Class: Google::Apis::CivicinfoV2::Precinct
- Inherits:
-
Object
- Object
- Google::Apis::CivicinfoV2::Precinct
- 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
Instance Attribute Summary collapse
-
#administration_region_id ⇒ String
ID of the AdministrationRegion message for this precinct.
-
#contest_id ⇒ Array<String>
ID(s) of the Contest message(s) for this precinct.
-
#dataset_id ⇒ Fixnum
Required.
-
#early_vote_site_id ⇒ Array<String>
ID(s) of the PollingLocation message(s) for this precinct.
-
#electoral_district_id ⇒ Array<String>
ID(s) of the ElectoralDistrict message(s) for this precinct.
-
#id ⇒ String
Required.
-
#mail_only ⇒ Boolean
(also: #mail_only?)
Specifies if the precinct runs mail-only elections.
-
#name ⇒ String
Required.
-
#number ⇒ String
The number of the precinct.
-
#ocd_id ⇒ Array<String>
Encouraged.
-
#polling_location_id ⇒ Array<String>
ID(s) of the PollingLocation message(s) for this precinct.
-
#spatial_boundary_id ⇒ Array<String>
ID(s) of the SpatialBoundary message(s) for this precinct.
-
#split_name ⇒ String
If present, this proto corresponds to one portion of split precinct.
-
#ward ⇒ String
Specifies the ward the precinct is contained within.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Precinct
constructor
A new instance of Precinct.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Precinct
Returns a new instance of Precinct.
1123 1124 1125 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1123 def initialize(**args) update!(**args) end |
Instance Attribute Details
#administration_region_id ⇒ String
ID of the AdministrationRegion message for this precinct. Corresponds to
LocalityId xml tag.
Corresponds to the JSON property administrationRegionId
1052 1053 1054 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1052 def administration_region_id @administration_region_id end |
#contest_id ⇒ Array<String>
ID(s) of the Contest message(s) for this precinct.
Corresponds to the JSON property contestId
1057 1058 1059 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1057 def contest_id @contest_id end |
#dataset_id ⇒ Fixnum
Required. Dataset ID. What datasets our Precincts come from.
Corresponds to the JSON property datasetId
1062 1063 1064 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1062 def dataset_id @dataset_id end |
#early_vote_site_id ⇒ Array<String>
ID(s) of the PollingLocation message(s) for this precinct.
Corresponds to the JSON property earlyVoteSiteId
1067 1068 1069 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1067 def early_vote_site_id @early_vote_site_id end |
#electoral_district_id ⇒ Array<String>
ID(s) of the ElectoralDistrict message(s) for this precinct.
Corresponds to the JSON property electoralDistrictId
1072 1073 1074 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1072 def electoral_district_id @electoral_district_id end |
#id ⇒ String
Required. A unique identifier for this precinct.
Corresponds to the JSON property id
1077 1078 1079 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1077 def id @id end |
#mail_only ⇒ Boolean Also known as: mail_only?
Specifies if the precinct runs mail-only elections.
Corresponds to the JSON property mailOnly
1082 1083 1084 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1082 def mail_only @mail_only end |
#name ⇒ String
Required. The name of the precinct.
Corresponds to the JSON property name
1088 1089 1090 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1088 def name @name end |
#number ⇒ String
The number of the precinct.
Corresponds to the JSON property number
1093 1094 1095 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1093 def number @number end |
#ocd_id ⇒ Array<String>
Encouraged. The OCD ID of the precinct
Corresponds to the JSON property ocdId
1098 1099 1100 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1098 def ocd_id @ocd_id end |
#polling_location_id ⇒ Array<String>
ID(s) of the PollingLocation message(s) for this precinct.
Corresponds to the JSON property pollingLocationId
1103 1104 1105 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1103 def polling_location_id @polling_location_id end |
#spatial_boundary_id ⇒ Array<String>
ID(s) of the SpatialBoundary message(s) for this precinct. Used to specify a
geometrical boundary of the precinct.
Corresponds to the JSON property spatialBoundaryId
1109 1110 1111 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1109 def spatial_boundary_id @spatial_boundary_id end |
#split_name ⇒ String
If present, this proto corresponds to one portion of split precinct. Other
portions of this precinct are guaranteed to have the same name. If not
present, this proto represents a full precicnt.
Corresponds to the JSON property splitName
1116 1117 1118 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1116 def split_name @split_name end |
#ward ⇒ String
Specifies the ward the precinct is contained within.
Corresponds to the JSON property ward
1121 1122 1123 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1121 def ward @ward end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 1128 def update!(**args) @administration_region_id = args[:administration_region_id] if args.key?(:administration_region_id) @contest_id = args[:contest_id] if args.key?(:contest_id) @dataset_id = args[:dataset_id] if args.key?(:dataset_id) @early_vote_site_id = args[:early_vote_site_id] if args.key?(:early_vote_site_id) @electoral_district_id = args[:electoral_district_id] if args.key?(:electoral_district_id) @id = args[:id] if args.key?(:id) @mail_only = args[:mail_only] if args.key?(:mail_only) @name = args[:name] if args.key?(:name) @number = args[:number] if args.key?(:number) @ocd_id = args[:ocd_id] if args.key?(:ocd_id) @polling_location_id = args[:polling_location_id] if args.key?(:polling_location_id) @spatial_boundary_id = args[:spatial_boundary_id] if args.key?(:spatial_boundary_id) @split_name = args[:split_name] if args.key?(:split_name) @ward = args[:ward] if args.key?(:ward) end |