xref: /aosp_15_r20/external/googleapis/google/ads/googleads/v15/resources/audience.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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
15syntax = "proto3";
16
17package google.ads.googleads.v15.resources;
18
19import "google/ads/googleads/v15/common/audiences.proto";
20import "google/ads/googleads/v15/enums/audience_scope.proto";
21import "google/ads/googleads/v15/enums/audience_status.proto";
22import "google/api/field_behavior.proto";
23import "google/api/resource.proto";
24
25option csharp_namespace = "Google.Ads.GoogleAds.V15.Resources";
26option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v15/resources;resources";
27option java_multiple_files = true;
28option java_outer_classname = "AudienceProto";
29option java_package = "com.google.ads.googleads.v15.resources";
30option objc_class_prefix = "GAA";
31option php_namespace = "Google\\Ads\\GoogleAds\\V15\\Resources";
32option ruby_package = "Google::Ads::GoogleAds::V15::Resources";
33
34// Proto file describing the Audience resource.
35
36// Audience is an effective targeting option that lets you
37// intersect different segment attributes, such as detailed demographics and
38// affinities, to create audiences that represent sections of your target
39// segments.
40message Audience {
41  option (google.api.resource) = {
42    type: "googleads.googleapis.com/Audience"
43    pattern: "customers/{customer_id}/audiences/{audience_id}"
44  };
45
46  // Immutable. The resource name of the audience.
47  // Audience names have the form:
48  //
49  // `customers/{customer_id}/audiences/{audience_id}`
50  string resource_name = 1 [
51    (google.api.field_behavior) = IMMUTABLE,
52    (google.api.resource_reference) = {
53      type: "googleads.googleapis.com/Audience"
54    }
55  ];
56
57  // Output only. ID of the audience.
58  int64 id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
59
60  // Output only. Status of this audience. Indicates whether the audience
61  // is enabled or removed.
62  google.ads.googleads.v15.enums.AudienceStatusEnum.AudienceStatus status = 3
63      [(google.api.field_behavior) = OUTPUT_ONLY];
64
65  // Name of the audience. It should be unique across all audiences within the
66  // account. It must have a minimum length of 1 and maximum length of 255.
67  // Required when scope is not set or is set to CUSTOMER. Cannot be set or
68  // updated when scope is ASSET_GROUP.
69  optional string name = 10;
70
71  // Description of this audience.
72  string description = 5;
73
74  // Positive dimensions specifying the audience composition.
75  repeated google.ads.googleads.v15.common.AudienceDimension dimensions = 6;
76
77  // Negative dimension specifying the audience composition.
78  google.ads.googleads.v15.common.AudienceExclusionDimension
79      exclusion_dimension = 7;
80
81  // Defines the scope this audience can be used in. By default, the scope is
82  // CUSTOMER. Audiences can be created with a scope of ASSET_GROUP for
83  // exclusive use by a single asset_group. Scope may change from ASSET_GROUP to
84  // CUSTOMER but not from CUSTOMER to ASSET_GROUP.
85  google.ads.googleads.v15.enums.AudienceScopeEnum.AudienceScope scope = 8;
86
87  // Immutable. The asset group that this audience is scoped under. Must be set
88  // if and only if scope is ASSET_GROUP. Immutable after creation. If an
89  // audience with ASSET_GROUP scope is upgraded to CUSTOMER scope, this field
90  // will automatically be cleared.
91  string asset_group = 9 [
92    (google.api.field_behavior) = IMMUTABLE,
93    (google.api.resource_reference) = {
94      type: "googleads.googleapis.com/AssetGroup"
95    }
96  ];
97}
98