# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::CognitiveServices::EntitySearch::V1_0
  module Models
    #
    # Defines a postal address.
    #
    class PostalAddress < StructuredValue

      include MsRestAzure


      def initialize
        @_type = "PostalAddress"
      end

      attr_accessor :_type

      # @return [String]
      attr_accessor :street_address

      # @return [String] The city where the street address is located. For
      # example, Seattle.
      attr_accessor :address_locality

      # @return [String]
      attr_accessor :address_subregion

      # @return [String] The state or province code where the street address is
      # located. This could be the two-letter code. For example, WA, or the
      # full name , Washington.
      attr_accessor :address_region

      # @return [String] The zip code or postal code where the street address
      # is located. For example, 98052.
      attr_accessor :postal_code

      # @return [String]
      attr_accessor :post_office_box_number

      # @return [String] The country/region where the street address is
      # located. This could be the two-letter ISO code. For example, US, or the
      # full name, United States.
      attr_accessor :address_country

      # @return [String] The two letter ISO code of this country. For example,
      # US.
      attr_accessor :country_iso

      # @return [String] The neighborhood where the street address is located.
      # For example, Westlake.
      attr_accessor :neighborhood

      # @return [String] Region Abbreviation. For example, WA.
      attr_accessor :address_region_abbreviation

      # @return [String] The complete address. For example, 2100 Westlake Ave
      # N, Bellevue, WA 98052.
      attr_accessor :text


      #
      # Mapper for PostalAddress class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'PostalAddress',
          type: {
            name: 'Composite',
            class_name: 'PostalAddress',
            model_properties: {
              _type: {
                client_side_validation: true,
                required: true,
                serialized_name: '_type',
                type: {
                  name: 'String'
                }
              },
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              contractual_rules: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'contractualRules',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ContractualRulesContractualRuleElementType',
                      type: {
                        name: 'Composite',
                        polymorphic_discriminator: '_type',
                        uber_parent: 'ContractualRulesContractualRule',
                        class_name: 'ContractualRulesContractualRule'
                      }
                  }
                }
              },
              web_search_url: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'webSearchUrl',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              url: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'url',
                type: {
                  name: 'String'
                }
              },
              image: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'image',
                type: {
                  name: 'Composite',
                  class_name: 'ImageObject'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'description',
                type: {
                  name: 'String'
                }
              },
              entity_presentation_info: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'entityPresentationInfo',
                type: {
                  name: 'Composite',
                  class_name: 'EntitiesEntityPresentationInfo'
                }
              },
              bing_id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'bingId',
                type: {
                  name: 'String'
                }
              },
              street_address: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'streetAddress',
                type: {
                  name: 'String'
                }
              },
              address_locality: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'addressLocality',
                type: {
                  name: 'String'
                }
              },
              address_subregion: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'addressSubregion',
                type: {
                  name: 'String'
                }
              },
              address_region: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'addressRegion',
                type: {
                  name: 'String'
                }
              },
              postal_code: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'postalCode',
                type: {
                  name: 'String'
                }
              },
              post_office_box_number: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'postOfficeBoxNumber',
                type: {
                  name: 'String'
                }
              },
              address_country: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'addressCountry',
                type: {
                  name: 'String'
                }
              },
              country_iso: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'countryIso',
                type: {
                  name: 'String'
                }
              },
              neighborhood: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'neighborhood',
                type: {
                  name: 'String'
                }
              },
              address_region_abbreviation: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'addressRegionAbbreviation',
                type: {
                  name: 'String'
                }
              },
              text: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'text',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
