Class: Google::Apis::CivicinfoV2::DivisionSearchResult

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

Overview

Represents a political geographic division that matches the requested query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ DivisionSearchResult

Returns a new instance of DivisionSearchResult.



552
553
554
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 552

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

Instance Attribute Details

#aliasesArray<String>

Other Open Civic Data identifiers that refer to the same division -- for example, those that refer to other political divisions whose boundaries are defined to be coterminous with this one. For example, ocd-division/country:us/ state:wy will include an alias of ocd-division/country:us/state:wy/cd:1, since Wyoming has only one Congressional district. Corresponds to the JSON property aliases

Returns:

  • (Array<String>)


540
541
542
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 540

def aliases
  @aliases
end

#nameString

The name of the division. Corresponds to the JSON property name

Returns:

  • (String)


545
546
547
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 545

def name
  @name
end

#ocd_idString

The unique Open Civic Data identifier for this division. Corresponds to the JSON property ocdId

Returns:

  • (String)


550
551
552
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 550

def ocd_id
  @ocd_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



557
558
559
560
561
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 557

def update!(**args)
  @aliases = args[:aliases] if args.key?(:aliases)
  @name = args[:name] if args.key?(:name)
  @ocd_id = args[:ocd_id] if args.key?(:ocd_id)
end