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.
209 210 211 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 209 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
162 163 164 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 162 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
169 170 171 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 169 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
174 175 176 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 174 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
180 181 182 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 180 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
189 190 191 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 189 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
198 199 200 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 198 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
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 |