offline_user_data_job_service.proto 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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/common/offline_user_data.proto";
  17. import "google/ads/googleads/v10/resources/offline_user_data_job.proto";
  18. import "google/api/annotations.proto";
  19. import "google/api/client.proto";
  20. import "google/api/field_behavior.proto";
  21. import "google/api/resource.proto";
  22. import "google/longrunning/operations.proto";
  23. import "google/rpc/status.proto";
  24. option csharp_namespace = "Google.Ads.GoogleAds.V10.Services";
  25. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "OfflineUserDataJobServiceProto";
  28. option java_package = "com.google.ads.googleads.v10.services";
  29. option objc_class_prefix = "GAA";
  30. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
  31. option ruby_package = "Google::Ads::GoogleAds::V10::Services";
  32. // Proto file describing the OfflineUserDataJobService.
  33. // Service to manage offline user data jobs.
  34. service OfflineUserDataJobService {
  35. option (google.api.default_host) = "googleads.googleapis.com";
  36. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  37. // Creates an offline user data job.
  38. //
  39. // List of thrown errors:
  40. // [AuthenticationError]()
  41. // [AuthorizationError]()
  42. // [DatabaseError]()
  43. // [FieldError]()
  44. // [HeaderError]()
  45. // [InternalError]()
  46. // [NotAllowlistedError]()
  47. // [OfflineUserDataJobError]()
  48. // [QuotaError]()
  49. // [RequestError]()
  50. rpc CreateOfflineUserDataJob(CreateOfflineUserDataJobRequest) returns (CreateOfflineUserDataJobResponse) {
  51. option (google.api.http) = {
  52. post: "/v10/customers/{customer_id=*}/offlineUserDataJobs:create"
  53. body: "*"
  54. };
  55. option (google.api.method_signature) = "customer_id,job";
  56. }
  57. // Adds operations to the offline user data job.
  58. //
  59. // List of thrown errors:
  60. // [AuthenticationError]()
  61. // [AuthorizationError]()
  62. // [DatabaseError]()
  63. // [FieldError]()
  64. // [HeaderError]()
  65. // [InternalError]()
  66. // [MutateError]()
  67. // [OfflineUserDataJobError]()
  68. // [QuotaError]()
  69. // [RequestError]()
  70. rpc AddOfflineUserDataJobOperations(AddOfflineUserDataJobOperationsRequest) returns (AddOfflineUserDataJobOperationsResponse) {
  71. option (google.api.http) = {
  72. post: "/v10/{resource_name=customers/*/offlineUserDataJobs/*}:addOperations"
  73. body: "*"
  74. };
  75. option (google.api.method_signature) = "resource_name,operations";
  76. }
  77. // Runs the offline user data job.
  78. //
  79. // When finished, the long running operation will contain the processing
  80. // result or failure information, if any.
  81. //
  82. // List of thrown errors:
  83. // [AuthenticationError]()
  84. // [AuthorizationError]()
  85. // [DatabaseError]()
  86. // [HeaderError]()
  87. // [InternalError]()
  88. // [OfflineUserDataJobError]()
  89. // [QuotaError]()
  90. // [RequestError]()
  91. rpc RunOfflineUserDataJob(RunOfflineUserDataJobRequest) returns (google.longrunning.Operation) {
  92. option (google.api.http) = {
  93. post: "/v10/{resource_name=customers/*/offlineUserDataJobs/*}:run"
  94. body: "*"
  95. };
  96. option (google.api.method_signature) = "resource_name";
  97. option (google.longrunning.operation_info) = {
  98. response_type: "google.protobuf.Empty"
  99. metadata_type: "google.ads.googleads.v10.resources.OfflineUserDataJobMetadata"
  100. };
  101. }
  102. }
  103. // Request message for
  104. // [OfflineUserDataJobService.CreateOfflineUserDataJob][google.ads.googleads.v10.services.OfflineUserDataJobService.CreateOfflineUserDataJob].
  105. message CreateOfflineUserDataJobRequest {
  106. // Required. The ID of the customer for which to create an offline user data job.
  107. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  108. // Required. The offline user data job to be created.
  109. google.ads.googleads.v10.resources.OfflineUserDataJob job = 2 [(google.api.field_behavior) = REQUIRED];
  110. // If true, the request is validated but not executed. Only errors are
  111. // returned, not results.
  112. bool validate_only = 3;
  113. // If true, match rate range for the offline user data job is calculated and
  114. // made available in the resource.
  115. bool enable_match_rate_range_preview = 5;
  116. }
  117. // Response message for
  118. // [OfflineUserDataJobService.CreateOfflineUserDataJob][google.ads.googleads.v10.services.OfflineUserDataJobService.CreateOfflineUserDataJob].
  119. message CreateOfflineUserDataJobResponse {
  120. // The resource name of the OfflineUserDataJob.
  121. string resource_name = 1 [(google.api.resource_reference) = {
  122. type: "googleads.googleapis.com/OfflineUserDataJob"
  123. }];
  124. }
  125. // Request message for [OfflineUserDataJobService.RunOfflineUserDataJob][google.ads.googleads.v10.services.OfflineUserDataJobService.RunOfflineUserDataJob].
  126. message RunOfflineUserDataJobRequest {
  127. // Required. The resource name of the OfflineUserDataJob to run.
  128. string resource_name = 1 [
  129. (google.api.field_behavior) = REQUIRED,
  130. (google.api.resource_reference) = {
  131. type: "googleads.googleapis.com/OfflineUserDataJob"
  132. }
  133. ];
  134. // If true, the request is validated but not executed. Only errors are
  135. // returned, not results.
  136. bool validate_only = 2;
  137. }
  138. // Request message for
  139. // [OfflineUserDataJobService.AddOfflineUserDataJobOperations][google.ads.googleads.v10.services.OfflineUserDataJobService.AddOfflineUserDataJobOperations].
  140. message AddOfflineUserDataJobOperationsRequest {
  141. // Required. The resource name of the OfflineUserDataJob.
  142. string resource_name = 1 [
  143. (google.api.field_behavior) = REQUIRED,
  144. (google.api.resource_reference) = {
  145. type: "googleads.googleapis.com/OfflineUserDataJob"
  146. }
  147. ];
  148. // True to enable partial failure for the offline user data job.
  149. optional bool enable_partial_failure = 4;
  150. // True to enable warnings for the offline user data job. When enabled, a
  151. // warning will not block the OfflineUserDataJobOperation, and will also
  152. // return warning messages about malformed field values.
  153. optional bool enable_warnings = 6;
  154. // Required. The list of operations to be done.
  155. repeated OfflineUserDataJobOperation operations = 3 [(google.api.field_behavior) = REQUIRED];
  156. // If true, the request is validated but not executed. Only errors are
  157. // returned, not results.
  158. bool validate_only = 5;
  159. }
  160. // Operation to be made for the AddOfflineUserDataJobOperationsRequest.
  161. message OfflineUserDataJobOperation {
  162. // Operation to be made for the AddOfflineUserDataJobOperationsRequest.
  163. oneof operation {
  164. // Add the provided data to the transaction. Data cannot be retrieved after
  165. // being uploaded.
  166. google.ads.googleads.v10.common.UserData create = 1;
  167. // Remove the provided data from the transaction. Data cannot be retrieved
  168. // after being uploaded.
  169. google.ads.googleads.v10.common.UserData remove = 2;
  170. // Remove all previously provided data. This is only supported for Customer
  171. // Match.
  172. bool remove_all = 3;
  173. }
  174. }
  175. // Response message for
  176. // [OfflineUserDataJobService.AddOfflineUserDataJobOperations][google.ads.googleads.v10.services.OfflineUserDataJobService.AddOfflineUserDataJobOperations].
  177. message AddOfflineUserDataJobOperationsResponse {
  178. // Errors that pertain to operation failures in the partial failure mode.
  179. // Returned only when partial_failure = true and all errors occur inside the
  180. // operations. If any errors occur outside the operations (e.g. auth errors),
  181. // we return an RPC level error.
  182. google.rpc.Status partial_failure_error = 1;
  183. // Non blocking errors that pertain to operation failures in the warnings
  184. // mode. Returned only when enable_warnings = true.
  185. google.rpc.Status warning = 2;
  186. }