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.



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

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)


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

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


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

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)


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

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)


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

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



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

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



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

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)


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

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



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

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)


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

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)


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

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)


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

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



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

def warning_escalation_date
  @warning_escalation_date
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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