class Google::Apis::CivicinfoV2::GeographicDivision

Describes a political geography.

Attributes

also_known_as[RW]

Any other valid OCD IDs that refer to the same division. Because 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. For 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` @return [Array<String>]

name[RW]

The name of the division. Corresponds to the JSON property `name` @return [String]

office_indices[RW]

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` @return [Array<Fixnum>]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/civicinfo_v2/classes.rb, line 672
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/civicinfo_v2/classes.rb, line 677
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