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/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.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 = "CustomerServiceProto";
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 Customer service.
35 // Service to manage customers.
36 service CustomerService {
37 // Returns the requested customer in full detail.
38 rpc GetCustomer(GetCustomerRequest) returns (google.ads.googleads.v1.resources.Customer) {
39 option (google.api.http) = {
40 get: "/v1/{resource_name=customers/*}"
44 // Updates a customer. Operation statuses are returned.
45 rpc MutateCustomer(MutateCustomerRequest) returns (MutateCustomerResponse) {
46 option (google.api.http) = {
47 post: "/v1/customers/{customer_id=*}:mutate"
52 // Returns resource names of customers directly accessible by the
53 // user authenticating the call.
54 rpc ListAccessibleCustomers(ListAccessibleCustomersRequest) returns (ListAccessibleCustomersResponse) {
55 option (google.api.http) = {
56 get: "/v1/customers:listAccessibleCustomers"
60 // Creates a new client under manager. The new client customer is returned.
61 rpc CreateCustomerClient(CreateCustomerClientRequest) returns (CreateCustomerClientResponse) {
62 option (google.api.http) = {
63 post: "/v1/customers/{customer_id=*}:createCustomerClient"
69 // Request message for [CustomerService.GetCustomer][google.ads.googleads.v1.services.CustomerService.GetCustomer].
70 message GetCustomerRequest {
71 // The resource name of the customer to fetch.
72 string resource_name = 1;
75 // Request message for [CustomerService.MutateCustomer][google.ads.googleads.v1.services.CustomerService.MutateCustomer].
76 message MutateCustomerRequest {
77 // The ID of the customer being modified.
78 string customer_id = 1;
80 // The operation to perform on the customer
81 CustomerOperation operation = 4;
83 // If true, the request is validated but not executed. Only errors are
84 // returned, not results.
85 bool validate_only = 5;
88 // Request message for [CustomerService.CreateCustomerClient][google.ads.googleads.v1.services.CustomerService.CreateCustomerClient].
89 message CreateCustomerClientRequest {
90 // The ID of the Manager under whom client customer is being created.
91 string customer_id = 1;
93 // The new client customer to create. The resource name on this customer
95 google.ads.googleads.v1.resources.Customer customer_client = 2;
98 // A single update on a customer.
99 message CustomerOperation {
100 // Mutate operation. Only updates are supported for customer.
101 google.ads.googleads.v1.resources.Customer update = 1;
103 // FieldMask that determines which resource fields are modified in an update.
104 google.protobuf.FieldMask update_mask = 2;
107 // Response message for CreateCustomerClient mutate.
108 message CreateCustomerClientResponse {
109 // The resource name of the newly created customer client.
110 string resource_name = 2;
113 // Response message for customer mutate.
114 message MutateCustomerResponse {
115 // Result for the mutate.
116 MutateCustomerResult result = 2;
119 // The result for the customer mutate.
120 message MutateCustomerResult {
121 // Returned for successful operations.
122 string resource_name = 1;
125 // Request message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers].
126 message ListAccessibleCustomersRequest {
130 // Response message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers].
131 message ListAccessibleCustomersResponse {
132 // Resource name of customers directly accessible by the
133 // user authenticating the call.
134 repeated string resource_names = 1;