customer_user_access_invitation_service.proto 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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.v11.services;
  16. import "google/ads/googleads/v11/resources/customer_user_access_invitation.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. option csharp_namespace = "Google.Ads.GoogleAds.V11.Services";
  22. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v11/services;services";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "CustomerUserAccessInvitationServiceProto";
  25. option java_package = "com.google.ads.googleads.v11.services";
  26. option objc_class_prefix = "GAA";
  27. option php_namespace = "Google\\Ads\\GoogleAds\\V11\\Services";
  28. option ruby_package = "Google::Ads::GoogleAds::V11::Services";
  29. // Proto file describing the CustomerUserAccessInvitation service.
  30. // This service manages the access invitation extended to users for a given
  31. // customer.
  32. service CustomerUserAccessInvitationService {
  33. option (google.api.default_host) = "googleads.googleapis.com";
  34. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  35. // Creates or removes an access invitation.
  36. //
  37. // List of thrown errors:
  38. // [AccessInvitationError]()
  39. // [AuthenticationError]()
  40. // [AuthorizationError]()
  41. // [HeaderError]()
  42. // [InternalError]()
  43. // [QuotaError]()
  44. // [RequestError]()
  45. rpc MutateCustomerUserAccessInvitation(MutateCustomerUserAccessInvitationRequest) returns (MutateCustomerUserAccessInvitationResponse) {
  46. option (google.api.http) = {
  47. post: "/v11/customers/{customer_id=*}/customerUserAccessInvitations:mutate"
  48. body: "*"
  49. };
  50. option (google.api.method_signature) = "customer_id,operation";
  51. }
  52. }
  53. // Request message for
  54. // [CustomerUserAccessInvitation.MutateCustomerUserAccessInvitation][]
  55. message MutateCustomerUserAccessInvitationRequest {
  56. // Required. The ID of the customer whose access invitation is being modified.
  57. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  58. // Required. The operation to perform on the access invitation
  59. CustomerUserAccessInvitationOperation operation = 2 [(google.api.field_behavior) = REQUIRED];
  60. }
  61. // A single operation (create or remove) on customer user access invitation.
  62. message CustomerUserAccessInvitationOperation {
  63. // The mutate operation
  64. oneof operation {
  65. // Create operation: No resource name is expected for the new access
  66. // invitation.
  67. google.ads.googleads.v11.resources.CustomerUserAccessInvitation create = 1;
  68. // Remove operation: A resource name for the revoke invitation is
  69. // expected, in this format:
  70. //
  71. // `customers/{customer_id}/customerUserAccessInvitations/{invitation_id}`
  72. string remove = 2 [(google.api.resource_reference) = {
  73. type: "googleads.googleapis.com/CustomerUserAccessInvitation"
  74. }];
  75. }
  76. }
  77. // Response message for access invitation mutate.
  78. message MutateCustomerUserAccessInvitationResponse {
  79. // Result for the mutate.
  80. MutateCustomerUserAccessInvitationResult result = 1;
  81. }
  82. // The result for the access invitation mutate.
  83. message MutateCustomerUserAccessInvitationResult {
  84. // Returned for successful operations.
  85. string resource_name = 1 [(google.api.resource_reference) = {
  86. type: "googleads.googleapis.com/CustomerUserAccessInvitation"
  87. }];
  88. }