Class: Google::Apis::AdsenseV2::Site

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/adsense_v2/classes.rb,
lib/google/apis/adsense_v2/representations.rb,
lib/google/apis/adsense_v2/representations.rb

Overview

Representation of a Site.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Site

Returns a new instance of Site.



944
945
946
# File 'lib/google/apis/adsense_v2/classes.rb', line 944

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

Instance Attribute Details

#auto_ads_enabledBoolean Also known as: auto_ads_enabled?

Whether auto ads is turned on for the site. Corresponds to the JSON property autoAdsEnabled

Returns:

  • (Boolean)


919
920
921
# File 'lib/google/apis/adsense_v2/classes.rb', line 919

def auto_ads_enabled
  @auto_ads_enabled
end

#domainString

Domain (or subdomain) of the site, e.g. "example.com" or "www.example.com". This is used in the OWNED_SITE_DOMAIN_NAME reporting dimension. Corresponds to the JSON property domain

Returns:

  • (String)


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

def domain
  @domain
end

#nameString

Resource name of a site. Format: accounts/account/sites/site Corresponds to the JSON property name

Returns:

  • (String)


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

def name
  @name
end

#reporting_dimension_idString

Output only. Unique ID of the site as used in the OWNED_SITE_ID reporting dimension. Corresponds to the JSON property reportingDimensionId

Returns:

  • (String)


937
938
939
# File 'lib/google/apis/adsense_v2/classes.rb', line 937

def reporting_dimension_id
  @reporting_dimension_id
end

#stateString

Output only. State of a site. Corresponds to the JSON property state

Returns:

  • (String)


942
943
944
# File 'lib/google/apis/adsense_v2/classes.rb', line 942

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



949
950
951
952
953
954
955
# File 'lib/google/apis/adsense_v2/classes.rb', line 949

def update!(**args)
  @auto_ads_enabled = args[:auto_ads_enabled] if args.key?(:auto_ads_enabled)
  @domain = args[:domain] if args.key?(:domain)
  @name = args[:name] if args.key?(:name)
  @reporting_dimension_id = args[:reporting_dimension_id] if args.key?(:reporting_dimension_id)
  @state = args[:state] if args.key?(:state)
end