Class: Google::Apis::CivicinfoV2::ElectoralDistrict

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 the geographic scope of a contest.

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

Returns a new instance of ElectoralDistrict



720
721
722
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 720

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

Instance Attribute Details

#idString

An identifier for this district, relative to its scope. For example, the 34th State Senate district would have id "34" and a scope of stateUpper. Corresponds to the JSON property id

Returns:

  • (String)


700
701
702
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 700

def id
  @id
end

#kg_foreign_keyString

Corresponds to the JSON property kgForeignKey

Returns:

  • (String)


705
706
707
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 705

def kg_foreign_key
  @kg_foreign_key
end

#nameString

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

Returns:

  • (String)


710
711
712
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 710

def name
  @name
end

#scopeString

The geographic scope of this district. If unspecified the district's geography is not known. One of: national, statewide, congressional, stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide, township, countyCouncil, cityCouncil, ward, special Corresponds to the JSON property scope

Returns:

  • (String)


718
719
720
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 718

def scope
  @scope
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



725
726
727
728
729
730
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 725

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @kg_foreign_key = args[:kg_foreign_key] if args.key?(:kg_foreign_key)
  @name = args[:name] if args.key?(:name)
  @scope = args[:scope] if args.key?(:scope)
end