{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Text.HTML5.MetaData.Schema.PostalAddress where

--  Valid: 2016-03-21 (Schema.rdfs.org)

import Text.HTML5.MetaData.Class
import Text.HTML5.MetaData.Type
import Data.Text
import Data.Typeable
import {-# SOURCE #-} qualified Text.HTML5.MetaData.Schema.Thing
import {-# SOURCE #-} qualified Text.HTML5.MetaData.Schema.Intangible
import {-# SOURCE #-} qualified Text.HTML5.MetaData.Schema.StructuredValue
import {-# SOURCE #-} qualified Text.HTML5.MetaData.Schema.ContactPoint

-- | The mailing address.
--
--   [@id@] PostalAddress
--
--   [@label@] Postal Address
--
--   [@comment@] The mailing address.
--
--   [@ancestors@] @'Thing','Intangible','StructuredValue','ContactPoint'@
--
--   [@subtypes@]
--
--   [@supertypes@] @'ContactPoint'@
--
--   [@url@] <http://schema.org/PostalAddress>
data PostalAddress = PostalAddress { addressCountry :: AddressCountry
                                   , addressLocality :: AddressLocality
                                   , addressRegion :: AddressRegion
                                   , postOfficeBoxNumber :: PostOfficeBoxNumber
                                   , postalCode :: PostalCode
                                   , streetAddress :: StreetAddress
                                   , areaServed :: AreaServed
                                   , availableLanguage :: AvailableLanguage
                                   , contactOption :: ContactOption
                                   , contactType :: ContactType
                                   , email :: Email
                                   , faxNumber :: FaxNumber
                                   , hoursAvailable :: HoursAvailable
                                   , productSupported :: ProductSupported
                                   , telephone :: Telephone
                                   , additionalType :: AdditionalType
                                   , alternateName :: AlternateName
                                   , description :: Description
                                   , image :: Image
                                   , mainEntityOfPage :: MainEntityOfPage
                                   , name :: Name
                                   , potentialAction :: PotentialAction
                                   , sameAs :: SameAs
                                   , url :: Url
                                   }
                     deriving (Show, Read, Eq, Typeable)

instance MetaData PostalAddress where
  _label         = const "Postal Address"
  _comment_plain = const "The mailing address."
  _comment       = const "The mailing address."
  _url           = const "http://schema.org/PostalAddress"
  _ancestors     = const [typeOf (undefined :: Text.HTML5.MetaData.Schema.Thing.Thing)
                         ,typeOf (undefined :: Text.HTML5.MetaData.Schema.Intangible.Intangible)
                         ,typeOf (undefined :: Text.HTML5.MetaData.Schema.StructuredValue.StructuredValue)
                         ,typeOf (undefined :: Text.HTML5.MetaData.Schema.ContactPoint.ContactPoint)]
  _subtypes      = const []
  _supertypes    = const [typeOf (undefined :: Text.HTML5.MetaData.Schema.ContactPoint.ContactPoint)]