1 // Copyright 2019 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.ads.googleads.v1.services;
20 import "google/ads/googleads/v1/resources/feed_mapping.proto";
21 import "google/api/annotations.proto";
22 import "google/protobuf/wrappers.proto";
23 import "google/rpc/status.proto";
25 option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
26 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
27 option java_multiple_files = true;
28 option java_outer_classname = "FeedMappingServiceProto";
29 option java_package = "com.google.ads.googleads.v1.services";
30 option objc_class_prefix = "GAA";
31 option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
32 option ruby_package = "Google::Ads::GoogleAds::V1::Services";
33 // Proto file describing the FeedMapping service.
35 // Service to manage feed mappings.
36 service FeedMappingService {
37 // Returns the requested feed mapping in full detail.
38 rpc GetFeedMapping(GetFeedMappingRequest) returns (google.ads.googleads.v1.resources.FeedMapping) {
39 option (google.api.http) = {
40 get: "/v1/{resource_name=customers/*/feedMappings/*}"
44 // Creates or removes feed mappings. Operation statuses are
46 rpc MutateFeedMappings(MutateFeedMappingsRequest) returns (MutateFeedMappingsResponse) {
47 option (google.api.http) = {
48 post: "/v1/customers/{customer_id=*}/feedMappings:mutate"
54 // Request message for [FeedMappingService.GetFeedMapping][google.ads.googleads.v1.services.FeedMappingService.GetFeedMapping].
55 message GetFeedMappingRequest {
56 // The resource name of the feed mapping to fetch.
57 string resource_name = 1;
60 // Request message for [FeedMappingService.MutateFeedMappings][google.ads.googleads.v1.services.FeedMappingService.MutateFeedMappings].
61 message MutateFeedMappingsRequest {
62 // The ID of the customer whose feed mappings are being modified.
63 string customer_id = 1;
65 // The list of operations to perform on individual feed mappings.
66 repeated FeedMappingOperation operations = 2;
68 // If true, successful operations will be carried out and invalid
69 // operations will return errors. If false, all operations will be carried
70 // out in one transaction if and only if they are all valid.
72 bool partial_failure = 3;
74 // If true, the request is validated but not executed. Only errors are
75 // returned, not results.
76 bool validate_only = 4;
79 // A single operation (create, remove) on a feed mapping.
80 message FeedMappingOperation {
81 // The mutate operation.
83 // Create operation: No resource name is expected for the new feed mapping.
84 google.ads.googleads.v1.resources.FeedMapping create = 1;
86 // Remove operation: A resource name for the removed feed mapping is
87 // expected, in this format:
89 // `customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}`
94 // Response message for a feed mapping mutate.
95 message MutateFeedMappingsResponse {
96 // Errors that pertain to operation failures in the partial failure mode.
97 // Returned only when partial_failure = true and all errors occur inside the
98 // operations. If any errors occur outside the operations (e.g. auth errors),
99 // we return an RPC level error.
100 google.rpc.Status partial_failure_error = 3;
102 // All results for the mutate.
103 repeated MutateFeedMappingResult results = 2;
106 // The result for the feed mapping mutate.
107 message MutateFeedMappingResult {
108 // Returned for successful operations.
109 string resource_name = 1;