Class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2GeographicDivision
- Inherits:
-
Object
- Object
- Google::Apis::CivicinfoV2::CivicinfoSchemaV2GeographicDivision
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/civicinfo_v2/classes.rb,
lib/google/apis/civicinfo_v2/representations.rb,
lib/google/apis/civicinfo_v2/representations.rb
Overview
Describes a political geography.
Instance Attribute Summary collapse
-
#also_known_as ⇒ Array<String>
Any other valid OCD IDs that refer to the same division.\n\nBecause OCD IDs are meant to be human-readable and at least somewhat predictable, there are occasionally several identifiers for a single division.
-
#name ⇒ String
The name of the division.
-
#office_indices ⇒ Array<Fixnum>
List of indices in the offices array, one for each office elected from this division.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CivicinfoSchemaV2GeographicDivision
constructor
A new instance of CivicinfoSchemaV2GeographicDivision.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CivicinfoSchemaV2GeographicDivision
Returns a new instance of CivicinfoSchemaV2GeographicDivision.
810 811 812 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 810 def initialize(**args) update!(**args) end |
Instance Attribute Details
#also_known_as ⇒ Array<String>
Any other valid OCD IDs that refer to the same division.\n\nBecause OCD IDs
are meant to be human-readable and at least somewhat predictable, there are
occasionally several identifiers for a single division. These identifiers are
defined to be equivalent to one another, and one is always indicated as the
primary identifier. The primary identifier will be returned in ocd_id above,
and any other equivalent valid identifiers will be returned in this list.\n\
nFor example, if this division's OCD ID is ocd-division/country:us/district:dc,
this will contain ocd-division/country:us/state:dc.
Corresponds to the JSON property alsoKnownAs
796 797 798 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 796 def also_known_as @also_known_as end |
#name ⇒ String
The name of the division.
Corresponds to the JSON property name
801 802 803 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 801 def name @name end |
#office_indices ⇒ Array<Fixnum>
List of indices in the offices array, one for each office elected from this
division. Will only be present if includeOffices was true (or absent) in the
request.
Corresponds to the JSON property officeIndices
808 809 810 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 808 def office_indices @office_indices end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
815 816 817 818 819 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 815 def update!(**args) @also_known_as = args[:also_known_as] if args.key?(:also_known_as) @name = args[:name] if args.key?(:name) @office_indices = args[:office_indices] if args.key?(:office_indices) end |