Class: Google::Apis::AdsenseV2::PolicyIssue

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 policy issue for a single entity (site, site-section, or page). All issues for a single entity are represented by a single PolicyIssue resource, though that PolicyIssue can have multiple causes (or "topics") that can change over time. Policy issues are removed if there are no issues detected recently or if there's a recent successful appeal for the entity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PolicyIssue

Returns a new instance of PolicyIssue.



997
998
999
# File 'lib/google/apis/adsense_v2/classes.rb', line 997

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

Instance Attribute Details

#actionString

Required. The most severe action taken on the entity over the past seven days. Corresponds to the JSON property action

Returns:

  • (String)


907
908
909
# File 'lib/google/apis/adsense_v2/classes.rb', line 907

def action
  @action
end

#ad_clientsArray<String>

Optional. List of ad clients associated with the policy issue (either as the primary ad client or an associated host/secondary ad client). In the latter case, this will be an ad client that is not owned by the current account. Corresponds to the JSON property adClients

Returns:

  • (Array<String>)


914
915
916
# File 'lib/google/apis/adsense_v2/classes.rb', line 914

def ad_clients
  @ad_clients
end

#ad_request_countFixnum

Required. Total number of ad requests affected by the policy violations over the past seven days. Corresponds to the JSON property adRequestCount

Returns:

  • (Fixnum)


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

def ad_request_count
  @ad_request_count
end

#entity_typeString

Required. Type of the entity indicating if the entity is a site, site-section, or page. Corresponds to the JSON property entityType

Returns:

  • (String)


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

def entity_type
  @entity_type
end

#first_detected_dateGoogle::Apis::AdsenseV2::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property firstDetectedDate



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

def first_detected_date
  @first_detected_date
end

#last_detected_dateGoogle::Apis::AdsenseV2::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property lastDetectedDate



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

def last_detected_date
  @last_detected_date
end

#nameString

Required. Resource name of the entity with policy issues. Format: accounts/ account/policyIssues/policy_issue Corresponds to the JSON property name

Returns:

  • (String)


956
957
958
# File 'lib/google/apis/adsense_v2/classes.rb', line 956

def name
  @name
end

#policy_topicsArray<Google::Apis::AdsenseV2::PolicyTopic>

Required. Unordered list. The policy topics that this entity was found to violate over the past seven days. Corresponds to the JSON property policyTopics



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

def policy_topics
  @policy_topics
end

#siteString

Required. Hostname/domain of the entity (for example "foo.com" or "www.foo.com" ). This should be a bare domain/host name without any protocol. This will be present for all policy issues. Corresponds to the JSON property site

Returns:

  • (String)


969
970
971
# File 'lib/google/apis/adsense_v2/classes.rb', line 969

def site
  @site
end

#site_sectionString

Optional. Prefix of the site-section having policy issues (For example "foo. com/bar-section"). This will be present if the entity_type is SITE_SECTION and will be absent for other entity types. Corresponds to the JSON property siteSection

Returns:

  • (String)


976
977
978
# File 'lib/google/apis/adsense_v2/classes.rb', line 976

def site_section
  @site_section
end

#uriString

Optional. URI of the page having policy violations (for example "foo.com/bar" or "www.foo.com/bar"). This will be present if the entity_type is PAGE and will be absent for other entity types. Corresponds to the JSON property uri

Returns:

  • (String)


983
984
985
# File 'lib/google/apis/adsense_v2/classes.rb', line 983

def uri
  @uri
end

#warning_escalation_dateGoogle::Apis::AdsenseV2::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property warningEscalationDate



995
996
997
# File 'lib/google/apis/adsense_v2/classes.rb', line 995

def warning_escalation_date
  @warning_escalation_date
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
# File 'lib/google/apis/adsense_v2/classes.rb', line 1002

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @ad_clients = args[:ad_clients] if args.key?(:ad_clients)
  @ad_request_count = args[:ad_request_count] if args.key?(:ad_request_count)
  @entity_type = args[:entity_type] if args.key?(:entity_type)
  @first_detected_date = args[:first_detected_date] if args.key?(:first_detected_date)
  @last_detected_date = args[:last_detected_date] if args.key?(:last_detected_date)
  @name = args[:name] if args.key?(:name)
  @policy_topics = args[:policy_topics] if args.key?(:policy_topics)
  @site = args[:site] if args.key?(:site)
  @site_section = args[:site_section] if args.key?(:site_section)
  @uri = args[:uri] if args.key?(:uri)
  @warning_escalation_date = args[:warning_escalation_date] if args.key?(:warning_escalation_date)
end