@@ -16,6 +16,7 @@ syntax = "proto3";
1616
1717package google.analytics.admin.v1alpha ;
1818
19+ import "google/analytics/admin/v1alpha/audience.proto" ;
1920import "google/analytics/admin/v1alpha/resources.proto" ;
2021import "google/api/annotations.proto" ;
2122import "google/api/client.proto" ;
@@ -729,6 +730,67 @@ service AnalyticsAdminService {
729730 };
730731 option (google.api.method_signature ) = "name" ;
731732 }
733+
734+ // Lookup for a single Audience.
735+ // Audiences created before 2020 may not be supported.
736+ rpc GetAudience (GetAudienceRequest ) returns (Audience ) {
737+ option (google.api.http ) = {
738+ get : "/v1alpha/{name=properties/*/audiences/*}"
739+ };
740+ option (google.api.method_signature ) = "name" ;
741+ }
742+
743+ // Lists Audiences on a property.
744+ // Audiences created before 2020 may not be supported.
745+ rpc ListAudiences (ListAudiencesRequest ) returns (ListAudiencesResponse ) {
746+ option (google.api.http ) = {
747+ get : "/v1alpha/{parent=properties/*}/audiences"
748+ };
749+ option (google.api.method_signature ) = "parent" ;
750+ }
751+
752+ // Creates an Audience.
753+ rpc CreateAudience (CreateAudienceRequest ) returns (Audience ) {
754+ option (google.api.http ) = {
755+ post : "/v1alpha/{parent=properties/*}/audiences"
756+ body : "audience"
757+ };
758+ option (google.api.method_signature ) = "parent,audience" ;
759+ }
760+
761+ // Updates an Audience on a property.
762+ rpc UpdateAudience (UpdateAudienceRequest ) returns (Audience ) {
763+ option (google.api.http ) = {
764+ patch : "/v1alpha/{audience.name=properties/*/audiences/*}"
765+ body : "audience"
766+ };
767+ option (google.api.method_signature ) = "audience,update_mask" ;
768+ }
769+
770+ // Archives an Audience on a property.
771+ rpc ArchiveAudience (ArchiveAudienceRequest ) returns (google.protobuf.Empty ) {
772+ option (google.api.http ) = {
773+ post : "/v1alpha/{name=properties/*/audiences/*}:archive"
774+ body : "*"
775+ };
776+ }
777+
778+ // Lookup for a AttributionSettings singleton.
779+ rpc GetAttributionSettings (GetAttributionSettingsRequest ) returns (AttributionSettings ) {
780+ option (google.api.http ) = {
781+ get : "/v1alpha/{name=properties/*/attributionSettings}"
782+ };
783+ option (google.api.method_signature ) = "name" ;
784+ }
785+
786+ // Updates attribution settings on a property.
787+ rpc UpdateAttributionSettings (UpdateAttributionSettingsRequest ) returns (AttributionSettings ) {
788+ option (google.api.http ) = {
789+ patch : "/v1alpha/{attribution_settings.name=properties/*/attributionSettings}"
790+ body : "attribution_settings"
791+ };
792+ option (google.api.method_signature ) = "attribution_settings,update_mask" ;
793+ }
732794}
733795
734796// Request message for GetAccount RPC.
@@ -2039,3 +2101,109 @@ message GetDataStreamRequest {
20392101 }
20402102 ];
20412103}
2104+
2105+ // Request message for GetAudience RPC.
2106+ message GetAudienceRequest {
2107+ // Required. The name of the Audience to get.
2108+ // Example format: properties/1234/audiences/5678
2109+ string name = 1 [
2110+ (google.api.field_behavior ) = REQUIRED ,
2111+ (google.api.resource_reference ) = {
2112+ type : "analyticsadmin.googleapis.com/Audience"
2113+ }
2114+ ];
2115+ }
2116+
2117+ // Request message for ListAudiences RPC.
2118+ message ListAudiencesRequest {
2119+ // Required. Example format: properties/1234
2120+ string parent = 1 [
2121+ (google.api.field_behavior ) = REQUIRED ,
2122+ (google.api.resource_reference ) = {
2123+ child_type : "analyticsadmin.googleapis.com/Audience"
2124+ }
2125+ ];
2126+
2127+ // The maximum number of resources to return.
2128+ // If unspecified, at most 50 resources will be returned.
2129+ // The maximum value is 200 (higher values will be coerced to the maximum).
2130+ int32 page_size = 2 ;
2131+
2132+ // A page token, received from a previous `ListAudiences` call. Provide this
2133+ // to retrieve the subsequent page.
2134+ //
2135+ // When paginating, all other parameters provided to `ListAudiences` must
2136+ // match the call that provided the page token.
2137+ string page_token = 3 ;
2138+ }
2139+
2140+ // Response message for ListAudiences RPC.
2141+ message ListAudiencesResponse {
2142+ // List of Audiences.
2143+ repeated Audience audiences = 1 ;
2144+
2145+ // A token, which can be sent as `page_token` to retrieve the next page.
2146+ // If this field is omitted, there are no subsequent pages.
2147+ string next_page_token = 2 ;
2148+ }
2149+
2150+ // Request message for CreateAudience RPC.
2151+ message CreateAudienceRequest {
2152+ // Required. Example format: properties/1234
2153+ string parent = 1 [
2154+ (google.api.field_behavior ) = REQUIRED ,
2155+ (google.api.resource_reference ) = {
2156+ child_type : "analyticsadmin.googleapis.com/Audience"
2157+ }
2158+ ];
2159+
2160+ // Required. The audience to create.
2161+ Audience audience = 2 [(google.api.field_behavior ) = REQUIRED ];
2162+ }
2163+
2164+ // Request message for UpdateAudience RPC.
2165+ message UpdateAudienceRequest {
2166+ // Required. The audience to update.
2167+ // The audience's `name` field is used to identify the audience to be updated.
2168+ Audience audience = 1 [(google.api.field_behavior ) = REQUIRED ];
2169+
2170+ // Required. The list of fields to be updated. Field names must be in snake case
2171+ // (e.g., "field_to_update"). Omitted fields will not be updated. To replace
2172+ // the entire entity, use one path with the string "*" to match all fields.
2173+ google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior ) = REQUIRED ];
2174+ }
2175+
2176+ // Request message for ArchiveAudience RPC.
2177+ message ArchiveAudienceRequest {
2178+ // Required. Example format: properties/1234/audiences/5678
2179+ string name = 1 [
2180+ (google.api.field_behavior ) = REQUIRED ,
2181+ (google.api.resource_reference ) = {
2182+ child_type : "analyticsadmin.googleapis.com/Audience"
2183+ }
2184+ ];
2185+ }
2186+
2187+ // Request message for GetAttributionSettings RPC.
2188+ message GetAttributionSettingsRequest {
2189+ // Required. The name of the attribution settings to retrieve.
2190+ // Format: properties/{property}/attributionSettings
2191+ string name = 1 [
2192+ (google.api.field_behavior ) = REQUIRED ,
2193+ (google.api.resource_reference ) = {
2194+ type : "analyticsadmin.googleapis.com/AttributionSettings"
2195+ }
2196+ ];
2197+ }
2198+
2199+ // Request message for UpdateAttributionSettings RPC
2200+ message UpdateAttributionSettingsRequest {
2201+ // Required. The attribution settings to update.
2202+ // The `name` field is used to identify the settings to be updated.
2203+ AttributionSettings attribution_settings = 1 [(google.api.field_behavior ) = REQUIRED ];
2204+
2205+ // Required. The list of fields to be updated. Field names must be in snake case
2206+ // (e.g., "field_to_update"). Omitted fields will not be updated. To replace
2207+ // the entire entity, use one path with the string "*" to match all fields.
2208+ google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior ) = REQUIRED ];
2209+ }
0 commit comments