merchant_center_link_service.proto 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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/merchant_center_link.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 = "MerchantCenterLinkServiceProto";
  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. // Proto file describing the MerchantCenterLink service.
  31. // This service allows management of links between Google Ads and Google
  32. // Merchant Center.
  33. service MerchantCenterLinkService {
  34. option (google.api.default_host) = "googleads.googleapis.com";
  35. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  36. // Returns Merchant Center links available for this customer.
  37. //
  38. // List of thrown errors:
  39. // [AuthenticationError]()
  40. // [AuthorizationError]()
  41. // [HeaderError]()
  42. // [InternalError]()
  43. // [QuotaError]()
  44. // [RequestError]()
  45. rpc ListMerchantCenterLinks(ListMerchantCenterLinksRequest) returns (ListMerchantCenterLinksResponse) {
  46. option (google.api.http) = {
  47. get: "/v10/customers/{customer_id=*}/merchantCenterLinks"
  48. };
  49. option (google.api.method_signature) = "customer_id";
  50. }
  51. // Returns the Merchant Center link in full detail.
  52. //
  53. // List of thrown errors:
  54. // [AuthenticationError]()
  55. // [AuthorizationError]()
  56. // [HeaderError]()
  57. // [InternalError]()
  58. // [QuotaError]()
  59. // [RequestError]()
  60. rpc GetMerchantCenterLink(GetMerchantCenterLinkRequest) returns (google.ads.googleads.v10.resources.MerchantCenterLink) {
  61. option (google.api.http) = {
  62. get: "/v10/{resource_name=customers/*/merchantCenterLinks/*}"
  63. };
  64. option (google.api.method_signature) = "resource_name";
  65. }
  66. // Updates status or removes a Merchant Center link.
  67. //
  68. // List of thrown errors:
  69. // [AuthenticationError]()
  70. // [AuthorizationError]()
  71. // [FieldMaskError]()
  72. // [HeaderError]()
  73. // [InternalError]()
  74. // [QuotaError]()
  75. // [RequestError]()
  76. rpc MutateMerchantCenterLink(MutateMerchantCenterLinkRequest) returns (MutateMerchantCenterLinkResponse) {
  77. option (google.api.http) = {
  78. post: "/v10/customers/{customer_id=*}/merchantCenterLinks:mutate"
  79. body: "*"
  80. };
  81. option (google.api.method_signature) = "customer_id,operation";
  82. }
  83. }
  84. // Request message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v10.services.MerchantCenterLinkService.ListMerchantCenterLinks].
  85. message ListMerchantCenterLinksRequest {
  86. // Required. The ID of the customer onto which to apply the Merchant Center link list
  87. // operation.
  88. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  89. }
  90. // Response message for [MerchantCenterLinkService.ListMerchantCenterLinks][google.ads.googleads.v10.services.MerchantCenterLinkService.ListMerchantCenterLinks].
  91. message ListMerchantCenterLinksResponse {
  92. // Merchant Center links available for the requested customer
  93. repeated google.ads.googleads.v10.resources.MerchantCenterLink merchant_center_links = 1;
  94. }
  95. // Request message for [MerchantCenterLinkService.GetMerchantCenterLink][google.ads.googleads.v10.services.MerchantCenterLinkService.GetMerchantCenterLink].
  96. message GetMerchantCenterLinkRequest {
  97. // Required. Resource name of the Merchant Center link.
  98. string resource_name = 1 [
  99. (google.api.field_behavior) = REQUIRED,
  100. (google.api.resource_reference) = {
  101. type: "googleads.googleapis.com/MerchantCenterLink"
  102. }
  103. ];
  104. }
  105. // Request message for [MerchantCenterLinkService.MutateMerchantCenterLink][google.ads.googleads.v10.services.MerchantCenterLinkService.MutateMerchantCenterLink].
  106. message MutateMerchantCenterLinkRequest {
  107. // Required. The ID of the customer being modified.
  108. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  109. // Required. The operation to perform on the link
  110. MerchantCenterLinkOperation operation = 2 [(google.api.field_behavior) = REQUIRED];
  111. // If true, the request is validated but not executed. Only errors are
  112. // returned, not results.
  113. bool validate_only = 3;
  114. }
  115. // A single update on a Merchant Center link.
  116. message MerchantCenterLinkOperation {
  117. // FieldMask that determines which resource fields are modified in an update.
  118. google.protobuf.FieldMask update_mask = 3;
  119. // The operation to perform
  120. oneof operation {
  121. // Update operation: The merchant center link is expected to have a valid
  122. // resource name.
  123. google.ads.googleads.v10.resources.MerchantCenterLink update = 1;
  124. // Remove operation: A resource name for the removed merchant center link is
  125. // expected, in this format:
  126. //
  127. // `customers/{customer_id}/merchantCenterLinks/{merchant_center_id}`
  128. string remove = 2 [(google.api.resource_reference) = {
  129. type: "googleads.googleapis.com/MerchantCenterLink"
  130. }];
  131. }
  132. }
  133. // Response message for Merchant Center link mutate.
  134. message MutateMerchantCenterLinkResponse {
  135. // Result for the mutate.
  136. MutateMerchantCenterLinkResult result = 2;
  137. }
  138. // The result for the Merchant Center link mutate.
  139. message MutateMerchantCenterLinkResult {
  140. // Returned for successful operations.
  141. string resource_name = 1 [(google.api.resource_reference) = {
  142. type: "googleads.googleapis.com/MerchantCenterLink"
  143. }];
  144. }