Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / ads / googleads / v0 / services / customer_service.proto
1 // Copyright 2018 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.v0.services;
19
20 import "google/ads/googleads/v0/resources/customer.proto";
21 import "google/api/annotations.proto";
22 import "google/protobuf/field_mask.proto";
23 import "google/protobuf/wrappers.proto";
24
25 option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
26 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
27 option java_multiple_files = true;
28 option java_outer_classname = "CustomerServiceProto";
29 option java_package = "com.google.ads.googleads.v0.services";
30 option objc_class_prefix = "GAA";
31 option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
32 option ruby_package = "Google::Ads::GoogleAds::V0::Services";
33
34 // Proto file describing the Customer service.
35
36 // Service to manage customers.
37 service CustomerService {
38   // Returns the requested customer in full detail.
39   rpc GetCustomer(GetCustomerRequest)
40       returns (google.ads.googleads.v0.resources.Customer) {
41     option (google.api.http) = {
42       get: "/v0/{resource_name=customers/*}"
43     };
44   }
45
46   // Updates a customer. Operation statuses are returned.
47   rpc MutateCustomer(MutateCustomerRequest) returns (MutateCustomerResponse) {
48     option (google.api.http) = {
49       post: "/v0/customers/{customer_id=*}:mutate"
50       body: "*"
51     };
52   }
53
54   // Returns resource names of customers directly accessible by the
55   // user authenticating the call.
56   rpc ListAccessibleCustomers(ListAccessibleCustomersRequest)
57       returns (ListAccessibleCustomersResponse) {
58     option (google.api.http) = {
59       get: "/v0/customers:listAccessibleCustomers"
60     };
61   }
62
63   // Creates a new client under manager. The new client customer is returned.
64   rpc CreateCustomerClient(CreateCustomerClientRequest)
65       returns (CreateCustomerClientResponse) {
66     option (google.api.http) = {
67       post: "/v0/customers/{customer_id=*}:createCustomerClient"
68       body: "*"
69     };
70   }
71 }
72
73 // Request message for
74 // [CustomerService.GetCustomer][google.ads.googleads.v0.services.CustomerService.GetCustomer].
75 message GetCustomerRequest {
76   // The resource name of the customer to fetch.
77   string resource_name = 1;
78 }
79
80 // Request message for
81 // [CustomerService.MutateCustomer][google.ads.googleads.v0.services.CustomerService.MutateCustomer].
82 message MutateCustomerRequest {
83   // The ID of the customer being modified.
84   string customer_id = 1;
85
86   // The operation to perform on the customer
87   CustomerOperation operation = 4;
88
89   // If true, the request is validated but not executed. Only errors are
90   // returned, not results.
91   bool validate_only = 5;
92 }
93
94 // Request message for
95 // [CustomerService.CreateCustomerClient][google.ads.googleads.v0.services.CustomerService.CreateCustomerClient].
96 message CreateCustomerClientRequest {
97   // The ID of the Manager under whom client customer is being created.
98   string customer_id = 1;
99
100   // The new client customer to create. The resource name on this customer
101   // will be ignored.
102   google.ads.googleads.v0.resources.Customer customer_client = 2;
103 }
104
105 // A single update on a customer.
106 message CustomerOperation {
107   // Mutate operation. Only updates are supported for customer.
108   google.ads.googleads.v0.resources.Customer update = 1;
109
110   // FieldMask that determines which resource fields are modified in an update.
111   google.protobuf.FieldMask update_mask = 2;
112 }
113
114 // Response message for CreateCustomerClient mutate.
115 message CreateCustomerClientResponse {
116   // The resource name of the newly created customer client.
117   string resource_name = 2;
118 }
119
120 // Response message for customer mutate.
121 message MutateCustomerResponse {
122   // Result for the mutate.
123   MutateCustomerResult result = 2;
124 }
125
126 // The result for the customer mutate.
127 message MutateCustomerResult {
128   // Returned for successful operations.
129   string resource_name = 1;
130 }
131
132 // Request message for
133 // [CustomerService.ListAccessibleCustomers][google.ads.googleads.v0.services.CustomerService.ListAccessibleCustomers].
134 message ListAccessibleCustomersRequest {}
135
136 // Response message for
137 // [CustomerService.ListAccessibleCustomers][google.ads.googleads.v0.services.CustomerService.ListAccessibleCustomers].
138 message ListAccessibleCustomersResponse {
139   // Resource name of customers directly accessible by the
140   // user authenticating the call.
141   repeated string resource_names = 1;
142 }