Class: Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1AddressComponent
- Inherits:
-
Object
- Object
- Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1AddressComponent
- 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
-
#component_name ⇒ Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1ComponentName
A wrapper for the name of the component.
-
#component_type ⇒ String
The type of the address component.
-
#confirmation_level ⇒ String
Indicates the level of certainty that we have that the component is correct.
-
#inferred ⇒ Boolean
(also: #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.
-
#replaced ⇒ Boolean
(also: #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.
-
#spell_corrected ⇒ Boolean
(also: #spell_corrected?)
Indicates a correction to a misspelling in the component name.
-
#unexpected ⇒ Boolean
(also: #unexpected?)
Indicates an address component that is not expected to be present in a postal address for the given region.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsAddressvalidationV1AddressComponent
constructor
A new instance of GoogleMapsAddressvalidationV1AddressComponent.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsAddressvalidationV1AddressComponent
Returns a new instance of GoogleMapsAddressvalidationV1AddressComponent.
215 216 217 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 215 def initialize(**args) update!(**args) end |
Instance Attribute Details
#component_name ⇒ Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1ComponentName
A wrapper for the name of the component.
Corresponds to the JSON property componentName
168 169 170 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 168 def component_name @component_name end |
#component_type ⇒ String
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
175 176 177 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 175 def component_type @component_type end |
#confirmation_level ⇒ String
Indicates the level of certainty that we have that the component is correct.
Corresponds to the JSON property confirmationLevel
180 181 182 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 180 def confirmation_level @confirmation_level end |
#inferred ⇒ Boolean 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
186 187 188 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 186 def inferred @inferred end |
#replaced ⇒ Boolean 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
195 196 197 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 195 def replaced @replaced end |
#spell_corrected ⇒ Boolean 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
204 205 206 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 204 def spell_corrected @spell_corrected end |
#unexpected ⇒ Boolean 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
212 213 214 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 212 def unexpected @unexpected end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
220 221 222 223 224 225 226 227 228 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 220 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 |