Class: Google::Apis::CivicinfoV2::Office
- Inherits:
-
Object
- Object
- Google::Apis::CivicinfoV2::Office
- Defined in:
- generated/google/apis/civicinfo_v2/classes.rb,
generated/google/apis/civicinfo_v2/representations.rb,
generated/google/apis/civicinfo_v2/representations.rb
Overview
Information about an Office held by one or more Officials.
Instance Attribute Summary collapse
-
#division_id ⇒ String
The OCD ID of the division with which this office is associated.
-
#levels ⇒ Array<String>
The levels of government of which this office is part.
-
#name ⇒ String
The human-readable name of the office.
-
#official_indices ⇒ Array<Fixnum>
List of indices in the officials array of people who presently hold this office.
-
#roles ⇒ Array<String>
The roles which this office fulfills.
-
#sources ⇒ Array<Google::Apis::CivicinfoV2::Source>
A list of sources for this office.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Office
constructor
A new instance of Office.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ Office
Returns a new instance of Office
1043 1044 1045 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1043 def initialize(**args) update!(**args) end |
Instance Attribute Details
#division_id ⇒ String
The OCD ID of the division with which this office is associated.
Corresponds to the JSON property divisionId
1007 1008 1009 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1007 def division_id @division_id end |
#levels ⇒ Array<String>
The levels of government of which this office is part. There may be more than
one in cases where a jurisdiction effectively acts at two different levels of
government; for example, the mayor of the District of Columbia acts at "
locality" level, but also effectively at both "administrative-area-2" and "
administrative-area-1".
Corresponds to the JSON property levels
1016 1017 1018 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1016 def levels @levels end |
#name ⇒ String
The human-readable name of the office.
Corresponds to the JSON property name
1021 1022 1023 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1021 def name @name end |
#official_indices ⇒ Array<Fixnum>
List of indices in the officials array of people who presently hold this
office.
Corresponds to the JSON property officialIndices
1027 1028 1029 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1027 def official_indices @official_indices end |
#roles ⇒ Array<String>
The roles which this office fulfills. Roles are not meant to be exhaustive, or
to exactly specify the entire set of responsibilities of a given office, but
are meant to be rough categories that are useful for general selection from or
sorting of a list of offices.
Corresponds to the JSON property roles
1035 1036 1037 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1035 def roles @roles end |
#sources ⇒ Array<Google::Apis::CivicinfoV2::Source>
A list of sources for this office. If multiple sources are listed, the data
has been aggregated from those sources.
Corresponds to the JSON property sources
1041 1042 1043 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1041 def sources @sources end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1048 1049 1050 1051 1052 1053 1054 1055 |
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1048 def update!(**args) @division_id = args[:division_id] if args.key?(:division_id) @levels = args[:levels] if args.key?(:levels) @name = args[:name] if args.key?(:name) @official_indices = args[:official_indices] if args.key?(:official_indices) @roles = args[:roles] if args.key?(:roles) @sources = args[:sources] if args.key?(:sources) end |