Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / ads / googleads / v1 / common / policy.proto
1 // Copyright 2019 Google LLC.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15
16 syntax = "proto3";
17
18 package google.ads.googleads.v1.common;
19
20 import "google/ads/googleads/v1/enums/policy_topic_entry_type.proto";
21 import "google/ads/googleads/v1/enums/policy_topic_evidence_destination_mismatch_url_type.proto";
22 import "google/protobuf/wrappers.proto";
23 import "google/api/annotations.proto";
24
25 option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
26 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
27 option java_multiple_files = true;
28 option java_outer_classname = "PolicyProto";
29 option java_package = "com.google.ads.googleads.v1.common";
30 option objc_class_prefix = "GAA";
31 option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
32 option ruby_package = "Google::Ads::GoogleAds::V1::Common";
33 // Proto file describing policy information.
34
35 // Key of the violation. The key is used for referring to a violation
36 // when filing an exemption request.
37 message PolicyViolationKey {
38   // Unique ID of the violated policy.
39   google.protobuf.StringValue policy_name = 1;
40
41   // The text that violates the policy if specified.
42   // Otherwise, refers to the policy in general
43   // (e.g., when requesting to be exempt from the whole policy).
44   // If not specified for criterion exemptions, the whole policy is implied.
45   // Must be specified for ad exemptions.
46   google.protobuf.StringValue violating_text = 2;
47 }
48
49 // Parameter for controlling how policy exemption is done. Ignorable policy
50 // topics are only usable with expanded text ads and responsive search ads. All
51 // other ad types must use policy violation keys.
52 message PolicyValidationParameter {
53   // The list of policy topics that should not cause a PolicyFindingError to
54   // be reported. This field is currently only compatible with Enhanced Text Ad.
55   // It corresponds to the PolicyTopicEntry.topic field.
56   //
57   // Resources violating these policies will be saved, but will not be eligible
58   // to serve. They may begin serving at a later time due to a change in
59   // policies, re-review of the resource, or a change in advertiser
60   // certificates.
61   repeated google.protobuf.StringValue ignorable_policy_topics = 1;
62 }
63
64 // Policy finding attached to a resource (e.g. alcohol policy associated with
65 // a site that sells alcohol).
66 //
67 // Each PolicyTopicEntry has a topic that indicates the specific ads policy
68 // the entry is about and a type to indicate the effect that the entry will have
69 // on serving. It may optionally have one or more evidences that indicate the
70 // reason for the finding. It may also optionally have one or more constraints
71 // that provide details about how serving may be restricted.
72 //
73 // Next tag: 5
74 message PolicyTopicEntry {
75   // Policy topic this finding refers to. For example, "ALCOHOL",
76   // "TRADEMARKS_IN_AD_TEXT", or "DESTINATION_NOT_WORKING". The set of possible
77   // policy topics is not fixed for a particular API version and may change
78   // at any time.
79   google.protobuf.StringValue topic = 1;
80
81   // Describes the negative or positive effect this policy will have on serving.
82   google.ads.googleads.v1.enums.PolicyTopicEntryTypeEnum.PolicyTopicEntryType type = 2;
83
84   // Additional information that explains policy finding
85   // (e.g. the brand name for a trademark finding).
86   repeated PolicyTopicEvidence evidences = 3;
87
88   // Indicates how serving of this resource may be affected (e.g. not serving
89   // in a country).
90   repeated PolicyTopicConstraint constraints = 4;
91 }
92
93 // Additional information that explains a policy finding.
94 //
95 // Next Id: 8
96 message PolicyTopicEvidence {
97   // A list of fragments of text that violated a policy.
98   //
99   // Next Id: 2
100   message TextList {
101     // The fragments of text from the resource that caused the policy finding.
102     repeated google.protobuf.StringValue texts = 1;
103   }
104
105   // A list of websites that caused a policy finding. Used for
106   // ONE_WEBSITE_PER_AD_GROUP policy topic, for example. In case there are more
107   // than five websites, only the top five (those that appear in resources the
108   // most) will be listed here.
109   //
110   // Next Id: 2
111   message WebsiteList {
112     // Websites that caused the policy finding.
113     repeated google.protobuf.StringValue websites = 1;
114   }
115
116   // A list of strings found in a destination page that caused a policy
117   // finding.
118   //
119   // Next Id: 2
120   message DestinationTextList {
121     // List of text found in the resource's destination page.
122     repeated google.protobuf.StringValue destination_texts = 1;
123   }
124
125   // Evidence of mismatches between the URLs of a resource.
126   //
127   // Next Id: 2
128   message DestinationMismatch {
129     // The set of URLs that did not match each other.
130     repeated google.ads.googleads.v1.enums.PolicyTopicEvidenceDestinationMismatchUrlTypeEnum.PolicyTopicEvidenceDestinationMismatchUrlType url_types = 1;
131   }
132
133   // Specific evidence information depending on the evidence type.
134   oneof value {
135     // HTTP code returned when the final URL was crawled.
136     google.protobuf.Int32Value http_code = 2;
137
138     // List of websites linked with this resource.
139     WebsiteList website_list = 3;
140
141     // List of evidence found in the text of a resource.
142     TextList text_list = 4;
143
144     // The language the resource was detected to be written in.
145     // This is an IETF language tag such as "en-US".
146     google.protobuf.StringValue language_code = 5;
147
148     // The text in the destination of the resource that is causing a policy
149     // finding.
150     DestinationTextList destination_text_list = 6;
151
152     // Mismatch between the destinations of a resource's URLs.
153     DestinationMismatch destination_mismatch = 7;
154   }
155 }
156
157 // Describes the effect on serving that a policy topic entry will have.
158 //
159 // Next Id: 5
160 message PolicyTopicConstraint {
161   // A list of countries where a resource's serving is constrained.
162   //
163   // Next Id: 3
164   message CountryConstraintList {
165     // Total number of countries targeted by the resource.
166     google.protobuf.Int32Value total_targeted_countries = 1;
167
168     // Countries in which serving is restricted.
169     repeated CountryConstraint countries = 2;
170   }
171
172   // Indicates that a policy topic was constrained due to disapproval of the
173   // website for reseller purposes.
174   //
175   // Next Id: 1
176   message ResellerConstraint {
177
178   }
179
180   // Indicates that a resource's ability to serve in a particular country is
181   // constrained.
182   //
183   // Next Id: 2
184   message CountryConstraint {
185     // Geo target constant resource name of the country in which serving is
186     // constrained.
187     google.protobuf.StringValue country_criterion = 1;
188   }
189
190   // Specific information about the constraint.
191   oneof value {
192     // Countries where the resource cannot serve.
193     CountryConstraintList country_constraint_list = 1;
194
195     // Reseller constraint.
196     ResellerConstraint reseller_constraint = 2;
197
198     // Countries where a certificate is required for serving.
199     CountryConstraintList certificate_missing_in_country_list = 3;
200
201     // Countries where the resource's domain is not covered by the
202     // certificates associated with it.
203     CountryConstraintList certificate_domain_mismatch_in_country_list = 4;
204   }
205 }