Skip to content

Commit 54861b4

Browse files
Google APIscopybara-github
authored andcommitted
feat: add the AcknowledgeUserDataCollection operation which acknowledges the terms of user data collection for the specified property
feat: add the new resource type `DataStream`, which is planned to eventually replace `WebDataStream`, `IosAppDataStream`, `AndroidAppDataStream` resources fix!: remove `GetEnhancedMeasurementSettings`, `UpdateEnhancedMeasurementSettingsRequest`, `UpdateEnhancedMeasurementSettingsRequest` operations from the API feat: add `CreateDataStream`, `DeleteDataStream`, `UpdateDataStream`, `ListDataStreams` operations to support the new `DataStream` resource feat: add `DISPLAY_VIDEO_360_ADVERTISER_LINK`, `DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL` fields to `ChangeHistoryResourceType` enum feat: add the `account` field to the `Property` type docs: update the documentation with a new list of valid values for `UserLink.direct_roles` field PiperOrigin-RevId: 416888961
1 parent 82a5422 commit 54861b4

3 files changed

Lines changed: 304 additions & 125 deletions

File tree

google/analytics/admin/v1alpha/analytics_admin.proto

Lines changed: 161 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -405,27 +405,6 @@ service AnalyticsAdminService {
405405
option (google.api.method_signature) = "parent";
406406
}
407407

408-
// Returns the singleton enhanced measurement settings for this web stream.
409-
// Note that the stream must enable enhanced measurement for these settings to
410-
// take effect.
411-
rpc GetEnhancedMeasurementSettings(GetEnhancedMeasurementSettingsRequest) returns (EnhancedMeasurementSettings) {
412-
option (google.api.http) = {
413-
get: "/v1alpha/{name=properties/*/webDataStreams/*/enhancedMeasurementSettings}"
414-
};
415-
option (google.api.method_signature) = "name";
416-
}
417-
418-
// Updates the singleton enhanced measurement settings for this web stream.
419-
// Note that the stream must enable enhanced measurement for these settings to
420-
// take effect.
421-
rpc UpdateEnhancedMeasurementSettings(UpdateEnhancedMeasurementSettingsRequest) returns (EnhancedMeasurementSettings) {
422-
option (google.api.http) = {
423-
patch: "/v1alpha/{enhanced_measurement_settings.name=properties/*/webDataStreams/*/enhancedMeasurementSettings}"
424-
body: "enhanced_measurement_settings"
425-
};
426-
option (google.api.method_signature) = "enhanced_measurement_settings,update_mask";
427-
}
428-
429408
// Creates a FirebaseLink.
430409
//
431410
// Properties can have at most one FirebaseLink.
@@ -583,6 +562,17 @@ service AnalyticsAdminService {
583562
option (google.api.method_signature) = "measurement_protocol_secret,update_mask";
584563
}
585564

565+
// Acknowledges the terms of user data collection for the specified property.
566+
//
567+
// This acknowledgement must be completed (either in the Google Analytics UI
568+
// or via this API) before MeasurementProtocolSecret resources may be created.
569+
rpc AcknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest) returns (AcknowledgeUserDataCollectionResponse) {
570+
option (google.api.http) = {
571+
post: "/v1alpha/{property=properties/*}:acknowledgeUserDataCollection"
572+
body: "*"
573+
};
574+
}
575+
586576
// Searches through all changes to an account or its children given the
587577
// specified set of filters.
588578
rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest) returns (SearchChangeHistoryEventsResponse) {
@@ -848,6 +838,48 @@ service AnalyticsAdminService {
848838
};
849839
option (google.api.method_signature) = "data_retention_settings,update_mask";
850840
}
841+
842+
// Creates a DataStream.
843+
rpc CreateDataStream(CreateDataStreamRequest) returns (DataStream) {
844+
option (google.api.http) = {
845+
post: "/v1alpha/{parent=properties/*}/dataStreams"
846+
body: "data_stream"
847+
};
848+
option (google.api.method_signature) = "parent,data_stream";
849+
}
850+
851+
// Deletes a DataStream on a property.
852+
rpc DeleteDataStream(DeleteDataStreamRequest) returns (google.protobuf.Empty) {
853+
option (google.api.http) = {
854+
delete: "/v1alpha/{name=properties/*/dataStreams/*}"
855+
};
856+
option (google.api.method_signature) = "name";
857+
}
858+
859+
// Updates a DataStream on a property.
860+
rpc UpdateDataStream(UpdateDataStreamRequest) returns (DataStream) {
861+
option (google.api.http) = {
862+
patch: "/v1alpha/{data_stream.name=properties/*/dataStreams/*}"
863+
body: "data_stream"
864+
};
865+
option (google.api.method_signature) = "data_stream,update_mask";
866+
}
867+
868+
// Lists DataStreams on a property.
869+
rpc ListDataStreams(ListDataStreamsRequest) returns (ListDataStreamsResponse) {
870+
option (google.api.http) = {
871+
get: "/v1alpha/{parent=properties/*}/dataStreams"
872+
};
873+
option (google.api.method_signature) = "parent";
874+
}
875+
876+
// Lookup for a single DataStream.
877+
rpc GetDataStream(GetDataStreamRequest) returns (DataStream) {
878+
option (google.api.http) = {
879+
get: "/v1alpha/{name=properties/*/dataStreams/*}"
880+
};
881+
option (google.api.method_signature) = "name";
882+
}
851883
}
852884

853885
// Request message for GetAccount RPC.
@@ -1479,32 +1511,6 @@ message ListAndroidAppDataStreamsResponse {
14791511
string next_page_token = 2;
14801512
}
14811513

1482-
// Request message for GetEnhancedMeasurementSettings RPC.
1483-
message GetEnhancedMeasurementSettingsRequest {
1484-
// Required. The name of the settings to lookup.
1485-
// Format:
1486-
// properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings
1487-
// Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
1488-
string name = 1 [
1489-
(google.api.field_behavior) = REQUIRED,
1490-
(google.api.resource_reference) = {
1491-
type: "analyticsadmin.googleapis.com/EnhancedMeasurementSettings"
1492-
}
1493-
];
1494-
}
1495-
1496-
// Request message for UpdateEnhancedMeasurementSettings RPC.
1497-
message UpdateEnhancedMeasurementSettingsRequest {
1498-
// Required. The settings to update.
1499-
// The `name` field is used to identify the settings to be updated.
1500-
EnhancedMeasurementSettings enhanced_measurement_settings = 1 [(google.api.field_behavior) = REQUIRED];
1501-
1502-
// Required. The list of fields to be updated. Field names must be in snake case
1503-
// (e.g., "field_to_update"). Omitted fields will not be updated. To replace
1504-
// the entire entity, use one path with the string "*" to match all fields.
1505-
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
1506-
}
1507-
15081514
// Request message for CreateFirebaseLink RPC
15091515
message CreateFirebaseLinkRequest {
15101516
// Required. Format: properties/{property_id}
@@ -1689,6 +1695,32 @@ message ListAccountSummariesResponse {
16891695
string next_page_token = 2;
16901696
}
16911697

1698+
// Request message for AcknowledgeUserDataCollection RPC.
1699+
message AcknowledgeUserDataCollectionRequest {
1700+
// Required. The property for which to acknowledge user data collection.
1701+
string property = 1 [
1702+
(google.api.field_behavior) = REQUIRED,
1703+
(google.api.resource_reference) = {
1704+
type: "analyticsadmin.googleapis.com/Property"
1705+
}
1706+
];
1707+
1708+
// Required. An acknowledgement that the caller of this method understands the terms
1709+
// of user data collection.
1710+
//
1711+
// This field must contain the exact value:
1712+
// "I acknowledge that I have the necessary privacy disclosures and rights
1713+
// from my end users for the collection and processing of their data,
1714+
// including the association of such data with the visitation information
1715+
// Google Analytics collects from my site and/or app property."
1716+
string acknowledgement = 2 [(google.api.field_behavior) = REQUIRED];
1717+
}
1718+
1719+
// Response message for AcknowledgeUserDataCollection RPC.
1720+
message AcknowledgeUserDataCollectionResponse {
1721+
1722+
}
1723+
16921724
// Request message for SearchChangeHistoryEvents RPC.
16931725
message SearchChangeHistoryEventsRequest {
16941726
// Required. The account resource for which to return change history resources.
@@ -2314,3 +2346,85 @@ message UpdateDataRetentionSettingsRequest {
23142346
// the entire entity, use one path with the string "*" to match all fields.
23152347
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
23162348
}
2349+
2350+
// Request message for CreateDataStream RPC.
2351+
message CreateDataStreamRequest {
2352+
// Required. Example format: properties/1234
2353+
string parent = 1 [
2354+
(google.api.field_behavior) = REQUIRED,
2355+
(google.api.resource_reference) = {
2356+
child_type: "analyticsadmin.googleapis.com/DataStream"
2357+
}
2358+
];
2359+
2360+
// Required. The DataStream to create.
2361+
DataStream data_stream = 2 [(google.api.field_behavior) = REQUIRED];
2362+
}
2363+
2364+
// Request message for DeleteDataStream RPC.
2365+
message DeleteDataStreamRequest {
2366+
// Required. The name of the DataStream to delete.
2367+
// Example format: properties/1234/dataStreams/5678
2368+
string name = 1 [
2369+
(google.api.field_behavior) = REQUIRED,
2370+
(google.api.resource_reference) = {
2371+
type: "analyticsadmin.googleapis.com/DataStream"
2372+
}
2373+
];
2374+
}
2375+
2376+
// Request message for UpdateDataStream RPC.
2377+
message UpdateDataStreamRequest {
2378+
// The DataStream to update
2379+
DataStream data_stream = 1;
2380+
2381+
// Required. The list of fields to be updated. Omitted fields will not be updated.
2382+
// To replace the entire entity, use one path with the string "*" to match
2383+
// all fields.
2384+
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
2385+
}
2386+
2387+
// Request message for ListDataStreams RPC.
2388+
message ListDataStreamsRequest {
2389+
// Required. Example format: properties/1234
2390+
string parent = 1 [
2391+
(google.api.field_behavior) = REQUIRED,
2392+
(google.api.resource_reference) = {
2393+
child_type: "analyticsadmin.googleapis.com/DataStream"
2394+
}
2395+
];
2396+
2397+
// The maximum number of resources to return.
2398+
// If unspecified, at most 50 resources will be returned.
2399+
// The maximum value is 200 (higher values will be coerced to the maximum).
2400+
int32 page_size = 2;
2401+
2402+
// A page token, received from a previous `ListDataStreams` call.
2403+
// Provide this to retrieve the subsequent page.
2404+
//
2405+
// When paginating, all other parameters provided to `ListDataStreams` must
2406+
// match the call that provided the page token.
2407+
string page_token = 3;
2408+
}
2409+
2410+
// Response message for ListDataStreams RPC.
2411+
message ListDataStreamsResponse {
2412+
// List of DataStreams.
2413+
repeated DataStream data_streams = 1;
2414+
2415+
// A token, which can be sent as `page_token` to retrieve the next page.
2416+
// If this field is omitted, there are no subsequent pages.
2417+
string next_page_token = 2;
2418+
}
2419+
2420+
// Request message for GetDataStream RPC.
2421+
message GetDataStreamRequest {
2422+
// Required. The name of the DataStream to get.
2423+
// Example format: properties/1234/dataStreams/5678
2424+
string name = 1 [
2425+
(google.api.field_behavior) = REQUIRED,
2426+
(google.api.resource_reference) = {
2427+
type: "analyticsadmin.googleapis.com/DataStream"
2428+
}
2429+
];
2430+
}

google/analytics/admin/v1alpha/analyticsadmin_v1alpha.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@ authentication:
7777
canonical_scopes: |-
7878
https://www.googleapis.com/auth/analytics.edit,
7979
https://www.googleapis.com/auth/analytics.readonly
80-
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLink
80+
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataStream
8181
oauth:
8282
canonical_scopes: |-
8383
https://www.googleapis.com/auth/analytics.edit,
8484
https://www.googleapis.com/auth/analytics.readonly
85-
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkProposal
85+
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLink
8686
oauth:
8787
canonical_scopes: |-
8888
https://www.googleapis.com/auth/analytics.edit,
8989
https://www.googleapis.com/auth/analytics.readonly
90-
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetEnhancedMeasurementSettings
90+
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkProposal
9191
oauth:
9292
canonical_scopes: |-
9393
https://www.googleapis.com/auth/analytics.edit,
@@ -157,6 +157,11 @@ authentication:
157157
canonical_scopes: |-
158158
https://www.googleapis.com/auth/analytics.edit,
159159
https://www.googleapis.com/auth/analytics.readonly
160+
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDataStreams
161+
oauth:
162+
canonical_scopes: |-
163+
https://www.googleapis.com/auth/analytics.edit,
164+
https://www.googleapis.com/auth/analytics.readonly
160165
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinkProposals
161166
oauth:
162167
canonical_scopes: |-

0 commit comments

Comments
 (0)