Skip to content

Commit

Permalink
feat: [analytics-admin] add GetKeyEvent, CreateKeyEvent, `ListKey…
Browse files Browse the repository at this point in the history
…Events`, `UpdateKeyEvent`, `DeleteKeyEvent` methods to the Admin API v1beta (#5556)

* feat: add `GetKeyEvent`, `CreateKeyEvent`, `ListKeyEvents`, `UpdateKeyEvent`, `DeleteKeyEvent` methods to the Admin API v1beta
feat: mark `GetConversionEvent`, `CreateConversionEvent`, `ListConversionEvents`, `UpdateConversionEvent`, `DeleteConversionEvent` methods as deprecated in the Admin API v1beta
feat: add the `default_conversion_value` field to the `ConversionEvent` resource in the Admin API v1beta
feat: add the `include_all_users` and `expand_groups` fields to the `RunAccessReportRequest` resource in the Admin API v1beta
feat: add the `gmp_organization` field to the `Account` resource in the Admin API v1beta
chore: update go_package to match open source code
docs: change comment for methods `DeleteAccount`, `DeleteProperty`, and `RunAccessReport` in service `AnalyticsAdminService`
docs: change comment in fields `account` and `property` in message `SearchChangeHistoryEventsRequest`
docs: change comment for field `property_type` in message `Property`

PiperOrigin-RevId: 653218190

Source-Link: googleapis/googleapis@b05173c

Source-Link: googleapis/googleapis-gen@b2881b6
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFuYWx5dGljcy1hZG1pbi8uT3dsQm90LnlhbWwiLCJoIjoiYjI4ODFiNjc0ZTAwMDY1MjVlMzdhMTY2ODk0MTUyM2MwZjdmZDkxOSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jul 17, 2024
1 parent 09fd87c commit f0403d5
Show file tree
Hide file tree
Showing 24 changed files with 14,073 additions and 7,380 deletions.
5 changes: 5 additions & 0 deletions packages/google-analytics-admin/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ syntax = "proto3";

package google.analytics.admin.v1beta;

option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin";
option go_package = "cloud.google.com/go/analytics/admin/apiv1beta/adminpb;adminpb";
option java_multiple_files = true;
option java_outer_classname = "AccessReportProto";
option java_package = "com.google.analytics.admin.v1beta";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";

option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin";
option go_package = "cloud.google.com/go/analytics/admin/apiv1beta/adminpb;adminpb";
option java_multiple_files = true;
option java_outer_classname = "AnalyticsAdminProto";
option java_package = "com.google.analytics.admin.v1beta";
Expand Down Expand Up @@ -64,7 +64,7 @@ service AnalyticsAdminService {
//
// If the accounts are not restored before the expiration time, the account
// and all child resources (eg: Properties, GoogleAdsLinks, Streams,
// UserLinks) will be permanently purged.
// AccessBindings) will be permanently purged.
// https://support.google.com/analytics/answer/6154772
//
// Returns an error if the target is not found.
Expand Down Expand Up @@ -136,7 +136,7 @@ service AnalyticsAdminService {
// However, they can be restored using the Trash Can UI.
//
// If the properties are not restored before the expiration time, the Property
// and all child resources (eg: GoogleAdsLinks, Streams, UserLinks)
// and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings)
// will be permanently purged.
// https://support.google.com/analytics/answer/6154772
//
Expand Down Expand Up @@ -305,54 +305,107 @@ service AnalyticsAdminService {
};
}

// Deprecated: Use `CreateKeyEvent` instead.
// Creates a conversion event with the specified attributes.
rpc CreateConversionEvent(CreateConversionEventRequest)
returns (ConversionEvent) {
option deprecated = true;
option (google.api.http) = {
post: "/v1beta/{parent=properties/*}/conversionEvents"
body: "conversion_event"
};
option (google.api.method_signature) = "parent,conversion_event";
}

// Deprecated: Use `UpdateKeyEvent` instead.
// Updates a conversion event with the specified attributes.
rpc UpdateConversionEvent(UpdateConversionEventRequest)
returns (ConversionEvent) {
option deprecated = true;
option (google.api.http) = {
patch: "/v1beta/{conversion_event.name=properties/*/conversionEvents/*}"
body: "conversion_event"
};
option (google.api.method_signature) = "conversion_event,update_mask";
}

// Deprecated: Use `GetKeyEvent` instead.
// Retrieve a single conversion event.
rpc GetConversionEvent(GetConversionEventRequest) returns (ConversionEvent) {
option deprecated = true;
option (google.api.http) = {
get: "/v1beta/{name=properties/*/conversionEvents/*}"
};
option (google.api.method_signature) = "name";
}

// Deprecated: Use `DeleteKeyEvent` instead.
// Deletes a conversion event in a property.
rpc DeleteConversionEvent(DeleteConversionEventRequest)
returns (google.protobuf.Empty) {
option deprecated = true;
option (google.api.http) = {
delete: "/v1beta/{name=properties/*/conversionEvents/*}"
};
option (google.api.method_signature) = "name";
}

// Deprecated: Use `ListKeyEvents` instead.
// Returns a list of conversion events in the specified parent property.
//
// Returns an empty list if no conversion events are found.
rpc ListConversionEvents(ListConversionEventsRequest)
returns (ListConversionEventsResponse) {
option deprecated = true;
option (google.api.http) = {
get: "/v1beta/{parent=properties/*}/conversionEvents"
};
option (google.api.method_signature) = "parent";
}

// Creates a Key Event.
rpc CreateKeyEvent(CreateKeyEventRequest) returns (KeyEvent) {
option (google.api.http) = {
post: "/v1beta/{parent=properties/*}/keyEvents"
body: "key_event"
};
option (google.api.method_signature) = "parent,key_event";
}

// Updates a Key Event.
rpc UpdateKeyEvent(UpdateKeyEventRequest) returns (KeyEvent) {
option (google.api.http) = {
patch: "/v1beta/{key_event.name=properties/*/keyEvents/*}"
body: "key_event"
};
option (google.api.method_signature) = "key_event,update_mask";
}

// Retrieve a single Key Event.
rpc GetKeyEvent(GetKeyEventRequest) returns (KeyEvent) {
option (google.api.http) = {
get: "/v1beta/{name=properties/*/keyEvents/*}"
};
option (google.api.method_signature) = "name";
}

// Deletes a Key Event.
rpc DeleteKeyEvent(DeleteKeyEventRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1beta/{name=properties/*/keyEvents/*}"
};
option (google.api.method_signature) = "name";
}

// Returns a list of Key Events in the specified parent property.
// Returns an empty list if no Key Events are found.
rpc ListKeyEvents(ListKeyEventsRequest) returns (ListKeyEventsResponse) {
option (google.api.http) = {
get: "/v1beta/{parent=properties/*}/keyEvents"
};
option (google.api.method_signature) = "parent";
}

// Creates a CustomDimension.
rpc CreateCustomDimension(CreateCustomDimensionRequest)
returns (CustomDimension) {
Expand Down Expand Up @@ -513,8 +566,10 @@ service AnalyticsAdminService {
// records of each time a user reads Google Analytics reporting data. Access
// records are retained for up to 2 years.
//
// Data Access Reports can be requested for a property. The property must be
// in Google Analytics 360. This method is only available to Administrators.
// Data Access Reports can be requested for a property. Reports may be
// requested for any property, but dimensions that aren't related to quota can
// only be requested on Google Analytics 360 properties. This method is only
// available to Administrators.
//
// These data access records include GA4 UI Reporting, GA4 UI Explorations,
// GA4 Data API, and other products like Firebase & Admob that can retrieve
Expand Down Expand Up @@ -613,6 +668,19 @@ message RunAccessReportRequest {
// quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level
// requests, this field must be false.
bool return_entity_quota = 11;

// Optional. Determines whether to include users who have never made an API
// call in the response. If true, all users with access to the specified
// property or account are included in the response, regardless of whether
// they have made an API call or not. If false, only the users who have made
// an API call will be included.
bool include_all_users = 12 [(google.api.field_behavior) = OPTIONAL];

// Optional. Decides whether to return the users within user groups. This
// field works only when include_all_users is set to true. If true, it will
// return all users with access to the specified property or account.
// If false, only the users with direct access will be returned.
bool expand_groups = 13 [(google.api.field_behavior) = OPTIONAL];
}

// The customized Data Access Record Report response.
Expand Down Expand Up @@ -830,7 +898,8 @@ message DeletePropertyRequest {
// Request message for CreateFirebaseLink RPC
message CreateFirebaseLinkRequest {
// Required. Format: properties/{property_id}
// Example: properties/1234
//
// Example: `properties/1234`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -845,7 +914,8 @@ message CreateFirebaseLinkRequest {
// Request message for DeleteFirebaseLink RPC
message DeleteFirebaseLinkRequest {
// Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
// Example: properties/1234/firebaseLinks/5678
//
// Example: `properties/1234/firebaseLinks/5678`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -857,7 +927,8 @@ message DeleteFirebaseLinkRequest {
// Request message for ListFirebaseLinks RPC
message ListFirebaseLinksRequest {
// Required. Format: properties/{property_id}
// Example: properties/1234
//
// Example: `properties/1234`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -965,7 +1036,8 @@ message ListGoogleAdsLinksResponse {
message GetDataSharingSettingsRequest {
// Required. The name of the settings to lookup.
// Format: accounts/{account}/dataSharingSettings
// Example: "accounts/1000/dataSharingSettings"
//
// Example: `accounts/1000/dataSharingSettings`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -1026,7 +1098,9 @@ message AcknowledgeUserDataCollectionResponse {}
// Request message for SearchChangeHistoryEvents RPC.
message SearchChangeHistoryEventsRequest {
// Required. The account resource for which to return change history
// resources.
// resources. Format: accounts/{account}
//
// Example: `accounts/100`
string account = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -1036,6 +1110,9 @@ message SearchChangeHistoryEventsRequest {

// Optional. Resource name for a child property. If set, only return changes
// made to this property or its child resources.
// Format: properties/{propertyId}
//
// Example: `properties/100`
string property = 2 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -1264,6 +1341,94 @@ message ListConversionEventsResponse {
string next_page_token = 2;
}

// Request message for CreateKeyEvent RPC
message CreateKeyEventRequest {
// Required. The Key Event to create.
KeyEvent key_event = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The resource name of the parent property where this Key Event
// will be created. Format: properties/123
string parent = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "analyticsadmin.googleapis.com/KeyEvent"
}
];
}

// Request message for UpdateKeyEvent RPC
message UpdateKeyEventRequest {
// Required. The Key Event to update.
// The `name` field is used to identify the settings to be updated.
KeyEvent key_event = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The list of fields to be updated. Field names must be in snake
// case (e.g., "field_to_update"). Omitted fields will not be updated. To
// replace the entire entity, use one path with the string "*" to match all
// fields.
google.protobuf.FieldMask update_mask = 2
[(google.api.field_behavior) = REQUIRED];
}

// Request message for GetKeyEvent RPC
message GetKeyEventRequest {
// Required. The resource name of the Key Event to retrieve.
// Format: properties/{property}/keyEvents/{key_event}
// Example: "properties/123/keyEvents/456"
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "analyticsadmin.googleapis.com/KeyEvent"
}
];
}

// Request message for DeleteKeyEvent RPC
message DeleteKeyEventRequest {
// Required. The resource name of the Key Event to delete.
// Format: properties/{property}/keyEvents/{key_event}
// Example: "properties/123/keyEvents/456"
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "analyticsadmin.googleapis.com/KeyEvent"
}
];
}

// Request message for ListKeyEvents RPC
message ListKeyEventsRequest {
// Required. The resource name of the parent property.
// Example: 'properties/123'
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "analyticsadmin.googleapis.com/KeyEvent"
}
];

// The maximum number of resources to return.
// If unspecified, at most 50 resources will be returned.
// The maximum value is 200; (higher values will be coerced to the maximum)
int32 page_size = 2;

// A page token, received from a previous `ListKeyEvents` call.
// Provide this to retrieve the subsequent page.
// When paginating, all other parameters provided to `ListKeyEvents`
// must match the call that provided the page token.
string page_token = 3;
}

// Response message for ListKeyEvents RPC.
message ListKeyEventsResponse {
// The requested Key Events
repeated KeyEvent key_events = 1;

// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
string next_page_token = 2;
}

// Request message for CreateCustomDimension RPC.
message CreateCustomDimensionRequest {
// Required. Example format: properties/1234
Expand Down
Loading

0 comments on commit f0403d5

Please sign in to comment.