customer_user_access_service.proto 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.ads.googleads.v10.services;
  16. import "google/ads/googleads/v10/resources/customer_user_access.proto";
  17. import "google/api/annotations.proto";
  18. import "google/api/client.proto";
  19. import "google/api/field_behavior.proto";
  20. import "google/api/resource.proto";
  21. import "google/protobuf/field_mask.proto";
  22. option csharp_namespace = "Google.Ads.GoogleAds.V10.Services";
  23. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "CustomerUserAccessServiceProto";
  26. option java_package = "com.google.ads.googleads.v10.services";
  27. option objc_class_prefix = "GAA";
  28. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
  29. option ruby_package = "Google::Ads::GoogleAds::V10::Services";
  30. // This service manages the permissions of a user on a given customer.
  31. service CustomerUserAccessService {
  32. option (google.api.default_host) = "googleads.googleapis.com";
  33. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  34. // Updates, removes permission of a user on a given customer. Operation
  35. // statuses are returned.
  36. //
  37. // List of thrown errors:
  38. // [AuthenticationError]()
  39. // [AuthorizationError]()
  40. // [CustomerUserAccessError]()
  41. // [FieldMaskError]()
  42. // [HeaderError]()
  43. // [InternalError]()
  44. // [MutateError]()
  45. // [QuotaError]()
  46. // [RequestError]()
  47. rpc MutateCustomerUserAccess(MutateCustomerUserAccessRequest) returns (MutateCustomerUserAccessResponse) {
  48. option (google.api.http) = {
  49. post: "/v10/customers/{customer_id=*}/customerUserAccesses:mutate"
  50. body: "*"
  51. };
  52. option (google.api.method_signature) = "customer_id,operation";
  53. }
  54. }
  55. // Mutate Request for
  56. // [CustomerUserAccessService.MutateCustomerUserAccess][google.ads.googleads.v10.services.CustomerUserAccessService.MutateCustomerUserAccess].
  57. message MutateCustomerUserAccessRequest {
  58. // Required. The ID of the customer being modified.
  59. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  60. // Required. The operation to perform on the customer
  61. CustomerUserAccessOperation operation = 2 [(google.api.field_behavior) = REQUIRED];
  62. }
  63. // A single operation (update, remove) on customer user access.
  64. message CustomerUserAccessOperation {
  65. // FieldMask that determines which resource fields are modified in an update.
  66. google.protobuf.FieldMask update_mask = 3;
  67. // The mutate operation.
  68. oneof operation {
  69. // Update operation: The customer user access is expected to have a valid
  70. // resource name.
  71. google.ads.googleads.v10.resources.CustomerUserAccess update = 1;
  72. // Remove operation: A resource name for the removed access is
  73. // expected, in this format:
  74. //
  75. // `customers/{customer_id}/customerUserAccesses/{CustomerUserAccess.user_id}`
  76. string remove = 2 [(google.api.resource_reference) = {
  77. type: "googleads.googleapis.com/CustomerUserAccess"
  78. }];
  79. }
  80. }
  81. // Response message for customer user access mutate.
  82. message MutateCustomerUserAccessResponse {
  83. // Result for the mutate.
  84. MutateCustomerUserAccessResult result = 1;
  85. }
  86. // The result for the customer user access mutate.
  87. message MutateCustomerUserAccessResult {
  88. // Returned for successful operations.
  89. string resource_name = 1 [(google.api.resource_reference) = {
  90. type: "googleads.googleapis.com/CustomerUserAccess"
  91. }];
  92. }