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