Class: Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1AddressComponent

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

Overview

Represents an address component, such as a street, city, or state.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsAddressvalidationV1AddressComponent

Returns a new instance of GoogleMapsAddressvalidationV1AddressComponent.



209
210
211
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 209

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

Instance Attribute Details

#component_nameGoogle::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1ComponentName

A wrapper for the name of the component. Corresponds to the JSON property componentName



162
163
164
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 162

def component_name
  @component_name
end

#component_typeString

The type of the address component. See Table 2: Additional types returned by the Places service for a list of possible types. Corresponds to the JSON property componentType

Returns:

  • (String)


169
170
171
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 169

def component_type
  @component_type
end

#confirmation_levelString

Indicates the level of certainty that we have that the component is correct. Corresponds to the JSON property confirmationLevel

Returns:

  • (String)


174
175
176
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 174

def confirmation_level
  @confirmation_level
end

#inferredBoolean Also known as: inferred?

Indicates that the component was not part of the input, but we inferred it for the address location and believe it should be provided for a complete address. Corresponds to the JSON property inferred

Returns:

  • (Boolean)


180
181
182
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 180

def inferred
  @inferred
end

#replacedBoolean Also known as: replaced?

Indicates the name of the component was replaced with a completely different one, for example a wrong postal code being replaced with one that is correct for the address. This is not a cosmetic change, the input component has been changed to a different one. Corresponds to the JSON property replaced

Returns:

  • (Boolean)


189
190
191
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 189

def replaced
  @replaced
end

#spell_correctedBoolean Also known as: spell_corrected?

Indicates a correction to a misspelling in the component name. The API does not always flag changes from one spelling variant to another, such as when changing "centre" to "center". It also does not always flag common misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre Pkwy". Corresponds to the JSON property spellCorrected

Returns:

  • (Boolean)


198
199
200
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 198

def spell_corrected
  @spell_corrected
end

#unexpectedBoolean Also known as: unexpected?

Indicates an address component that is not expected to be present in a postal address for the given region. We have retained it only because it was part of the input. Corresponds to the JSON property unexpected

Returns:

  • (Boolean)


206
207
208
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 206

def unexpected
  @unexpected
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



214
215
216
217
218
219
220
221
222
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 214

def update!(**args)
  @component_name = args[:component_name] if args.key?(:component_name)
  @component_type = args[:component_type] if args.key?(:component_type)
  @confirmation_level = args[:confirmation_level] if args.key?(:confirmation_level)
  @inferred = args[:inferred] if args.key?(:inferred)
  @replaced = args[:replaced] if args.key?(:replaced)
  @spell_corrected = args[:spell_corrected] if args.key?(:spell_corrected)
  @unexpected = args[:unexpected] if args.key?(:unexpected)
end