Skip to content

Commit 89a0f8e

Browse files
Google APIscopybara-github
authored andcommitted
docs: replace "GA4" with "Google Analytics" or "GA" in all comments
feat: add `user_data_retention` field to `DataRetentionSettings` and mark as `REQUIRED` fix: mark `event_data_retention` field in `DataRetentionSettings` as `REQUIRED` PiperOrigin-RevId: 720657164
1 parent f20edbd commit 89a0f8e

3 files changed

Lines changed: 69 additions & 31 deletions

File tree

google/analytics/admin/v1beta/BUILD.bazel

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
# * extra_protoc_file_parameters
1010
# The complete list of preserved parameters can be found in the source code.
1111

12+
# buildifier: disable=load-on-top
13+
1214
# This is an API workspace, having public visibility by default makes perfect sense.
1315
package(default_visibility = ["//visibility:public"])
1416

1517
##############################################################################
1618
# Common
1719
##############################################################################
18-
load("@rules_proto//proto:defs.bzl", "proto_library")
20+
# buildifier: disable=same-origin-load
1921
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
22+
load("@rules_proto//proto:defs.bzl", "proto_library")
2023

2124
proto_library(
2225
name = "admin_proto",
@@ -48,6 +51,7 @@ proto_library_with_info(
4851
##############################################################################
4952
# Java
5053
##############################################################################
54+
# buildifier: disable=same-origin-load
5155
load(
5256
"@com_google_googleapis_imports//:imports.bzl",
5357
"java_gapic_assembly_gradle_pkg",
@@ -110,6 +114,7 @@ java_gapic_assembly_gradle_pkg(
110114
##############################################################################
111115
# Go
112116
##############################################################################
117+
# buildifier: disable=same-origin-load
113118
load(
114119
"@com_google_googleapis_imports//:imports.bzl",
115120
"go_gapic_assembly_pkg",
@@ -157,6 +162,7 @@ go_gapic_assembly_pkg(
157162
##############################################################################
158163
# Python
159164
##############################################################################
165+
# buildifier: disable=same-origin-load
160166
load(
161167
"@com_google_googleapis_imports//:imports.bzl",
162168
"py_gapic_assembly_pkg",
@@ -196,6 +202,7 @@ py_gapic_assembly_pkg(
196202
##############################################################################
197203
# PHP
198204
##############################################################################
205+
# buildifier: disable=same-origin-load
199206
load(
200207
"@com_google_googleapis_imports//:imports.bzl",
201208
"php_gapic_assembly_pkg",
@@ -216,7 +223,9 @@ php_gapic_library(
216223
rest_numeric_enums = True,
217224
service_yaml = "analyticsadmin_v1beta.yaml",
218225
transport = "grpc+rest",
219-
deps = [":admin_php_proto"],
226+
deps = [
227+
":admin_php_proto",
228+
],
220229
)
221230

222231
# Open Source Packages
@@ -231,6 +240,7 @@ php_gapic_assembly_pkg(
231240
##############################################################################
232241
# Node.js
233242
##############################################################################
243+
# buildifier: disable=same-origin-load
234244
load(
235245
"@com_google_googleapis_imports//:imports.bzl",
236246
"nodejs_gapic_assembly_pkg",
@@ -261,6 +271,7 @@ nodejs_gapic_assembly_pkg(
261271
##############################################################################
262272
# Ruby
263273
##############################################################################
274+
# buildifier: disable=same-origin-load
264275
load(
265276
"@com_google_googleapis_imports//:imports.bzl",
266277
"ruby_cloud_gapic_library",
@@ -307,6 +318,7 @@ ruby_gapic_assembly_pkg(
307318
##############################################################################
308319
# C#
309320
##############################################################################
321+
# buildifier: disable=same-origin-load
310322
load(
311323
"@com_google_googleapis_imports//:imports.bzl",
312324
"csharp_gapic_assembly_pkg",
@@ -317,6 +329,7 @@ load(
317329

318330
csharp_proto_library(
319331
name = "admin_csharp_proto",
332+
extra_opts = [],
320333
deps = [":admin_proto"],
321334
)
322335

@@ -353,6 +366,7 @@ csharp_gapic_assembly_pkg(
353366
##############################################################################
354367
# C++
355368
##############################################################################
369+
# buildifier: disable=same-origin-load
356370
load(
357371
"@com_google_googleapis_imports//:imports.bzl",
358372
"cc_grpc_library",

google/analytics/admin/v1beta/analytics_admin.proto

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ option java_multiple_files = true;
3131
option java_outer_classname = "AnalyticsAdminProto";
3232
option java_package = "com.google.analytics.admin.v1beta";
3333

34-
// Service Interface for the Analytics Admin API (GA4).
34+
// Service Interface for the Google Analytics Admin API.
3535
service AnalyticsAdminService {
3636
option (google.api.default_host) = "analyticsadmin.googleapis.com";
3737
option (google.api.oauth_scopes) =
@@ -48,7 +48,7 @@ service AnalyticsAdminService {
4848

4949
// Returns all accounts accessible by the caller.
5050
//
51-
// Note that these accounts might not currently have GA4 properties.
51+
// Note that these accounts might not currently have GA properties.
5252
// Soft-deleted (ie: "trashed") accounts are excluded by default.
5353
// Returns an empty list if no relevant accounts are found.
5454
rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) {
@@ -101,7 +101,7 @@ service AnalyticsAdminService {
101101
};
102102
}
103103

104-
// Lookup for a single "GA4" Property.
104+
// Lookup for a single GA Property.
105105
rpc GetProperty(GetPropertyRequest) returns (Property) {
106106
option (google.api.http) = {
107107
get: "/v1beta/{name=properties/*}"
@@ -111,7 +111,6 @@ service AnalyticsAdminService {
111111

112112
// Returns child Properties under the specified parent Account.
113113
//
114-
// Only "GA4" properties will be returned.
115114
// Properties will be excluded if the caller does not have access.
116115
// Soft-deleted (ie: "trashed") properties are excluded by default.
117116
// Returns an empty list if no relevant properties are found.
@@ -121,7 +120,8 @@ service AnalyticsAdminService {
121120
};
122121
}
123122

124-
// Creates an "GA4" property with the specified location and attributes.
123+
// Creates a Google Analytics property with the specified location and
124+
// attributes.
125125
rpc CreateProperty(CreatePropertyRequest) returns (Property) {
126126
option (google.api.http) = {
127127
post: "/v1beta/properties"
@@ -140,7 +140,7 @@ service AnalyticsAdminService {
140140
// will be permanently purged.
141141
// https://support.google.com/analytics/answer/6154772
142142
//
143-
// Returns an error if the target is not found, or is not a GA4 Property.
143+
// Returns an error if the target is not found.
144144
rpc DeleteProperty(DeletePropertyRequest) returns (Property) {
145145
option (google.api.http) = {
146146
delete: "/v1beta/{name=properties/*}"
@@ -233,7 +233,7 @@ service AnalyticsAdminService {
233233
option (google.api.method_signature) = "name";
234234
}
235235

236-
// Lookup for a single "GA4" MeasurementProtocolSecret.
236+
// Lookup for a single MeasurementProtocolSecret.
237237
rpc GetMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest)
238238
returns (MeasurementProtocolSecret) {
239239
option (google.api.http) = {
@@ -297,6 +297,9 @@ service AnalyticsAdminService {
297297

298298
// Searches through all changes to an account or its children given the
299299
// specified set of filters.
300+
//
301+
// Only returns the subset of changes supported by the API. The UI may return
302+
// additional changes.
300303
rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest)
301304
returns (SearchChangeHistoryEventsResponse) {
302305
option (google.api.http) = {
@@ -571,12 +574,17 @@ service AnalyticsAdminService {
571574
// only be requested on Google Analytics 360 properties. This method is only
572575
// available to Administrators.
573576
//
574-
// These data access records include GA4 UI Reporting, GA4 UI Explorations,
575-
// GA4 Data API, and other products like Firebase & Admob that can retrieve
577+
// These data access records include GA UI Reporting, GA UI Explorations,
578+
// GA Data API, and other products like Firebase & Admob that can retrieve
576579
// data from Google Analytics through a linkage. These records don't include
577580
// property configuration changes like adding a stream or changing a
578581
// property's time zone. For configuration change history, see
579582
// [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).
583+
//
584+
// To give your feedback on this API, complete the [Google Analytics Access
585+
// Reports
586+
// feedback](https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform)
587+
// form.
580588
rpc RunAccessReport(RunAccessReportRequest)
581589
returns (RunAccessReportResponse) {
582590
option (google.api.http) = {
@@ -597,9 +605,9 @@ message RunAccessReportRequest {
597605
// access for all properties under that account.
598606
//
599607
// To request at the property level, entity should be for example
600-
// 'properties/123' if "123" is your GA4 property ID. To request at the
601-
// account level, entity should be for example 'accounts/1234' if "1234" is
602-
// your GA4 Account ID.
608+
// 'properties/123' if "123" is your Google Analytics property ID. To request
609+
// at the account level, entity should be for example 'accounts/1234' if
610+
// "1234" is your Google Analytics Account ID.
603611
string entity = 1;
604612

605613
// The dimensions requested and displayed in the response. Requests are
@@ -1142,9 +1150,14 @@ message SearchChangeHistoryEventsRequest {
11421150
[(google.api.field_behavior) = OPTIONAL];
11431151

11441152
// Optional. The maximum number of ChangeHistoryEvent items to return.
1145-
// The service may return fewer than this value, even if there are additional
1146-
// pages. If unspecified, at most 50 items will be returned.
1147-
// The maximum value is 200 (higher values will be coerced to the maximum).
1153+
// If unspecified, at most 50 items will be returned. The maximum value is 200
1154+
// (higher values will be coerced to the maximum).
1155+
//
1156+
// Note that the service may return a page with fewer items than this value
1157+
// specifies (potentially even zero), and that there still may be additional
1158+
// pages. If you want a particular number of items, you'll need to continue
1159+
// requesting additional pages using `page_token` until you get the needed
1160+
// number.
11481161
int32 page_size = 8 [(google.api.field_behavior) = OPTIONAL];
11491162

11501163
// Optional. A page token, received from a previous

google/analytics/admin/v1beta/resources.proto

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ enum ChangeHistoryResourceType {
183183
// MeasurementProtocolSecret resource
184184
MEASUREMENT_PROTOCOL_SECRET = 10;
185185

186+
// CustomDimension resource
187+
CUSTOM_DIMENSION = 11;
188+
189+
// CustomMetric resource
190+
CUSTOM_METRIC = 12;
191+
186192
// DataRetentionSettings resource
187193
DATA_RETENTION_SETTINGS = 13;
188194

@@ -199,18 +205,18 @@ enum ChangeHistoryResourceType {
199205
ATTRIBUTION_SETTINGS = 20;
200206
}
201207

202-
// Types of Property resources.
208+
// Types of `Property` resources.
203209
enum PropertyType {
204210
// Unknown or unspecified property type
205211
PROPERTY_TYPE_UNSPECIFIED = 0;
206212

207-
// Ordinary GA4 property
213+
// Ordinary Google Analytics property
208214
PROPERTY_TYPE_ORDINARY = 1;
209215

210-
// GA4 subproperty
216+
// Google Analytics subproperty
211217
PROPERTY_TYPE_SUBPROPERTY = 2;
212218

213-
// GA4 rollup property
219+
// Google Analytics rollup property
214220
PROPERTY_TYPE_ROLLUP = 3;
215221
}
216222

@@ -255,7 +261,7 @@ message Account {
255261
];
256262
}
257263

258-
// A resource message representing a Google Analytics GA4 property.
264+
// A resource message representing a Google Analytics property.
259265
message Property {
260266
option (google.api.resource) = {
261267
type: "analyticsadmin.googleapis.com/Property"
@@ -446,7 +452,7 @@ message DataStream {
446452
[(google.api.field_behavior) = OUTPUT_ONLY];
447453
}
448454

449-
// A link between a GA4 property and a Firebase project.
455+
// A link between a Google Analytics property and a Firebase project.
450456
message FirebaseLink {
451457
option (google.api.resource) = {
452458
type: "analyticsadmin.googleapis.com/FirebaseLink"
@@ -470,7 +476,7 @@ message FirebaseLink {
470476
[(google.api.field_behavior) = OUTPUT_ONLY];
471477
}
472478

473-
// A link between a GA4 property and a Google Ads account.
479+
// A link between a Google Analytics property and a Google Ads account.
474480
message GoogleAdsLink {
475481
option (google.api.resource) = {
476482
type: "analyticsadmin.googleapis.com/GoogleAdsLink"
@@ -542,7 +548,7 @@ message DataSharingSettings {
542548
}
543549

544550
// A virtual resource representing an overview of an account and
545-
// all its child GA4 properties.
551+
// all its child Google Analytics properties.
546552
message AccountSummary {
547553
option (google.api.resource) = {
548554
type: "analyticsadmin.googleapis.com/AccountSummary"
@@ -568,7 +574,7 @@ message AccountSummary {
568574
repeated PropertySummary property_summaries = 4;
569575
}
570576

571-
// A virtual resource representing metadata for a GA4 property.
577+
// A virtual resource representing metadata for a Google Analytics property.
572578
message PropertySummary {
573579
// Resource name of property referred to by this property summary
574580
// Format: properties/{property_id}
@@ -1024,24 +1030,29 @@ message DataRetentionSettings {
10241030
FOURTEEN_MONTHS = 3;
10251031

10261032
// The data retention time duration is 26 months.
1027-
// Available to 360 properties only.
1033+
// Available to 360 properties only. Available for event data only.
10281034
TWENTY_SIX_MONTHS = 4;
10291035

10301036
// The data retention time duration is 38 months.
1031-
// Available to 360 properties only.
1037+
// Available to 360 properties only. Available for event data only.
10321038
THIRTY_EIGHT_MONTHS = 5;
10331039

10341040
// The data retention time duration is 50 months.
1035-
// Available to 360 properties only.
1041+
// Available to 360 properties only. Available for event data only.
10361042
FIFTY_MONTHS = 6;
10371043
}
10381044

10391045
// Output only. Resource name for this DataRetentionSetting resource.
10401046
// Format: properties/{property}/dataRetentionSettings
10411047
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
10421048

1043-
// The length of time that event-level data is retained.
1044-
RetentionDuration event_data_retention = 2;
1049+
// Required. The length of time that event-level data is retained.
1050+
RetentionDuration event_data_retention = 2
1051+
[(google.api.field_behavior) = REQUIRED];
1052+
1053+
// Required. The length of time that user-level data is retained.
1054+
RetentionDuration user_data_retention = 4
1055+
[(google.api.field_behavior) = REQUIRED];
10451056

10461057
// If true, reset the retention period for the user identifier with every
10471058
// event from that user.

0 commit comments

Comments
 (0)