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.v14.services; 18 19import "google/ads/googleads/v14/enums/response_content_type.proto"; 20import "google/ads/googleads/v14/resources/bidding_data_exclusion.proto"; 21import "google/api/annotations.proto"; 22import "google/api/client.proto"; 23import "google/api/field_behavior.proto"; 24import "google/api/resource.proto"; 25import "google/protobuf/field_mask.proto"; 26import "google/rpc/status.proto"; 27 28option csharp_namespace = "Google.Ads.GoogleAds.V14.Services"; 29option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/services;services"; 30option java_multiple_files = true; 31option java_outer_classname = "BiddingDataExclusionServiceProto"; 32option java_package = "com.google.ads.googleads.v14.services"; 33option objc_class_prefix = "GAA"; 34option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Services"; 35option ruby_package = "Google::Ads::GoogleAds::V14::Services"; 36 37// Service to manage bidding data exclusions. 38service BiddingDataExclusionService { 39 option (google.api.default_host) = "googleads.googleapis.com"; 40 option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords"; 41 42 // Creates, updates, or removes data exclusions. 43 // Operation statuses are returned. 44 rpc MutateBiddingDataExclusions(MutateBiddingDataExclusionsRequest) 45 returns (MutateBiddingDataExclusionsResponse) { 46 option (google.api.http) = { 47 post: "/v14/customers/{customer_id=*}/biddingDataExclusions:mutate" 48 body: "*" 49 }; 50 option (google.api.method_signature) = "customer_id,operations"; 51 } 52} 53 54// Request message for 55// [BiddingDataExclusionService.MutateBiddingDataExclusions][google.ads.googleads.v14.services.BiddingDataExclusionService.MutateBiddingDataExclusions]. 56message MutateBiddingDataExclusionsRequest { 57 // Required. ID of the customer whose data exclusions are being modified. 58 string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; 59 60 // Required. The list of operations to perform on individual data exclusions. 61 repeated BiddingDataExclusionOperation operations = 2 62 [(google.api.field_behavior) = REQUIRED]; 63 64 // If true, successful operations will be carried out and invalid 65 // operations will return errors. If false, all operations will be carried 66 // out in one transaction if and only if they are all valid. 67 // Default is false. 68 bool partial_failure = 3; 69 70 // If true, the request is validated but not executed. Only errors are 71 // returned, not results. 72 bool validate_only = 4; 73 74 // The response content type setting. Determines whether the mutable resource 75 // or just the resource name should be returned post mutation. 76 google.ads.googleads.v14.enums.ResponseContentTypeEnum.ResponseContentType 77 response_content_type = 5; 78} 79 80// A single operation (create, remove, update) on a data exclusion. 81message BiddingDataExclusionOperation { 82 // FieldMask that determines which resource fields are modified in an update. 83 google.protobuf.FieldMask update_mask = 4; 84 85 // The mutate operation. 86 oneof operation { 87 // Create operation: No resource name is expected for the new data 88 // exclusion. 89 google.ads.googleads.v14.resources.BiddingDataExclusion create = 1; 90 91 // Update operation: The data exclusion is expected to have a valid 92 // resource name. 93 google.ads.googleads.v14.resources.BiddingDataExclusion update = 2; 94 95 // Remove operation: A resource name for the removed data exclusion 96 // is expected, in this format: 97 // 98 // `customers/{customer_id}/biddingDataExclusions/{data_exclusion_id}` 99 string remove = 3 [(google.api.resource_reference) = { 100 type: "googleads.googleapis.com/BiddingDataExclusion" 101 }]; 102 } 103} 104 105// Response message for data exlusions mutate. 106message MutateBiddingDataExclusionsResponse { 107 // Errors that pertain to operation failures in the partial failure mode. 108 // Returned only when partial_failure = true and all errors occur inside the 109 // operations. If any errors occur outside the operations (for example, auth 110 // errors), we return an RPC level error. 111 google.rpc.Status partial_failure_error = 3; 112 113 // All results for the mutate. 114 repeated MutateBiddingDataExclusionsResult results = 2; 115} 116 117// The result for the data exclusion mutate. 118message MutateBiddingDataExclusionsResult { 119 // Returned for successful operations. 120 string resource_name = 1 [(google.api.resource_reference) = { 121 type: "googleads.googleapis.com/BiddingDataExclusion" 122 }]; 123 124 // The mutated bidding data exclusion with only mutable fields after mutate. 125 // The field will only be returned when response_content_type is set 126 // to "MUTABLE_RESOURCE". 127 google.ads.googleads.v14.resources.BiddingDataExclusion 128 bidding_data_exclusion = 2; 129} 130