Class: Google::Apis::CivicinfoV2::AdministrationRegion

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

Describes information about a regional election administrative area.

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) ⇒ AdministrationRegion

Returns a new instance of AdministrationRegion.



58
59
60
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 58

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

Instance Attribute Details

#election_administration_bodyGoogle::Apis::CivicinfoV2::AdministrativeBody

Information about an election administrative body (e.g. County Board of Elections). Corresponds to the JSON property electionAdministrationBody



33
34
35
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 33

def election_administration_body
  @election_administration_body
end

#idString

An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested from the Request more link on the Quotas page. Corresponds to the JSON property id

Returns:

  • (String)


40
41
42
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 40

def id
  @id
end

#local_jurisdictionGoogle::Apis::CivicinfoV2::AdministrationRegion

Describes information about a regional election administrative area. Corresponds to the JSON property local_jurisdiction



45
46
47
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 45

def local_jurisdiction
  @local_jurisdiction
end

#nameString

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

Returns:

  • (String)


50
51
52
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 50

def name
  @name
end

#sourcesArray<Google::Apis::CivicinfoV2::Source>

A list of sources for this area. If multiple sources are listed the data has been aggregated from those sources. Corresponds to the JSON property sources



56
57
58
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 56

def sources
  @sources
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



63
64
65
66
67
68
69
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 63

def update!(**args)
  @election_administration_body = args[:election_administration_body] if args.key?(:election_administration_body)
  @id = args[:id] if args.key?(:id)
  @local_jurisdiction = args[:local_jurisdiction] if args.key?(:local_jurisdiction)
  @name = args[:name] if args.key?(:name)
  @sources = args[:sources] if args.key?(:sources)
end