Class: Google::Apis::CivicinfoV2::Source

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

Contains information about the data source for the element containing it.

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

Returns a new instance of Source.


1062
1063
1064
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1062

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

Instance Attribute Details

#nameString

The name of the data source. Corresponds to the JSON property name

Returns:

  • (String)

1054
1055
1056
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1054

def name
  @name
end

#officialBoolean Also known as: official?

Whether this data comes from an official government source. Corresponds to the JSON property official

Returns:

  • (Boolean)

1059
1060
1061
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1059

def official
  @official
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1067
1068
1069
1070
# File 'generated/google/apis/civicinfo_v2/classes.rb', line 1067

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