Class: Google::Apis::AdminDirectoryV1::BuildingAddress

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/admin_directory_v1/classes.rb,
generated/google/apis/admin_directory_v1/representations.rb,
generated/google/apis/admin_directory_v1/representations.rb

Overview

JSON template for the postal address of a building in Directory API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ BuildingAddress

Returns a new instance of BuildingAddress.



293
294
295
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 293

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#address_linesArray<String>

Unstructured address lines describing the lower levels of an address. Corresponds to the JSON property addressLines

Returns:

  • (Array<String>)


257
258
259
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 257

def address_lines
  @address_lines
end

#administrative_areaString

Optional. Highest administrative subdivision which is used for postal addresses of a country or region. Corresponds to the JSON property administrativeArea

Returns:

  • (String)


263
264
265
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 263

def administrative_area
  @administrative_area
end

#language_codeString

Optional. BCP-47 language code of the contents of this address (if known). Corresponds to the JSON property languageCode

Returns:

  • (String)


268
269
270
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 268

def language_code
  @language_code
end

#localityString

Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use addressLines. Corresponds to the JSON property locality

Returns:

  • (String)


276
277
278
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 276

def locality
  @locality
end

#postal_codeString

Optional. Postal code of the address. Corresponds to the JSON property postalCode

Returns:

  • (String)


281
282
283
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 281

def postal_code
  @postal_code
end

#region_codeString

Required. CLDR region code of the country/region of the address. Corresponds to the JSON property regionCode

Returns:

  • (String)


286
287
288
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 286

def region_code
  @region_code
end

#sublocalityString

Optional. Sublocality of the address. Corresponds to the JSON property sublocality

Returns:

  • (String)


291
292
293
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 291

def sublocality
  @sublocality
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



298
299
300
301
302
303
304
305
306
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 298

def update!(**args)
  @address_lines = args[:address_lines] if args.key?(:address_lines)
  @administrative_area = args[:administrative_area] if args.key?(:administrative_area)
  @language_code = args[:language_code] if args.key?(:language_code)
  @locality = args[:locality] if args.key?(:locality)
  @postal_code = args[:postal_code] if args.key?(:postal_code)
  @region_code = args[:region_code] if args.key?(:region_code)
  @sublocality = args[:sublocality] if args.key?(:sublocality)
end