Class: Google::Apis::CivicinfoV2::Office

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

Information about an Office held by one or more Officials.

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

Returns a new instance of Office.


742
743
744
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 742

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

Instance Attribute Details

#division_idString

The OCD ID of the division with which this office is associated. Corresponds to the JSON property divisionId

Returns:

  • (String)

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

def division_id
  @division_id
end

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

Returns:

  • (Array<String>)

715
716
717
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 715

def levels
  @levels
end

#nameString

The human-readable name of the office. Corresponds to the JSON property name

Returns:

  • (String)

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

def name
  @name
end

#official_indicesArray<Fixnum>

List of indices in the officials array of people who presently hold this office. Corresponds to the JSON property officialIndices

Returns:

  • (Array<Fixnum>)

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

def official_indices
  @official_indices
end

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

Returns:

  • (Array<String>)

734
735
736
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 734

def roles
  @roles
end

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


740
741
742
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 740

def sources
  @sources
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


747
748
749
750
751
752
753
754
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 747

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