custom_interest_service.proto 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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/custom_interest.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.V11.Services";
  23. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v11/services;services";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "CustomInterestServiceProto";
  26. option java_package = "com.google.ads.googleads.v11.services";
  27. option objc_class_prefix = "GAA";
  28. option php_namespace = "Google\\Ads\\GoogleAds\\V11\\Services";
  29. option ruby_package = "Google::Ads::GoogleAds::V11::Services";
  30. // Proto file describing the Custom Interest service.
  31. // Service to manage custom interests.
  32. service CustomInterestService {
  33. option (google.api.default_host) = "googleads.googleapis.com";
  34. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  35. // Creates or updates custom interests. Operation statuses are returned.
  36. //
  37. // List of thrown errors:
  38. // [AuthenticationError]()
  39. // [AuthorizationError]()
  40. // [CriterionError]()
  41. // [CustomInterestError]()
  42. // [HeaderError]()
  43. // [InternalError]()
  44. // [MutateError]()
  45. // [PolicyViolationError]()
  46. // [QuotaError]()
  47. // [RequestError]()
  48. // [StringLengthError]()
  49. rpc MutateCustomInterests(MutateCustomInterestsRequest) returns (MutateCustomInterestsResponse) {
  50. option (google.api.http) = {
  51. post: "/v11/customers/{customer_id=*}/customInterests:mutate"
  52. body: "*"
  53. };
  54. option (google.api.method_signature) = "customer_id,operations";
  55. }
  56. }
  57. // Request message for [CustomInterestService.MutateCustomInterests][google.ads.googleads.v11.services.CustomInterestService.MutateCustomInterests].
  58. message MutateCustomInterestsRequest {
  59. // Required. The ID of the customer whose custom interests are being modified.
  60. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  61. // Required. The list of operations to perform on individual custom interests.
  62. repeated CustomInterestOperation operations = 2 [(google.api.field_behavior) = REQUIRED];
  63. // If true, the request is validated but not executed. Only errors are
  64. // returned, not results.
  65. bool validate_only = 4;
  66. }
  67. // A single operation (create, update) on a custom interest.
  68. message CustomInterestOperation {
  69. // FieldMask that determines which resource fields are modified in an update.
  70. google.protobuf.FieldMask update_mask = 4;
  71. // The mutate operation.
  72. oneof operation {
  73. // Create operation: No resource name is expected for the new custom
  74. // interest.
  75. google.ads.googleads.v11.resources.CustomInterest create = 1;
  76. // Update operation: The custom interest is expected to have a valid
  77. // resource name.
  78. google.ads.googleads.v11.resources.CustomInterest update = 2;
  79. }
  80. }
  81. // Response message for custom interest mutate.
  82. message MutateCustomInterestsResponse {
  83. // All results for the mutate.
  84. repeated MutateCustomInterestResult results = 2;
  85. }
  86. // The result for the custom interest mutate.
  87. message MutateCustomInterestResult {
  88. // Returned for successful operations.
  89. string resource_name = 1 [(google.api.resource_reference) = {
  90. type: "googleads.googleapis.com/CustomInterest"
  91. }];
  92. }