user_data_service.proto 4.1 KB

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