Class: Google::Apis::AdminDirectoryV1::UserAddress

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 address.

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) ⇒ UserAddress

Returns a new instance of UserAddress



3021
3022
3023
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3021

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

Instance Attribute Details

#countryString

Country. Corresponds to the JSON property country

Returns:

  • (String)


2952
2953
2954
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2952

def country
  @country
end

#country_codeString

Country code. Corresponds to the JSON property countryCode

Returns:

  • (String)


2957
2958
2959
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2957

def country_code
  @country_code
end

#custom_typeString

Custom type. Corresponds to the JSON property customType

Returns:

  • (String)


2962
2963
2964
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2962

def custom_type
  @custom_type
end

#extended_addressString

Extended Address. Corresponds to the JSON property extendedAddress

Returns:

  • (String)


2967
2968
2969
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2967

def extended_address
  @extended_address
end

#formattedString

Formatted address. Corresponds to the JSON property formatted

Returns:

  • (String)


2972
2973
2974
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2972

def formatted
  @formatted
end

#localityString

Locality. Corresponds to the JSON property locality

Returns:

  • (String)


2977
2978
2979
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2977

def locality
  @locality
end

#po_boxString

Other parts of address. Corresponds to the JSON property poBox

Returns:

  • (String)


2982
2983
2984
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2982

def po_box
  @po_box
end

#postal_codeString

Postal code. Corresponds to the JSON property postalCode

Returns:

  • (String)


2987
2988
2989
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2987

def postal_code
  @postal_code
end

#primaryBoolean Also known as: primary?

If this is user's primary address. Only one entry could be marked as primary. Corresponds to the JSON property primary

Returns:

  • (Boolean)


2992
2993
2994
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2992

def primary
  @primary
end

#regionString

Region. Corresponds to the JSON property region

Returns:

  • (String)


2998
2999
3000
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 2998

def region
  @region
end

#source_is_structuredBoolean Also known as: source_is_structured?

User supplied address was structured. Structured addresses are NOT supported at this time. You might be able to write structured addresses, but any values will eventually be clobbered. Corresponds to the JSON property sourceIsStructured

Returns:

  • (Boolean)


3005
3006
3007
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3005

def source_is_structured
  @source_is_structured
end

#street_addressString

Street. Corresponds to the JSON property streetAddress

Returns:

  • (String)


3011
3012
3013
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3011

def street_address
  @street_address
end

#typeString

Each entry can have a type which indicates standard values of that entry. For example address could be of home, work etc. In addition to the standard type, an entry can have a custom type and can take any value. Such type should have the CUSTOM value as type and also have a customType value. Corresponds to the JSON property type

Returns:

  • (String)


3019
3020
3021
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3019

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3026

def update!(**args)
  @country = args[:country] if args.key?(:country)
  @country_code = args[:country_code] if args.key?(:country_code)
  @custom_type = args[:custom_type] if args.key?(:custom_type)
  @extended_address = args[:extended_address] if args.key?(:extended_address)
  @formatted = args[:formatted] if args.key?(:formatted)
  @locality = args[:locality] if args.key?(:locality)
  @po_box = args[:po_box] if args.key?(:po_box)
  @postal_code = args[:postal_code] if args.key?(:postal_code)
  @primary = args[:primary] if args.key?(:primary)
  @region = args[:region] if args.key?(:region)
  @source_is_structured = args[:source_is_structured] if args.key?(:source_is_structured)
  @street_address = args[:street_address] if args.key?(:street_address)
  @type = args[:type] if args.key?(:type)
end