Skip to content

Commit fbd3e7f

Browse files
Google APIscopybara-github
authored andcommitted
feat: add the GetSubpropertySyncConfigRequest method
feat: add the `ListSubpropertySyncConfigsRequest` method feat: add the `UpdateSubpropertySyncConfigRequest` method PiperOrigin-RevId: 771095956
1 parent 1de7d6f commit fbd3e7f

4 files changed

Lines changed: 174 additions & 3 deletions

File tree

google/analytics/admin/v1alpha/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,12 @@ load(
126126
"@com_google_googleapis_imports//:imports.bzl",
127127
"go_gapic_assembly_pkg",
128128
"go_gapic_library",
129-
"go_grpc_library",
129+
"go_proto_library",
130130
)
131131

132-
go_grpc_library(
132+
go_proto_library(
133133
name = "admin_go_proto",
134+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
134135
importpath = "cloud.google.com/go/analytics/admin/apiv1alpha/adminpb",
135136
protos = [":admin_proto"],
136137
deps = [
@@ -345,7 +346,6 @@ load(
345346

346347
csharp_proto_library(
347348
name = "admin_csharp_proto",
348-
extra_opts = [],
349349
deps = [":admin_proto"],
350350
)
351351

google/analytics/admin/v1alpha/analytics_admin.proto

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,6 +1637,35 @@ service AnalyticsAdminService {
16371637
};
16381638
option (google.api.method_signature) = "name";
16391639
}
1640+
1641+
// List all Subproperty Sync Configs on a property.
1642+
rpc ListSubpropertySyncConfigs(ListSubpropertySyncConfigsRequest)
1643+
returns (ListSubpropertySyncConfigsResponse) {
1644+
option (google.api.http) = {
1645+
get: "/v1alpha/{parent=properties/*}/subpropertySyncConfigs"
1646+
};
1647+
option (google.api.method_signature) = "parent";
1648+
}
1649+
1650+
// Updates a Subproperty Sync Config.
1651+
rpc UpdateSubpropertySyncConfig(UpdateSubpropertySyncConfigRequest)
1652+
returns (SubpropertySyncConfig) {
1653+
option (google.api.http) = {
1654+
patch: "/v1alpha/{subproperty_sync_config.name=properties/*/subpropertySyncConfigs/*}"
1655+
body: "subproperty_sync_config"
1656+
};
1657+
option (google.api.method_signature) =
1658+
"subproperty_sync_config,update_mask";
1659+
}
1660+
1661+
// Lookup for a single Subproperty Sync Config.
1662+
rpc GetSubpropertySyncConfig(GetSubpropertySyncConfigRequest)
1663+
returns (SubpropertySyncConfig) {
1664+
option (google.api.http) = {
1665+
get: "/v1alpha/{name=properties/*/subpropertySyncConfigs/*}"
1666+
};
1667+
option (google.api.method_signature) = "name";
1668+
}
16401669
}
16411670

16421671
// The request for a Data Access Record Report.
@@ -4376,6 +4405,12 @@ message ProvisionSubpropertyRequest {
43764405
// Optional. The subproperty event filter to create on an ordinary property.
43774406
SubpropertyEventFilter subproperty_event_filter = 3
43784407
[(google.api.field_behavior) = OPTIONAL];
4408+
4409+
// Optional. The subproperty feature synchronization mode for Custom
4410+
// Dimensions and Metrics
4411+
SubpropertySyncConfig.SynchronizationMode
4412+
custom_dimension_and_metric_synchronization_mode = 4
4413+
[(google.api.field_behavior) = OPTIONAL];
43794414
}
43804415

43814416
// Response message for ProvisionSubproperty RPC.
@@ -4659,3 +4694,67 @@ message SubmitUserDeletionResponse {
46594694
// received.
46604695
google.protobuf.Timestamp deletion_request_time = 1;
46614696
}
4697+
4698+
// Request message for GetSubpropertySyncConfig RPC.
4699+
message GetSubpropertySyncConfigRequest {
4700+
// Required. Resource name of the SubpropertySyncConfig to lookup.
4701+
// Format:
4702+
// properties/{ordinary_property_id}/subpropertySyncConfigs/{subproperty_id}
4703+
// Example: properties/1234/subpropertySyncConfigs/5678
4704+
string name = 1 [
4705+
(google.api.field_behavior) = REQUIRED,
4706+
(google.api.resource_reference) = {
4707+
type: "analyticsadmin.googleapis.com/SubpropertySyncConfig"
4708+
}
4709+
];
4710+
}
4711+
4712+
// Request message for ListSubpropertySyncConfigs RPC.
4713+
message ListSubpropertySyncConfigsRequest {
4714+
// Required. Resource name of the property.
4715+
// Format: properties/property_id
4716+
// Example: properties/123
4717+
string parent = 1 [
4718+
(google.api.field_behavior) = REQUIRED,
4719+
(google.api.resource_reference) = {
4720+
child_type: "analyticsadmin.googleapis.com/SubpropertySyncConfig"
4721+
}
4722+
];
4723+
4724+
// Optional. The maximum number of resources to return. The service may return
4725+
// fewer than this value, even if there are additional pages. If unspecified,
4726+
// at most 50 resources will be returned. The maximum value is 200; (higher
4727+
// values will be coerced to the maximum)
4728+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
4729+
4730+
// Optional. A page token, received from a previous
4731+
// `ListSubpropertySyncConfig` call. Provide this to retrieve the subsequent
4732+
// page. When paginating, all other parameters provided to
4733+
// `ListSubpropertySyncConfig` must match the call that provided the page
4734+
// token.
4735+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
4736+
}
4737+
4738+
// Response message for ListSubpropertySyncConfigs RPC.
4739+
message ListSubpropertySyncConfigsResponse {
4740+
// List of Subproperty Sync Configs.
4741+
repeated SubpropertySyncConfig subproperty_sync_configs = 1;
4742+
4743+
// A token, which can be sent as `page_token` to retrieve the next page. If
4744+
// this field is omitted, there are no subsequent pages.
4745+
string next_page_token = 2;
4746+
}
4747+
4748+
// Request message for UpdateSubpropertySyncConfig RPC.
4749+
message UpdateSubpropertySyncConfigRequest {
4750+
// Required. The SubpropertySyncConfig to update.
4751+
SubpropertySyncConfig subproperty_sync_config = 1
4752+
[(google.api.field_behavior) = REQUIRED];
4753+
4754+
// Optional. The list of fields to update. Field names must be in snake case
4755+
// (for example, "field_to_update"). Omitted fields will not be updated. To
4756+
// replace the entire entity, use one path with the string "*" to match all
4757+
// fields.
4758+
google.protobuf.FieldMask update_mask = 2
4759+
[(google.api.field_behavior) = OPTIONAL];
4760+
}

google/analytics/admin/v1alpha/analyticsadmin_v1alpha.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ authentication:
212212
canonical_scopes: |-
213213
https://www.googleapis.com/auth/analytics.edit,
214214
https://www.googleapis.com/auth/analytics.readonly
215+
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.GetSubpropertySyncConfig
216+
oauth:
217+
canonical_scopes: |-
218+
https://www.googleapis.com/auth/analytics.edit,
219+
https://www.googleapis.com/auth/analytics.readonly
215220
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccessBindings
216221
oauth:
217222
canonical_scopes: |-
@@ -352,6 +357,11 @@ authentication:
352357
canonical_scopes: |-
353358
https://www.googleapis.com/auth/analytics.edit,
354359
https://www.googleapis.com/auth/analytics.readonly
360+
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.ListSubpropertySyncConfigs
361+
oauth:
362+
canonical_scopes: |-
363+
https://www.googleapis.com/auth/analytics.edit,
364+
https://www.googleapis.com/auth/analytics.readonly
355365
- selector: google.analytics.admin.v1alpha.AnalyticsAdminService.RunAccessReport
356366
oauth:
357367
canonical_scopes: |-

google/analytics/admin/v1alpha/resources.proto

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ enum ChangeHistoryResourceType {
247247

248248
// ReportingDataAnnotation resource
249249
REPORTING_DATA_ANNOTATION = 32;
250+
251+
// SubpropertySyncConfig resource
252+
SUBPROPERTY_SYNC_CONFIG = 33;
250253
}
251254

252255
// Status of the Google Signals settings.
@@ -1030,6 +1033,9 @@ message ChangeHistoryChange {
10301033

10311034
// A snapshot of a ReportingDataAnnotation resource in change history.
10321035
ReportingDataAnnotation reporting_data_annotation = 32;
1036+
1037+
// A snapshot of a SubpropertySyncConfig resource in change history.
1038+
SubpropertySyncConfig subproperty_sync_config = 33;
10331039
}
10341040
}
10351041

@@ -2126,3 +2132,59 @@ message ReportingDataAnnotation {
21262132
// system. System-generated annotations cannot be updated or deleted.
21272133
bool system_generated = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
21282134
}
2135+
2136+
// Subproperty synchronization configuration controls how ordinary property
2137+
// configurations are synchronized to subproperties. This resource is
2138+
// provisioned automatically for each subproperty.
2139+
message SubpropertySyncConfig {
2140+
option (google.api.resource) = {
2141+
type: "analyticsadmin.googleapis.com/SubpropertySyncConfig"
2142+
pattern: "properties/{property}/subpropertySyncConfigs/{subproperty_sync_config}"
2143+
plural: "subpropertySyncConfigs"
2144+
singular: "subpropertySyncConfig"
2145+
};
2146+
2147+
// Synchronization modes for a Subproperty
2148+
enum SynchronizationMode {
2149+
// Synchronization mode unknown or not specified.
2150+
SYNCHRONIZATION_MODE_UNSPECIFIED = 0;
2151+
2152+
// Entities are not synchronized.
2153+
// Local edits are allowed on the Subproperty.
2154+
NONE = 1;
2155+
2156+
// Entities are synchronized from Parent Property.
2157+
// Local mutations are not allowed on the Subproperty (Create / Update /
2158+
// Delete)
2159+
ALL = 2;
2160+
}
2161+
2162+
// Output only. Identifier. Format:
2163+
// properties/{ordinary_property_id}/subpropertySyncConfigs/{subproperty_id}
2164+
// Example: properties/1234/subpropertySyncConfigs/5678
2165+
string name = 1 [
2166+
(google.api.field_behavior) = IDENTIFIER,
2167+
(google.api.field_behavior) = OUTPUT_ONLY
2168+
];
2169+
2170+
// Output only. Immutable. Resource name of the Subproperty that these
2171+
// settings apply to.
2172+
string apply_to_property = 2 [
2173+
(google.api.field_behavior) = IMMUTABLE,
2174+
(google.api.field_behavior) = OUTPUT_ONLY
2175+
];
2176+
2177+
// Required. Specifies the Custom Dimension / Metric synchronization mode for
2178+
// the Subproperty.
2179+
//
2180+
// If set to ALL, Custom Dimension / Metric synchronization will be
2181+
// immediately enabled. Local configuration of Custom Dimensions / Metrics
2182+
// will not be allowed on the Subproperty so long as the synchronization mode
2183+
// is set to ALL.
2184+
//
2185+
// If set to NONE, Custom Dimensions / Metric synchronization is disabled.
2186+
// Custom Dimensions / Metrics must be configured explicitly on the
2187+
// Subproperty.
2188+
SynchronizationMode custom_dimension_and_metric_sync_mode = 3
2189+
[(google.api.field_behavior) = REQUIRED];
2190+
}

0 commit comments

Comments
 (0)