Skip to content

Commit 2f0e6e1

Browse files
feat: [analytics-admin] add GetAdSenseLink, CreateAdSenseLink, DeleteAdSenseLink, ListAdSenseLinks methods to the Admin API v1alpha (#4276)
* feat: add `GetAdSenseLink`, `CreateAdSenseLink`, `DeleteAdSenseLink`, `ListAdSenseLinks` methods to the Admin API v1alpha feat: add `FetchConnectedGa4Property` method to the Admin API v1alpha feat: add `CreateEventCreateRule`, `UpdateEventCreateRule`,`DeleteEventCreateRule`, `ListEventCreateRules` methods to the Admin API v1alpha feat: add `EventCreateRule`, `MatchingCondition` types to the Admin API v1alpha feat: add `AdSenseLink` type to the Admin API v1alpha feat: add `AUDIENCE`, `EVENT_CREATE_RULE` options to the `ChangeHistoryResourceType` enum feat: add `audience`, `event_create_rule` fields to the `ChangeHistoryResource.resource` oneof field PiperOrigin-RevId: 531601348 Source-Link: googleapis/googleapis@ef2e2ea Source-Link: googleapis/googleapis-gen@6632490 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFuYWx5dGljcy1hZG1pbi8uT3dsQm90LnlhbWwiLCJoIjoiNjYzMjQ5MGNjZTZiZDkyZGRhZDM3Nzk3NDk0NmFkMTFmMWFiNjUwMSJ9 * 🦉 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> Co-authored-by: Denis DelGrosso <[email protected]>
1 parent 3defaa1 commit 2f0e6e1

24 files changed

+19751
-8611
lines changed

packages/google-analytics-admin/README.md

+186-178
Large diffs are not rendered by default.

packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto

+248
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.analytics.admin.v1alpha;
1919
import "google/analytics/admin/v1alpha/access_report.proto";
2020
import "google/analytics/admin/v1alpha/audience.proto";
2121
import "google/analytics/admin/v1alpha/channel_group.proto";
22+
import "google/analytics/admin/v1alpha/event_create_and_edit.proto";
2223
import "google/analytics/admin/v1alpha/expanded_data_set.proto";
2324
import "google/analytics/admin/v1alpha/resources.proto";
2425
import "google/api/annotations.proto";
@@ -1238,6 +1239,87 @@ service AnalyticsAdminService {
12381239
get: "/v1alpha/properties:fetchConnectedGa4Property"
12391240
};
12401241
}
1242+
1243+
// Looks up a single AdSenseLink.
1244+
rpc GetAdSenseLink(GetAdSenseLinkRequest) returns (AdSenseLink) {
1245+
option (google.api.http) = {
1246+
get: "/v1alpha/{name=properties/*/adSenseLinks/*}"
1247+
};
1248+
option (google.api.method_signature) = "name";
1249+
}
1250+
1251+
// Creates an AdSenseLink.
1252+
rpc CreateAdSenseLink(CreateAdSenseLinkRequest) returns (AdSenseLink) {
1253+
option (google.api.http) = {
1254+
post: "/v1alpha/{parent=properties/*}/adSenseLinks"
1255+
body: "adsense_link"
1256+
};
1257+
option (google.api.method_signature) = "parent,adsense_link";
1258+
}
1259+
1260+
// Deletes an AdSenseLink.
1261+
rpc DeleteAdSenseLink(DeleteAdSenseLinkRequest)
1262+
returns (google.protobuf.Empty) {
1263+
option (google.api.http) = {
1264+
delete: "/v1alpha/{name=properties/*/adSenseLinks/*}"
1265+
};
1266+
option (google.api.method_signature) = "name";
1267+
}
1268+
1269+
// Lists AdSenseLinks on a property.
1270+
rpc ListAdSenseLinks(ListAdSenseLinksRequest)
1271+
returns (ListAdSenseLinksResponse) {
1272+
option (google.api.http) = {
1273+
get: "/v1alpha/{parent=properties/*}/adSenseLinks"
1274+
};
1275+
option (google.api.method_signature) = "parent";
1276+
}
1277+
1278+
// Lookup for a single EventCreateRule.
1279+
rpc GetEventCreateRule(GetEventCreateRuleRequest) returns (EventCreateRule) {
1280+
option (google.api.http) = {
1281+
get: "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}"
1282+
};
1283+
option (google.api.method_signature) = "name";
1284+
}
1285+
1286+
// Lists EventCreateRules on a web data stream.
1287+
rpc ListEventCreateRules(ListEventCreateRulesRequest)
1288+
returns (ListEventCreateRulesResponse) {
1289+
option (google.api.http) = {
1290+
get: "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules"
1291+
};
1292+
option (google.api.method_signature) = "parent";
1293+
}
1294+
1295+
// Creates an EventCreateRule.
1296+
rpc CreateEventCreateRule(CreateEventCreateRuleRequest)
1297+
returns (EventCreateRule) {
1298+
option (google.api.http) = {
1299+
post: "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules"
1300+
body: "event_create_rule"
1301+
};
1302+
option (google.api.method_signature) = "parent,event_create_rule";
1303+
}
1304+
1305+
// Updates an EventCreateRule.
1306+
rpc UpdateEventCreateRule(UpdateEventCreateRuleRequest)
1307+
returns (EventCreateRule) {
1308+
option (google.api.http) = {
1309+
patch: "/v1alpha/{event_create_rule.name=properties/*/dataStreams/*/eventCreateRules/*}"
1310+
body: "event_create_rule"
1311+
};
1312+
option (google.api.method_signature) = "event_create_rule,update_mask";
1313+
}
1314+
1315+
// Deletes an EventCreateRule.
1316+
rpc DeleteEventCreateRule(DeleteEventCreateRuleRequest)
1317+
returns (google.protobuf.Empty) {
1318+
option (google.api.http) = {
1319+
delete: "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}"
1320+
};
1321+
option (google.api.method_signature) = "name";
1322+
}
12411323
}
12421324

12431325
// The request for a Data Access Record Report.
@@ -3406,6 +3488,83 @@ message ListConnectedSiteTagsResponse {
34063488
repeated ConnectedSiteTag connected_site_tags = 1;
34073489
}
34083490

3491+
// Request message to be passed to CreateAdSenseLink method.
3492+
message CreateAdSenseLinkRequest {
3493+
// Required. The property for which to create an AdSense Link.
3494+
// Format: properties/{propertyId}
3495+
// Example: properties/1234
3496+
string parent = 1 [
3497+
(google.api.field_behavior) = REQUIRED,
3498+
(google.api.resource_reference) = {
3499+
child_type: "analyticsadmin.googleapis.com/AdSenseLink"
3500+
}
3501+
];
3502+
3503+
// Required. The AdSense Link to create
3504+
AdSenseLink adsense_link = 2 [(google.api.field_behavior) = REQUIRED];
3505+
}
3506+
3507+
// Request message to be passed to GetAdSenseLink method.
3508+
message GetAdSenseLinkRequest {
3509+
// Required. Unique identifier for the AdSense Link requested.
3510+
// Format: properties/{propertyId}/adSenseLinks/{linkId}
3511+
// Example: properties/1234/adSenseLinks/5678
3512+
string name = 1 [
3513+
(google.api.field_behavior) = REQUIRED,
3514+
(google.api.resource_reference) = {
3515+
type: "analyticsadmin.googleapis.com/AdSenseLink"
3516+
}
3517+
];
3518+
}
3519+
3520+
// Request message to be passed to DeleteAdSenseLink method.
3521+
message DeleteAdSenseLinkRequest {
3522+
// Required. Unique identifier for the AdSense Link to be deleted.
3523+
// Format: properties/{propertyId}/adSenseLinks/{linkId}
3524+
// Example: properties/1234/adSenseLinks/5678
3525+
string name = 1 [
3526+
(google.api.field_behavior) = REQUIRED,
3527+
(google.api.resource_reference) = {
3528+
type: "analyticsadmin.googleapis.com/AdSenseLink"
3529+
}
3530+
];
3531+
}
3532+
3533+
// Request message to be passed to ListAdSenseLinks method.
3534+
message ListAdSenseLinksRequest {
3535+
// Required. Resource name of the parent property.
3536+
// Format: properties/{propertyId}
3537+
// Example: properties/1234
3538+
string parent = 1 [
3539+
(google.api.field_behavior) = REQUIRED,
3540+
(google.api.resource_reference) = {
3541+
child_type: "analyticsadmin.googleapis.com/AdSenseLink"
3542+
}
3543+
];
3544+
3545+
// The maximum number of resources to return.
3546+
// If unspecified, at most 50 resources will be returned.
3547+
// The maximum value is 200 (higher values will be coerced to the maximum).
3548+
int32 page_size = 2;
3549+
3550+
// A page token received from a previous `ListAdSenseLinks` call.
3551+
// Provide this to retrieve the subsequent page.
3552+
//
3553+
// When paginating, all other parameters provided to `ListAdSenseLinks` must
3554+
// match the call that provided the page token.
3555+
string page_token = 3;
3556+
}
3557+
3558+
// Response message for ListAdSenseLinks method.
3559+
message ListAdSenseLinksResponse {
3560+
// List of AdSenseLinks.
3561+
repeated AdSenseLink adsense_links = 1;
3562+
3563+
// A token, which can be sent as `page_token` to retrieve the next page.
3564+
// If this field is omitted, there are no subsequent pages.
3565+
string next_page_token = 2;
3566+
}
3567+
34093568
// Request for looking up GA4 property connected to a UA property.
34103569
message FetchConnectedGa4PropertyRequest {
34113570
// Required. The UA property for which to look up the connected GA4 property.
@@ -3431,3 +3590,92 @@ message FetchConnectedGa4PropertyResponse {
34313590
type: "analyticsadmin.googleapis.com/Property"
34323591
}];
34333592
}
3593+
3594+
// Request message for CreateEventCreateRule RPC.
3595+
message CreateEventCreateRuleRequest {
3596+
// Required. Example format: properties/123/dataStreams/456
3597+
string parent = 1 [
3598+
(google.api.field_behavior) = REQUIRED,
3599+
(google.api.resource_reference) = {
3600+
child_type: "analyticsadmin.googleapis.com/EventCreateRule"
3601+
}
3602+
];
3603+
3604+
// Required. The EventCreateRule to create.
3605+
EventCreateRule event_create_rule = 2
3606+
[(google.api.field_behavior) = REQUIRED];
3607+
}
3608+
3609+
// Request message for UpdateEventCreateRule RPC.
3610+
message UpdateEventCreateRuleRequest {
3611+
// Required. The EventCreateRule to update.
3612+
// The resource's `name` field is used to identify the EventCreateRule to be
3613+
// updated.
3614+
EventCreateRule event_create_rule = 1
3615+
[(google.api.field_behavior) = REQUIRED];
3616+
3617+
// Required. The list of fields to be updated. Field names must be in snake
3618+
// case (e.g., "field_to_update"). Omitted fields will not be updated. To
3619+
// replace the entire entity, use one path with the string "*" to match all
3620+
// fields.
3621+
google.protobuf.FieldMask update_mask = 2
3622+
[(google.api.field_behavior) = REQUIRED];
3623+
}
3624+
3625+
// Request message for DeleteEventCreateRule RPC.
3626+
message DeleteEventCreateRuleRequest {
3627+
// Required. Example format:
3628+
// properties/123/dataStreams/456/eventCreateRules/789
3629+
string name = 1 [
3630+
(google.api.field_behavior) = REQUIRED,
3631+
(google.api.resource_reference) = {
3632+
type: "analyticsadmin.googleapis.com/EventCreateRule"
3633+
}
3634+
];
3635+
}
3636+
3637+
// Request message for GetEventCreateRule RPC.
3638+
message GetEventCreateRuleRequest {
3639+
// Required. The name of the EventCreateRule to get.
3640+
// Example format: properties/123/dataStreams/456/eventCreateRules/789
3641+
string name = 1 [
3642+
(google.api.field_behavior) = REQUIRED,
3643+
(google.api.resource_reference) = {
3644+
type: "analyticsadmin.googleapis.com/EventCreateRule"
3645+
}
3646+
];
3647+
}
3648+
3649+
// Request message for ListEventCreateRules RPC.
3650+
message ListEventCreateRulesRequest {
3651+
// Required. Example format: properties/123/dataStreams/456
3652+
string parent = 1 [
3653+
(google.api.field_behavior) = REQUIRED,
3654+
(google.api.resource_reference) = {
3655+
child_type: "analyticsadmin.googleapis.com/EventCreateRule"
3656+
}
3657+
];
3658+
3659+
// The maximum number of resources to return.
3660+
// If unspecified, at most 50 resources will be returned.
3661+
// The maximum value is 200 (higher values will be coerced to the maximum).
3662+
int32 page_size = 2;
3663+
3664+
// A page token, received from a previous `ListEventCreateRules` call. Provide
3665+
// this to retrieve the subsequent page.
3666+
//
3667+
// When paginating, all other parameters provided to `ListEventCreateRules`
3668+
// must match the call that provided the page token.
3669+
string page_token = 3;
3670+
}
3671+
3672+
// Response message for ListEventCreateRules RPC.
3673+
message ListEventCreateRulesResponse {
3674+
// List of EventCreateRules. These will be ordered stably, but in an arbitrary
3675+
// order.
3676+
repeated EventCreateRule event_create_rules = 1;
3677+
3678+
// A token, which can be sent as `page_token` to retrieve the next page.
3679+
// If this field is omitted, there are no subsequent pages.
3680+
string next_page_token = 2;
3681+
}

packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/audience.proto

+15-10
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,12 @@ message AudienceDimensionOrMetricFilter {
153153
BetweenFilter between_filter = 5;
154154
}
155155

156-
// Required. Immutable. The dimension name or metric name to filter.
156+
// Required. Immutable. The dimension name or metric name to filter. If the
157+
// field name refers to a custom dimension or metric, a scope prefix will be
158+
// added to the front of the custom dimensions or metric name. For more on
159+
// scope prefixes or custom dimensions/metrics, reference the [Google
160+
// Analytics Data API documentation]
161+
// (https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#custom_dimensions).
157162
string field_name = 1 [
158163
(google.api.field_behavior) = REQUIRED,
159164
(google.api.field_behavior) = IMMUTABLE
@@ -170,7 +175,7 @@ message AudienceDimensionOrMetricFilter {
170175

171176
// Optional. If set, specifies the time window for which to evaluate data in
172177
// number of days. If not set, then audience data is evaluated against
173-
// lifetime data (i.e., infinite time window).
178+
// lifetime data (For example, infinite time window).
174179
//
175180
// For example, if set to 1 day, only the current day's data is evaluated. The
176181
// reference point is the current day when at_any_point_in_time is unset or
@@ -193,7 +198,7 @@ message AudienceEventFilter {
193198

194199
// Optional. If specified, this filter matches events that match both the
195200
// single event name and the parameter filter expressions. AudienceEventFilter
196-
// inside the parameter filter expression cannot be set (i.e., nested
201+
// inside the parameter filter expression cannot be set (For example, nested
197202
// event filters are not supported). This should be a single and_group of
198203
// dimension_or_metric_filter or not_expression; ANDs of ORs are not
199204
// supported. Also, if it includes a filter for "eventCount", only that one
@@ -215,9 +220,9 @@ message AudienceFilterExpression {
215220
// AudienceFilterExpressions with and_group or or_group.
216221
AudienceFilterExpressionList or_group = 2;
217222

218-
// A filter expression to be NOT'ed (i.e., inverted, complemented). It
219-
// can only include a dimension_or_metric_filter. This cannot be set on the
220-
// top level AudienceFilterExpression.
223+
// A filter expression to be NOT'ed (For example, inverted, complemented).
224+
// It can only include a dimension_or_metric_filter. This cannot be set on
225+
// the top level AudienceFilterExpression.
221226
AudienceFilterExpression not_expression = 3;
222227

223228
// A filter on a single dimension or metric. This cannot be set on the top
@@ -273,7 +278,7 @@ message AudienceSequenceFilter {
273278
bool immediately_follows = 2 [(google.api.field_behavior) = OPTIONAL];
274279

275280
// Optional. When set, this step must be satisfied within the
276-
// constraint_duration of the previous step (i.e., t[i] - t[i-1] <=
281+
// constraint_duration of the previous step (For example, t[i] - t[i-1] <=
277282
// constraint_duration). If not set, there is no duration requirement (the
278283
// duration is effectively unlimited). It is ignored for the first step.
279284
google.protobuf.Duration constraint_duration = 3
@@ -304,9 +309,9 @@ message AudienceSequenceFilter {
304309
}
305310

306311
// A clause for defining either a simple or sequence filter. A filter can be
307-
// inclusive (i.e., users satisfying the filter clause are included in the
308-
// Audience) or exclusive (i.e., users satisfying the filter clause are
309-
// excluded from the Audience).
312+
// inclusive (For example, users satisfying the filter clause are included in
313+
// the Audience) or exclusive (For example, users satisfying the filter clause
314+
// are excluded from the Audience).
310315
message AudienceFilterClause {
311316
// Specifies whether this is an include or exclude filter clause.
312317
enum AudienceClauseType {

0 commit comments

Comments
 (0)