1 // Copyright 2018 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.v0.services;
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";
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";
34 // Proto file describing the Customer service.
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/*}"
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"
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"
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"
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;
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;
86 // The operation to perform on the customer
87 CustomerOperation operation = 4;
89 // If true, the request is validated but not executed. Only errors are
90 // returned, not results.
91 bool validate_only = 5;
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;
100 // The new client customer to create. The resource name on this customer
102 google.ads.googleads.v0.resources.Customer customer_client = 2;
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;
110 // FieldMask that determines which resource fields are modified in an update.
111 google.protobuf.FieldMask update_mask = 2;
114 // Response message for CreateCustomerClient mutate.
115 message CreateCustomerClientResponse {
116 // The resource name of the newly created customer client.
117 string resource_name = 2;
120 // Response message for customer mutate.
121 message MutateCustomerResponse {
122 // Result for the mutate.
123 MutateCustomerResult result = 2;
126 // The result for the customer mutate.
127 message MutateCustomerResult {
128 // Returned for successful operations.
129 string resource_name = 1;
132 // Request message for
133 // [CustomerService.ListAccessibleCustomers][google.ads.googleads.v0.services.CustomerService.ListAccessibleCustomers].
134 message ListAccessibleCustomersRequest {}
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;