user_data_service.proto 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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/api/annotations.proto";
  18. import "google/api/client.proto";
  19. import "google/api/field_behavior.proto";
  20. option csharp_namespace = "Google.Ads.GoogleAds.V10.Services";
  21. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "UserDataServiceProto";
  24. option java_package = "com.google.ads.googleads.v10.services";
  25. option objc_class_prefix = "GAA";
  26. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
  27. option ruby_package = "Google::Ads::GoogleAds::V10::Services";
  28. // Proto file describing the UserDataService.
  29. // Service to manage user data uploads.
  30. service UserDataService {
  31. option (google.api.default_host) = "googleads.googleapis.com";
  32. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  33. // Uploads the given user data.
  34. //
  35. // List of thrown errors:
  36. // [AuthenticationError]()
  37. // [AuthorizationError]()
  38. // [CollectionSizeError]()
  39. // [FieldError]()
  40. // [HeaderError]()
  41. // [InternalError]()
  42. // [MutateError]()
  43. // [OfflineUserDataJobError]()
  44. // [QuotaError]()
  45. // [RequestError]()
  46. // [UserDataError]()
  47. rpc UploadUserData(UploadUserDataRequest) returns (UploadUserDataResponse) {
  48. option (google.api.http) = {
  49. post: "/v10/customers/{customer_id=*}:uploadUserData"
  50. body: "*"
  51. };
  52. }
  53. }
  54. // Request message for [UserDataService.UploadUserData][google.ads.googleads.v10.services.UserDataService.UploadUserData]
  55. message UploadUserDataRequest {
  56. // Required. The ID of the customer for which to update the user data.
  57. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  58. // Required. The list of operations to be done.
  59. repeated UserDataOperation operations = 3 [(google.api.field_behavior) = REQUIRED];
  60. // Metadata of the request.
  61. oneof metadata {
  62. // Metadata for data updates to a Customer Match user list.
  63. google.ads.googleads.v10.common.CustomerMatchUserListMetadata customer_match_user_list_metadata = 2;
  64. }
  65. }
  66. // Operation to be made for the UploadUserDataRequest.
  67. message UserDataOperation {
  68. // Operation to be made for the UploadUserDataRequest.
  69. oneof operation {
  70. // The list of user data to be appended to the user list.
  71. google.ads.googleads.v10.common.UserData create = 1;
  72. // The list of user data to be removed from the user list.
  73. google.ads.googleads.v10.common.UserData remove = 2;
  74. }
  75. }
  76. // Response message for [UserDataService.UploadUserData][google.ads.googleads.v10.services.UserDataService.UploadUserData]
  77. message UploadUserDataResponse {
  78. // The date time at which the request was received by API, formatted as
  79. // "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".
  80. optional string upload_date_time = 3;
  81. // Number of upload data operations received by API.
  82. optional int32 received_operations_count = 4;
  83. }