Class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Precinct

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CivicinfoSchemaV2Precinct

Returns a new instance of CivicinfoSchemaV2Precinct.



982
983
984
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 982

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

Instance Attribute Details

#administration_region_idString

ID of the AdministrationRegion message for this precinct. Corresponds to LocalityId xml tag. Corresponds to the JSON property administrationRegionId

Returns:

  • (String)


911
912
913
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 911

def administration_region_id
  @administration_region_id
end

#contest_idArray<String>

ID(s) of the Contest message(s) for this precinct. Corresponds to the JSON property contestId

Returns:

  • (Array<String>)


916
917
918
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 916

def contest_id
  @contest_id
end

#dataset_idFixnum

Required. Dataset ID. What datasets our Precincts come from. Corresponds to the JSON property datasetId

Returns:

  • (Fixnum)


921
922
923
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 921

def dataset_id
  @dataset_id
end

#early_vote_site_idArray<String>

ID(s) of the PollingLocation message(s) for this precinct. Corresponds to the JSON property earlyVoteSiteId

Returns:

  • (Array<String>)


926
927
928
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 926

def early_vote_site_id
  @early_vote_site_id
end

#electoral_district_idArray<String>

ID(s) of the ElectoralDistrict message(s) for this precinct. Corresponds to the JSON property electoralDistrictId

Returns:

  • (Array<String>)


931
932
933
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 931

def electoral_district_id
  @electoral_district_id
end

#idString

Required. A unique identifier for this precinct. Corresponds to the JSON property id

Returns:

  • (String)


936
937
938
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 936

def id
  @id
end

#mail_onlyBoolean Also known as: mail_only?

Specifies if the precinct runs mail-only elections. Corresponds to the JSON property mailOnly

Returns:

  • (Boolean)


941
942
943
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 941

def mail_only
  @mail_only
end

#nameString

Required. The name of the precinct. Corresponds to the JSON property name

Returns:

  • (String)


947
948
949
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 947

def name
  @name
end

#numberString

The number of the precinct. Corresponds to the JSON property number

Returns:

  • (String)


952
953
954
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 952

def number
  @number
end

#ocd_idArray<String>

Encouraged. The OCD ID of the precinct Corresponds to the JSON property ocdId

Returns:

  • (Array<String>)


957
958
959
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 957

def ocd_id
  @ocd_id
end

#polling_location_idArray<String>

ID(s) of the PollingLocation message(s) for this precinct. Corresponds to the JSON property pollingLocationId

Returns:

  • (Array<String>)


962
963
964
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 962

def polling_location_id
  @polling_location_id
end

#spatial_boundary_idArray<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

Returns:

  • (Array<String>)


968
969
970
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 968

def spatial_boundary_id
  @spatial_boundary_id
end

#split_nameString

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

Returns:

  • (String)


975
976
977
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 975

def split_name
  @split_name
end

#wardString

Specifies the ward the precinct is contained within. Corresponds to the JSON property ward

Returns:

  • (String)


980
981
982
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 980

def ward
  @ward
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 987

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