-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Automated regeneration of AdSense client (#11202)
Auto-created at 2024-03-26 13:12:21 +0000 using the toys pull request generator.
- Loading branch information
1 parent
20c4f1d
commit 0e5d9cc
Showing
7 changed files
with
304 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
clients/ad_sense/lib/google_api/ad_sense/v2/model/list_policy_issues_response.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# NOTE: This file is auto generated by the elixir code generator program. | ||
# Do not edit this file manually. | ||
|
||
defmodule GoogleApi.AdSense.V2.Model.ListPolicyIssuesResponse do | ||
@moduledoc """ | ||
Response definition for the policy issues list rpc. Policy issues are reported only if the publisher has at least one AFC ad client in READY or GETTING_READY state. If the publisher has no such AFC ad client, the response will be an empty list. | ||
## Attributes | ||
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Continuation token used to page through policy issues. To retrieve the next page of the results, set the next request's "page_token" value to this. | ||
* `policyIssues` (*type:* `list(GoogleApi.AdSense.V2.Model.PolicyIssue.t)`, *default:* `nil`) - The policy issues returned in the list response. | ||
""" | ||
|
||
use GoogleApi.Gax.ModelBase | ||
|
||
@type t :: %__MODULE__{ | ||
:nextPageToken => String.t() | nil, | ||
:policyIssues => list(GoogleApi.AdSense.V2.Model.PolicyIssue.t()) | nil | ||
} | ||
|
||
field(:nextPageToken) | ||
field(:policyIssues, as: GoogleApi.AdSense.V2.Model.PolicyIssue, type: :list) | ||
end | ||
|
||
defimpl Poison.Decoder, for: GoogleApi.AdSense.V2.Model.ListPolicyIssuesResponse do | ||
def decode(value, options) do | ||
GoogleApi.AdSense.V2.Model.ListPolicyIssuesResponse.decode(value, options) | ||
end | ||
end | ||
|
||
defimpl Poison.Encoder, for: GoogleApi.AdSense.V2.Model.ListPolicyIssuesResponse do | ||
def encode(value, options) do | ||
GoogleApi.Gax.ModelBase.encode(value, options) | ||
end | ||
end |
79 changes: 79 additions & 0 deletions
79
clients/ad_sense/lib/google_api/ad_sense/v2/model/policy_issue.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# NOTE: This file is auto generated by the elixir code generator program. | ||
# Do not edit this file manually. | ||
|
||
defmodule GoogleApi.AdSense.V2.Model.PolicyIssue do | ||
@moduledoc """ | ||
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. | ||
## Attributes | ||
* `action` (*type:* `String.t`, *default:* `nil`) - Required. The most severe action taken on the entity over the past seven days. | ||
* `adClients` (*type:* `list(String.t)`, *default:* `nil`) - 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. | ||
* `adRequestCount` (*type:* `String.t`, *default:* `nil`) - Required. Total number of ad requests affected by the policy violations over the past seven days. | ||
* `entityType` (*type:* `String.t`, *default:* `nil`) - Required. Type of the entity indicating if the entity is a site, site-section, or page. | ||
* `firstDetectedDate` (*type:* `GoogleApi.AdSense.V2.Model.Date.t`, *default:* `nil`) - Required. The date (in the America/Los_Angeles timezone) when policy violations were first detected on the entity. | ||
* `lastDetectedDate` (*type:* `GoogleApi.AdSense.V2.Model.Date.t`, *default:* `nil`) - Required. The date (in the America/Los_Angeles timezone) when policy violations were last detected on the entity. | ||
* `name` (*type:* `String.t`, *default:* `nil`) - Required. Resource name of the entity with policy issues. Format: accounts/{account}/policyIssues/{policy_issue} | ||
* `policyTopics` (*type:* `list(GoogleApi.AdSense.V2.Model.PolicyTopic.t)`, *default:* `nil`) - Required. Unordered list. The policy topics that this entity was found to violate over the past seven days. | ||
* `site` (*type:* `String.t`, *default:* `nil`) - 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. | ||
* `siteSection` (*type:* `String.t`, *default:* `nil`) - 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. | ||
* `uri` (*type:* `String.t`, *default:* `nil`) - 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. | ||
* `warningEscalationDate` (*type:* `GoogleApi.AdSense.V2.Model.Date.t`, *default:* `nil`) - Optional. The date (in the America/Los_Angeles timezone) when the entity will have ad serving demand restricted or ad serving disabled. This is present only for issues with a `WARNED` enforcement action. See https://support.google.com/adsense/answer/11066888. | ||
""" | ||
|
||
use GoogleApi.Gax.ModelBase | ||
|
||
@type t :: %__MODULE__{ | ||
:action => String.t() | nil, | ||
:adClients => list(String.t()) | nil, | ||
:adRequestCount => String.t() | nil, | ||
:entityType => String.t() | nil, | ||
:firstDetectedDate => GoogleApi.AdSense.V2.Model.Date.t() | nil, | ||
:lastDetectedDate => GoogleApi.AdSense.V2.Model.Date.t() | nil, | ||
:name => String.t() | nil, | ||
:policyTopics => list(GoogleApi.AdSense.V2.Model.PolicyTopic.t()) | nil, | ||
:site => String.t() | nil, | ||
:siteSection => String.t() | nil, | ||
:uri => String.t() | nil, | ||
:warningEscalationDate => GoogleApi.AdSense.V2.Model.Date.t() | nil | ||
} | ||
|
||
field(:action) | ||
field(:adClients, type: :list) | ||
field(:adRequestCount) | ||
field(:entityType) | ||
field(:firstDetectedDate, as: GoogleApi.AdSense.V2.Model.Date) | ||
field(:lastDetectedDate, as: GoogleApi.AdSense.V2.Model.Date) | ||
field(:name) | ||
field(:policyTopics, as: GoogleApi.AdSense.V2.Model.PolicyTopic, type: :list) | ||
field(:site) | ||
field(:siteSection) | ||
field(:uri) | ||
field(:warningEscalationDate, as: GoogleApi.AdSense.V2.Model.Date) | ||
end | ||
|
||
defimpl Poison.Decoder, for: GoogleApi.AdSense.V2.Model.PolicyIssue do | ||
def decode(value, options) do | ||
GoogleApi.AdSense.V2.Model.PolicyIssue.decode(value, options) | ||
end | ||
end | ||
|
||
defimpl Poison.Encoder, for: GoogleApi.AdSense.V2.Model.PolicyIssue do | ||
def encode(value, options) do | ||
GoogleApi.Gax.ModelBase.encode(value, options) | ||
end | ||
end |
49 changes: 49 additions & 0 deletions
49
clients/ad_sense/lib/google_api/ad_sense/v2/model/policy_topic.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# NOTE: This file is auto generated by the elixir code generator program. | ||
# Do not edit this file manually. | ||
|
||
defmodule GoogleApi.AdSense.V2.Model.PolicyTopic do | ||
@moduledoc """ | ||
Information about a particular policy topic. A policy topic represents a single class of policy issue that can impact ad serving for your site. For example, sexual content or having ads that obscure your content. A single policy issue can have multiple policy topics for a single entity. | ||
## Attributes | ||
* `mustFix` (*type:* `boolean()`, *default:* `nil`) - Required. Indicates if this is a policy violation or not. When the value is true, issues that are instances of this topic must be addressed to remain in compliance with the partner's agreements with Google. A false value indicates that it's not mandatory to fix the issues but advertising demand might be restricted. | ||
* `topic` (*type:* `String.t`, *default:* `nil`) - Required. The policy topic. For example, "sexual-content" or "ads-obscuring-content"." | ||
""" | ||
|
||
use GoogleApi.Gax.ModelBase | ||
|
||
@type t :: %__MODULE__{ | ||
:mustFix => boolean() | nil, | ||
:topic => String.t() | nil | ||
} | ||
|
||
field(:mustFix) | ||
field(:topic) | ||
end | ||
|
||
defimpl Poison.Decoder, for: GoogleApi.AdSense.V2.Model.PolicyTopic do | ||
def decode(value, options) do | ||
GoogleApi.AdSense.V2.Model.PolicyTopic.decode(value, options) | ||
end | ||
end | ||
|
||
defimpl Poison.Encoder, for: GoogleApi.AdSense.V2.Model.PolicyTopic do | ||
def encode(value, options) do | ||
GoogleApi.Gax.ModelBase.encode(value, options) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters