Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / ads / googleads / v1 / services / campaign_feed_service.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.services;
19
20 import "google/ads/googleads/v1/resources/campaign_feed.proto";
21 import "google/api/annotations.proto";
22 import "google/protobuf/field_mask.proto";
23 import "google/protobuf/wrappers.proto";
24 import "google/rpc/status.proto";
25
26 option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
27 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
28 option java_multiple_files = true;
29 option java_outer_classname = "CampaignFeedServiceProto";
30 option java_package = "com.google.ads.googleads.v1.services";
31 option objc_class_prefix = "GAA";
32 option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
33 option ruby_package = "Google::Ads::GoogleAds::V1::Services";
34 // Proto file describing the CampaignFeed service.
35
36 // Service to manage campaign feeds.
37 service CampaignFeedService {
38   // Returns the requested campaign feed in full detail.
39   rpc GetCampaignFeed(GetCampaignFeedRequest) returns (google.ads.googleads.v1.resources.CampaignFeed) {
40     option (google.api.http) = {
41       get: "/v1/{resource_name=customers/*/campaignFeeds/*}"
42     };
43   }
44
45   // Creates, updates, or removes campaign feeds. Operation statuses are
46   // returned.
47   rpc MutateCampaignFeeds(MutateCampaignFeedsRequest) returns (MutateCampaignFeedsResponse) {
48     option (google.api.http) = {
49       post: "/v1/customers/{customer_id=*}/campaignFeeds:mutate"
50       body: "*"
51     };
52   }
53 }
54
55 // Request message for [CampaignFeedService.GetCampaignFeed][google.ads.googleads.v1.services.CampaignFeedService.GetCampaignFeed].
56 message GetCampaignFeedRequest {
57   // The resource name of the campaign feed to fetch.
58   string resource_name = 1;
59 }
60
61 // Request message for [CampaignFeedService.MutateCampaignFeeds][google.ads.googleads.v1.services.CampaignFeedService.MutateCampaignFeeds].
62 message MutateCampaignFeedsRequest {
63   // The ID of the customer whose campaign feeds are being modified.
64   string customer_id = 1;
65
66   // The list of operations to perform on individual campaign feeds.
67   repeated CampaignFeedOperation operations = 2;
68
69   // If true, successful operations will be carried out and invalid
70   // operations will return errors. If false, all operations will be carried
71   // out in one transaction if and only if they are all valid.
72   // Default is false.
73   bool partial_failure = 3;
74
75   // If true, the request is validated but not executed. Only errors are
76   // returned, not results.
77   bool validate_only = 4;
78 }
79
80 // A single operation (create, update, remove) on a campaign feed.
81 message CampaignFeedOperation {
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 campaign feed.
88     google.ads.googleads.v1.resources.CampaignFeed create = 1;
89
90     // Update operation: The campaign feed is expected to have a valid resource
91     // name.
92     google.ads.googleads.v1.resources.CampaignFeed update = 2;
93
94     // Remove operation: A resource name for the removed campaign feed is
95     // expected, in this format:
96     //
97     // `customers/{customer_id}/campaignFeeds/{campaign_id}~{feed_id}`
98     string remove = 3;
99   }
100 }
101
102 // Response message for a campaign feed mutate.
103 message MutateCampaignFeedsResponse {
104   // Errors that pertain to operation failures in the partial failure mode.
105   // Returned only when partial_failure = true and all errors occur inside the
106   // operations. If any errors occur outside the operations (e.g. auth errors),
107   // we return an RPC level error.
108   google.rpc.Status partial_failure_error = 3;
109
110   // All results for the mutate.
111   repeated MutateCampaignFeedResult results = 2;
112 }
113
114 // The result for the campaign feed mutate.
115 message MutateCampaignFeedResult {
116   // Returned for successful operations.
117   string resource_name = 1;
118 }