• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.v16.services;
18
19import "google/ads/googleads/v16/enums/response_content_type.proto";
20import "google/ads/googleads/v16/resources/campaign_shared_set.proto";
21import "google/api/annotations.proto";
22import "google/api/client.proto";
23import "google/api/field_behavior.proto";
24import "google/api/resource.proto";
25import "google/rpc/status.proto";
26
27option csharp_namespace = "Google.Ads.GoogleAds.V16.Services";
28option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v16/services;services";
29option java_multiple_files = true;
30option java_outer_classname = "CampaignSharedSetServiceProto";
31option java_package = "com.google.ads.googleads.v16.services";
32option objc_class_prefix = "GAA";
33option php_namespace = "Google\\Ads\\GoogleAds\\V16\\Services";
34option ruby_package = "Google::Ads::GoogleAds::V16::Services";
35
36// Proto file describing the Campaign Shared Set service.
37
38// Service to manage campaign shared sets.
39service CampaignSharedSetService {
40  option (google.api.default_host) = "googleads.googleapis.com";
41  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
42
43  // Creates or removes campaign shared sets. Operation statuses are returned.
44  //
45  // List of thrown errors:
46  //   [AuthenticationError]()
47  //   [AuthorizationError]()
48  //   [CampaignSharedSetError]()
49  //   [ContextError]()
50  //   [DatabaseError]()
51  //   [DateError]()
52  //   [DistinctError]()
53  //   [FieldError]()
54  //   [HeaderError]()
55  //   [IdError]()
56  //   [InternalError]()
57  //   [MutateError]()
58  //   [NewResourceCreationError]()
59  //   [NotEmptyError]()
60  //   [NullError]()
61  //   [OperatorError]()
62  //   [QuotaError]()
63  //   [RangeError]()
64  //   [RequestError]()
65  //   [SizeLimitError]()
66  //   [StringFormatError]()
67  //   [StringLengthError]()
68  rpc MutateCampaignSharedSets(MutateCampaignSharedSetsRequest)
69      returns (MutateCampaignSharedSetsResponse) {
70    option (google.api.http) = {
71      post: "/v16/customers/{customer_id=*}/campaignSharedSets:mutate"
72      body: "*"
73    };
74    option (google.api.method_signature) = "customer_id,operations";
75  }
76}
77
78// Request message for
79// [CampaignSharedSetService.MutateCampaignSharedSets][google.ads.googleads.v16.services.CampaignSharedSetService.MutateCampaignSharedSets].
80message MutateCampaignSharedSetsRequest {
81  // Required. The ID of the customer whose campaign shared sets are being
82  // modified.
83  string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
84
85  // Required. The list of operations to perform on individual campaign shared
86  // sets.
87  repeated CampaignSharedSetOperation operations = 2
88      [(google.api.field_behavior) = REQUIRED];
89
90  // If true, successful operations will be carried out and invalid
91  // operations will return errors. If false, all operations will be carried
92  // out in one transaction if and only if they are all valid.
93  // Default is false.
94  bool partial_failure = 3;
95
96  // If true, the request is validated but not executed. Only errors are
97  // returned, not results.
98  bool validate_only = 4;
99
100  // The response content type setting. Determines whether the mutable resource
101  // or just the resource name should be returned post mutation.
102  google.ads.googleads.v16.enums.ResponseContentTypeEnum.ResponseContentType
103      response_content_type = 5;
104}
105
106// A single operation (create, remove) on a campaign shared set.
107message CampaignSharedSetOperation {
108  // The mutate operation.
109  oneof operation {
110    // Create operation: No resource name is expected for the new campaign
111    // shared set.
112    google.ads.googleads.v16.resources.CampaignSharedSet create = 1;
113
114    // Remove operation: A resource name for the removed campaign shared set is
115    // expected, in this format:
116    //
117    // `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}`
118    string remove = 3 [(google.api.resource_reference) = {
119      type: "googleads.googleapis.com/CampaignSharedSet"
120    }];
121  }
122}
123
124// Response message for a campaign shared set mutate.
125message MutateCampaignSharedSetsResponse {
126  // Errors that pertain to operation failures in the partial failure mode.
127  // Returned only when partial_failure = true and all errors occur inside the
128  // operations. If any errors occur outside the operations (for example, auth
129  // errors), we return an RPC level error.
130  google.rpc.Status partial_failure_error = 3;
131
132  // All results for the mutate.
133  repeated MutateCampaignSharedSetResult results = 2;
134}
135
136// The result for the campaign shared set mutate.
137message MutateCampaignSharedSetResult {
138  // Returned for successful operations.
139  string resource_name = 1 [(google.api.resource_reference) = {
140    type: "googleads.googleapis.com/CampaignSharedSet"
141  }];
142
143  // The mutated campaign shared set with only mutable fields after mutate. The
144  // field will only be returned when response_content_type is set to
145  // "MUTABLE_RESOURCE".
146  google.ads.googleads.v16.resources.CampaignSharedSet campaign_shared_set = 2;
147}
148