google-apis-adsense_v2 0.32.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4182e0ca21af735c58af43a96098396be4402e9f22863ef6a0bfaae0b053026
4
- data.tar.gz: ce3ea27cb6fc4faeb04008a1e2a4a535f57ba4c02774a0ead0349dbd56260bef
3
+ metadata.gz: 10f293a3b157c6526a78a9fbdedfacf9a98d78dd35fa2abeb4d801978bae6bee
4
+ data.tar.gz: 3ac7a5b5f4251e6724033da1c29ea592de78add0703736a230adb1da734e8cad
5
5
  SHA512:
6
- metadata.gz: 499c730a0939f04c411632e06548eb59456a6b689256aa231ffdb22667f4bfb8e32358f0ce3a72cd615c0d2c5a9ed0bd883220a824c79a0d9392bca11158f90f
7
- data.tar.gz: 5486f0176cd1ea64a412cf6d34432a89fe95bada1c0d87d8637f49c29f4dd8c550b5968788b1069bcbcb6cecc65b63911a202be1864ea8b40332c5475d43168e
6
+ metadata.gz: 519392e4db39ece8ec74f9a1a0806cea05f7e13f820f67c8430da98d5a3b2cece5c34b612520bbb972ea496400316fce3bc902a0d8c7a0c259250ac5e8cba50b
7
+ data.tar.gz: bf8b982f52b901be20b686b47245b6e31a150b7f3378c0f53069f2365ed8ef11cbf3f1f363d41e3babc71f32d7baf77311af4a44da2ddc1e5e7b41f8b72abc08
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release history for google-apis-adsense_v2
2
2
 
3
+ ### v0.34.0 (2024-05-19)
4
+
5
+ * Regenerated from discovery document revision 20240515
6
+ * Regenerated using generator version 0.15.0
7
+
8
+ ### v0.33.0 (2024-03-31)
9
+
10
+ * Regenerated from discovery document revision 20240324
11
+
3
12
  ### v0.32.0 (2024-03-24)
4
13
 
5
14
  * Regenerated from discovery document revision 20240320
@@ -739,6 +739,35 @@ module Google
739
739
  end
740
740
  end
741
741
 
742
+ # Response definition for the policy issues list rpc. Policy issues are reported
743
+ # only if the publisher has at least one AFC ad client in READY or GETTING_READY
744
+ # state. If the publisher has no such AFC ad client, the response will be an
745
+ # empty list.
746
+ class ListPolicyIssuesResponse
747
+ include Google::Apis::Core::Hashable
748
+
749
+ # Continuation token used to page through policy issues. To retrieve the next
750
+ # page of the results, set the next request's "page_token" value to this.
751
+ # Corresponds to the JSON property `nextPageToken`
752
+ # @return [String]
753
+ attr_accessor :next_page_token
754
+
755
+ # The policy issues returned in the list response.
756
+ # Corresponds to the JSON property `policyIssues`
757
+ # @return [Array<Google::Apis::AdsenseV2::PolicyIssue>]
758
+ attr_accessor :policy_issues
759
+
760
+ def initialize(**args)
761
+ update!(**args)
762
+ end
763
+
764
+ # Update properties of this object
765
+ def update!(**args)
766
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
767
+ @policy_issues = args[:policy_issues] if args.key?(:policy_issues)
768
+ end
769
+ end
770
+
742
771
  # Response definition for the saved reports list rpc.
743
772
  class ListSavedReportsResponse
744
773
  include Google::Apis::Core::Hashable
@@ -864,6 +893,162 @@ module Google
864
893
  end
865
894
  end
866
895
 
896
+ # Representation of a policy issue for a single entity (site, site-section, or
897
+ # page). All issues for a single entity are represented by a single PolicyIssue
898
+ # resource, though that PolicyIssue can have multiple causes (or "topics") that
899
+ # can change over time. Policy issues are removed if there are no issues
900
+ # detected recently or if there's a recent successful appeal for the entity.
901
+ class PolicyIssue
902
+ include Google::Apis::Core::Hashable
903
+
904
+ # Required. The most severe action taken on the entity over the past seven days.
905
+ # Corresponds to the JSON property `action`
906
+ # @return [String]
907
+ attr_accessor :action
908
+
909
+ # Optional. List of ad clients associated with the policy issue (either as the
910
+ # primary ad client or an associated host/secondary ad client). In the latter
911
+ # case, this will be an ad client that is not owned by the current account.
912
+ # Corresponds to the JSON property `adClients`
913
+ # @return [Array<String>]
914
+ attr_accessor :ad_clients
915
+
916
+ # Required. Total number of ad requests affected by the policy violations over
917
+ # the past seven days.
918
+ # Corresponds to the JSON property `adRequestCount`
919
+ # @return [Fixnum]
920
+ attr_accessor :ad_request_count
921
+
922
+ # Required. Type of the entity indicating if the entity is a site, site-section,
923
+ # or page.
924
+ # Corresponds to the JSON property `entityType`
925
+ # @return [String]
926
+ attr_accessor :entity_type
927
+
928
+ # Represents a whole or partial calendar date, such as a birthday. The time of
929
+ # day and time zone are either specified elsewhere or are insignificant. The
930
+ # date is relative to the Gregorian Calendar. This can represent one of the
931
+ # following: * A full date, with non-zero year, month, and day values. * A month
932
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
933
+ # with a zero month and a zero day. * A year and month, with a zero day (for
934
+ # example, a credit card expiration date). Related types: * google.type.
935
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
936
+ # Corresponds to the JSON property `firstDetectedDate`
937
+ # @return [Google::Apis::AdsenseV2::Date]
938
+ attr_accessor :first_detected_date
939
+
940
+ # Represents a whole or partial calendar date, such as a birthday. The time of
941
+ # day and time zone are either specified elsewhere or are insignificant. The
942
+ # date is relative to the Gregorian Calendar. This can represent one of the
943
+ # following: * A full date, with non-zero year, month, and day values. * A month
944
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
945
+ # with a zero month and a zero day. * A year and month, with a zero day (for
946
+ # example, a credit card expiration date). Related types: * google.type.
947
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
948
+ # Corresponds to the JSON property `lastDetectedDate`
949
+ # @return [Google::Apis::AdsenseV2::Date]
950
+ attr_accessor :last_detected_date
951
+
952
+ # Required. Resource name of the entity with policy issues. Format: accounts/`
953
+ # account`/policyIssues/`policy_issue`
954
+ # Corresponds to the JSON property `name`
955
+ # @return [String]
956
+ attr_accessor :name
957
+
958
+ # Required. Unordered list. The policy topics that this entity was found to
959
+ # violate over the past seven days.
960
+ # Corresponds to the JSON property `policyTopics`
961
+ # @return [Array<Google::Apis::AdsenseV2::PolicyTopic>]
962
+ attr_accessor :policy_topics
963
+
964
+ # Required. Hostname/domain of the entity (for example "foo.com" or "www.foo.com"
965
+ # ). This _should_ be a bare domain/host name without any protocol. This will be
966
+ # present for all policy issues.
967
+ # Corresponds to the JSON property `site`
968
+ # @return [String]
969
+ attr_accessor :site
970
+
971
+ # Optional. Prefix of the site-section having policy issues (For example "foo.
972
+ # com/bar-section"). This will be present if the `entity_type` is `SITE_SECTION`
973
+ # and will be absent for other entity types.
974
+ # Corresponds to the JSON property `siteSection`
975
+ # @return [String]
976
+ attr_accessor :site_section
977
+
978
+ # Optional. URI of the page having policy violations (for example "foo.com/bar"
979
+ # or "www.foo.com/bar"). This will be present if the `entity_type` is `PAGE` and
980
+ # will be absent for other entity types.
981
+ # Corresponds to the JSON property `uri`
982
+ # @return [String]
983
+ attr_accessor :uri
984
+
985
+ # Represents a whole or partial calendar date, such as a birthday. The time of
986
+ # day and time zone are either specified elsewhere or are insignificant. The
987
+ # date is relative to the Gregorian Calendar. This can represent one of the
988
+ # following: * A full date, with non-zero year, month, and day values. * A month
989
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
990
+ # with a zero month and a zero day. * A year and month, with a zero day (for
991
+ # example, a credit card expiration date). Related types: * google.type.
992
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
993
+ # Corresponds to the JSON property `warningEscalationDate`
994
+ # @return [Google::Apis::AdsenseV2::Date]
995
+ attr_accessor :warning_escalation_date
996
+
997
+ def initialize(**args)
998
+ update!(**args)
999
+ end
1000
+
1001
+ # Update properties of this object
1002
+ def update!(**args)
1003
+ @action = args[:action] if args.key?(:action)
1004
+ @ad_clients = args[:ad_clients] if args.key?(:ad_clients)
1005
+ @ad_request_count = args[:ad_request_count] if args.key?(:ad_request_count)
1006
+ @entity_type = args[:entity_type] if args.key?(:entity_type)
1007
+ @first_detected_date = args[:first_detected_date] if args.key?(:first_detected_date)
1008
+ @last_detected_date = args[:last_detected_date] if args.key?(:last_detected_date)
1009
+ @name = args[:name] if args.key?(:name)
1010
+ @policy_topics = args[:policy_topics] if args.key?(:policy_topics)
1011
+ @site = args[:site] if args.key?(:site)
1012
+ @site_section = args[:site_section] if args.key?(:site_section)
1013
+ @uri = args[:uri] if args.key?(:uri)
1014
+ @warning_escalation_date = args[:warning_escalation_date] if args.key?(:warning_escalation_date)
1015
+ end
1016
+ end
1017
+
1018
+ # Information about a particular policy topic. A policy topic represents a
1019
+ # single class of policy issue that can impact ad serving for your site. For
1020
+ # example, sexual content or having ads that obscure your content. A single
1021
+ # policy issue can have multiple policy topics for a single entity.
1022
+ class PolicyTopic
1023
+ include Google::Apis::Core::Hashable
1024
+
1025
+ # Required. Indicates if this is a policy violation or not. When the value is
1026
+ # true, issues that are instances of this topic must be addressed to remain in
1027
+ # compliance with the partner's agreements with Google. A false value indicates
1028
+ # that it's not mandatory to fix the issues but advertising demand might be
1029
+ # restricted.
1030
+ # Corresponds to the JSON property `mustFix`
1031
+ # @return [Boolean]
1032
+ attr_accessor :must_fix
1033
+ alias_method :must_fix?, :must_fix
1034
+
1035
+ # Required. The policy topic. For example, "sexual-content" or "ads-obscuring-
1036
+ # content"."
1037
+ # Corresponds to the JSON property `topic`
1038
+ # @return [String]
1039
+ attr_accessor :topic
1040
+
1041
+ def initialize(**args)
1042
+ update!(**args)
1043
+ end
1044
+
1045
+ # Update properties of this object
1046
+ def update!(**args)
1047
+ @must_fix = args[:must_fix] if args.key?(:must_fix)
1048
+ @topic = args[:topic] if args.key?(:topic)
1049
+ end
1050
+ end
1051
+
867
1052
  # Result of a generated report.
868
1053
  class ReportResult
869
1054
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module AdsenseV2
18
18
  # Version of the google-apis-adsense_v2 gem
19
- GEM_VERSION = "0.32.0"
19
+ GEM_VERSION = "0.34.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.14.0"
22
+ GENERATOR_VERSION = "0.15.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20240320"
25
+ REVISION = "20240515"
26
26
  end
27
27
  end
28
28
  end
@@ -160,6 +160,12 @@ module Google
160
160
  include Google::Apis::Core::JsonObjectSupport
161
161
  end
162
162
 
163
+ class ListPolicyIssuesResponse
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
163
169
  class ListSavedReportsResponse
164
170
  class Representation < Google::Apis::Core::JsonRepresentation; end
165
171
 
@@ -184,6 +190,18 @@ module Google
184
190
  include Google::Apis::Core::JsonObjectSupport
185
191
  end
186
192
 
193
+ class PolicyIssue
194
+ class Representation < Google::Apis::Core::JsonRepresentation; end
195
+
196
+ include Google::Apis::Core::JsonObjectSupport
197
+ end
198
+
199
+ class PolicyTopic
200
+ class Representation < Google::Apis::Core::JsonRepresentation; end
201
+
202
+ include Google::Apis::Core::JsonObjectSupport
203
+ end
204
+
187
205
  class ReportResult
188
206
  class Representation < Google::Apis::Core::JsonRepresentation; end
189
207
 
@@ -427,6 +445,15 @@ module Google
427
445
  end
428
446
  end
429
447
 
448
+ class ListPolicyIssuesResponse
449
+ # @private
450
+ class Representation < Google::Apis::Core::JsonRepresentation
451
+ property :next_page_token, as: 'nextPageToken'
452
+ collection :policy_issues, as: 'policyIssues', class: Google::Apis::AdsenseV2::PolicyIssue, decorator: Google::Apis::AdsenseV2::PolicyIssue::Representation
453
+
454
+ end
455
+ end
456
+
430
457
  class ListSavedReportsResponse
431
458
  # @private
432
459
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -464,6 +491,36 @@ module Google
464
491
  end
465
492
  end
466
493
 
494
+ class PolicyIssue
495
+ # @private
496
+ class Representation < Google::Apis::Core::JsonRepresentation
497
+ property :action, as: 'action'
498
+ collection :ad_clients, as: 'adClients'
499
+ property :ad_request_count, :numeric_string => true, as: 'adRequestCount'
500
+ property :entity_type, as: 'entityType'
501
+ property :first_detected_date, as: 'firstDetectedDate', class: Google::Apis::AdsenseV2::Date, decorator: Google::Apis::AdsenseV2::Date::Representation
502
+
503
+ property :last_detected_date, as: 'lastDetectedDate', class: Google::Apis::AdsenseV2::Date, decorator: Google::Apis::AdsenseV2::Date::Representation
504
+
505
+ property :name, as: 'name'
506
+ collection :policy_topics, as: 'policyTopics', class: Google::Apis::AdsenseV2::PolicyTopic, decorator: Google::Apis::AdsenseV2::PolicyTopic::Representation
507
+
508
+ property :site, as: 'site'
509
+ property :site_section, as: 'siteSection'
510
+ property :uri, as: 'uri'
511
+ property :warning_escalation_date, as: 'warningEscalationDate', class: Google::Apis::AdsenseV2::Date, decorator: Google::Apis::AdsenseV2::Date::Representation
512
+
513
+ end
514
+ end
515
+
516
+ class PolicyTopic
517
+ # @private
518
+ class Representation < Google::Apis::Core::JsonRepresentation
519
+ property :must_fix, as: 'mustFix'
520
+ property :topic, as: 'topic'
521
+ end
522
+ end
523
+
467
524
  class ReportResult
468
525
  # @private
469
526
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -895,6 +895,80 @@ module Google
895
895
  execute_or_queue_command(command, &block)
896
896
  end
897
897
 
898
+ # Gets information about the selected policy issue.
899
+ # @param [String] name
900
+ # Required. Name of the policy issue. Format: accounts/`account`/policyIssues/`
901
+ # policy_issue`
902
+ # @param [String] fields
903
+ # Selector specifying which fields to include in a partial response.
904
+ # @param [String] quota_user
905
+ # Available to use for quota purposes for server-side applications. Can be any
906
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
907
+ # @param [Google::Apis::RequestOptions] options
908
+ # Request-specific options
909
+ #
910
+ # @yield [result, err] Result & error if block supplied
911
+ # @yieldparam result [Google::Apis::AdsenseV2::PolicyIssue] parsed result object
912
+ # @yieldparam err [StandardError] error object if request failed
913
+ #
914
+ # @return [Google::Apis::AdsenseV2::PolicyIssue]
915
+ #
916
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
917
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
918
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
919
+ def get_account_policy_issue(name, fields: nil, quota_user: nil, options: nil, &block)
920
+ command = make_simple_command(:get, 'v2/{+name}', options)
921
+ command.response_representation = Google::Apis::AdsenseV2::PolicyIssue::Representation
922
+ command.response_class = Google::Apis::AdsenseV2::PolicyIssue
923
+ command.params['name'] = name unless name.nil?
924
+ command.query['fields'] = fields unless fields.nil?
925
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
926
+ execute_or_queue_command(command, &block)
927
+ end
928
+
929
+ # Lists all the policy issues where the specified account is involved, both
930
+ # directly and through any AFP child accounts.
931
+ # @param [String] parent
932
+ # Required. The account for which policy issues are being retrieved. Format:
933
+ # accounts/`account`
934
+ # @param [Fixnum] page_size
935
+ # The maximum number of policy issues to include in the response, used for
936
+ # paging. If unspecified, at most 10000 policy issues will be returned. The
937
+ # maximum value is 10000; values above 10000 will be coerced to 10000.
938
+ # @param [String] page_token
939
+ # A page token, received from a previous `ListPolicyIssues` call. Provide this
940
+ # to retrieve the subsequent page. When paginating, all other parameters
941
+ # provided to `ListPolicyIssues` must match the call that provided the page
942
+ # token.
943
+ # @param [String] fields
944
+ # Selector specifying which fields to include in a partial response.
945
+ # @param [String] quota_user
946
+ # Available to use for quota purposes for server-side applications. Can be any
947
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
948
+ # @param [Google::Apis::RequestOptions] options
949
+ # Request-specific options
950
+ #
951
+ # @yield [result, err] Result & error if block supplied
952
+ # @yieldparam result [Google::Apis::AdsenseV2::ListPolicyIssuesResponse] parsed result object
953
+ # @yieldparam err [StandardError] error object if request failed
954
+ #
955
+ # @return [Google::Apis::AdsenseV2::ListPolicyIssuesResponse]
956
+ #
957
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
958
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
959
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
960
+ def list_account_policy_issues(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
961
+ command = make_simple_command(:get, 'v2/{+parent}/policyIssues', options)
962
+ command.response_representation = Google::Apis::AdsenseV2::ListPolicyIssuesResponse::Representation
963
+ command.response_class = Google::Apis::AdsenseV2::ListPolicyIssuesResponse
964
+ command.params['parent'] = parent unless parent.nil?
965
+ command.query['pageSize'] = page_size unless page_size.nil?
966
+ command.query['pageToken'] = page_token unless page_token.nil?
967
+ command.query['fields'] = fields unless fields.nil?
968
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
969
+ execute_or_queue_command(command, &block)
970
+ end
971
+
898
972
  # Generates an ad hoc report.
899
973
  # @param [String] account
900
974
  # Required. The account which owns the collection of reports. Format: accounts/`
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-adsense_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-24 00:00:00.000000000 Z
11
+ date: 2024-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.14.0
19
+ version: 0.15.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.14.0
29
+ version: 0.15.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-adsense_v2/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-adsense_v2/v0.32.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-adsense_v2/v0.34.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-adsense_v2
63
63
  post_install_message:
64
64
  rdoc_options: []