xref: /aosp_15_r20/external/googleapis/google/ads/googleads/v14/resources/account_link.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.v14.resources;
18
19import "google/ads/googleads/v14/enums/account_link_status.proto";
20import "google/ads/googleads/v14/enums/linked_account_type.proto";
21import "google/ads/googleads/v14/enums/mobile_app_vendor.proto";
22import "google/api/field_behavior.proto";
23import "google/api/resource.proto";
24
25option csharp_namespace = "Google.Ads.GoogleAds.V14.Resources";
26option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/resources;resources";
27option java_multiple_files = true;
28option java_outer_classname = "AccountLinkProto";
29option java_package = "com.google.ads.googleads.v14.resources";
30option objc_class_prefix = "GAA";
31option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Resources";
32option ruby_package = "Google::Ads::GoogleAds::V14::Resources";
33
34// Represents the data sharing connection between a Google Ads account and
35// another account
36message AccountLink {
37  option (google.api.resource) = {
38    type: "googleads.googleapis.com/AccountLink"
39    pattern: "customers/{customer_id}/accountLinks/{account_link_id}"
40  };
41
42  // Immutable. Resource name of the account link.
43  // AccountLink resource names have the form:
44  // `customers/{customer_id}/accountLinks/{account_link_id}`
45  string resource_name = 1 [
46    (google.api.field_behavior) = IMMUTABLE,
47    (google.api.resource_reference) = {
48      type: "googleads.googleapis.com/AccountLink"
49    }
50  ];
51
52  // Output only. The ID of the link.
53  // This field is read only.
54  optional int64 account_link_id = 8
55      [(google.api.field_behavior) = OUTPUT_ONLY];
56
57  // The status of the link.
58  google.ads.googleads.v14.enums.AccountLinkStatusEnum.AccountLinkStatus
59      status = 3;
60
61  // Output only. The type of the linked account.
62  google.ads.googleads.v14.enums.LinkedAccountTypeEnum.LinkedAccountType type =
63      4 [(google.api.field_behavior) = OUTPUT_ONLY];
64
65  // An account linked to this Google Ads account.
66  oneof linked_account {
67    // Immutable. A third party app analytics link.
68    ThirdPartyAppAnalyticsLinkIdentifier third_party_app_analytics = 5
69        [(google.api.field_behavior) = IMMUTABLE];
70
71    // Output only. Data partner link.
72    DataPartnerLinkIdentifier data_partner = 6
73        [(google.api.field_behavior) = OUTPUT_ONLY];
74
75    // Output only. Google Ads link.
76    GoogleAdsLinkIdentifier google_ads = 7
77        [(google.api.field_behavior) = OUTPUT_ONLY];
78
79    // Output only. Hotel link
80    HotelCenterLinkIdentifier hotel_center = 9
81        [(google.api.field_behavior) = OUTPUT_ONLY];
82
83    // Output only. Advertising Partner link
84    AdvertisingPartnerLinkIdentifier advertising_partner = 10
85        [(google.api.field_behavior) = OUTPUT_ONLY];
86  }
87}
88
89// The identifiers of a Third Party App Analytics Link.
90message ThirdPartyAppAnalyticsLinkIdentifier {
91  // Immutable. The ID of the app analytics provider.
92  // This field should not be empty when creating a new third
93  // party app analytics link. It is unable to be modified after the creation of
94  // the link.
95  optional int64 app_analytics_provider_id = 4
96      [(google.api.field_behavior) = IMMUTABLE];
97
98  // Immutable. A string that uniquely identifies a mobile application from
99  // which the data was collected to the Google Ads API. For iOS, the ID string
100  // is the 9 digit string that appears at the end of an App Store URL (for
101  // example, "422689480" for "Gmail" whose App Store link is
102  // https://apps.apple.com/us/app/gmail-email-by-google/id422689480). For
103  // Android, the ID string is the application's package name (for example,
104  // "com.google.android.gm" for "Gmail" given Google Play link
105  // https://play.google.com/store/apps/details?id=com.google.android.gm)
106  // This field should not be empty when creating a new third
107  // party app analytics link. It is unable to be modified after the creation of
108  // the link.
109  optional string app_id = 5 [(google.api.field_behavior) = IMMUTABLE];
110
111  // Immutable. The vendor of the app.
112  // This field should not be empty when creating a new third
113  // party app analytics link. It is unable to be modified after the creation of
114  // the link.
115  google.ads.googleads.v14.enums.MobileAppVendorEnum.MobileAppVendor
116      app_vendor = 3 [(google.api.field_behavior) = IMMUTABLE];
117}
118
119// The identifier for Data Partner account.
120message DataPartnerLinkIdentifier {
121  // Immutable. The customer ID of the Data partner account.
122  // This field is required and should not be empty when creating a new
123  // data partner link. It is unable to be modified after the creation of
124  // the link.
125  optional int64 data_partner_id = 1 [(google.api.field_behavior) = IMMUTABLE];
126}
127
128// The identifier for Hotel account.
129message HotelCenterLinkIdentifier {
130  // Output only. The hotel center id of the hotel account.
131  int64 hotel_center_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
132}
133
134// The identifier for Google Ads account.
135message GoogleAdsLinkIdentifier {
136  // Immutable. The resource name of the Google Ads account.
137  // This field is required and should not be empty when creating a new
138  // Google Ads link. It is unable to be modified after the creation of
139  // the link.
140  optional string customer = 3 [
141    (google.api.field_behavior) = IMMUTABLE,
142    (google.api.resource_reference) = {
143      type: "googleads.googleapis.com/Customer"
144    }
145  ];
146}
147
148// The identifier for the Advertising Partner Google Ads account.
149message AdvertisingPartnerLinkIdentifier {
150  // Immutable. The resource name of the advertising partner Google Ads account.
151  // This field is required and should not be empty when creating a new
152  // Advertising Partner link. It is unable to be modified after the creation of
153  // the link.
154  optional string customer = 1 [
155    (google.api.field_behavior) = IMMUTABLE,
156    (google.api.resource_reference) = {
157      type: "googleads.googleapis.com/Customer"
158    }
159  ];
160}
161