From a8be1f2536c070f493079163ee3e922a74fed39a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jul 2022 07:13:53 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- .../v1alpha/analyticsadmin-api.json | 600 +- analyticsadmin/v1alpha/analyticsadmin-gen.go | 7881 ++++++++++------- chat/v1/chat-api.json | 25 +- chat/v1/chat-gen.go | 46 +- content/v2.1/content-api.json | 22 +- content/v2.1/content-gen.go | 30 +- slides/v1/slides-api.json | 12 +- slides/v1/slides-gen.go | 20 +- 8 files changed, 5424 insertions(+), 3212 deletions(-) diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index ec1ae53f6cc..4dce6049742 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -993,6 +993,163 @@ } }, "resources": { + "audiences": { + "methods": { + "archive": { + "description": "Archives an Audience on a property.", + "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}:archive", + "httpMethod": "POST", + "id": "analyticsadmin.properties.audiences.archive", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Example format: properties/1234/audiences/5678", + "location": "path", + "pattern": "^properties/[^/]+/audiences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:archive", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaArchiveAudienceRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, + "create": { + "description": "Creates an Audience.", + "flatPath": "v1alpha/properties/{propertiesId}/audiences", + "httpMethod": "POST", + "id": "analyticsadmin.properties.audiences.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Example format: properties/1234", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/audiences", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaAudience" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaAudience" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, + "get": { + "description": "Lookup for a single Audience.", + "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}", + "httpMethod": "GET", + "id": "analyticsadmin.properties.audiences.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Audience to get. Example format: properties/1234/audiences/5678", + "location": "path", + "pattern": "^properties/[^/]+/audiences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaAudience" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "list": { + "description": "Lists Audiences on a property.", + "flatPath": "v1alpha/properties/{propertiesId}/audiences", + "httpMethod": "GET", + "id": "analyticsadmin.properties.audiences.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "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).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListAudiences` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAudiences` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Example format: properties/1234", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/audiences", + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaListAudiencesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "patch": { + "description": "Updates an Audience on a property.", + "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}", + "httpMethod": "PATCH", + "id": "analyticsadmin.properties.audiences.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}", + "location": "path", + "pattern": "^properties/[^/]+/audiences/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "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.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaAudience" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaAudience" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + } + } + }, "conversionEvents": { "methods": { "create": { @@ -2616,7 +2773,7 @@ } } }, - "revision": "20220706", + "revision": "20220725", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccount": { @@ -2716,6 +2873,12 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaArchiveAudienceRequest": { + "description": "Request message for ArchiveAudience RPC.", + "id": "GoogleAnalyticsAdminV1alphaArchiveAudienceRequest", + "properties": {}, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest": { "description": "Request message for ArchiveCustomDimension RPC.", "id": "GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest", @@ -2794,6 +2957,423 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaAudience": { + "description": "A resource message representing a GA4 Audience.", + "id": "GoogleAnalyticsAdminV1alphaAudience", + "properties": { + "adsPersonalizationEnabled": { + "description": "Output only. It is automatically set by GA to false if this is an NPA Audience and is excluded from ads personalization.", + "readOnly": true, + "type": "boolean" + }, + "description": { + "description": "Required. The description of the Audience.", + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the Audience.", + "type": "string" + }, + "eventTrigger": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceEventTrigger", + "description": "Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience." + }, + "exclusionDurationMode": { + "description": "Immutable. Specifies how long an exclusion lasts for users that meet the exclusion filter. It is applied to all EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter clause in the Audience.", + "enum": [ + "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED", + "EXCLUDE_TEMPORARILY", + "EXCLUDE_PERMANENTLY" + ], + "enumDescriptions": [ + "Not specified.", + "Exclude users from the Audience during periods when they meet the filter clause.", + "Exclude users from the Audience if they've ever met the filter clause." + ], + "type": "string" + }, + "filterClauses": { + "description": "Required. Immutable. null Filter clauses that define the Audience. All clauses will be AND’ed together.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceFilterClause" + }, + "type": "array" + }, + "membershipDurationDays": { + "description": "Required. Immutable. The duration a user should stay in an Audience. It cannot be set to more than 540 days.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter": { + "description": "A specific filter for a single dimension or metric.", + "id": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter", + "properties": { + "atAnyPointInTime": { + "description": "Optional. Indicates whether this filter needs dynamic evaluation or not. If set to true, users join the Audience if they ever met the condition (static evaluation). If unset or set to false, user evaluation for an Audience is dynamic; users are added to an Audience when they meet the conditions and then removed when they no longer meet them. This can only be set when Audience scope is ACROSS_ALL_SESSIONS.", + "type": "boolean" + }, + "betweenFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterBetweenFilter", + "description": "A filter for numeric or date values between certain values on a dimension or metric." + }, + "fieldName": { + "description": "Required. Immutable. The dimension name or metric name to filter.", + "type": "string" + }, + "inAnyNDayPeriod": { + "description": "Optional. If set, specifies the time window for which to evaluate data in number of days. If not set, then audience data is evaluated against lifetime data (i.e., infinite time window). For example, if set to 1 day, only the current day's data is evaluated. The reference point is the current day when at_any_point_in_time is unset or false. It can only be set when Audience scope is ACROSS_ALL_SESSIONS and cannot be greater than 60 days.", + "format": "int32", + "type": "integer" + }, + "inListFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterInListFilter", + "description": "A filter for a string dimension that matches a particular list of options." + }, + "numericFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericFilter", + "description": "A filter for numeric or date values on a dimension or metric." + }, + "stringFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterStringFilter", + "description": "A filter for a string-type dimension that matches a particular pattern." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterBetweenFilter": { + "description": "A filter for numeric or date values between certain values on a dimension or metric.", + "id": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterBetweenFilter", + "properties": { + "fromValue": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue", + "description": "Required. Begins with this number, inclusive." + }, + "toValue": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue", + "description": "Required. Ends with this number, inclusive." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterInListFilter": { + "description": "A filter for a string dimension that matches a particular list of options.", + "id": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterInListFilter", + "properties": { + "caseSensitive": { + "description": "Optional. If true, the match is case-sensitive. If false, the match is case-insensitive.", + "type": "boolean" + }, + "values": { + "description": "Required. The list of possible string values to match against. Must be non-empty.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericFilter": { + "description": "A filter for numeric or date values on a dimension or metric.", + "id": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericFilter", + "properties": { + "operation": { + "description": "Required. The operation applied to a numeric filter.", + "enum": [ + "OPERATION_UNSPECIFIED", + "EQUAL", + "LESS_THAN", + "LESS_THAN_OR_EQUAL", + "GREATER_THAN", + "GREATER_THAN_OR_EQUAL" + ], + "enumDescriptions": [ + "Unspecified.", + "Equal.", + "Less than.", + "Less than or equal.", + "Greater than.", + "Greater than or equal." + ], + "type": "string" + }, + "value": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue", + "description": "Required. The numeric or date value to match against." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue": { + "description": "To represent a number.", + "id": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue", + "properties": { + "doubleValue": { + "description": "Double value.", + "format": "double", + "type": "number" + }, + "int64Value": { + "description": "Integer value.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterStringFilter": { + "description": "A filter for a string-type dimension that matches a particular pattern.", + "id": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterStringFilter", + "properties": { + "caseSensitive": { + "description": "Optional. If true, the match is case-sensitive. If false, the match is case-insensitive.", + "type": "boolean" + }, + "matchType": { + "description": "Required. The match type for the string filter.", + "enum": [ + "MATCH_TYPE_UNSPECIFIED", + "EXACT", + "BEGINS_WITH", + "ENDS_WITH", + "CONTAINS", + "FULL_REGEXP", + "PARTIAL_REGEXP" + ], + "enumDescriptions": [ + "Unspecified", + "Exact match of the string value.", + "Begins with the string value.", + "Ends with the string value.", + "Contains the string value.", + "Full regular expression matches with the string value.", + "Partial regular expression matches with the string value." + ], + "type": "string" + }, + "value": { + "description": "Required. The string value to be matched against.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceEventFilter": { + "description": "A filter that matches events of a single event name. If an event parameter is specified, only the subset of events that match both the single event name and the parameter filter expressions match this event filter.", + "id": "GoogleAnalyticsAdminV1alphaAudienceEventFilter", + "properties": { + "eventName": { + "description": "Required. Immutable. The name of the event to match against.", + "type": "string" + }, + "eventParameterFilterExpression": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceFilterExpression", + "description": "Optional. If specified, this filter matches events that match both the single event name and the parameter filter expressions. AudienceEventFilter inside the parameter filter expression cannot be set (i.e., nested event filters are not supported). This should be a single and_group of dimension_or_metric_filter or not_expression; ANDs of ORs are not supported. Also, if it includes a filter for \"eventCount\", only that one will be considered; all the other filters will be ignored." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceEventTrigger": { + "description": "Specifies an event to log when a user joins the Audience.", + "id": "GoogleAnalyticsAdminV1alphaAudienceEventTrigger", + "properties": { + "eventName": { + "description": "Required. The event name that will be logged.", + "type": "string" + }, + "logCondition": { + "description": "Required. When to log the event.", + "enum": [ + "LOG_CONDITION_UNSPECIFIED", + "AUDIENCE_JOINED", + "AUDIENCE_MEMBERSHIP_RENEWED" + ], + "enumDescriptions": [ + "Log condition is not specified.", + "The event should be logged only when a user is joined.", + "The event should be logged whenever the Audience condition is met, even if the user is already a member of the Audience." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceFilterClause": { + "description": "A clause for defining either a simple or sequence filter. A filter can be inclusive (i.e., users satisfying the filter clause are included in the Audience) or exclusive (i.e., users satisfying the filter clause are excluded from the Audience).", + "id": "GoogleAnalyticsAdminV1alphaAudienceFilterClause", + "properties": { + "clauseType": { + "description": "Required. Specifies whether this is an include or exclude filter clause.", + "enum": [ + "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED", + "INCLUDE", + "EXCLUDE" + ], + "enumDescriptions": [ + "Unspecified clause type.", + "Users will be included in the Audience if the filter clause is met.", + "Users will be excluded from the Audience if the filter clause is met." + ], + "type": "string" + }, + "sequenceFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceSequenceFilter", + "description": "Filters that must occur in a specific order for the user to be a member of the Audience." + }, + "simpleFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceSimpleFilter", + "description": "A simple filter that a user must satisfy to be a member of the Audience." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceFilterExpression": { + "description": "A logical expression of Audience dimension, metric, or event filters.", + "id": "GoogleAnalyticsAdminV1alphaAudienceFilterExpression", + "properties": { + "andGroup": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList", + "description": "A list of expressions to be AND’ed together. It can only contain AudienceFilterExpressions with or_group. This must be set for the top level AudienceFilterExpression." + }, + "dimensionOrMetricFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter", + "description": "A filter on a single dimension or metric. This cannot be set on the top level AudienceFilterExpression." + }, + "eventFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceEventFilter", + "description": "Creates a filter that matches a specific event. This cannot be set on the top level AudienceFilterExpression." + }, + "notExpression": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceFilterExpression", + "description": "A filter expression to be NOT'ed (i.e., inverted, complemented). It can only include a dimension_or_metric_filter. This cannot be set on the top level AudienceFilterExpression." + }, + "orGroup": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList", + "description": "A list of expressions to OR’ed together. It cannot contain AudienceFilterExpressions with and_group or or_group." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList": { + "description": "A list of Audience filter expressions.", + "id": "GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList", + "properties": { + "filterExpressions": { + "description": "A list of Audience filter expressions.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceFilterExpression" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceSequenceFilter": { + "description": "Defines filters that must occur in a specific order for the user to be a member of the Audience.", + "id": "GoogleAnalyticsAdminV1alphaAudienceSequenceFilter", + "properties": { + "scope": { + "description": "Required. Immutable. Specifies the scope for this filter.", + "enum": [ + "AUDIENCE_FILTER_SCOPE_UNSPECIFIED", + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT", + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION", + "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS" + ], + "enumDescriptions": [ + "Scope is not specified.", + "User joins the Audience if the filter condition is met within one event.", + "User joins the Audience if the filter condition is met within one session.", + "User joins the Audience if the filter condition is met by any event across any session." + ], + "type": "string" + }, + "sequenceMaximumDuration": { + "description": "Optional. Defines the time period in which the whole sequence must occur.", + "format": "google-duration", + "type": "string" + }, + "sequenceSteps": { + "description": "Required. An ordered sequence of steps. A user must complete each step in order to join the sequence filter.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceSequenceFilterAudienceSequenceStep" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceSequenceFilterAudienceSequenceStep": { + "description": "A condition that must occur in the specified step order for this user to match the sequence.", + "id": "GoogleAnalyticsAdminV1alphaAudienceSequenceFilterAudienceSequenceStep", + "properties": { + "constraintDuration": { + "description": "Optional. When set, this step must be satisfied within the constraint_duration of the previous step (i.e., t[i] - t[i-1] \u003c= constraint_duration). If not set, there is no duration requirement (the duration is effectively unlimited). It is ignored for the first step.", + "format": "google-duration", + "type": "string" + }, + "filterExpression": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceFilterExpression", + "description": "Required. Immutable. A logical expression of Audience dimension, metric, or event filters in each step." + }, + "immediatelyFollows": { + "description": "Optional. If true, the event satisfying this step must be the very next event after the event satisfying the last step. If unset or false, this step indirectly follows the prior step; for example, there may be events between the prior step and this step. It is ignored for the first step.", + "type": "boolean" + }, + "scope": { + "description": "Required. Immutable. Specifies the scope for this step.", + "enum": [ + "AUDIENCE_FILTER_SCOPE_UNSPECIFIED", + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT", + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION", + "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS" + ], + "enumDescriptions": [ + "Scope is not specified.", + "User joins the Audience if the filter condition is met within one event.", + "User joins the Audience if the filter condition is met within one session.", + "User joins the Audience if the filter condition is met by any event across any session." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAudienceSimpleFilter": { + "description": "Defines a simple filter that a user must satisfy to be a member of the Audience.", + "id": "GoogleAnalyticsAdminV1alphaAudienceSimpleFilter", + "properties": { + "filterExpression": { + "$ref": "GoogleAnalyticsAdminV1alphaAudienceFilterExpression", + "description": "Required. Immutable. A logical expression of Audience dimension, metric, or event filters." + }, + "scope": { + "description": "Required. Immutable. Specifies the scope for this filter.", + "enum": [ + "AUDIENCE_FILTER_SCOPE_UNSPECIFIED", + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT", + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION", + "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS" + ], + "enumDescriptions": [ + "Scope is not specified.", + "User joins the Audience if the filter condition is met within one event.", + "User joins the Audience if the filter condition is met within one session.", + "User joins the Audience if the filter condition is met by any event across any session." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaAuditUserLink": { "description": "Read-only resource used to summarize a principal's effective roles.", "id": "GoogleAnalyticsAdminV1alphaAuditUserLink", @@ -3742,6 +4322,24 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaListAudiencesResponse": { + "description": "Response message for ListAudiences RPC.", + "id": "GoogleAnalyticsAdminV1alphaListAudiencesResponse", + "properties": { + "audiences": { + "description": "List of Audiences.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAudience" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaListConversionEventsResponse": { "description": "Response message for ListConversionEvents RPC.", "id": "GoogleAnalyticsAdminV1alphaListConversionEventsResponse", diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 31f16015c18..942a00f9bc2 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -190,6 +190,7 @@ type AccountsUserLinksService struct { func NewPropertiesService(s *Service) *PropertiesService { rs := &PropertiesService{s: s} + rs.Audiences = NewPropertiesAudiencesService(s) rs.ConversionEvents = NewPropertiesConversionEventsService(s) rs.CustomDimensions = NewPropertiesCustomDimensionsService(s) rs.CustomMetrics = NewPropertiesCustomMetricsService(s) @@ -205,6 +206,8 @@ func NewPropertiesService(s *Service) *PropertiesService { type PropertiesService struct { s *Service + Audiences *PropertiesAudiencesService + ConversionEvents *PropertiesConversionEventsService CustomDimensions *PropertiesCustomDimensionsService @@ -224,6 +227,15 @@ type PropertiesService struct { UserLinks *PropertiesUserLinksService } +func NewPropertiesAudiencesService(s *Service) *PropertiesAudiencesService { + rs := &PropertiesAudiencesService{s: s} + return rs +} + +type PropertiesAudiencesService struct { + s *Service +} + func NewPropertiesConversionEventsService(s *Service) *PropertiesConversionEventsService { rs := &PropertiesConversionEventsService{s: s} return rs @@ -500,6 +512,11 @@ func (s *GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposal return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaArchiveAudienceRequest: Request message +// for ArchiveAudience RPC. +type GoogleAnalyticsAdminV1alphaArchiveAudienceRequest struct { +} + // GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest: Request // message for ArchiveCustomDimension RPC. type GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest struct { @@ -609,27 +626,122 @@ func (s *GoogleAnalyticsAdminV1alphaAttributionSettings) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaAuditUserLink: Read-only resource used to -// summarize a principal's effective roles. -type GoogleAnalyticsAdminV1alphaAuditUserLink struct { - // DirectRoles: Roles directly assigned to this user for this entity. - // Format: predefinedRoles/viewer Excludes roles that are inherited from - // an account (if this is for a property), group, or organization admin - // role. - DirectRoles []string `json:"directRoles,omitempty"` +// GoogleAnalyticsAdminV1alphaAudience: A resource message representing +// a GA4 Audience. +type GoogleAnalyticsAdminV1alphaAudience struct { + // AdsPersonalizationEnabled: Output only. It is automatically set by GA + // to false if this is an NPA Audience and is excluded from ads + // personalization. + AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"` - // EffectiveRoles: Union of all permissions a user has at this account - // or property (includes direct permissions, group-inherited - // permissions, etc.). Format: predefinedRoles/viewer - EffectiveRoles []string `json:"effectiveRoles,omitempty"` + // Description: Required. The description of the Audience. + Description string `json:"description,omitempty"` - // EmailAddress: Email address of the linked user - EmailAddress string `json:"emailAddress,omitempty"` + // DisplayName: Required. The display name of the Audience. + DisplayName string `json:"displayName,omitempty"` - // Name: Example format: properties/1234/userLinks/5678 + // EventTrigger: Optional. Specifies an event to log when a user joins + // the Audience. If not set, no event is logged when a user joins the + // Audience. + EventTrigger *GoogleAnalyticsAdminV1alphaAudienceEventTrigger `json:"eventTrigger,omitempty"` + + // ExclusionDurationMode: Immutable. Specifies how long an exclusion + // lasts for users that meet the exclusion filter. It is applied to all + // EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter + // clause in the Audience. + // + // Possible values: + // "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED" - Not specified. + // "EXCLUDE_TEMPORARILY" - Exclude users from the Audience during + // periods when they meet the filter clause. + // "EXCLUDE_PERMANENTLY" - Exclude users from the Audience if they've + // ever met the filter clause. + ExclusionDurationMode string `json:"exclusionDurationMode,omitempty"` + + // FilterClauses: Required. Immutable. null Filter clauses that define + // the Audience. All clauses will be AND’ed together. + FilterClauses []*GoogleAnalyticsAdminV1alphaAudienceFilterClause `json:"filterClauses,omitempty"` + + // MembershipDurationDays: Required. Immutable. The duration a user + // should stay in an Audience. It cannot be set to more than 540 days. + MembershipDurationDays int64 `json:"membershipDurationDays,omitempty"` + + // Name: Output only. The resource name for this Audience resource. + // Format: properties/{propertyId}/audiences/{audienceId} Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "DirectRoles") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AdsPersonalizationEnabled") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AdsPersonalizationEnabled") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAudience) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudience + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter: A +// specific filter for a single dimension or metric. +type GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter struct { + // AtAnyPointInTime: Optional. Indicates whether this filter needs + // dynamic evaluation or not. If set to true, users join the Audience if + // they ever met the condition (static evaluation). If unset or set to + // false, user evaluation for an Audience is dynamic; users are added to + // an Audience when they meet the conditions and then removed when they + // no longer meet them. This can only be set when Audience scope is + // ACROSS_ALL_SESSIONS. + AtAnyPointInTime bool `json:"atAnyPointInTime,omitempty"` + + // BetweenFilter: A filter for numeric or date values between certain + // values on a dimension or metric. + BetweenFilter *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterBetweenFilter `json:"betweenFilter,omitempty"` + + // FieldName: Required. Immutable. The dimension name or metric name to + // filter. + FieldName string `json:"fieldName,omitempty"` + + // InAnyNDayPeriod: Optional. If set, specifies the time window for + // which to evaluate data in number of days. If not set, then audience + // data is evaluated against lifetime data (i.e., infinite time window). + // For example, if set to 1 day, only the current day's data is + // evaluated. The reference point is the current day when + // at_any_point_in_time is unset or false. It can only be set when + // Audience scope is ACROSS_ALL_SESSIONS and cannot be greater than 60 + // days. + InAnyNDayPeriod int64 `json:"inAnyNDayPeriod,omitempty"` + + // InListFilter: A filter for a string dimension that matches a + // particular list of options. + InListFilter *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterInListFilter `json:"inListFilter,omitempty"` + + // NumericFilter: A filter for numeric or date values on a dimension or + // metric. + NumericFilter *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericFilter `json:"numericFilter,omitempty"` + + // StringFilter: A filter for a string-type dimension that matches a + // particular pattern. + StringFilter *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterStringFilter `json:"stringFilter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AtAnyPointInTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -637,37 +749,33 @@ type GoogleAnalyticsAdminV1alphaAuditUserLink struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DirectRoles") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AtAnyPointInTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaAuditUserLink) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLink +func (s *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaAuditUserLinksRequest: Request message for -// AuditUserLinks RPC. -type GoogleAnalyticsAdminV1alphaAuditUserLinksRequest struct { - // PageSize: The maximum number of user links to return. The service may - // return fewer than this value. If unspecified, at most 1000 user links - // will be returned. The maximum value is 5000; values above 5000 will - // be coerced to 5000. - PageSize int64 `json:"pageSize,omitempty"` +// GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterBetweenFilte +// r: A filter for numeric or date values between certain values on a +// dimension or metric. +type GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterBetweenFilter struct { + // FromValue: Required. Begins with this number, inclusive. + FromValue *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue `json:"fromValue,omitempty"` - // PageToken: A page token, received from a previous `AuditUserLinks` - // call. Provide this to retrieve the subsequent page. When paginating, - // all other parameters provided to `AuditUserLinks` must match the call - // that provided the page token. - PageToken string `json:"pageToken,omitempty"` + // ToValue: Required. Ends with this number, inclusive. + ToValue *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue `json:"toValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSize") to + // ForceSendFields is a list of field names (e.g. "FromValue") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -675,7 +783,7 @@ type GoogleAnalyticsAdminV1alphaAuditUserLinksRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSize") to include in + // NullFields is a list of field names (e.g. "FromValue") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -684,29 +792,25 @@ type GoogleAnalyticsAdminV1alphaAuditUserLinksRequest struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksRequest +func (s *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterBetweenFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterBetweenFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaAuditUserLinksResponse: Response message -// for AuditUserLinks RPC. -type GoogleAnalyticsAdminV1alphaAuditUserLinksResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // UserLinks: List of AuditUserLinks. These will be ordered stably, but - // in an arbitrary order. - UserLinks []*GoogleAnalyticsAdminV1alphaAuditUserLink `json:"userLinks,omitempty"` +// GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterInListFilter +// : A filter for a string dimension that matches a particular list of +// options. +type GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterInListFilter struct { + // CaseSensitive: Optional. If true, the match is case-sensitive. If + // false, the match is case-insensitive. + CaseSensitive bool `json:"caseSensitive,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Values: Required. The list of possible string values to match + // against. Must be non-empty. + Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "CaseSensitive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -714,7 +818,7 @@ type GoogleAnalyticsAdminV1alphaAuditUserLinksResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include + // NullFields is a list of field names (e.g. "CaseSensitive") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -723,26 +827,30 @@ type GoogleAnalyticsAdminV1alphaAuditUserLinksResponse struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksResponse +func (s *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterInListFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterInListFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest: Request -// message for BatchCreateUserLinks RPC. -type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest struct { - // NotifyNewUsers: Optional. If set, then email the new users notifying - // them that they've been granted permissions to the resource. - // Regardless of whether this is set or not, notify_new_user field - // inside each individual request is ignored. - NotifyNewUsers bool `json:"notifyNewUsers,omitempty"` - - // Requests: Required. The requests specifying the user links to create. - // A maximum of 1000 user links can be created in a batch. - Requests []*GoogleAnalyticsAdminV1alphaCreateUserLinkRequest `json:"requests,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NotifyNewUsers") to +// GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericFilte +// r: A filter for numeric or date values on a dimension or metric. +type GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericFilter struct { + // Operation: Required. The operation applied to a numeric filter. + // + // Possible values: + // "OPERATION_UNSPECIFIED" - Unspecified. + // "EQUAL" - Equal. + // "LESS_THAN" - Less than. + // "LESS_THAN_OR_EQUAL" - Less than or equal. + // "GREATER_THAN" - Greater than. + // "GREATER_THAN_OR_EQUAL" - Greater than or equal. + Operation string `json:"operation,omitempty"` + + // Value: Required. The numeric or date value to match against. + Value *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Operation") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -750,33 +858,31 @@ type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NotifyNewUsers") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Operation") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest +func (s *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse: Response -// message for BatchCreateUserLinks RPC. -type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse struct { - // UserLinks: The user links created. - UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` +// GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue +// : To represent a number. +type GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue struct { + // DoubleValue: Double value. + DoubleValue float64 `json:"doubleValue,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Int64Value: Integer value. + Int64Value int64 `json:"int64Value,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "UserLinks") to + // ForceSendFields is a list of field names (e.g. "DoubleValue") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -784,29 +890,61 @@ type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserLinks") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DoubleValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse +func (s *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest: Request -// message for BatchDeleteUserLinks RPC. -type GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest struct { - // Requests: Required. The requests specifying the user links to update. - // A maximum of 1000 user links can be updated in a batch. - Requests []*GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest `json:"requests,omitempty"` +func (s *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterNumericValue + var s1 struct { + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DoubleValue = float64(s1.DoubleValue) + return nil +} - // ForceSendFields is a list of field names (e.g. "Requests") to +// GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterStringFilter +// : A filter for a string-type dimension that matches a particular +// pattern. +type GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterStringFilter struct { + // CaseSensitive: Optional. If true, the match is case-sensitive. If + // false, the match is case-insensitive. + CaseSensitive bool `json:"caseSensitive,omitempty"` + + // MatchType: Required. The match type for the string filter. + // + // Possible values: + // "MATCH_TYPE_UNSPECIFIED" - Unspecified + // "EXACT" - Exact match of the string value. + // "BEGINS_WITH" - Begins with the string value. + // "ENDS_WITH" - Ends with the string value. + // "CONTAINS" - Contains the string value. + // "FULL_REGEXP" - Full regular expression matches with the string + // value. + // "PARTIAL_REGEXP" - Partial regular expression matches with the + // string value. + MatchType string `json:"matchType,omitempty"` + + // Value: Required. The string value to be matched against. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaseSensitive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -814,32 +952,41 @@ type GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Requests") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CaseSensitive") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest +func (s *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterStringFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilterStringFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse: Response -// message for BatchGetUserLinks RPC. -type GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse struct { - // UserLinks: The requested user links. - UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleAnalyticsAdminV1alphaAudienceEventFilter: A filter that matches +// events of a single event name. If an event parameter is specified, +// only the subset of events that match both the single event name and +// the parameter filter expressions match this event filter. +type GoogleAnalyticsAdminV1alphaAudienceEventFilter struct { + // EventName: Required. Immutable. The name of the event to match + // against. + EventName string `json:"eventName,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserLinks") to + // EventParameterFilterExpression: Optional. If specified, this filter + // matches events that match both the single event name and the + // parameter filter expressions. AudienceEventFilter inside the + // parameter filter expression cannot be set (i.e., nested event filters + // are not supported). This should be a single and_group of + // dimension_or_metric_filter or not_expression; ANDs of ORs are not + // supported. Also, if it includes a filter for "eventCount", only that + // one will be considered; all the other filters will be ignored. + EventParameterFilterExpression *GoogleAnalyticsAdminV1alphaAudienceFilterExpression `json:"eventParameterFilterExpression,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EventName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -847,7 +994,7 @@ type GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserLinks") to include in + // NullFields is a list of field names (e.g. "EventName") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -856,20 +1003,30 @@ type GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse +func (s *GoogleAnalyticsAdminV1alphaAudienceEventFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceEventFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest: Request -// message for BatchUpdateUserLinks RPC. -type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest struct { - // Requests: Required. The requests specifying the user links to update. - // A maximum of 1000 user links can be updated in a batch. - Requests []*GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest `json:"requests,omitempty"` +// GoogleAnalyticsAdminV1alphaAudienceEventTrigger: Specifies an event +// to log when a user joins the Audience. +type GoogleAnalyticsAdminV1alphaAudienceEventTrigger struct { + // EventName: Required. The event name that will be logged. + EventName string `json:"eventName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Requests") to + // LogCondition: Required. When to log the event. + // + // Possible values: + // "LOG_CONDITION_UNSPECIFIED" - Log condition is not specified. + // "AUDIENCE_JOINED" - The event should be logged only when a user is + // joined. + // "AUDIENCE_MEMBERSHIP_RENEWED" - The event should be logged whenever + // the Audience condition is met, even if the user is already a member + // of the Audience. + LogCondition string `json:"logCondition,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EventName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -877,7 +1034,7 @@ type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Requests") to include in + // NullFields is a list of field names (e.g. "EventName") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -886,23 +1043,38 @@ type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest +func (s *GoogleAnalyticsAdminV1alphaAudienceEventTrigger) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceEventTrigger raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse: Response -// message for BatchUpdateUserLinks RPC. -type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse struct { - // UserLinks: The user links updated. - UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "UserLinks") to +// GoogleAnalyticsAdminV1alphaAudienceFilterClause: A clause for +// defining either a simple or sequence filter. A filter can be +// inclusive (i.e., users satisfying the filter clause are included in +// the Audience) or exclusive (i.e., users satisfying the filter clause +// are excluded from the Audience). +type GoogleAnalyticsAdminV1alphaAudienceFilterClause struct { + // ClauseType: Required. Specifies whether this is an include or exclude + // filter clause. + // + // Possible values: + // "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED" - Unspecified clause type. + // "INCLUDE" - Users will be included in the Audience if the filter + // clause is met. + // "EXCLUDE" - Users will be excluded from the Audience if the filter + // clause is met. + ClauseType string `json:"clauseType,omitempty"` + + // SequenceFilter: Filters that must occur in a specific order for the + // user to be a member of the Audience. + SequenceFilter *GoogleAnalyticsAdminV1alphaAudienceSequenceFilter `json:"sequenceFilter,omitempty"` + + // SimpleFilter: A simple filter that a user must satisfy to be a member + // of the Audience. + SimpleFilter *GoogleAnalyticsAdminV1alphaAudienceSimpleFilter `json:"simpleFilter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClauseType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -910,7 +1082,7 @@ type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserLinks") to include in + // NullFields is a list of field names (e.g. "ClauseType") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -919,45 +1091,38 @@ type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse +func (s *GoogleAnalyticsAdminV1alphaAudienceFilterClause) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceFilterClause raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposal -// Request: Request message for -// CancelDisplayVideo360AdvertiserLinkProposal RPC. -type GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposalRequest struct { -} +// GoogleAnalyticsAdminV1alphaAudienceFilterExpression: A logical +// expression of Audience dimension, metric, or event filters. +type GoogleAnalyticsAdminV1alphaAudienceFilterExpression struct { + // AndGroup: A list of expressions to be AND’ed together. It can only + // contain AudienceFilterExpressions with or_group. This must be set for + // the top level AudienceFilterExpression. + AndGroup *GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList `json:"andGroup,omitempty"` -// GoogleAnalyticsAdminV1alphaChangeHistoryChange: A description of a -// change to a single Google Analytics resource. -type GoogleAnalyticsAdminV1alphaChangeHistoryChange struct { - // Action: The type of action that changed this resource. - // - // Possible values: - // "ACTION_TYPE_UNSPECIFIED" - Action type unknown or not specified. - // "CREATED" - Resource was created in this change. - // "UPDATED" - Resource was updated in this change. - // "DELETED" - Resource was deleted in this change. - Action string `json:"action,omitempty"` + // DimensionOrMetricFilter: A filter on a single dimension or metric. + // This cannot be set on the top level AudienceFilterExpression. + DimensionOrMetricFilter *GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter `json:"dimensionOrMetricFilter,omitempty"` - // Resource: Resource name of the resource whose changes are described - // by this entry. - Resource string `json:"resource,omitempty"` + // EventFilter: Creates a filter that matches a specific event. This + // cannot be set on the top level AudienceFilterExpression. + EventFilter *GoogleAnalyticsAdminV1alphaAudienceEventFilter `json:"eventFilter,omitempty"` - // ResourceAfterChange: Resource contents from after the change was - // made. If this resource was deleted in this change, this field will be - // missing. - ResourceAfterChange *GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource `json:"resourceAfterChange,omitempty"` + // NotExpression: A filter expression to be NOT'ed (i.e., inverted, + // complemented). It can only include a dimension_or_metric_filter. This + // cannot be set on the top level AudienceFilterExpression. + NotExpression *GoogleAnalyticsAdminV1alphaAudienceFilterExpression `json:"notExpression,omitempty"` - // ResourceBeforeChange: Resource contents from before the change was - // made. If this resource was created in this change, this field will be - // missing. - ResourceBeforeChange *GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource `json:"resourceBeforeChange,omitempty"` + // OrGroup: A list of expressions to OR’ed together. It cannot contain + // AudienceFilterExpressions with and_group or or_group. + OrGroup *GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList `json:"orGroup,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to + // ForceSendFields is a list of field names (e.g. "AndGroup") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -965,8 +1130,8 @@ type GoogleAnalyticsAdminV1alphaChangeHistoryChange struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "AndGroup") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -974,130 +1139,68 @@ type GoogleAnalyticsAdminV1alphaChangeHistoryChange struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaChangeHistoryChange) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaChangeHistoryChange +func (s *GoogleAnalyticsAdminV1alphaAudienceFilterExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceFilterExpression raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource: -// A snapshot of a resource as before or after the result of a change in -// change history. -type GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource struct { - // Account: A snapshot of an Account resource in change history. - Account *GoogleAnalyticsAdminV1alphaAccount `json:"account,omitempty"` - - // AttributionSettings: A snapshot of AttributionSettings resource in - // change history. - AttributionSettings *GoogleAnalyticsAdminV1alphaAttributionSettings `json:"attributionSettings,omitempty"` - - // ConversionEvent: A snapshot of a ConversionEvent resource in change - // history. - ConversionEvent *GoogleAnalyticsAdminV1alphaConversionEvent `json:"conversionEvent,omitempty"` - - // CustomDimension: A snapshot of a CustomDimension resource in change - // history. - CustomDimension *GoogleAnalyticsAdminV1alphaCustomDimension `json:"customDimension,omitempty"` - - // CustomMetric: A snapshot of a CustomMetric resource in change - // history. - CustomMetric *GoogleAnalyticsAdminV1alphaCustomMetric `json:"customMetric,omitempty"` - - // DataRetentionSettings: A snapshot of a data retention settings - // resource in change history. - DataRetentionSettings *GoogleAnalyticsAdminV1alphaDataRetentionSettings `json:"dataRetentionSettings,omitempty"` - - // DataStream: A snapshot of a DataStream resource in change history. - DataStream *GoogleAnalyticsAdminV1alphaDataStream `json:"dataStream,omitempty"` - - // DisplayVideo360AdvertiserLink: A snapshot of a - // DisplayVideo360AdvertiserLink resource in change history. - DisplayVideo360AdvertiserLink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink `json:"displayVideo360AdvertiserLink,omitempty"` - - // DisplayVideo360AdvertiserLinkProposal: A snapshot of a - // DisplayVideo360AdvertiserLinkProposal resource in change history. - DisplayVideo360AdvertiserLinkProposal *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal `json:"displayVideo360AdvertiserLinkProposal,omitempty"` - - // FirebaseLink: A snapshot of a FirebaseLink resource in change - // history. - FirebaseLink *GoogleAnalyticsAdminV1alphaFirebaseLink `json:"firebaseLink,omitempty"` - - // GoogleAdsLink: A snapshot of a GoogleAdsLink resource in change - // history. - GoogleAdsLink *GoogleAnalyticsAdminV1alphaGoogleAdsLink `json:"googleAdsLink,omitempty"` - - // GoogleSignalsSettings: A snapshot of a GoogleSignalsSettings resource - // in change history. - GoogleSignalsSettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings `json:"googleSignalsSettings,omitempty"` - - // MeasurementProtocolSecret: A snapshot of a MeasurementProtocolSecret - // resource in change history. - MeasurementProtocolSecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret `json:"measurementProtocolSecret,omitempty"` - - // Property: A snapshot of a Property resource in change history. - Property *GoogleAnalyticsAdminV1alphaProperty `json:"property,omitempty"` +// GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList: A list of +// Audience filter expressions. +type GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList struct { + // FilterExpressions: A list of Audience filter expressions. + FilterExpressions []*GoogleAnalyticsAdminV1alphaAudienceFilterExpression `json:"filterExpressions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Account") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "FilterExpressions") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Account") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "FilterExpressions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource +func (s *GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaChangeHistoryEvent: A set of changes -// within a Google Analytics account or its child properties that -// resulted from the same cause. Common causes would be updates made in -// the Google Analytics UI, changes from customer support, or automatic -// Google Analytics system changes. -type GoogleAnalyticsAdminV1alphaChangeHistoryEvent struct { - // ActorType: The type of actor that made this change. +// GoogleAnalyticsAdminV1alphaAudienceSequenceFilter: Defines filters +// that must occur in a specific order for the user to be a member of +// the Audience. +type GoogleAnalyticsAdminV1alphaAudienceSequenceFilter struct { + // Scope: Required. Immutable. Specifies the scope for this filter. // // Possible values: - // "ACTOR_TYPE_UNSPECIFIED" - Unknown or unspecified actor type. - // "USER" - Changes made by the user specified in actor_email. - // "SYSTEM" - Changes made by the Google Analytics system. - // "SUPPORT" - Changes made by Google Analytics support team staff. - ActorType string `json:"actorType,omitempty"` - - // ChangeTime: Time when change was made. - ChangeTime string `json:"changeTime,omitempty"` - - // Changes: A list of changes made in this change history event that fit - // the filters specified in SearchChangeHistoryEventsRequest. - Changes []*GoogleAnalyticsAdminV1alphaChangeHistoryChange `json:"changes,omitempty"` - - // ChangesFiltered: If true, then the list of changes returned was - // filtered, and does not represent all changes that occurred in this - // event. - ChangesFiltered bool `json:"changesFiltered,omitempty"` + // "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" - Scope is not specified. + // "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT" - User joins the Audience + // if the filter condition is met within one event. + // "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION" - User joins the + // Audience if the filter condition is met within one session. + // "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS" - User joins the + // Audience if the filter condition is met by any event across any + // session. + Scope string `json:"scope,omitempty"` - // Id: ID of this change history event. This ID is unique across Google - // Analytics. - Id string `json:"id,omitempty"` + // SequenceMaximumDuration: Optional. Defines the time period in which + // the whole sequence must occur. + SequenceMaximumDuration string `json:"sequenceMaximumDuration,omitempty"` - // UserActorEmail: Email address of the Google account that made the - // change. This will be a valid email address if the actor field is set - // to USER, and empty otherwise. Google accounts that have been deleted - // will cause an error. - UserActorEmail string `json:"userActorEmail,omitempty"` + // SequenceSteps: Required. An ordered sequence of steps. A user must + // complete each step in order to join the sequence filter. + SequenceSteps []*GoogleAnalyticsAdminV1alphaAudienceSequenceFilterAudienceSequenceStep `json:"sequenceSteps,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActorType") to + // ForceSendFields is a list of field names (e.g. "Scope") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1105,8 +1208,8 @@ type GoogleAnalyticsAdminV1alphaChangeHistoryEvent struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActorType") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Scope") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1114,87 +1217,92 @@ type GoogleAnalyticsAdminV1alphaChangeHistoryEvent struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaChangeHistoryEvent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaChangeHistoryEvent +func (s *GoogleAnalyticsAdminV1alphaAudienceSequenceFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceSequenceFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaConversionEvent: A conversion event in a -// Google Analytics property. -type GoogleAnalyticsAdminV1alphaConversionEvent struct { - // CreateTime: Output only. Time when this conversion event was created - // in the property. - CreateTime string `json:"createTime,omitempty"` - - // Custom: Output only. If set to true, this conversion event refers to - // a custom event. If set to false, this conversion event refers to a - // default event in GA. Default events typically have special meaning in - // GA. Default events are usually created for you by the GA system, but - // in some cases can be created by property admins. Custom events count - // towards the maximum number of custom conversion events that may be - // created per property. - Custom bool `json:"custom,omitempty"` - - // Deletable: Output only. If set, this event can currently be deleted - // via DeleteConversionEvent. - Deletable bool `json:"deletable,omitempty"` - - // EventName: Immutable. The event name for this conversion event. - // Examples: 'click', 'purchase' - EventName string `json:"eventName,omitempty"` - - // Name: Output only. Resource name of this conversion event. Format: - // properties/{property}/conversionEvents/{conversion_event} - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleAnalyticsAdminV1alphaAudienceSequenceFilterAudienceSequenceStep: +// A condition that must occur in the specified step order for this +// user to match the sequence. +type GoogleAnalyticsAdminV1alphaAudienceSequenceFilterAudienceSequenceStep struct { + // ConstraintDuration: Optional. When set, this step must be satisfied + // within the constraint_duration of the previous step (i.e., t[i] - + // t[i-1] <= constraint_duration). If not set, there is no duration + // requirement (the duration is effectively unlimited). It is ignored + // for the first step. + ConstraintDuration string `json:"constraintDuration,omitempty"` + + // FilterExpression: Required. Immutable. A logical expression of + // Audience dimension, metric, or event filters in each step. + FilterExpression *GoogleAnalyticsAdminV1alphaAudienceFilterExpression `json:"filterExpression,omitempty"` + + // ImmediatelyFollows: Optional. If true, the event satisfying this step + // must be the very next event after the event satisfying the last step. + // If unset or false, this step indirectly follows the prior step; for + // example, there may be events between the prior step and this step. It + // is ignored for the first step. + ImmediatelyFollows bool `json:"immediatelyFollows,omitempty"` + + // Scope: Required. Immutable. Specifies the scope for this step. + // + // Possible values: + // "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" - Scope is not specified. + // "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT" - User joins the Audience + // if the filter condition is met within one event. + // "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION" - User joins the + // Audience if the filter condition is met within one session. + // "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS" - User joins the + // Audience if the filter condition is met by any event across any + // session. + Scope string `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ConstraintDuration") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ConstraintDuration") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaConversionEvent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaConversionEvent +func (s *GoogleAnalyticsAdminV1alphaAudienceSequenceFilterAudienceSequenceStep) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceSequenceFilterAudienceSequenceStep raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaCreateUserLinkRequest: Request message for -// CreateUserLink RPC. Users can have multiple email addresses -// associated with their Google account, and one of these email -// addresses is the "primary" email address. Any of the email addresses -// associated with a Google account may be used for a new UserLink, but -// the returned UserLink will always contain the "primary" email -// address. As a result, the input and output email address for this -// request may differ. -type GoogleAnalyticsAdminV1alphaCreateUserLinkRequest struct { - // NotifyNewUser: Optional. If set, then email the new user notifying - // them that they've been granted permissions to the resource. - NotifyNewUser bool `json:"notifyNewUser,omitempty"` - - // Parent: Required. Example format: accounts/1234 - Parent string `json:"parent,omitempty"` +// GoogleAnalyticsAdminV1alphaAudienceSimpleFilter: Defines a simple +// filter that a user must satisfy to be a member of the Audience. +type GoogleAnalyticsAdminV1alphaAudienceSimpleFilter struct { + // FilterExpression: Required. Immutable. A logical expression of + // Audience dimension, metric, or event filters. + FilterExpression *GoogleAnalyticsAdminV1alphaAudienceFilterExpression `json:"filterExpression,omitempty"` - // UserLink: Required. The user link to create. - UserLink *GoogleAnalyticsAdminV1alphaUserLink `json:"userLink,omitempty"` + // Scope: Required. Immutable. Specifies the scope for this filter. + // + // Possible values: + // "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" - Scope is not specified. + // "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT" - User joins the Audience + // if the filter condition is met within one event. + // "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION" - User joins the + // Audience if the filter condition is met within one session. + // "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS" - User joins the + // Audience if the filter condition is met by any event across any + // session. + Scope string `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "NotifyNewUser") to + // ForceSendFields is a list of field names (e.g. "FilterExpression") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1202,66 +1310,43 @@ type GoogleAnalyticsAdminV1alphaCreateUserLinkRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NotifyNewUser") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "FilterExpression") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaCreateUserLinkRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaCreateUserLinkRequest +func (s *GoogleAnalyticsAdminV1alphaAudienceSimpleFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAudienceSimpleFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaCustomDimension: A definition for a -// CustomDimension. -type GoogleAnalyticsAdminV1alphaCustomDimension struct { - // Description: Optional. Description for this custom dimension. Max - // length of 150 characters. - Description string `json:"description,omitempty"` +// GoogleAnalyticsAdminV1alphaAuditUserLink: Read-only resource used to +// summarize a principal's effective roles. +type GoogleAnalyticsAdminV1alphaAuditUserLink struct { + // DirectRoles: Roles directly assigned to this user for this entity. + // Format: predefinedRoles/viewer Excludes roles that are inherited from + // an account (if this is for a property), group, or organization admin + // role. + DirectRoles []string `json:"directRoles,omitempty"` - // DisallowAdsPersonalization: Optional. If set to true, sets this - // dimension as NPA and excludes it from ads personalization. This is - // currently only supported by user-scoped custom dimensions. - DisallowAdsPersonalization bool `json:"disallowAdsPersonalization,omitempty"` + // EffectiveRoles: Union of all permissions a user has at this account + // or property (includes direct permissions, group-inherited + // permissions, etc.). Format: predefinedRoles/viewer + EffectiveRoles []string `json:"effectiveRoles,omitempty"` - // DisplayName: Required. Display name for this custom dimension as - // shown in the Analytics UI. Max length of 82 characters, alphanumeric - // plus space and underscore starting with a letter. Legacy - // system-generated display names may contain square brackets, but - // updates to this field will never permit square brackets. - DisplayName string `json:"displayName,omitempty"` + // EmailAddress: Email address of the linked user + EmailAddress string `json:"emailAddress,omitempty"` - // Name: Output only. Resource name for this CustomDimension resource. - // Format: properties/{property}/customDimensions/{customDimension} + // Name: Example format: properties/1234/userLinks/5678 Name string `json:"name,omitempty"` - // ParameterName: Required. Immutable. Tagging parameter name for this - // custom dimension. If this is a user-scoped dimension, then this is - // the user property name. If this is an event-scoped dimension, then - // this is the event parameter name. May only contain alphanumeric and - // underscore characters, starting with a letter. Max length of 24 - // characters for user-scoped dimensions, 40 characters for event-scoped - // dimensions. - ParameterName string `json:"parameterName,omitempty"` - - // Scope: Required. Immutable. The scope of this dimension. - // - // Possible values: - // "DIMENSION_SCOPE_UNSPECIFIED" - Scope unknown or not specified. - // "EVENT" - Dimension scoped to an event. - // "USER" - Dimension scoped to a user. - Scope string `json:"scope,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "DirectRoles") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1269,7 +1354,7 @@ type GoogleAnalyticsAdminV1alphaCustomDimension struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include + // NullFields is a list of field names (e.g. "DirectRoles") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -1278,76 +1363,67 @@ type GoogleAnalyticsAdminV1alphaCustomDimension struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaCustomDimension) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaCustomDimension +func (s *GoogleAnalyticsAdminV1alphaAuditUserLink) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLink raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaCustomMetric: A definition for a custom -// metric. -type GoogleAnalyticsAdminV1alphaCustomMetric struct { - // Description: Optional. Description for this custom dimension. Max - // length of 150 characters. - Description string `json:"description,omitempty"` +// GoogleAnalyticsAdminV1alphaAuditUserLinksRequest: Request message for +// AuditUserLinks RPC. +type GoogleAnalyticsAdminV1alphaAuditUserLinksRequest struct { + // PageSize: The maximum number of user links to return. The service may + // return fewer than this value. If unspecified, at most 1000 user links + // will be returned. The maximum value is 5000; values above 5000 will + // be coerced to 5000. + PageSize int64 `json:"pageSize,omitempty"` - // DisplayName: Required. Display name for this custom metric as shown - // in the Analytics UI. Max length of 82 characters, alphanumeric plus - // space and underscore starting with a letter. Legacy system-generated - // display names may contain square brackets, but updates to this field - // will never permit square brackets. - DisplayName string `json:"displayName,omitempty"` + // PageToken: A page token, received from a previous `AuditUserLinks` + // call. Provide this to retrieve the subsequent page. When paginating, + // all other parameters provided to `AuditUserLinks` must match the call + // that provided the page token. + PageToken string `json:"pageToken,omitempty"` - // MeasurementUnit: Required. The type for the custom metric's value. - // - // Possible values: - // "MEASUREMENT_UNIT_UNSPECIFIED" - MeasurementUnit unspecified or - // missing. - // "STANDARD" - This metric uses default units. - // "CURRENCY" - This metric measures a currency. - // "FEET" - This metric measures feet. - // "METERS" - This metric measures meters. - // "KILOMETERS" - This metric measures kilometers. - // "MILES" - This metric measures miles. - // "MILLISECONDS" - This metric measures milliseconds. - // "SECONDS" - This metric measures seconds. - // "MINUTES" - This metric measures minutes. - // "HOURS" - This metric measures hours. - MeasurementUnit string `json:"measurementUnit,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSize") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Name: Output only. Resource name for this CustomMetric resource. - // Format: properties/{property}/customMetrics/{customMetric} - Name string `json:"name,omitempty"` + // NullFields is a list of field names (e.g. "PageSize") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // ParameterName: Required. Immutable. Tagging name for this custom - // metric. If this is an event-scoped metric, then this is the event - // parameter name. May only contain alphanumeric and underscore - // charactes, starting with a letter. Max length of 40 characters for - // event-scoped metrics. - ParameterName string `json:"parameterName,omitempty"` +func (s *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // RestrictedMetricType: Optional. Types of restricted data that this - // metric may contain. Required for metrics with CURRENCY measurement - // unit. Must be empty for metrics with a non-CURRENCY measurement unit. - // - // Possible values: - // "RESTRICTED_METRIC_TYPE_UNSPECIFIED" - Type unknown or unspecified. - // "COST_DATA" - Metric reports cost data. - // "REVENUE_DATA" - Metric reports revenue data. - RestrictedMetricType []string `json:"restrictedMetricType,omitempty"` +// GoogleAnalyticsAdminV1alphaAuditUserLinksResponse: Response message +// for AuditUserLinks RPC. +type GoogleAnalyticsAdminV1alphaAuditUserLinksResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // Scope: Required. Immutable. The scope of this custom metric. - // - // Possible values: - // "METRIC_SCOPE_UNSPECIFIED" - Scope unknown or not specified. - // "EVENT" - Metric scoped to an event. - Scope string `json:"scope,omitempty"` + // UserLinks: List of AuditUserLinks. These will be ordered stably, but + // in an arbitrary order. + UserLinks []*GoogleAnalyticsAdminV1alphaAuditUserLink `json:"userLinks,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1355,7 +1431,7 @@ type GoogleAnalyticsAdminV1alphaCustomMetric struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include + // NullFields is a list of field names (e.g. "NextPageToken") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -1364,52 +1440,34 @@ type GoogleAnalyticsAdminV1alphaCustomMetric struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaCustomMetric) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaCustomMetric +func (s *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaDataRetentionSettings: Settings values for -// data retention. This is a singleton resource. -type GoogleAnalyticsAdminV1alphaDataRetentionSettings struct { - // EventDataRetention: The length of time that event-level data is - // retained. - // - // Possible values: - // "RETENTION_DURATION_UNSPECIFIED" - Data retention time duration is - // not specified. - // "TWO_MONTHS" - The data retention time duration is 2 months. - // "FOURTEEN_MONTHS" - The data retention time duration is 14 months. - // "TWENTY_SIX_MONTHS" - The data retention time duration is 26 - // months. Available to 360 properties only. - // "THIRTY_EIGHT_MONTHS" - The data retention time duration is 38 - // months. Available to 360 properties only. - // "FIFTY_MONTHS" - The data retention time duration is 50 months. - // Available to 360 properties only. - EventDataRetention string `json:"eventDataRetention,omitempty"` - - // Name: Output only. Resource name for this DataRetentionSetting - // resource. Format: properties/{property}/dataRetentionSettings - Name string `json:"name,omitempty"` - - // ResetUserDataOnNewActivity: If true, reset the retention period for - // the user identifier with every event from that user. - ResetUserDataOnNewActivity bool `json:"resetUserDataOnNewActivity,omitempty"` +// GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest: Request +// message for BatchCreateUserLinks RPC. +type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest struct { + // NotifyNewUsers: Optional. If set, then email the new users notifying + // them that they've been granted permissions to the resource. + // Regardless of whether this is set or not, notify_new_user field + // inside each individual request is ignored. + NotifyNewUsers bool `json:"notifyNewUsers,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Requests: Required. The requests specifying the user links to create. + // A maximum of 1000 user links can be created in a batch. + Requests []*GoogleAnalyticsAdminV1alphaCreateUserLinkRequest `json:"requests,omitempty"` - // ForceSendFields is a list of field names (e.g. "EventDataRetention") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "NotifyNewUsers") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EventDataRetention") to + // NullFields is a list of field names (e.g. "NotifyNewUsers") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -1419,48 +1477,23 @@ type GoogleAnalyticsAdminV1alphaDataRetentionSettings struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaDataRetentionSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaDataRetentionSettings +func (s *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaDataSharingSettings: A resource message -// representing data sharing settings of a Google Analytics account. -type GoogleAnalyticsAdminV1alphaDataSharingSettings struct { - // Name: Output only. Resource name. Format: - // accounts/{account}/dataSharingSettings Example: - // "accounts/1000/dataSharingSettings" - Name string `json:"name,omitempty"` - - // SharingWithGoogleAnySalesEnabled: Allows any of Google sales to - // access the data in order to suggest configuration changes to improve - // results. - SharingWithGoogleAnySalesEnabled bool `json:"sharingWithGoogleAnySalesEnabled,omitempty"` - - // SharingWithGoogleAssignedSalesEnabled: Allows Google sales teams that - // are assigned to the customer to access the data in order to suggest - // configuration changes to improve results. Sales team restrictions - // still apply when enabled. - SharingWithGoogleAssignedSalesEnabled bool `json:"sharingWithGoogleAssignedSalesEnabled,omitempty"` - - // SharingWithGoogleProductsEnabled: Allows Google to use the data to - // improve other Google products or services. - SharingWithGoogleProductsEnabled bool `json:"sharingWithGoogleProductsEnabled,omitempty"` - - // SharingWithGoogleSupportEnabled: Allows Google support to access the - // data in order to help troubleshoot issues. - SharingWithGoogleSupportEnabled bool `json:"sharingWithGoogleSupportEnabled,omitempty"` - - // SharingWithOthersEnabled: Allows Google to share the data anonymously - // in aggregate form with others. - SharingWithOthersEnabled bool `json:"sharingWithOthersEnabled,omitempty"` +// GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse: Response +// message for BatchCreateUserLinks RPC. +type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse struct { + // UserLinks: The user links created. + UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "UserLinks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1468,8 +1501,8 @@ type GoogleAnalyticsAdminV1alphaDataSharingSettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "UserLinks") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1477,96 +1510,83 @@ type GoogleAnalyticsAdminV1alphaDataSharingSettings struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaDataSharingSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaDataSharingSettings +func (s *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaDataStream: A resource message -// representing a data stream. -type GoogleAnalyticsAdminV1alphaDataStream struct { - // AndroidAppStreamData: Data specific to Android app streams. Must be - // populated if type is ANDROID_APP_DATA_STREAM. - AndroidAppStreamData *GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData `json:"androidAppStreamData,omitempty"` +// GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest: Request +// message for BatchDeleteUserLinks RPC. +type GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest struct { + // Requests: Required. The requests specifying the user links to update. + // A maximum of 1000 user links can be updated in a batch. + Requests []*GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest `json:"requests,omitempty"` - // CreateTime: Output only. Time when this stream was originally - // created. - CreateTime string `json:"createTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // DisplayName: Human-readable display name for the Data Stream. - // Required for web data streams. The max allowed display name length is - // 255 UTF-16 code units. - DisplayName string `json:"displayName,omitempty"` + // NullFields is a list of field names (e.g. "Requests") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // IosAppStreamData: Data specific to iOS app streams. Must be populated - // if type is IOS_APP_DATA_STREAM. - IosAppStreamData *GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData `json:"iosAppStreamData,omitempty"` +func (s *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Name: Output only. Resource name of this Data Stream. Format: - // properties/{property_id}/dataStreams/{stream_id} Example: - // "properties/1000/dataStreams/2000" - Name string `json:"name,omitempty"` - - // Type: Required. Immutable. The type of this DataStream resource. - // - // Possible values: - // "DATA_STREAM_TYPE_UNSPECIFIED" - Type unknown or not specified. - // "WEB_DATA_STREAM" - Web data stream. - // "ANDROID_APP_DATA_STREAM" - Android app data stream. - // "IOS_APP_DATA_STREAM" - iOS app data stream. - Type string `json:"type,omitempty"` - - // UpdateTime: Output only. Time when stream payload fields were last - // updated. - UpdateTime string `json:"updateTime,omitempty"` - - // WebStreamData: Data specific to web streams. Must be populated if - // type is WEB_DATA_STREAM. - WebStreamData *GoogleAnalyticsAdminV1alphaDataStreamWebStreamData `json:"webStreamData,omitempty"` +// GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse: Response +// message for BatchGetUserLinks RPC. +type GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse struct { + // UserLinks: The requested user links. + UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AndroidAppStreamData") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "UserLinks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AndroidAppStreamData") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "UserLinks") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaDataStream) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaDataStream +func (s *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData: Data -// specific to Android app streams. -type GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData struct { - // FirebaseAppId: Output only. ID of the corresponding Android app in - // Firebase, if any. This ID can change if the Android app is deleted - // and recreated. - FirebaseAppId string `json:"firebaseAppId,omitempty"` - - // PackageName: Immutable. The package name for the app being measured. - // Example: "com.example.myandroidapp" - PackageName string `json:"packageName,omitempty"` +// GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest: Request +// message for BatchUpdateUserLinks RPC. +type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest struct { + // Requests: Required. The requests specifying the user links to update. + // A maximum of 1000 user links can be updated in a batch. + Requests []*GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest `json:"requests,omitempty"` - // ForceSendFields is a list of field names (e.g. "FirebaseAppId") to + // ForceSendFields is a list of field names (e.g. "Requests") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1574,34 +1594,32 @@ type GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirebaseAppId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Requests") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData +func (s *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData: Data specific -// to iOS app streams. -type GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData struct { - // BundleId: Required. Immutable. The Apple App Store Bundle ID for the - // app Example: "com.example.myiosapp" - BundleId string `json:"bundleId,omitempty"` +// GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse: Response +// message for BatchUpdateUserLinks RPC. +type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse struct { + // UserLinks: The user links updated. + UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` - // FirebaseAppId: Output only. ID of the corresponding iOS app in - // Firebase, if any. This ID can change if the iOS app is deleted and - // recreated. - FirebaseAppId string `json:"firebaseAppId,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BundleId") to + // ForceSendFields is a list of field names (e.g. "UserLinks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1609,7 +1627,7 @@ type GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BundleId") to include in + // NullFields is a list of field names (e.g. "UserLinks") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1618,29 +1636,45 @@ type GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData +func (s *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaDataStreamWebStreamData: Data specific to -// web streams. -type GoogleAnalyticsAdminV1alphaDataStreamWebStreamData struct { - // DefaultUri: Immutable. Domain name of the web app being measured, or - // empty. Example: "http://www.google.com", "https://www.google.com" - DefaultUri string `json:"defaultUri,omitempty"` +// GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposal +// Request: Request message for +// CancelDisplayVideo360AdvertiserLinkProposal RPC. +type GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposalRequest struct { +} - // FirebaseAppId: Output only. ID of the corresponding web app in - // Firebase, if any. This ID can change if the web app is deleted and - // recreated. - FirebaseAppId string `json:"firebaseAppId,omitempty"` +// GoogleAnalyticsAdminV1alphaChangeHistoryChange: A description of a +// change to a single Google Analytics resource. +type GoogleAnalyticsAdminV1alphaChangeHistoryChange struct { + // Action: The type of action that changed this resource. + // + // Possible values: + // "ACTION_TYPE_UNSPECIFIED" - Action type unknown or not specified. + // "CREATED" - Resource was created in this change. + // "UPDATED" - Resource was updated in this change. + // "DELETED" - Resource was deleted in this change. + Action string `json:"action,omitempty"` - // MeasurementId: Output only. Analytics "Measurement ID", without the - // "G-" prefix. Example: "G-1A2BCD345E" would just be "1A2BCD345E" - MeasurementId string `json:"measurementId,omitempty"` + // Resource: Resource name of the resource whose changes are described + // by this entry. + Resource string `json:"resource,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultUri") to + // ResourceAfterChange: Resource contents from after the change was + // made. If this resource was deleted in this change, this field will be + // missing. + ResourceAfterChange *GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource `json:"resourceAfterChange,omitempty"` + + // ResourceBeforeChange: Resource contents from before the change was + // made. If this resource was created in this change, this field will be + // missing. + ResourceBeforeChange *GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource `json:"resourceBeforeChange,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1648,8 +1682,8 @@ type GoogleAnalyticsAdminV1alphaDataStreamWebStreamData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultUri") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1657,19 +1691,70 @@ type GoogleAnalyticsAdminV1alphaDataStreamWebStreamData struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaDataStreamWebStreamData) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaDataStreamWebStreamData +func (s *GoogleAnalyticsAdminV1alphaChangeHistoryChange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaChangeHistoryChange raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest: Request message for -// DeleteUserLink RPC. -type GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest struct { - // Name: Required. Example format: accounts/1234/userLinks/5678 - Name string `json:"name,omitempty"` +// GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource: +// A snapshot of a resource as before or after the result of a change in +// change history. +type GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource struct { + // Account: A snapshot of an Account resource in change history. + Account *GoogleAnalyticsAdminV1alphaAccount `json:"account,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // AttributionSettings: A snapshot of AttributionSettings resource in + // change history. + AttributionSettings *GoogleAnalyticsAdminV1alphaAttributionSettings `json:"attributionSettings,omitempty"` + + // ConversionEvent: A snapshot of a ConversionEvent resource in change + // history. + ConversionEvent *GoogleAnalyticsAdminV1alphaConversionEvent `json:"conversionEvent,omitempty"` + + // CustomDimension: A snapshot of a CustomDimension resource in change + // history. + CustomDimension *GoogleAnalyticsAdminV1alphaCustomDimension `json:"customDimension,omitempty"` + + // CustomMetric: A snapshot of a CustomMetric resource in change + // history. + CustomMetric *GoogleAnalyticsAdminV1alphaCustomMetric `json:"customMetric,omitempty"` + + // DataRetentionSettings: A snapshot of a data retention settings + // resource in change history. + DataRetentionSettings *GoogleAnalyticsAdminV1alphaDataRetentionSettings `json:"dataRetentionSettings,omitempty"` + + // DataStream: A snapshot of a DataStream resource in change history. + DataStream *GoogleAnalyticsAdminV1alphaDataStream `json:"dataStream,omitempty"` + + // DisplayVideo360AdvertiserLink: A snapshot of a + // DisplayVideo360AdvertiserLink resource in change history. + DisplayVideo360AdvertiserLink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink `json:"displayVideo360AdvertiserLink,omitempty"` + + // DisplayVideo360AdvertiserLinkProposal: A snapshot of a + // DisplayVideo360AdvertiserLinkProposal resource in change history. + DisplayVideo360AdvertiserLinkProposal *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal `json:"displayVideo360AdvertiserLinkProposal,omitempty"` + + // FirebaseLink: A snapshot of a FirebaseLink resource in change + // history. + FirebaseLink *GoogleAnalyticsAdminV1alphaFirebaseLink `json:"firebaseLink,omitempty"` + + // GoogleAdsLink: A snapshot of a GoogleAdsLink resource in change + // history. + GoogleAdsLink *GoogleAnalyticsAdminV1alphaGoogleAdsLink `json:"googleAdsLink,omitempty"` + + // GoogleSignalsSettings: A snapshot of a GoogleSignalsSettings resource + // in change history. + GoogleSignalsSettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings `json:"googleSignalsSettings,omitempty"` + + // MeasurementProtocolSecret: A snapshot of a MeasurementProtocolSecret + // resource in change history. + MeasurementProtocolSecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret `json:"measurementProtocolSecret,omitempty"` + + // Property: A snapshot of a Property resource in change history. + Property *GoogleAnalyticsAdminV1alphaProperty `json:"property,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Account") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1677,8 +1762,8 @@ type GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Account") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1686,176 +1771,100 @@ type GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest +func (s *GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink: A link -// between a GA4 property and a Display & Video 360 advertiser. -type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink struct { - // AdsPersonalizationEnabled: Enables personalized advertising features - // with this integration. If this field is not set on create/update, it - // will be defaulted to true. - AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"` +// GoogleAnalyticsAdminV1alphaChangeHistoryEvent: A set of changes +// within a Google Analytics account or its child properties that +// resulted from the same cause. Common causes would be updates made in +// the Google Analytics UI, changes from customer support, or automatic +// Google Analytics system changes. +type GoogleAnalyticsAdminV1alphaChangeHistoryEvent struct { + // ActorType: The type of actor that made this change. + // + // Possible values: + // "ACTOR_TYPE_UNSPECIFIED" - Unknown or unspecified actor type. + // "USER" - Changes made by the user specified in actor_email. + // "SYSTEM" - Changes made by the Google Analytics system. + // "SUPPORT" - Changes made by Google Analytics support team staff. + ActorType string `json:"actorType,omitempty"` - // AdvertiserDisplayName: Output only. The display name of the Display & - // Video 360 Advertiser. - AdvertiserDisplayName string `json:"advertiserDisplayName,omitempty"` + // ChangeTime: Time when change was made. + ChangeTime string `json:"changeTime,omitempty"` - // AdvertiserId: Immutable. The Display & Video 360 Advertiser's - // advertiser ID. - AdvertiserId string `json:"advertiserId,omitempty"` + // Changes: A list of changes made in this change history event that fit + // the filters specified in SearchChangeHistoryEventsRequest. + Changes []*GoogleAnalyticsAdminV1alphaChangeHistoryChange `json:"changes,omitempty"` - // CampaignDataSharingEnabled: Immutable. Enables the import of campaign - // data from Display & Video 360 into the GA4 property. After link - // creation, this can only be updated from the Display & Video 360 - // product. If this field is not set on create, it will be defaulted to - // true. - CampaignDataSharingEnabled bool `json:"campaignDataSharingEnabled,omitempty"` - - // CostDataSharingEnabled: Immutable. Enables the import of cost data - // from Display & Video 360 into the GA4 property. This can only be - // enabled if campaign_data_sharing_enabled is enabled. After link - // creation, this can only be updated from the Display & Video 360 - // product. If this field is not set on create, it will be defaulted to - // true. - CostDataSharingEnabled bool `json:"costDataSharingEnabled,omitempty"` + // ChangesFiltered: If true, then the list of changes returned was + // filtered, and does not represent all changes that occurred in this + // event. + ChangesFiltered bool `json:"changesFiltered,omitempty"` - // Name: Output only. The resource name for this - // DisplayVideo360AdvertiserLink resource. Format: - // properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId} Note: - // linkId is not the Display & Video 360 Advertiser ID - Name string `json:"name,omitempty"` + // Id: ID of this change history event. This ID is unique across Google + // Analytics. + Id string `json:"id,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // UserActorEmail: Email address of the Google account that made the + // change. This will be a valid email address if the actor field is set + // to USER, and empty otherwise. Google accounts that have been deleted + // will cause an error. + UserActorEmail string `json:"userActorEmail,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AdsPersonalizationEnabled") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "ActorType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "AdsPersonalizationEnabled") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "ActorType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink +func (s *GoogleAnalyticsAdminV1alphaChangeHistoryEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaChangeHistoryEvent raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal: A -// proposal for a link between a GA4 property and a Display & Video 360 -// advertiser. A proposal is converted to a -// DisplayVideo360AdvertiserLink once approved. Google Analytics admins -// approve inbound proposals while Display & Video 360 admins approve -// outbound proposals. -type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal struct { - // AdsPersonalizationEnabled: Immutable. Enables personalized - // advertising features with this integration. If this field is not set - // on create, it will be defaulted to true. - AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"` - - // AdvertiserDisplayName: Output only. The display name of the Display & - // Video Advertiser. Only populated for proposals that originated from - // Display & Video 360. - AdvertiserDisplayName string `json:"advertiserDisplayName,omitempty"` - - // AdvertiserId: Immutable. The Display & Video 360 Advertiser's - // advertiser ID. - AdvertiserId string `json:"advertiserId,omitempty"` - - // CampaignDataSharingEnabled: Immutable. Enables the import of campaign - // data from Display & Video 360. If this field is not set on create, it - // will be defaulted to true. - CampaignDataSharingEnabled bool `json:"campaignDataSharingEnabled,omitempty"` - - // CostDataSharingEnabled: Immutable. Enables the import of cost data - // from Display & Video 360. This can only be enabled if - // campaign_data_sharing_enabled is enabled. If this field is not set on - // create, it will be defaulted to true. - CostDataSharingEnabled bool `json:"costDataSharingEnabled,omitempty"` - - // LinkProposalStatusDetails: Output only. The status information for - // this link proposal. - LinkProposalStatusDetails *GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails `json:"linkProposalStatusDetails,omitempty"` - - // Name: Output only. The resource name for this - // DisplayVideo360AdvertiserLinkProposal resource. Format: - // properties/{propertyId}/displayVideo360AdvertiserLinkProposals/{propos - // alId} Note: proposalId is not the Display & Video 360 Advertiser ID - Name string `json:"name,omitempty"` - - // ValidationEmail: Input only. On a proposal being sent to Display & - // Video 360, this field must be set to the email address of an admin on - // the target advertiser. This is used to verify that the Google - // Analytics admin is aware of at least one admin on the Display & Video - // 360 Advertiser. This does not restrict approval of the proposal to a - // single user. Any admin on the Display & Video 360 Advertiser may - // approve the proposal. - ValidationEmail string `json:"validationEmail,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "AdsPersonalizationEnabled") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` +// GoogleAnalyticsAdminV1alphaConversionEvent: A conversion event in a +// Google Analytics property. +type GoogleAnalyticsAdminV1alphaConversionEvent struct { + // CreateTime: Output only. Time when this conversion event was created + // in the property. + CreateTime string `json:"createTime,omitempty"` - // NullFields is a list of field names (e.g. - // "AdsPersonalizationEnabled") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} + // Custom: Output only. If set to true, this conversion event refers to + // a custom event. If set to false, this conversion event refers to a + // default event in GA. Default events typically have special meaning in + // GA. Default events are usually created for you by the GA system, but + // in some cases can be created by property admins. Custom events count + // towards the maximum number of custom conversion events that may be + // created per property. + Custom bool `json:"custom,omitempty"` -func (s *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Deletable: Output only. If set, this event can currently be deleted + // via DeleteConversionEvent. + Deletable bool `json:"deletable,omitempty"` -// GoogleAnalyticsAdminV1alphaFirebaseLink: A link between a GA4 -// property and a Firebase project. -type GoogleAnalyticsAdminV1alphaFirebaseLink struct { - // CreateTime: Output only. Time when this FirebaseLink was originally - // created. - CreateTime string `json:"createTime,omitempty"` + // EventName: Immutable. The event name for this conversion event. + // Examples: 'click', 'purchase' + EventName string `json:"eventName,omitempty"` - // Name: Output only. Example format: properties/1234/firebaseLinks/5678 + // Name: Output only. Resource name of this conversion event. Format: + // properties/{property}/conversionEvents/{conversion_event} Name string `json:"name,omitempty"` - // Project: Immutable. Firebase project resource name. When creating a - // FirebaseLink, you may provide this resource name using either a - // project number or project ID. Once this resource has been created, - // returned FirebaseLinks will always have a project_name that contains - // a project number. Format: 'projects/{project number}' Example: - // 'projects/1234' - Project string `json:"project,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -1877,31 +1886,32 @@ type GoogleAnalyticsAdminV1alphaFirebaseLink struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaFirebaseLink) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaFirebaseLink +func (s *GoogleAnalyticsAdminV1alphaConversionEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaConversionEvent raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaGlobalSiteTag: Read-only resource with the -// tag for sending data from a website to a DataStream. Only present for -// web DataStream resources. -type GoogleAnalyticsAdminV1alphaGlobalSiteTag struct { - // Name: Output only. Resource name for this GlobalSiteTag resource. - // Format: - // properties/{property_id}/dataStreams/{stream_id}/globalSiteTag - // Example: "properties/123/dataStreams/456/globalSiteTag" - Name string `json:"name,omitempty"` +// GoogleAnalyticsAdminV1alphaCreateUserLinkRequest: Request message for +// CreateUserLink RPC. Users can have multiple email addresses +// associated with their Google account, and one of these email +// addresses is the "primary" email address. Any of the email addresses +// associated with a Google account may be used for a new UserLink, but +// the returned UserLink will always contain the "primary" email +// address. As a result, the input and output email address for this +// request may differ. +type GoogleAnalyticsAdminV1alphaCreateUserLinkRequest struct { + // NotifyNewUser: Optional. If set, then email the new user notifying + // them that they've been granted permissions to the resource. + NotifyNewUser bool `json:"notifyNewUser,omitempty"` - // Snippet: Immutable. JavaScript code snippet to be pasted as the first - // item into the head tag of every webpage to measure. - Snippet string `json:"snippet,omitempty"` + // Parent: Required. Example format: accounts/1234 + Parent string `json:"parent,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // UserLink: Required. The user link to create. + UserLink *GoogleAnalyticsAdminV1alphaUserLink `json:"userLink,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "NotifyNewUser") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1909,118 +1919,152 @@ type GoogleAnalyticsAdminV1alphaGlobalSiteTag struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NotifyNewUser") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaGlobalSiteTag) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaGlobalSiteTag +func (s *GoogleAnalyticsAdminV1alphaCreateUserLinkRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaCreateUserLinkRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaGoogleAdsLink: A link between a GA4 -// property and a Google Ads account. -type GoogleAnalyticsAdminV1alphaGoogleAdsLink struct { - // AdsPersonalizationEnabled: Enable personalized advertising features - // with this integration. Automatically publish my Google Analytics - // audience lists and Google Analytics remarketing events/parameters to - // the linked Google Ads account. If this field is not set on - // create/update, it will be defaulted to true. - AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"` - - // CanManageClients: Output only. If true, this link is for a Google Ads - // manager account. - CanManageClients bool `json:"canManageClients,omitempty"` +// GoogleAnalyticsAdminV1alphaCustomDimension: A definition for a +// CustomDimension. +type GoogleAnalyticsAdminV1alphaCustomDimension struct { + // Description: Optional. Description for this custom dimension. Max + // length of 150 characters. + Description string `json:"description,omitempty"` - // CreateTime: Output only. Time when this link was originally created. - CreateTime string `json:"createTime,omitempty"` + // DisallowAdsPersonalization: Optional. If set to true, sets this + // dimension as NPA and excludes it from ads personalization. This is + // currently only supported by user-scoped custom dimensions. + DisallowAdsPersonalization bool `json:"disallowAdsPersonalization,omitempty"` - // CreatorEmailAddress: Output only. Email address of the user that - // created the link. An empty string will be returned if the email - // address can't be retrieved. - CreatorEmailAddress string `json:"creatorEmailAddress,omitempty"` - - // CustomerId: Immutable. Google Ads customer ID. - CustomerId string `json:"customerId,omitempty"` + // DisplayName: Required. Display name for this custom dimension as + // shown in the Analytics UI. Max length of 82 characters, alphanumeric + // plus space and underscore starting with a letter. Legacy + // system-generated display names may contain square brackets, but + // updates to this field will never permit square brackets. + DisplayName string `json:"displayName,omitempty"` - // Name: Output only. Format: - // properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: - // googleAdsLinkId is not the Google Ads customer ID. + // Name: Output only. Resource name for this CustomDimension resource. + // Format: properties/{property}/customDimensions/{customDimension} Name string `json:"name,omitempty"` - // UpdateTime: Output only. Time when this link was last updated. - UpdateTime string `json:"updateTime,omitempty"` + // ParameterName: Required. Immutable. Tagging parameter name for this + // custom dimension. If this is a user-scoped dimension, then this is + // the user property name. If this is an event-scoped dimension, then + // this is the event parameter name. May only contain alphanumeric and + // underscore characters, starting with a letter. Max length of 24 + // characters for user-scoped dimensions, 40 characters for event-scoped + // dimensions. + ParameterName string `json:"parameterName,omitempty"` + + // Scope: Required. Immutable. The scope of this dimension. + // + // Possible values: + // "DIMENSION_SCOPE_UNSPECIFIED" - Scope unknown or not specified. + // "EVENT" - Dimension scoped to an event. + // "USER" - Dimension scoped to a user. + Scope string `json:"scope,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AdsPersonalizationEnabled") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "AdsPersonalizationEnabled") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaGoogleAdsLink) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaGoogleAdsLink +func (s *GoogleAnalyticsAdminV1alphaCustomDimension) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaCustomDimension raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaGoogleSignalsSettings: Settings values for -// Google Signals. This is a singleton resource. -type GoogleAnalyticsAdminV1alphaGoogleSignalsSettings struct { - // Consent: Output only. Terms of Service acceptance. +// GoogleAnalyticsAdminV1alphaCustomMetric: A definition for a custom +// metric. +type GoogleAnalyticsAdminV1alphaCustomMetric struct { + // Description: Optional. Description for this custom dimension. Max + // length of 150 characters. + Description string `json:"description,omitempty"` + + // DisplayName: Required. Display name for this custom metric as shown + // in the Analytics UI. Max length of 82 characters, alphanumeric plus + // space and underscore starting with a letter. Legacy system-generated + // display names may contain square brackets, but updates to this field + // will never permit square brackets. + DisplayName string `json:"displayName,omitempty"` + + // MeasurementUnit: Required. The type for the custom metric's value. // // Possible values: - // "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED" - Google Signals consent value - // defaults to GOOGLE_SIGNALS_CONSENT_UNSPECIFIED. This will be treated - // as GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED. - // "GOOGLE_SIGNALS_CONSENT_CONSENTED" - Terms of service have been - // accepted - // "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED" - Terms of service have not - // been accepted - Consent string `json:"consent,omitempty"` + // "MEASUREMENT_UNIT_UNSPECIFIED" - MeasurementUnit unspecified or + // missing. + // "STANDARD" - This metric uses default units. + // "CURRENCY" - This metric measures a currency. + // "FEET" - This metric measures feet. + // "METERS" - This metric measures meters. + // "KILOMETERS" - This metric measures kilometers. + // "MILES" - This metric measures miles. + // "MILLISECONDS" - This metric measures milliseconds. + // "SECONDS" - This metric measures seconds. + // "MINUTES" - This metric measures minutes. + // "HOURS" - This metric measures hours. + MeasurementUnit string `json:"measurementUnit,omitempty"` - // Name: Output only. Resource name of this setting. Format: - // properties/{property_id}/googleSignalsSettings Example: - // "properties/1000/googleSignalsSettings" + // Name: Output only. Resource name for this CustomMetric resource. + // Format: properties/{property}/customMetrics/{customMetric} Name string `json:"name,omitempty"` - // State: Status of this setting. + // ParameterName: Required. Immutable. Tagging name for this custom + // metric. If this is an event-scoped metric, then this is the event + // parameter name. May only contain alphanumeric and underscore + // charactes, starting with a letter. Max length of 40 characters for + // event-scoped metrics. + ParameterName string `json:"parameterName,omitempty"` + + // RestrictedMetricType: Optional. Types of restricted data that this + // metric may contain. Required for metrics with CURRENCY measurement + // unit. Must be empty for metrics with a non-CURRENCY measurement unit. // // Possible values: - // "GOOGLE_SIGNALS_STATE_UNSPECIFIED" - Google Signals status defaults - // to GOOGLE_SIGNALS_STATE_UNSPECIFIED to represent that the user has - // not made an explicit choice. - // "GOOGLE_SIGNALS_ENABLED" - Google Signals is enabled. - // "GOOGLE_SIGNALS_DISABLED" - Google Signals is disabled. - State string `json:"state,omitempty"` + // "RESTRICTED_METRIC_TYPE_UNSPECIFIED" - Type unknown or unspecified. + // "COST_DATA" - Metric reports cost data. + // "REVENUE_DATA" - Metric reports revenue data. + RestrictedMetricType []string `json:"restrictedMetricType,omitempty"` + + // Scope: Required. Immutable. The scope of this custom metric. + // + // Possible values: + // "METRIC_SCOPE_UNSPECIFIED" - Scope unknown or not specified. + // "EVENT" - Metric scoped to an event. + Scope string `json:"scope,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Consent") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2028,115 +2072,61 @@ type GoogleAnalyticsAdminV1alphaGoogleSignalsSettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Consent") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaGoogleSignalsSettings +func (s *GoogleAnalyticsAdminV1alphaCustomMetric) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaCustomMetric raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails: Status -// information for a link proposal. -type GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails struct { - // LinkProposalInitiatingProduct: Output only. The source of this - // proposal. - // - // Possible values: - // "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED" - Unspecified - // product. - // "GOOGLE_ANALYTICS" - This proposal was created by a user from - // Google Analytics. - // "LINKED_PRODUCT" - This proposal was created by a user from a - // linked product (not Google Analytics). - LinkProposalInitiatingProduct string `json:"linkProposalInitiatingProduct,omitempty"` - - // LinkProposalState: Output only. The state of this proposal. +// GoogleAnalyticsAdminV1alphaDataRetentionSettings: Settings values for +// data retention. This is a singleton resource. +type GoogleAnalyticsAdminV1alphaDataRetentionSettings struct { + // EventDataRetention: The length of time that event-level data is + // retained. // // Possible values: - // "LINK_PROPOSAL_STATE_UNSPECIFIED" - Unspecified state - // "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS" - This proposal is awaiting - // review from a Google Analytics user. This proposal will automatically - // expire after some time. - // "AWAITING_REVIEW_FROM_LINKED_PRODUCT" - This proposal is awaiting - // review from a user of a linked product. This proposal will - // automatically expire after some time. - // "WITHDRAWN" - This proposal has been withdrawn by an admin on the - // initiating product. This proposal will be automatically deleted after - // some time. - // "DECLINED" - This proposal has been declined by an admin on the - // receiving product. This proposal will be automatically deleted after - // some time. - // "EXPIRED" - This proposal expired due to lack of response from an - // admin on the receiving product. This proposal will be automatically - // deleted after some time. - // "OBSOLETE" - This proposal has become obsolete because a link was - // directly created to the same external product resource that this - // proposal specifies. This proposal will be automatically deleted after - // some time. - LinkProposalState string `json:"linkProposalState,omitempty"` - - // RequestorEmail: Output only. The email address of the user that - // proposed this linkage. - RequestorEmail string `json:"requestorEmail,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "LinkProposalInitiatingProduct") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "LinkProposalInitiatingProduct") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // "RETENTION_DURATION_UNSPECIFIED" - Data retention time duration is + // not specified. + // "TWO_MONTHS" - The data retention time duration is 2 months. + // "FOURTEEN_MONTHS" - The data retention time duration is 14 months. + // "TWENTY_SIX_MONTHS" - The data retention time duration is 26 + // months. Available to 360 properties only. + // "THIRTY_EIGHT_MONTHS" - The data retention time duration is 38 + // months. Available to 360 properties only. + // "FIFTY_MONTHS" - The data retention time duration is 50 months. + // Available to 360 properties only. + EventDataRetention string `json:"eventDataRetention,omitempty"` -// GoogleAnalyticsAdminV1alphaListAccountSummariesResponse: Response -// message for ListAccountSummaries RPC. -type GoogleAnalyticsAdminV1alphaListAccountSummariesResponse struct { - // AccountSummaries: Account summaries of all accounts the caller has - // access to. - AccountSummaries []*GoogleAnalyticsAdminV1alphaAccountSummary `json:"accountSummaries,omitempty"` + // Name: Output only. Resource name for this DataRetentionSetting + // resource. Format: properties/{property}/dataRetentionSettings + Name string `json:"name,omitempty"` - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // ResetUserDataOnNewActivity: If true, reset the retention period for + // the user identifier with every event from that user. + ResetUserDataOnNewActivity bool `json:"resetUserDataOnNewActivity,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccountSummaries") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "EventDataRetention") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountSummaries") to + // NullFields is a list of field names (e.g. "EventDataRetention") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2146,28 +2136,48 @@ type GoogleAnalyticsAdminV1alphaListAccountSummariesResponse struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListAccountSummariesResponse - raw := NoMethod(*s) +func (s *GoogleAnalyticsAdminV1alphaDataRetentionSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaDataRetentionSettings + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListAccountsResponse: Request message for -// ListAccounts RPC. -type GoogleAnalyticsAdminV1alphaListAccountsResponse struct { - // Accounts: Results that were accessible to the caller. - Accounts []*GoogleAnalyticsAdminV1alphaAccount `json:"accounts,omitempty"` +// GoogleAnalyticsAdminV1alphaDataSharingSettings: A resource message +// representing data sharing settings of a Google Analytics account. +type GoogleAnalyticsAdminV1alphaDataSharingSettings struct { + // Name: Output only. Resource name. Format: + // accounts/{account}/dataSharingSettings Example: + // "accounts/1000/dataSharingSettings" + Name string `json:"name,omitempty"` - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // SharingWithGoogleAnySalesEnabled: Allows any of Google sales to + // access the data in order to suggest configuration changes to improve + // results. + SharingWithGoogleAnySalesEnabled bool `json:"sharingWithGoogleAnySalesEnabled,omitempty"` + + // SharingWithGoogleAssignedSalesEnabled: Allows Google sales teams that + // are assigned to the customer to access the data in order to suggest + // configuration changes to improve results. Sales team restrictions + // still apply when enabled. + SharingWithGoogleAssignedSalesEnabled bool `json:"sharingWithGoogleAssignedSalesEnabled,omitempty"` + + // SharingWithGoogleProductsEnabled: Allows Google to use the data to + // improve other Google products or services. + SharingWithGoogleProductsEnabled bool `json:"sharingWithGoogleProductsEnabled,omitempty"` + + // SharingWithGoogleSupportEnabled: Allows Google support to access the + // data in order to help troubleshoot issues. + SharingWithGoogleSupportEnabled bool `json:"sharingWithGoogleSupportEnabled,omitempty"` + + // SharingWithOthersEnabled: Allows Google to share the data anonymously + // in aggregate form with others. + SharingWithOthersEnabled bool `json:"sharingWithOthersEnabled,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Accounts") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2175,8 +2185,8 @@ type GoogleAnalyticsAdminV1alphaListAccountsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accounts") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2184,36 +2194,68 @@ type GoogleAnalyticsAdminV1alphaListAccountsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListAccountsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListAccountsResponse +func (s *GoogleAnalyticsAdminV1alphaDataSharingSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaDataSharingSettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListConversionEventsResponse: Response -// message for ListConversionEvents RPC. -type GoogleAnalyticsAdminV1alphaListConversionEventsResponse struct { - // ConversionEvents: The requested conversion events - ConversionEvents []*GoogleAnalyticsAdminV1alphaConversionEvent `json:"conversionEvents,omitempty"` +// GoogleAnalyticsAdminV1alphaDataStream: A resource message +// representing a data stream. +type GoogleAnalyticsAdminV1alphaDataStream struct { + // AndroidAppStreamData: Data specific to Android app streams. Must be + // populated if type is ANDROID_APP_DATA_STREAM. + AndroidAppStreamData *GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData `json:"androidAppStreamData,omitempty"` - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // CreateTime: Output only. Time when this stream was originally + // created. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: Human-readable display name for the Data Stream. + // Required for web data streams. The max allowed display name length is + // 255 UTF-16 code units. + DisplayName string `json:"displayName,omitempty"` + + // IosAppStreamData: Data specific to iOS app streams. Must be populated + // if type is IOS_APP_DATA_STREAM. + IosAppStreamData *GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData `json:"iosAppStreamData,omitempty"` + + // Name: Output only. Resource name of this Data Stream. Format: + // properties/{property_id}/dataStreams/{stream_id} Example: + // "properties/1000/dataStreams/2000" + Name string `json:"name,omitempty"` + + // Type: Required. Immutable. The type of this DataStream resource. + // + // Possible values: + // "DATA_STREAM_TYPE_UNSPECIFIED" - Type unknown or not specified. + // "WEB_DATA_STREAM" - Web data stream. + // "ANDROID_APP_DATA_STREAM" - Android app data stream. + // "IOS_APP_DATA_STREAM" - iOS app data stream. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Time when stream payload fields were last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // WebStreamData: Data specific to web streams. Must be populated if + // type is WEB_DATA_STREAM. + WebStreamData *GoogleAnalyticsAdminV1alphaDataStreamWebStreamData `json:"webStreamData,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConversionEvents") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AndroidAppStreamData") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConversionEvents") to + // NullFields is a list of field names (e.g. "AndroidAppStreamData") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2223,28 +2265,25 @@ type GoogleAnalyticsAdminV1alphaListConversionEventsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListConversionEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListConversionEventsResponse +func (s *GoogleAnalyticsAdminV1alphaDataStream) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaDataStream raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse: Response -// message for ListCustomDimensions RPC. -type GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse struct { - // CustomDimensions: List of CustomDimensions. - CustomDimensions []*GoogleAnalyticsAdminV1alphaCustomDimension `json:"customDimensions,omitempty"` - - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData: Data +// specific to Android app streams. +type GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData struct { + // FirebaseAppId: Output only. ID of the corresponding Android app in + // Firebase, if any. This ID can change if the Android app is deleted + // and recreated. + FirebaseAppId string `json:"firebaseAppId,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // PackageName: Immutable. The package name for the app being measured. + // Example: "com.example.myandroidapp" + PackageName string `json:"packageName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomDimensions") to + // ForceSendFields is a list of field names (e.g. "FirebaseAppId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2252,38 +2291,34 @@ type GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomDimensions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "FirebaseAppId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse +func (s *GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaDataStreamAndroidAppStreamData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListCustomMetricsResponse: Response -// message for ListCustomMetrics RPC. -type GoogleAnalyticsAdminV1alphaListCustomMetricsResponse struct { - // CustomMetrics: List of CustomMetrics. - CustomMetrics []*GoogleAnalyticsAdminV1alphaCustomMetric `json:"customMetrics,omitempty"` - - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData: Data specific +// to iOS app streams. +type GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData struct { + // BundleId: Required. Immutable. The Apple App Store Bundle ID for the + // app Example: "com.example.myiosapp" + BundleId string `json:"bundleId,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // FirebaseAppId: Output only. ID of the corresponding iOS app in + // Firebase, if any. This ID can change if the iOS app is deleted and + // recreated. + FirebaseAppId string `json:"firebaseAppId,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomMetrics") to + // ForceSendFields is a list of field names (e.g. "BundleId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2291,37 +2326,38 @@ type GoogleAnalyticsAdminV1alphaListCustomMetricsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomMetrics") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "BundleId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListCustomMetricsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListCustomMetricsResponse +func (s *GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaDataStreamIosAppStreamData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListDataStreamsResponse: Response message -// for ListDataStreams RPC. -type GoogleAnalyticsAdminV1alphaListDataStreamsResponse struct { - // DataStreams: List of DataStreams. - DataStreams []*GoogleAnalyticsAdminV1alphaDataStream `json:"dataStreams,omitempty"` +// GoogleAnalyticsAdminV1alphaDataStreamWebStreamData: Data specific to +// web streams. +type GoogleAnalyticsAdminV1alphaDataStreamWebStreamData struct { + // DefaultUri: Immutable. Domain name of the web app being measured, or + // empty. Example: "http://www.google.com", "https://www.google.com" + DefaultUri string `json:"defaultUri,omitempty"` - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // FirebaseAppId: Output only. ID of the corresponding web app in + // Firebase, if any. This ID can change if the web app is deleted and + // recreated. + FirebaseAppId string `json:"firebaseAppId,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // MeasurementId: Output only. Analytics "Measurement ID", without the + // "G-" prefix. Example: "G-1A2BCD345E" would just be "1A2BCD345E" + MeasurementId string `json:"measurementId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStreams") to + // ForceSendFields is a list of field names (e.g. "DefaultUri") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2329,81 +2365,173 @@ type GoogleAnalyticsAdminV1alphaListDataStreamsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStreams") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DefaultUri") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListDataStreamsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListDataStreamsResponse +func (s *GoogleAnalyticsAdminV1alphaDataStreamWebStreamData) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaDataStreamWebStreamData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsR -// esponse: Response message for -// ListDisplayVideo360AdvertiserLinkProposals RPC. -type GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse struct { - // DisplayVideo360AdvertiserLinkProposals: List of - // DisplayVideo360AdvertiserLinkProposals. - DisplayVideo360AdvertiserLinkProposals []*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal `json:"displayVideo360AdvertiserLinkProposals,omitempty"` - - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest: Request message for +// DeleteUserLink RPC. +type GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest struct { + // Name: Required. Example format: accounts/1234/userLinks/5678 + Name string `json:"name,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink: A link +// between a GA4 property and a Display & Video 360 advertiser. +type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink struct { + // AdsPersonalizationEnabled: Enables personalized advertising features + // with this integration. If this field is not set on create/update, it + // will be defaulted to true. + AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"` + + // AdvertiserDisplayName: Output only. The display name of the Display & + // Video 360 Advertiser. + AdvertiserDisplayName string `json:"advertiserDisplayName,omitempty"` + + // AdvertiserId: Immutable. The Display & Video 360 Advertiser's + // advertiser ID. + AdvertiserId string `json:"advertiserId,omitempty"` + + // CampaignDataSharingEnabled: Immutable. Enables the import of campaign + // data from Display & Video 360 into the GA4 property. After link + // creation, this can only be updated from the Display & Video 360 + // product. If this field is not set on create, it will be defaulted to + // true. + CampaignDataSharingEnabled bool `json:"campaignDataSharingEnabled,omitempty"` + + // CostDataSharingEnabled: Immutable. Enables the import of cost data + // from Display & Video 360 into the GA4 property. This can only be + // enabled if campaign_data_sharing_enabled is enabled. After link + // creation, this can only be updated from the Display & Video 360 + // product. If this field is not set on create, it will be defaulted to + // true. + CostDataSharingEnabled bool `json:"costDataSharingEnabled,omitempty"` + + // Name: Output only. The resource name for this + // DisplayVideo360AdvertiserLink resource. Format: + // properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId} Note: + // linkId is not the Display & Video 360 Advertiser ID + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. - // "DisplayVideo360AdvertiserLinkProposals") to unconditionally include - // in API requests. By default, fields with empty or default values are - // omitted from API requests. However, any non-pointer, non-interface - // field appearing in ForceSendFields will be sent to the server - // regardless of whether the field is empty or not. This may be used to - // include empty fields in Patch requests. + // "AdsPersonalizationEnabled") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. - // "DisplayVideo360AdvertiserLinkProposals") to include in API requests - // with the JSON null value. By default, fields with empty values are - // omitted from API requests. However, any field with an empty value - // appearing in NullFields will be sent to the server as null. It is an - // error if a field in this list has a non-empty value. This may be used - // to include null fields in Patch requests. + // "AdsPersonalizationEnabled") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse +func (s *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse: -// Response message for ListDisplayVideo360AdvertiserLinks RPC. -type GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse struct { - // DisplayVideo360AdvertiserLinks: List of - // DisplayVideo360AdvertiserLinks. - DisplayVideo360AdvertiserLinks []*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink `json:"displayVideo360AdvertiserLinks,omitempty"` +// GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal: A +// proposal for a link between a GA4 property and a Display & Video 360 +// advertiser. A proposal is converted to a +// DisplayVideo360AdvertiserLink once approved. Google Analytics admins +// approve inbound proposals while Display & Video 360 admins approve +// outbound proposals. +type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal struct { + // AdsPersonalizationEnabled: Immutable. Enables personalized + // advertising features with this integration. If this field is not set + // on create, it will be defaulted to true. + AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"` - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // AdvertiserDisplayName: Output only. The display name of the Display & + // Video Advertiser. Only populated for proposals that originated from + // Display & Video 360. + AdvertiserDisplayName string `json:"advertiserDisplayName,omitempty"` + + // AdvertiserId: Immutable. The Display & Video 360 Advertiser's + // advertiser ID. + AdvertiserId string `json:"advertiserId,omitempty"` + + // CampaignDataSharingEnabled: Immutable. Enables the import of campaign + // data from Display & Video 360. If this field is not set on create, it + // will be defaulted to true. + CampaignDataSharingEnabled bool `json:"campaignDataSharingEnabled,omitempty"` + + // CostDataSharingEnabled: Immutable. Enables the import of cost data + // from Display & Video 360. This can only be enabled if + // campaign_data_sharing_enabled is enabled. If this field is not set on + // create, it will be defaulted to true. + CostDataSharingEnabled bool `json:"costDataSharingEnabled,omitempty"` + + // LinkProposalStatusDetails: Output only. The status information for + // this link proposal. + LinkProposalStatusDetails *GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails `json:"linkProposalStatusDetails,omitempty"` + + // Name: Output only. The resource name for this + // DisplayVideo360AdvertiserLinkProposal resource. Format: + // properties/{propertyId}/displayVideo360AdvertiserLinkProposals/{propos + // alId} Note: proposalId is not the Display & Video 360 Advertiser ID + Name string `json:"name,omitempty"` + + // ValidationEmail: Input only. On a proposal being sent to Display & + // Video 360, this field must be set to the email address of an admin on + // the target advertiser. This is used to verify that the Google + // Analytics admin is aware of at least one admin on the Display & Video + // 360 Advertiser. This does not restrict approval of the proposal to a + // single user. Any admin on the Display & Video 360 Advertiser may + // approve the proposal. + ValidationEmail string `json:"validationEmail,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. - // "DisplayVideo360AdvertiserLinks") to unconditionally include in API + // "AdsPersonalizationEnabled") to unconditionally include in API // requests. By default, fields with empty or default values are omitted // from API requests. However, any non-pointer, non-interface field // appearing in ForceSendFields will be sent to the server regardless of @@ -2412,39 +2540,44 @@ type GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse struc ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. - // "DisplayVideo360AdvertiserLinks") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a + // "AdsPersonalizationEnabled") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a // field in this list has a non-empty value. This may be used to include // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse +func (s *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse: Response -// message for ListFirebaseLinks RPC -type GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse struct { - // FirebaseLinks: List of FirebaseLinks. This will have at most one - // value. - FirebaseLinks []*GoogleAnalyticsAdminV1alphaFirebaseLink `json:"firebaseLinks,omitempty"` +// GoogleAnalyticsAdminV1alphaFirebaseLink: A link between a GA4 +// property and a Firebase project. +type GoogleAnalyticsAdminV1alphaFirebaseLink struct { + // CreateTime: Output only. Time when this FirebaseLink was originally + // created. + CreateTime string `json:"createTime,omitempty"` - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. Currently, Google Analytics supports only one FirebaseLink per - // property, so this will never be populated. - NextPageToken string `json:"nextPageToken,omitempty"` + // Name: Output only. Example format: properties/1234/firebaseLinks/5678 + Name string `json:"name,omitempty"` + + // Project: Immutable. Firebase project resource name. When creating a + // FirebaseLink, you may provide this resource name using either a + // project number or project ID. Once this resource has been created, + // returned FirebaseLinks will always have a project_name that contains + // a project number. Format: 'projects/{project number}' Example: + // 'projects/1234' + Project string `json:"project,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "FirebaseLinks") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2452,37 +2585,40 @@ type GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirebaseLinks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse +func (s *GoogleAnalyticsAdminV1alphaFirebaseLink) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaFirebaseLink raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse: Response -// message for ListGoogleAdsLinks RPC. -type GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse struct { - // GoogleAdsLinks: List of GoogleAdsLinks. - GoogleAdsLinks []*GoogleAnalyticsAdminV1alphaGoogleAdsLink `json:"googleAdsLinks,omitempty"` +// GoogleAnalyticsAdminV1alphaGlobalSiteTag: Read-only resource with the +// tag for sending data from a website to a DataStream. Only present for +// web DataStream resources. +type GoogleAnalyticsAdminV1alphaGlobalSiteTag struct { + // Name: Output only. Resource name for this GlobalSiteTag resource. + // Format: + // properties/{property_id}/dataStreams/{stream_id}/globalSiteTag + // Example: "properties/123/dataStreams/456/globalSiteTag" + Name string `json:"name,omitempty"` - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // Snippet: Immutable. JavaScript code snippet to be pasted as the first + // item into the head tag of every webpage to measure. + Snippet string `json:"snippet,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "GoogleAdsLinks") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2490,40 +2626,60 @@ type GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GoogleAdsLinks") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse +func (s *GoogleAnalyticsAdminV1alphaGlobalSiteTag) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaGlobalSiteTag raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse: -// Response message for ListMeasurementProtocolSecret RPC -type GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse struct { - // MeasurementProtocolSecrets: A list of secrets for the parent stream - // specified in the request. - MeasurementProtocolSecrets []*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret `json:"measurementProtocolSecrets,omitempty"` - - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - +// GoogleAnalyticsAdminV1alphaGoogleAdsLink: A link between a GA4 +// property and a Google Ads account. +type GoogleAnalyticsAdminV1alphaGoogleAdsLink struct { + // AdsPersonalizationEnabled: Enable personalized advertising features + // with this integration. Automatically publish my Google Analytics + // audience lists and Google Analytics remarketing events/parameters to + // the linked Google Ads account. If this field is not set on + // create/update, it will be defaulted to true. + AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"` + + // CanManageClients: Output only. If true, this link is for a Google Ads + // manager account. + CanManageClients bool `json:"canManageClients,omitempty"` + + // CreateTime: Output only. Time when this link was originally created. + CreateTime string `json:"createTime,omitempty"` + + // CreatorEmailAddress: Output only. Email address of the user that + // created the link. An empty string will be returned if the email + // address can't be retrieved. + CreatorEmailAddress string `json:"creatorEmailAddress,omitempty"` + + // CustomerId: Immutable. Google Ads customer ID. + CustomerId string `json:"customerId,omitempty"` + + // Name: Output only. Format: + // properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: + // googleAdsLinkId is not the Google Ads customer ID. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. Time when this link was last updated. + UpdateTime string `json:"updateTime,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. - // "MeasurementProtocolSecrets") to unconditionally include in API + // "AdsPersonalizationEnabled") to unconditionally include in API // requests. By default, fields with empty or default values are omitted // from API requests. However, any non-pointer, non-interface field // appearing in ForceSendFields will be sent to the server regardless of @@ -2532,7 +2688,133 @@ type GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse struct { ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. - // "MeasurementProtocolSecrets") to include in API requests with the + // "AdsPersonalizationEnabled") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaGoogleAdsLink) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaGoogleAdsLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaGoogleSignalsSettings: Settings values for +// Google Signals. This is a singleton resource. +type GoogleAnalyticsAdminV1alphaGoogleSignalsSettings struct { + // Consent: Output only. Terms of Service acceptance. + // + // Possible values: + // "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED" - Google Signals consent value + // defaults to GOOGLE_SIGNALS_CONSENT_UNSPECIFIED. This will be treated + // as GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED. + // "GOOGLE_SIGNALS_CONSENT_CONSENTED" - Terms of service have been + // accepted + // "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED" - Terms of service have not + // been accepted + Consent string `json:"consent,omitempty"` + + // Name: Output only. Resource name of this setting. Format: + // properties/{property_id}/googleSignalsSettings Example: + // "properties/1000/googleSignalsSettings" + Name string `json:"name,omitempty"` + + // State: Status of this setting. + // + // Possible values: + // "GOOGLE_SIGNALS_STATE_UNSPECIFIED" - Google Signals status defaults + // to GOOGLE_SIGNALS_STATE_UNSPECIFIED to represent that the user has + // not made an explicit choice. + // "GOOGLE_SIGNALS_ENABLED" - Google Signals is enabled. + // "GOOGLE_SIGNALS_DISABLED" - Google Signals is disabled. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Consent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Consent") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaGoogleSignalsSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails: Status +// information for a link proposal. +type GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails struct { + // LinkProposalInitiatingProduct: Output only. The source of this + // proposal. + // + // Possible values: + // "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED" - Unspecified + // product. + // "GOOGLE_ANALYTICS" - This proposal was created by a user from + // Google Analytics. + // "LINKED_PRODUCT" - This proposal was created by a user from a + // linked product (not Google Analytics). + LinkProposalInitiatingProduct string `json:"linkProposalInitiatingProduct,omitempty"` + + // LinkProposalState: Output only. The state of this proposal. + // + // Possible values: + // "LINK_PROPOSAL_STATE_UNSPECIFIED" - Unspecified state + // "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS" - This proposal is awaiting + // review from a Google Analytics user. This proposal will automatically + // expire after some time. + // "AWAITING_REVIEW_FROM_LINKED_PRODUCT" - This proposal is awaiting + // review from a user of a linked product. This proposal will + // automatically expire after some time. + // "WITHDRAWN" - This proposal has been withdrawn by an admin on the + // initiating product. This proposal will be automatically deleted after + // some time. + // "DECLINED" - This proposal has been declined by an admin on the + // receiving product. This proposal will be automatically deleted after + // some time. + // "EXPIRED" - This proposal expired due to lack of response from an + // admin on the receiving product. This proposal will be automatically + // deleted after some time. + // "OBSOLETE" - This proposal has become obsolete because a link was + // directly created to the same external product resource that this + // proposal specifies. This proposal will be automatically deleted after + // some time. + LinkProposalState string `json:"linkProposalState,omitempty"` + + // RequestorEmail: Output only. The email address of the user that + // proposed this linkage. + RequestorEmail string `json:"requestorEmail,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LinkProposalInitiatingProduct") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "LinkProposalInitiatingProduct") to include in API requests with the // JSON null value. By default, fields with empty values are omitted // from API requests. However, any field with an empty value appearing // in NullFields will be sent to the server as null. It is an error if a @@ -2541,29 +2823,29 @@ type GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse +func (s *GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListPropertiesResponse: Response message -// for ListProperties RPC. -type GoogleAnalyticsAdminV1alphaListPropertiesResponse struct { +// GoogleAnalyticsAdminV1alphaListAccountSummariesResponse: Response +// message for ListAccountSummaries RPC. +type GoogleAnalyticsAdminV1alphaListAccountSummariesResponse struct { + // AccountSummaries: Account summaries of all accounts the caller has + // access to. + AccountSummaries []*GoogleAnalyticsAdminV1alphaAccountSummary `json:"accountSummaries,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve // the next page. If this field is omitted, there are no subsequent // pages. NextPageToken string `json:"nextPageToken,omitempty"` - // Properties: Results that matched the filter criteria and were - // accessible to the caller. - Properties []*GoogleAnalyticsAdminV1alphaProperty `json:"properties,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "AccountSummaries") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2571,38 +2853,38 @@ type GoogleAnalyticsAdminV1alphaListPropertiesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AccountSummaries") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListPropertiesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListPropertiesResponse +func (s *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListAccountSummariesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaListUserLinksResponse: Response message -// for ListUserLinks RPC. -type GoogleAnalyticsAdminV1alphaListUserLinksResponse struct { +// GoogleAnalyticsAdminV1alphaListAccountsResponse: Request message for +// ListAccounts RPC. +type GoogleAnalyticsAdminV1alphaListAccountsResponse struct { + // Accounts: Results that were accessible to the caller. + Accounts []*GoogleAnalyticsAdminV1alphaAccount `json:"accounts,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve // the next page. If this field is omitted, there are no subsequent // pages. NextPageToken string `json:"nextPageToken,omitempty"` - // UserLinks: List of UserLinks. These will be ordered stably, but in an - // arbitrary order. - UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "Accounts") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2610,43 +2892,37 @@ type GoogleAnalyticsAdminV1alphaListUserLinksResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Accounts") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaListUserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaListUserLinksResponse +func (s *GoogleAnalyticsAdminV1alphaListAccountsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListAccountsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret: A secret value -// used for sending hits to Measurement Protocol. -type GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret struct { - // DisplayName: Required. Human-readable display name for this secret. - DisplayName string `json:"displayName,omitempty"` - - // Name: Output only. Resource name of this secret. This secret may be a - // child of any type of stream. Format: - // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecr - // ets/{measurementProtocolSecret} - Name string `json:"name,omitempty"` +// GoogleAnalyticsAdminV1alphaListAudiencesResponse: Response message +// for ListAudiences RPC. +type GoogleAnalyticsAdminV1alphaListAudiencesResponse struct { + // Audiences: List of Audiences. + Audiences []*GoogleAnalyticsAdminV1alphaAudience `json:"audiences,omitempty"` - // SecretValue: Output only. The measurement protocol secret value. Pass - // this value to the api_secret field of the Measurement Protocol API - // when sending hits to this secret's parent property. - SecretValue string `json:"secretValue,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "Audiences") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2654,135 +2930,37 @@ type GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Audiences") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret +func (s *GoogleAnalyticsAdminV1alphaListAudiencesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListAudiencesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaProperty: A resource message representing -// a Google Analytics GA4 property. -type GoogleAnalyticsAdminV1alphaProperty struct { - // Account: Immutable. The resource name of the parent account Format: - // accounts/{account_id} Example: "accounts/123" - Account string `json:"account,omitempty"` - - // CreateTime: Output only. Time when the entity was originally created. - CreateTime string `json:"createTime,omitempty"` - - // CurrencyCode: The currency type used in reports involving monetary - // values. Format: https://en.wikipedia.org/wiki/ISO_4217 Examples: - // "USD", "EUR", "JPY" - CurrencyCode string `json:"currencyCode,omitempty"` - - // DeleteTime: Output only. If set, the time at which this property was - // trashed. If not set, then this property is not currently in the trash - // can. - DeleteTime string `json:"deleteTime,omitempty"` - - // DisplayName: Required. Human-readable display name for this property. - // The max allowed display name length is 100 UTF-16 code units. - DisplayName string `json:"displayName,omitempty"` - - // ExpireTime: Output only. If set, the time at which this trashed - // property will be permanently deleted. If not set, then this property - // is not currently in the trash can and is not slated to be deleted. - ExpireTime string `json:"expireTime,omitempty"` - - // IndustryCategory: Industry associated with this property Example: - // AUTOMOTIVE, FOOD_AND_DRINK - // - // Possible values: - // "INDUSTRY_CATEGORY_UNSPECIFIED" - Industry category unspecified - // "AUTOMOTIVE" - Automotive - // "BUSINESS_AND_INDUSTRIAL_MARKETS" - Business and industrial markets - // "FINANCE" - Finance - // "HEALTHCARE" - Healthcare - // "TECHNOLOGY" - Technology - // "TRAVEL" - Travel - // "OTHER" - Other - // "ARTS_AND_ENTERTAINMENT" - Arts and entertainment - // "BEAUTY_AND_FITNESS" - Beauty and fitness - // "BOOKS_AND_LITERATURE" - Books and literature - // "FOOD_AND_DRINK" - Food and drink - // "GAMES" - Games - // "HOBBIES_AND_LEISURE" - Hobbies and leisure - // "HOME_AND_GARDEN" - Home and garden - // "INTERNET_AND_TELECOM" - Internet and telecom - // "LAW_AND_GOVERNMENT" - Law and government - // "NEWS" - News - // "ONLINE_COMMUNITIES" - Online communities - // "PEOPLE_AND_SOCIETY" - People and society - // "PETS_AND_ANIMALS" - Pets and animals - // "REAL_ESTATE" - Real estate - // "REFERENCE" - Reference - // "SCIENCE" - Science - // "SPORTS" - Sports - // "JOBS_AND_EDUCATION" - Jobs and education - // "SHOPPING" - Shopping - IndustryCategory string `json:"industryCategory,omitempty"` - - // Name: Output only. Resource name of this property. Format: - // properties/{property_id} Example: "properties/1000" - Name string `json:"name,omitempty"` - - // Parent: Immutable. Resource name of this property's logical parent. - // Note: The Property-Moving UI can be used to change the parent. - // Format: accounts/{account}, properties/{property} Example: - // "accounts/100", "properties/101" - Parent string `json:"parent,omitempty"` - - // PropertyType: Immutable. The property type for this Property - // resource. When creating a property, if the type is - // "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be - // implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be - // created via Google Analytics Admin API. - // - // Possible values: - // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property - PropertyType string `json:"propertyType,omitempty"` - - // ServiceLevel: Output only. The Google Analytics service level that - // applies to this property. - // - // Possible values: - // "SERVICE_LEVEL_UNSPECIFIED" - Service level not specified or - // invalid. - // "GOOGLE_ANALYTICS_STANDARD" - The standard version of Google - // Analytics. - // "GOOGLE_ANALYTICS_360" - The paid, premium version of Google - // Analytics. - ServiceLevel string `json:"serviceLevel,omitempty"` - - // TimeZone: Required. Reporting Time Zone, used as the day boundary for - // reports, regardless of where the data originates. If the time zone - // honors DST, Analytics will automatically adjust for the changes. - // NOTE: Changing the time zone only affects data going forward, and is - // not applied retroactively. Format: https://www.iana.org/time-zones - // Example: "America/Los_Angeles" - TimeZone string `json:"timeZone,omitempty"` +// GoogleAnalyticsAdminV1alphaListConversionEventsResponse: Response +// message for ListConversionEvents RPC. +type GoogleAnalyticsAdminV1alphaListConversionEventsResponse struct { + // ConversionEvents: The requested conversion events + ConversionEvents []*GoogleAnalyticsAdminV1alphaConversionEvent `json:"conversionEvents,omitempty"` - // UpdateTime: Output only. Time when entity payload fields were last - // updated. - UpdateTime string `json:"updateTime,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Account") to + // ForceSendFields is a list of field names (e.g. "ConversionEvents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2790,48 +2968,38 @@ type GoogleAnalyticsAdminV1alphaProperty struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Account") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ConversionEvents") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaProperty) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaProperty +func (s *GoogleAnalyticsAdminV1alphaListConversionEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListConversionEventsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaPropertySummary: A virtual resource -// representing metadata for a GA4 property. -type GoogleAnalyticsAdminV1alphaPropertySummary struct { - // DisplayName: Display name for the property referred to in this - // property summary. - DisplayName string `json:"displayName,omitempty"` - - // Parent: Resource name of this property's logical parent. Note: The - // Property-Moving UI can be used to change the parent. Format: - // accounts/{account}, properties/{property} Example: "accounts/100", - // "properties/200" - Parent string `json:"parent,omitempty"` +// GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse: Response +// message for ListCustomDimensions RPC. +type GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse struct { + // CustomDimensions: List of CustomDimensions. + CustomDimensions []*GoogleAnalyticsAdminV1alphaCustomDimension `json:"customDimensions,omitempty"` - // Property: Resource name of property referred to by this property - // summary Format: properties/{property_id} Example: "properties/1000" - Property string `json:"property,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // PropertyType: The property's property type. - // - // Possible values: - // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property - PropertyType string `json:"propertyType,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "CustomDimensions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2839,33 +3007,38 @@ type GoogleAnalyticsAdminV1alphaPropertySummary struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CustomDimensions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaPropertySummary) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaPropertySummary +func (s *GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest: Request -// message for ProvisionAccountTicket RPC. -type GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest struct { - // Account: The account to create. - Account *GoogleAnalyticsAdminV1alphaAccount `json:"account,omitempty"` +// GoogleAnalyticsAdminV1alphaListCustomMetricsResponse: Response +// message for ListCustomMetrics RPC. +type GoogleAnalyticsAdminV1alphaListCustomMetricsResponse struct { + // CustomMetrics: List of CustomMetrics. + CustomMetrics []*GoogleAnalyticsAdminV1alphaCustomMetric `json:"customMetrics,omitempty"` - // RedirectUri: Redirect URI where the user will be sent after accepting - // Terms of Service. Must be configured in Developers Console as a - // Redirect URI - RedirectUri string `json:"redirectUri,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "Account") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CustomMetrics") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2873,32 +3046,37 @@ type GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Account") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CustomMetrics") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest +func (s *GoogleAnalyticsAdminV1alphaListCustomMetricsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListCustomMetricsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse: Response -// message for ProvisionAccountTicket RPC. -type GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse struct { - // AccountTicketId: The param to be passed in the ToS link. - AccountTicketId string `json:"accountTicketId,omitempty"` +// GoogleAnalyticsAdminV1alphaListDataStreamsResponse: Response message +// for ListDataStreams RPC. +type GoogleAnalyticsAdminV1alphaListDataStreamsResponse struct { + // DataStreams: List of DataStreams. + DataStreams []*GoogleAnalyticsAdminV1alphaDataStream `json:"dataStreams,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccountTicketId") to + // ForceSendFields is a list of field names (e.g. "DataStreams") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2906,117 +3084,69 @@ type GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountTicketId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "DataStreams") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse +func (s *GoogleAnalyticsAdminV1alphaListDataStreamsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListDataStreamsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest: Request -// message for SearchChangeHistoryEvents RPC. -type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest struct { - // Action: Optional. If set, only return changes that match one or more - // of these types of actions. - // - // Possible values: - // "ACTION_TYPE_UNSPECIFIED" - Action type unknown or not specified. - // "CREATED" - Resource was created in this change. - // "UPDATED" - Resource was updated in this change. - // "DELETED" - Resource was deleted in this change. - Action []string `json:"action,omitempty"` - - // ActorEmail: Optional. If set, only return changes if they are made by - // a user in this list. - ActorEmail []string `json:"actorEmail,omitempty"` - - // EarliestChangeTime: Optional. If set, only return changes made after - // this time (inclusive). - EarliestChangeTime string `json:"earliestChangeTime,omitempty"` - - // LatestChangeTime: Optional. If set, only return changes made before - // this time (inclusive). - LatestChangeTime string `json:"latestChangeTime,omitempty"` - - // PageSize: Optional. The maximum number of ChangeHistoryEvent items to - // return. The service may return fewer than this value, even if there - // are additional pages. If unspecified, at most 50 items will be - // returned. The maximum value is 200 (higher values will be coerced to - // the maximum). - PageSize int64 `json:"pageSize,omitempty"` - - // PageToken: Optional. A page token, received from a previous - // `SearchChangeHistoryEvents` call. Provide this to retrieve the - // subsequent page. When paginating, all other parameters provided to - // `SearchChangeHistoryEvents` must match the call that provided the - // page token. - PageToken string `json:"pageToken,omitempty"` +// GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsR +// esponse: Response message for +// ListDisplayVideo360AdvertiserLinkProposals RPC. +type GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse struct { + // DisplayVideo360AdvertiserLinkProposals: List of + // DisplayVideo360AdvertiserLinkProposals. + DisplayVideo360AdvertiserLinkProposals []*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal `json:"displayVideo360AdvertiserLinkProposals,omitempty"` - // Property: Optional. Resource name for a child property. If set, only - // return changes made to this property or its child resources. - Property string `json:"property,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // ResourceType: Optional. If set, only return changes if they are for a - // resource that matches at least one of these types. - // - // Possible values: - // "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED" - Resource type unknown - // or not specified. - // "ACCOUNT" - Account resource - // "PROPERTY" - Property resource - // "FIREBASE_LINK" - FirebaseLink resource - // "GOOGLE_ADS_LINK" - GoogleAdsLink resource - // "GOOGLE_SIGNALS_SETTINGS" - GoogleSignalsSettings resource - // "CONVERSION_EVENT" - ConversionEvent resource - // "MEASUREMENT_PROTOCOL_SECRET" - MeasurementProtocolSecret resource - // "CUSTOM_DIMENSION" - CustomDimension resource - // "CUSTOM_METRIC" - CustomMetric resource - // "DATA_RETENTION_SETTINGS" - DataRetentionSettings resource - // "DISPLAY_VIDEO_360_ADVERTISER_LINK" - DisplayVideo360AdvertiserLink - // resource - // "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL" - - // DisplayVideo360AdvertiserLinkProposal resource - // "DATA_STREAM" - DataStream resource - // "ATTRIBUTION_SETTINGS" - AttributionSettings resource - ResourceType []string `json:"resourceType,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Action") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "DisplayVideo360AdvertiserLinkProposals") to unconditionally include + // in API requests. By default, fields with empty or default values are + // omitted from API requests. However, any non-pointer, non-interface + // field appearing in ForceSendFields will be sent to the server + // regardless of whether the field is empty or not. This may be used to + // include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "DisplayVideo360AdvertiserLinkProposals") to include in API requests + // with the JSON null value. By default, fields with empty values are + // omitted from API requests. However, any field with an empty value + // appearing in NullFields will be sent to the server as null. It is an + // error if a field in this list has a non-empty value. This may be used + // to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest +func (s *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse: -// Response message for SearchAccounts RPC. -type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse struct { - // ChangeHistoryEvents: Results that were accessible to the caller. - ChangeHistoryEvents []*GoogleAnalyticsAdminV1alphaChangeHistoryEvent `json:"changeHistoryEvents,omitempty"` +// GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse: +// Response message for ListDisplayVideo360AdvertiserLinks RPC. +type GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse struct { + // DisplayVideo360AdvertiserLinks: List of + // DisplayVideo360AdvertiserLinks. + DisplayVideo360AdvertiserLinks []*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink `json:"displayVideo360AdvertiserLinks,omitempty"` // NextPageToken: A token, which can be sent as `page_token` to retrieve // the next page. If this field is omitted, there are no subsequent @@ -3027,37 +3157,49 @@ type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ChangeHistoryEvents") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "DisplayVideo360AdvertiserLinks") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChangeHistoryEvents") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "DisplayVideo360AdvertiserLinks") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse +func (s *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest: Request message for -// UpdateUserLink RPC. -type GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest struct { - // UserLink: Required. The user link to update. - UserLink *GoogleAnalyticsAdminV1alphaUserLink `json:"userLink,omitempty"` +// GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse: Response +// message for ListFirebaseLinks RPC +type GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse struct { + // FirebaseLinks: List of FirebaseLinks. This will have at most one + // value. + FirebaseLinks []*GoogleAnalyticsAdminV1alphaFirebaseLink `json:"firebaseLinks,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserLink") to + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. Currently, Google Analytics supports only one FirebaseLink per + // property, so this will never be populated. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FirebaseLinks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3065,44 +3207,37 @@ type GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserLink") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "FirebaseLinks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest +func (s *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaUserLink: A resource message representing -// a user's permissions on an Account or Property resource. -type GoogleAnalyticsAdminV1alphaUserLink struct { - // DirectRoles: Roles directly assigned to this user for this account or - // property. Valid values: predefinedRoles/viewer - // predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin - // predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes - // roles that are inherited from a higher-level entity, group, or - // organization admin role. A UserLink that is updated to have an empty - // list of direct_roles will be deleted. - DirectRoles []string `json:"directRoles,omitempty"` - - // EmailAddress: Immutable. Email address of the user to link - EmailAddress string `json:"emailAddress,omitempty"` +// GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse: Response +// message for ListGoogleAdsLinks RPC. +type GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse struct { + // GoogleAdsLinks: List of GoogleAdsLinks. + GoogleAdsLinks []*GoogleAnalyticsAdminV1alphaGoogleAdsLink `json:"googleAdsLinks,omitempty"` - // Name: Output only. Example format: properties/1234/userLinks/5678 - Name string `json:"name,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DirectRoles") to + // ForceSendFields is a list of field names (e.g. "GoogleAdsLinks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3110,72 +3245,1331 @@ type GoogleAnalyticsAdminV1alphaUserLink struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DirectRoles") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "GoogleAdsLinks") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleAnalyticsAdminV1alphaUserLink) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaUserLink +func (s *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleProtobufEmpty: A generic empty message that you can re-use to -// avoid defining duplicated empty messages in your APIs. A typical -// example is to use it as the request or the response type of an API -// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } -type GoogleProtobufEmpty struct { +// GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse: +// Response message for ListMeasurementProtocolSecret RPC +type GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse struct { + // MeasurementProtocolSecrets: A list of secrets for the parent stream + // specified in the request. + MeasurementProtocolSecrets []*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret `json:"measurementProtocolSecrets,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` -} - -// method id "analyticsadmin.accountSummaries.list": -type AccountSummariesListCall struct { - s *Service - urlParams_ gensupport.URLParams + // ForceSendFields is a list of field names (e.g. + // "MeasurementProtocolSecrets") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "MeasurementProtocolSecrets") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaListPropertiesResponse: Response message +// for ListProperties RPC. +type GoogleAnalyticsAdminV1alphaListPropertiesResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Properties: Results that matched the filter criteria and were + // accessible to the caller. + Properties []*GoogleAnalyticsAdminV1alphaProperty `json:"properties,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaListPropertiesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListPropertiesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaListUserLinksResponse: Response message +// for ListUserLinks RPC. +type GoogleAnalyticsAdminV1alphaListUserLinksResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // UserLinks: List of UserLinks. These will be ordered stably, but in an + // arbitrary order. + UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaListUserLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListUserLinksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret: A secret value +// used for sending hits to Measurement Protocol. +type GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret struct { + // DisplayName: Required. Human-readable display name for this secret. + DisplayName string `json:"displayName,omitempty"` + + // Name: Output only. Resource name of this secret. This secret may be a + // child of any type of stream. Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecr + // ets/{measurementProtocolSecret} + Name string `json:"name,omitempty"` + + // SecretValue: Output only. The measurement protocol secret value. Pass + // this value to the api_secret field of the Measurement Protocol API + // when sending hits to this secret's parent property. + SecretValue string `json:"secretValue,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaProperty: A resource message representing +// a Google Analytics GA4 property. +type GoogleAnalyticsAdminV1alphaProperty struct { + // Account: Immutable. The resource name of the parent account Format: + // accounts/{account_id} Example: "accounts/123" + Account string `json:"account,omitempty"` + + // CreateTime: Output only. Time when the entity was originally created. + CreateTime string `json:"createTime,omitempty"` + + // CurrencyCode: The currency type used in reports involving monetary + // values. Format: https://en.wikipedia.org/wiki/ISO_4217 Examples: + // "USD", "EUR", "JPY" + CurrencyCode string `json:"currencyCode,omitempty"` + + // DeleteTime: Output only. If set, the time at which this property was + // trashed. If not set, then this property is not currently in the trash + // can. + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: Required. Human-readable display name for this property. + // The max allowed display name length is 100 UTF-16 code units. + DisplayName string `json:"displayName,omitempty"` + + // ExpireTime: Output only. If set, the time at which this trashed + // property will be permanently deleted. If not set, then this property + // is not currently in the trash can and is not slated to be deleted. + ExpireTime string `json:"expireTime,omitempty"` + + // IndustryCategory: Industry associated with this property Example: + // AUTOMOTIVE, FOOD_AND_DRINK + // + // Possible values: + // "INDUSTRY_CATEGORY_UNSPECIFIED" - Industry category unspecified + // "AUTOMOTIVE" - Automotive + // "BUSINESS_AND_INDUSTRIAL_MARKETS" - Business and industrial markets + // "FINANCE" - Finance + // "HEALTHCARE" - Healthcare + // "TECHNOLOGY" - Technology + // "TRAVEL" - Travel + // "OTHER" - Other + // "ARTS_AND_ENTERTAINMENT" - Arts and entertainment + // "BEAUTY_AND_FITNESS" - Beauty and fitness + // "BOOKS_AND_LITERATURE" - Books and literature + // "FOOD_AND_DRINK" - Food and drink + // "GAMES" - Games + // "HOBBIES_AND_LEISURE" - Hobbies and leisure + // "HOME_AND_GARDEN" - Home and garden + // "INTERNET_AND_TELECOM" - Internet and telecom + // "LAW_AND_GOVERNMENT" - Law and government + // "NEWS" - News + // "ONLINE_COMMUNITIES" - Online communities + // "PEOPLE_AND_SOCIETY" - People and society + // "PETS_AND_ANIMALS" - Pets and animals + // "REAL_ESTATE" - Real estate + // "REFERENCE" - Reference + // "SCIENCE" - Science + // "SPORTS" - Sports + // "JOBS_AND_EDUCATION" - Jobs and education + // "SHOPPING" - Shopping + IndustryCategory string `json:"industryCategory,omitempty"` + + // Name: Output only. Resource name of this property. Format: + // properties/{property_id} Example: "properties/1000" + Name string `json:"name,omitempty"` + + // Parent: Immutable. Resource name of this property's logical parent. + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account}, properties/{property} Example: + // "accounts/100", "properties/101" + Parent string `json:"parent,omitempty"` + + // PropertyType: Immutable. The property type for this Property + // resource. When creating a property, if the type is + // "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be + // implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be + // created via Google Analytics Admin API. + // + // Possible values: + // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type + // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property + // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty + // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + PropertyType string `json:"propertyType,omitempty"` + + // ServiceLevel: Output only. The Google Analytics service level that + // applies to this property. + // + // Possible values: + // "SERVICE_LEVEL_UNSPECIFIED" - Service level not specified or + // invalid. + // "GOOGLE_ANALYTICS_STANDARD" - The standard version of Google + // Analytics. + // "GOOGLE_ANALYTICS_360" - The paid, premium version of Google + // Analytics. + ServiceLevel string `json:"serviceLevel,omitempty"` + + // TimeZone: Required. Reporting Time Zone, used as the day boundary for + // reports, regardless of where the data originates. If the time zone + // honors DST, Analytics will automatically adjust for the changes. + // NOTE: Changing the time zone only affects data going forward, and is + // not applied retroactively. Format: https://www.iana.org/time-zones + // Example: "America/Los_Angeles" + TimeZone string `json:"timeZone,omitempty"` + + // UpdateTime: Output only. Time when entity payload fields were last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Account") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Account") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaProperty) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaProperty + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaPropertySummary: A virtual resource +// representing metadata for a GA4 property. +type GoogleAnalyticsAdminV1alphaPropertySummary struct { + // DisplayName: Display name for the property referred to in this + // property summary. + DisplayName string `json:"displayName,omitempty"` + + // Parent: Resource name of this property's logical parent. Note: The + // Property-Moving UI can be used to change the parent. Format: + // accounts/{account}, properties/{property} Example: "accounts/100", + // "properties/200" + Parent string `json:"parent,omitempty"` + + // Property: Resource name of property referred to by this property + // summary Format: properties/{property_id} Example: "properties/1000" + Property string `json:"property,omitempty"` + + // PropertyType: The property's property type. + // + // Possible values: + // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type + // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property + // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty + // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + PropertyType string `json:"propertyType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaPropertySummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaPropertySummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest: Request +// message for ProvisionAccountTicket RPC. +type GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest struct { + // Account: The account to create. + Account *GoogleAnalyticsAdminV1alphaAccount `json:"account,omitempty"` + + // RedirectUri: Redirect URI where the user will be sent after accepting + // Terms of Service. Must be configured in Developers Console as a + // Redirect URI + RedirectUri string `json:"redirectUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Account") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Account") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse: Response +// message for ProvisionAccountTicket RPC. +type GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse struct { + // AccountTicketId: The param to be passed in the ToS link. + AccountTicketId string `json:"accountTicketId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AccountTicketId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccountTicketId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest: Request +// message for SearchChangeHistoryEvents RPC. +type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest struct { + // Action: Optional. If set, only return changes that match one or more + // of these types of actions. + // + // Possible values: + // "ACTION_TYPE_UNSPECIFIED" - Action type unknown or not specified. + // "CREATED" - Resource was created in this change. + // "UPDATED" - Resource was updated in this change. + // "DELETED" - Resource was deleted in this change. + Action []string `json:"action,omitempty"` + + // ActorEmail: Optional. If set, only return changes if they are made by + // a user in this list. + ActorEmail []string `json:"actorEmail,omitempty"` + + // EarliestChangeTime: Optional. If set, only return changes made after + // this time (inclusive). + EarliestChangeTime string `json:"earliestChangeTime,omitempty"` + + // LatestChangeTime: Optional. If set, only return changes made before + // this time (inclusive). + LatestChangeTime string `json:"latestChangeTime,omitempty"` + + // PageSize: Optional. The maximum number of ChangeHistoryEvent items to + // return. The service may return fewer than this value, even if there + // are additional pages. If unspecified, at most 50 items will be + // returned. The maximum value is 200 (higher values will be coerced to + // the maximum). + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: Optional. A page token, received from a previous + // `SearchChangeHistoryEvents` call. Provide this to retrieve the + // subsequent page. When paginating, all other parameters provided to + // `SearchChangeHistoryEvents` must match the call that provided the + // page token. + PageToken string `json:"pageToken,omitempty"` + + // Property: Optional. Resource name for a child property. If set, only + // return changes made to this property or its child resources. + Property string `json:"property,omitempty"` + + // ResourceType: Optional. If set, only return changes if they are for a + // resource that matches at least one of these types. + // + // Possible values: + // "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED" - Resource type unknown + // or not specified. + // "ACCOUNT" - Account resource + // "PROPERTY" - Property resource + // "FIREBASE_LINK" - FirebaseLink resource + // "GOOGLE_ADS_LINK" - GoogleAdsLink resource + // "GOOGLE_SIGNALS_SETTINGS" - GoogleSignalsSettings resource + // "CONVERSION_EVENT" - ConversionEvent resource + // "MEASUREMENT_PROTOCOL_SECRET" - MeasurementProtocolSecret resource + // "CUSTOM_DIMENSION" - CustomDimension resource + // "CUSTOM_METRIC" - CustomMetric resource + // "DATA_RETENTION_SETTINGS" - DataRetentionSettings resource + // "DISPLAY_VIDEO_360_ADVERTISER_LINK" - DisplayVideo360AdvertiserLink + // resource + // "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL" - + // DisplayVideo360AdvertiserLinkProposal resource + // "DATA_STREAM" - DataStream resource + // "ATTRIBUTION_SETTINGS" - AttributionSettings resource + ResourceType []string `json:"resourceType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse: +// Response message for SearchAccounts RPC. +type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse struct { + // ChangeHistoryEvents: Results that were accessible to the caller. + ChangeHistoryEvents []*GoogleAnalyticsAdminV1alphaChangeHistoryEvent `json:"changeHistoryEvents,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ChangeHistoryEvents") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChangeHistoryEvents") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest: Request message for +// UpdateUserLink RPC. +type GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest struct { + // UserLink: Required. The user link to update. + UserLink *GoogleAnalyticsAdminV1alphaUserLink `json:"userLink,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UserLink") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UserLink") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaUserLink: A resource message representing +// a user's permissions on an Account or Property resource. +type GoogleAnalyticsAdminV1alphaUserLink struct { + // DirectRoles: Roles directly assigned to this user for this account or + // property. Valid values: predefinedRoles/viewer + // predefinedRoles/analyst predefinedRoles/editor predefinedRoles/admin + // predefinedRoles/no-cost-data predefinedRoles/no-revenue-data Excludes + // roles that are inherited from a higher-level entity, group, or + // organization admin role. A UserLink that is updated to have an empty + // list of direct_roles will be deleted. + DirectRoles []string `json:"directRoles,omitempty"` + + // EmailAddress: Immutable. Email address of the user to link + EmailAddress string `json:"emailAddress,omitempty"` + + // Name: Output only. Example format: properties/1234/userLinks/5678 + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DirectRoles") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DirectRoles") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaUserLink) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaUserLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// method id "analyticsadmin.accountSummaries.list": + +type AccountSummariesListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns summaries of all accounts accessible by the caller. +func (r *AccountSummariesService) List() *AccountSummariesListCall { + c := &AccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of AccountSummary resources to return. The service may return fewer +// than this value, even if there are additional pages. If unspecified, +// at most 50 resources will be returned. The maximum value is 200; +// (higher values will be coerced to the maximum) +func (c *AccountSummariesListCall) PageSize(pageSize int64) *AccountSummariesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListAccountSummaries` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListAccountSummaries` must match the call that provided +// the page token. +func (c *AccountSummariesListCall) PageToken(pageToken string) *AccountSummariesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountSummariesListCall) Fields(s ...googleapi.Field) *AccountSummariesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountSummariesListCall) IfNoneMatch(entityTag string) *AccountSummariesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountSummariesListCall) Context(ctx context.Context) *AccountSummariesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountSummariesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountSummariesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accountSummaries") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.accountSummaries.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountSummariesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccountSummariesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleAnalyticsAdminV1alphaListAccountSummariesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns summaries of all accounts accessible by the caller.", + // "flatPath": "v1alpha/accountSummaries", + // "httpMethod": "GET", + // "id": "analyticsadmin.accountSummaries.list", + // "parameterOrder": [], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListAccountSummaries` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountSummaries` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/accountSummaries", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaListAccountSummariesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountSummariesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccountSummariesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "analyticsadmin.accounts.delete": + +type AccountsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Marks target Account as soft-deleted (ie: "trashed") and +// returns it. This API does not have a method to restore soft-deleted +// accounts. However, they can be restored using the Trash Can UI. 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. +// https://support.google.com/analytics/answer/6154772 Returns an error +// if the target is not found. +// +// - name: The name of the Account to soft-delete. Format: +// accounts/{account} Example: "accounts/100". +func (r *AccountsService) Delete(name string) *AccountsDeleteCall { + c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.accounts.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Marks target Account as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. 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. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", + // "flatPath": "v1alpha/accounts/{accountsId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.accounts.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Account to soft-delete. Format: accounts/{account} Example: \"accounts/100\"", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + +// method id "analyticsadmin.accounts.get": + +type AccountsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Lookup for a single Account. +// +// - name: The name of the account to lookup. Format: accounts/{account} +// Example: "accounts/100". +func (r *AccountsService) Get(name string) *AccountsGetCall { + c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.accounts.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAccount or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaAccount.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccount, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleAnalyticsAdminV1alphaAccount{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lookup for a single Account.", + // "flatPath": "v1alpha/accounts/{accountsId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.accounts.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the account to lookup. Format: accounts/{account} Example: \"accounts/100\"", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaAccount" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// method id "analyticsadmin.accounts.getDataSharingSettings": + +type AccountsGetDataSharingSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Returns summaries of all accounts accessible by the caller. -func (r *AccountSummariesService) List() *AccountSummariesListCall { - c := &AccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// GetDataSharingSettings: Get data sharing settings on an account. Data +// sharing settings are singletons. +// +// - name: The name of the settings to lookup. Format: +// accounts/{account}/dataSharingSettings Example: +// "accounts/1000/dataSharingSettings". +func (r *AccountsService) GetDataSharingSettings(name string) *AccountsGetDataSharingSettingsCall { + c := &AccountsGetDataSharingSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsGetDataSharingSettingsCall) Fields(s ...googleapi.Field) *AccountsGetDataSharingSettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsGetDataSharingSettingsCall) IfNoneMatch(entityTag string) *AccountsGetDataSharingSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsGetDataSharingSettingsCall) Context(ctx context.Context) *AccountsGetDataSharingSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsGetDataSharingSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsGetDataSharingSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.accounts.getDataSharingSettings" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaDataSharingSettings or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaDataSharingSettings.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsGetDataSharingSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataSharingSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleAnalyticsAdminV1alphaDataSharingSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get data sharing settings on an account. Data sharing settings are singletons.", + // "flatPath": "v1alpha/accounts/{accountsId}/dataSharingSettings", + // "httpMethod": "GET", + // "id": "analyticsadmin.accounts.getDataSharingSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: \"accounts/1000/dataSharingSettings\"", + // "location": "path", + // "pattern": "^accounts/[^/]+/dataSharingSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaDataSharingSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// method id "analyticsadmin.accounts.list": + +type AccountsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all accounts accessible by the caller. Note that these +// accounts might not currently have GA4 properties. Soft-deleted (ie: +// "trashed") accounts are excluded by default. Returns an empty list if +// no relevant accounts are found. +func (r *AccountsService) List() *AccountsListCall { + c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of AccountSummary resources to return. The service may return fewer -// than this value, even if there are additional pages. If unspecified, -// at most 50 resources will be returned. The maximum value is 200; -// (higher values will be coerced to the maximum) -func (c *AccountSummariesListCall) PageSize(pageSize int64) *AccountSummariesListCall { +// of resources to return. The service may return fewer than this value, +// even if there are additional pages. If unspecified, at most 50 +// resources will be returned. The maximum value is 200; (higher values +// will be coerced to the maximum) +func (c *AccountsListCall) PageSize(pageSize int64) *AccountsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListAccountSummaries` call. Provide this to +// received from a previous `ListAccounts` call. Provide this to // retrieve the subsequent page. When paginating, all other parameters -// provided to `ListAccountSummaries` must match the call that provided -// the page token. -func (c *AccountSummariesListCall) PageToken(pageToken string) *AccountSummariesListCall { +// provided to `ListAccounts` must match the call that provided the page +// token. +func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ShowDeleted sets the optional parameter "showDeleted": Whether to +// include soft-deleted (ie: "trashed") Accounts in the results. +// Accounts can be inspected to determine whether they are deleted or +// not. +func (c *AccountsListCall) ShowDeleted(showDeleted bool) *AccountsListCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountSummariesListCall) Fields(s ...googleapi.Field) *AccountSummariesListCall { +func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3185,7 +4579,7 @@ func (c *AccountSummariesListCall) Fields(s ...googleapi.Field) *AccountSummarie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AccountSummariesListCall) IfNoneMatch(entityTag string) *AccountSummariesListCall { +func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3193,21 +4587,21 @@ func (c *AccountSummariesListCall) IfNoneMatch(entityTag string) *AccountSummari // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountSummariesListCall) Context(ctx context.Context) *AccountSummariesListCall { +func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountSummariesListCall) Header() http.Header { +func (c *AccountsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountSummariesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3220,7 +4614,7 @@ func (c *AccountSummariesListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accountSummaries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accounts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3230,17 +4624,16 @@ func (c *AccountSummariesListCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accountSummaries.list" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "analyticsadmin.accounts.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListAccountsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse.ServerRespons -// e.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaListAccountsResponse.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountSummariesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccountSummariesResponse, error) { +func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccountsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3259,7 +4652,7 @@ func (c *AccountSummariesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaListAccountSummariesResponse{ + ret := &GoogleAnalyticsAdminV1alphaListAccountsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3271,27 +4664,32 @@ func (c *AccountSummariesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnal } return ret, nil // { - // "description": "Returns summaries of all accounts accessible by the caller.", - // "flatPath": "v1alpha/accountSummaries", + // "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", + // "flatPath": "v1alpha/accounts", // "httpMethod": "GET", - // "id": "analyticsadmin.accountSummaries.list", + // "id": "analyticsadmin.accounts.list", // "parameterOrder": [], // "parameters": { // "pageSize": { - // "description": "The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", + // "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListAccountSummaries` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountSummaries` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "showDeleted": { + // "description": "Whether to include soft-deleted (ie: \"trashed\") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/accountSummaries", + // "path": "v1alpha/accounts", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListAccountSummariesResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaListAccountsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -3304,7 +4702,7 @@ func (c *AccountSummariesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnal // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *AccountSummariesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccountSummariesResponse) error) error { +func (c *AccountsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccountsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -3322,37 +4720,187 @@ func (c *AccountSummariesListCall) Pages(ctx context.Context, f func(*GoogleAnal } } -// method id "analyticsadmin.accounts.delete": +// method id "analyticsadmin.accounts.patch": -type AccountsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaaccount *GoogleAnalyticsAdminV1alphaAccount + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Marks target Account as soft-deleted (ie: "trashed") and -// returns it. This API does not have a method to restore soft-deleted -// accounts. However, they can be restored using the Trash Can UI. 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. -// https://support.google.com/analytics/answer/6154772 Returns an error -// if the target is not found. +// Patch: Updates an account. // -// - name: The name of the Account to soft-delete. Format: +// - name: Output only. Resource name of this account. Format: // accounts/{account} Example: "accounts/100". -func (r *AccountsService) Delete(name string) *AccountsDeleteCall { - c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsService) Patch(name string, googleanalyticsadminv1alphaaccount *GoogleAnalyticsAdminV1alphaAccount) *AccountsPatchCall { + c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphaaccount = googleanalyticsadminv1alphaaccount + return c +} + +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *AccountsPatchCall) UpdateMask(updateMask string) *AccountsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaccount) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.accounts.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAccount or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaAccount.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccount, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleAnalyticsAdminV1alphaAccount{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an account.", + // "flatPath": "v1alpha/accounts/{accountsId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.accounts.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. Resource name of this account. Format: accounts/{account} Example: \"accounts/100\"", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "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.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaAccount" + // }, + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaAccount" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + +// method id "analyticsadmin.accounts.provisionAccountTicket": + +type AccountsProvisionAccountTicketCall struct { + s *Service + googleanalyticsadminv1alphaprovisionaccountticketrequest *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ProvisionAccountTicket: Requests a ticket for creating an account. +func (r *AccountsService) ProvisionAccountTicket(googleanalyticsadminv1alphaprovisionaccountticketrequest *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest) *AccountsProvisionAccountTicketCall { + c := &AccountsProvisionAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphaprovisionaccountticketrequest = googleanalyticsadminv1alphaprovisionaccountticketrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { +func (c *AccountsProvisionAccountTicketCall) Fields(s ...googleapi.Field) *AccountsProvisionAccountTicketCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3360,21 +4908,21 @@ func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { +func (c *AccountsProvisionAccountTicketCall) Context(ctx context.Context) *AccountsProvisionAccountTicketCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsDeleteCall) Header() http.Header { +func (c *AccountsProvisionAccountTicketCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsProvisionAccountTicketCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3382,29 +4930,34 @@ func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaprovisionaccountticketrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accounts:provisionAccountTicket") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.accounts.provisionAccountTicket" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsProvisionAccountTicketCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3423,7 +4976,7 @@ func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEm if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3435,25 +4988,18 @@ func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEm } return ret, nil // { - // "description": "Marks target Account as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. 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. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", - // "flatPath": "v1alpha/accounts/{accountsId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.accounts.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the Account to soft-delete. Format: accounts/{account} Example: \"accounts/100\"", - // "location": "path", - // "pattern": "^accounts/[^/]+$", - // "required": true, - // "type": "string" - // } + // "description": "Requests a ticket for creating an account.", + // "flatPath": "v1alpha/accounts:provisionAccountTicket", + // "httpMethod": "POST", + // "id": "analyticsadmin.accounts.provisionAccountTicket", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/accounts:provisionAccountTicket", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest" // }, - // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -3462,97 +5008,93 @@ func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEm } -// method id "analyticsadmin.accounts.get": +// method id "analyticsadmin.accounts.searchChangeHistoryEvents": -type AccountsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsSearchChangeHistoryEventsCall struct { + s *Service + account string + googleanalyticsadminv1alphasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Lookup for a single Account. +// SearchChangeHistoryEvents: Searches through all changes to an account +// or its children given the specified set of filters. // -// - name: The name of the account to lookup. Format: accounts/{account} -// Example: "accounts/100". -func (r *AccountsService) Get(name string) *AccountsGetCall { - c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - account: The account resource for which to return change history +// resources. +func (r *AccountsService) SearchChangeHistoryEvents(account string, googleanalyticsadminv1alphasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest) *AccountsSearchChangeHistoryEventsCall { + c := &AccountsSearchChangeHistoryEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.account = account + c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest = googleanalyticsadminv1alphasearchchangehistoryeventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { +func (c *AccountsSearchChangeHistoryEventsCall) Fields(s ...googleapi.Field) *AccountsSearchChangeHistoryEventsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { +func (c *AccountsSearchChangeHistoryEventsCall) Context(ctx context.Context) *AccountsSearchChangeHistoryEventsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsGetCall) Header() http.Header { +func (c *AccountsSearchChangeHistoryEventsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsSearchChangeHistoryEventsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+account}:searchChangeHistoryEvents") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "account": c.account, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAccount or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleAnalyticsAdminV1alphaAccount.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.accounts.searchChangeHistoryEvents" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse.ServerRe +// sponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccount, error) { +func (c *AccountsSearchChangeHistoryEventsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3571,7 +5113,7 @@ func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdmi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaAccount{ + ret := &GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3583,128 +5125,147 @@ func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdmi } return ret, nil // { - // "description": "Lookup for a single Account.", - // "flatPath": "v1alpha/accounts/{accountsId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.accounts.get", + // "description": "Searches through all changes to an account or its children given the specified set of filters.", + // "flatPath": "v1alpha/accounts/{accountsId}:searchChangeHistoryEvents", + // "httpMethod": "POST", + // "id": "analyticsadmin.accounts.searchChangeHistoryEvents", // "parameterOrder": [ - // "name" + // "account" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the account to lookup. Format: accounts/{account} Example: \"accounts/100\"", + // "account": { + // "description": "Required. The account resource for which to return change history resources.", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+account}:searchChangeHistoryEvents", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAccount" + // "$ref": "GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.accounts.getDataSharingSettings": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsSearchChangeHistoryEventsCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest.PageToken = pt }(c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest.PageToken = x.NextPageToken + } +} -type AccountsGetDataSharingSettingsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.accounts.userLinks.audit": + +type AccountsUserLinksAuditCall struct { + s *Service + parent string + googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetDataSharingSettings: Get data sharing settings on an account. Data -// sharing settings are singletons. +// Audit: Lists all user links on an account or property, including +// implicit ones that come from effective permissions granted by groups +// or organization admin roles. If a returned user link does not have +// direct permissions, they cannot be removed from the account or +// property directly with the DeleteUserLink command. They have to be +// removed from the group/etc that gives them permissions, which is +// currently only usable/discoverable in the GA or GMP UIs. // -// - name: The name of the settings to lookup. Format: -// accounts/{account}/dataSharingSettings Example: -// "accounts/1000/dataSharingSettings". -func (r *AccountsService) GetDataSharingSettings(name string) *AccountsGetDataSharingSettingsCall { - c := &AccountsGetDataSharingSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Example format: accounts/1234. +func (r *AccountsUserLinksService) Audit(parent string, googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) *AccountsUserLinksAuditCall { + c := &AccountsUserLinksAuditCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphaaudituserlinksrequest = googleanalyticsadminv1alphaaudituserlinksrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsGetDataSharingSettingsCall) Fields(s ...googleapi.Field) *AccountsGetDataSharingSettingsCall { +func (c *AccountsUserLinksAuditCall) Fields(s ...googleapi.Field) *AccountsUserLinksAuditCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsGetDataSharingSettingsCall) IfNoneMatch(entityTag string) *AccountsGetDataSharingSettingsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsGetDataSharingSettingsCall) Context(ctx context.Context) *AccountsGetDataSharingSettingsCall { +func (c *AccountsUserLinksAuditCall) Context(ctx context.Context) *AccountsUserLinksAuditCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsGetDataSharingSettingsCall) Header() http.Header { +func (c *AccountsUserLinksAuditCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsGetDataSharingSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksAuditCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaudituserlinksrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:audit") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.getDataSharingSettings" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaDataSharingSettings or +// Do executes the "analyticsadmin.accounts.userLinks.audit" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaDataSharingSettings.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.ServerResponse.Head +// er or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsGetDataSharingSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataSharingSettings, error) { +func (c *AccountsUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3723,7 +5284,7 @@ func (c *AccountsGetDataSharingSettingsCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaDataSharingSettings{ + ret := &GoogleAnalyticsAdminV1alphaAuditUserLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3735,150 +5296,148 @@ func (c *AccountsGetDataSharingSettingsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Get data sharing settings on an account. Data sharing settings are singletons.", - // "flatPath": "v1alpha/accounts/{accountsId}/dataSharingSettings", - // "httpMethod": "GET", - // "id": "analyticsadmin.accounts.getDataSharingSettings", + // "description": "Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles. If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:audit", + // "httpMethod": "POST", + // "id": "analyticsadmin.accounts.userLinks.audit", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: \"accounts/1000/dataSharingSettings\"", + // "parent": { + // "description": "Required. Example format: accounts/1234", // "location": "path", - // "pattern": "^accounts/[^/]+/dataSharingSettings$", + // "pattern": "^accounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/userLinks:audit", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataSharingSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.manage.users", + // "https://www.googleapis.com/auth/analytics.manage.users.readonly" // ] // } } -// method id "analyticsadmin.accounts.list": - -type AccountsListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns all accounts accessible by the caller. Note that these -// accounts might not currently have GA4 properties. Soft-deleted (ie: -// "trashed") accounts are excluded by default. Returns an empty list if -// no relevant accounts are found. -func (r *AccountsService) List() *AccountsListCall { - c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsUserLinksAuditCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = pt }(c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = x.NextPageToken + } } -// PageSize sets the optional parameter "pageSize": The maximum number -// of resources to return. The service may return fewer than this value, -// even if there are additional pages. If unspecified, at most 50 -// resources will be returned. The maximum value is 200; (higher values -// will be coerced to the maximum) -func (c *AccountsListCall) PageSize(pageSize int64) *AccountsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} +// method id "analyticsadmin.accounts.userLinks.batchCreate": -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListAccounts` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListAccounts` must match the call that provided the page -// token. -func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type AccountsUserLinksBatchCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ShowDeleted sets the optional parameter "showDeleted": Whether to -// include soft-deleted (ie: "trashed") Accounts in the results. -// Accounts can be inspected to determine whether they are deleted or -// not. -func (c *AccountsListCall) ShowDeleted(showDeleted bool) *AccountsListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) +// BatchCreate: Creates information about multiple users' links to an +// account or property. This method is transactional. If any UserLink +// cannot be created, none of the UserLinks will be created. +// +// - parent: The account or property that all user links in the request +// are for. This field is required. The parent field in the +// CreateUserLinkRequest messages must either be empty or match this +// field. Example format: accounts/1234. +func (r *AccountsUserLinksService) BatchCreate(parent string, googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) *AccountsUserLinksBatchCreateCall { + c := &AccountsUserLinksBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphabatchcreateuserlinksrequest = googleanalyticsadminv1alphabatchcreateuserlinksrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { +func (c *AccountsUserLinksBatchCreateCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { +func (c *AccountsUserLinksBatchCreateCall) Context(ctx context.Context) *AccountsUserLinksBatchCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsListCall) Header() http.Header { +func (c *AccountsUserLinksBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksBatchCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchcreateuserlinksrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accounts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchCreate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListAccountsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "analyticsadmin.accounts.userLinks.batchCreate" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaListAccountsResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.ServerRespons +// e.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccountsResponse, error) { +func (c *AccountsUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3897,7 +5456,7 @@ func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdm if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaListAccountsResponse{ + ret := &GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3909,98 +5468,64 @@ func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdm } return ret, nil // { - // "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", - // "flatPath": "v1alpha/accounts", - // "httpMethod": "GET", - // "id": "analyticsadmin.accounts.list", - // "parameterOrder": [], + // "description": "Creates information about multiple users' links to an account or property. This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchCreate", + // "httpMethod": "POST", + // "id": "analyticsadmin.accounts.userLinks.batchCreate", + // "parameterOrder": [ + // "parent" + // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token.", - // "location": "query", + // "parent": { + // "description": "Required. The account or property that all user links in the request are for. This field is required. The parent field in the CreateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, // "type": "string" - // }, - // "showDeleted": { - // "description": "Whether to include soft-deleted (ie: \"trashed\") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/accounts", + // "path": "v1alpha/{+parent}/userLinks:batchCreate", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListAccountsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.manage.users" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccountsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "analyticsadmin.accounts.patch": +// method id "analyticsadmin.accounts.userLinks.batchDelete": -type AccountsPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphaaccount *GoogleAnalyticsAdminV1alphaAccount - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUserLinksBatchDeleteCall struct { + s *Service + parent string + googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an account. +// BatchDelete: Deletes information about multiple users' links to an +// account or property. // -// - name: Output only. Resource name of this account. Format: -// accounts/{account} Example: "accounts/100". -func (r *AccountsService) Patch(name string, googleanalyticsadminv1alphaaccount *GoogleAnalyticsAdminV1alphaAccount) *AccountsPatchCall { - c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphaaccount = googleanalyticsadminv1alphaaccount - return c -} - -// UpdateMask sets the optional parameter "updateMask": 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. -func (c *AccountsPatchCall) UpdateMask(updateMask string) *AccountsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The account or property that all user links in the request +// are for. The parent of all values for user link names to delete +// must match this field. Example format: accounts/1234. +func (r *AccountsUserLinksService) BatchDelete(parent string, googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) *AccountsUserLinksBatchDeleteCall { + c := &AccountsUserLinksBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest = googleanalyticsadminv1alphabatchdeleteuserlinksrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall { +func (c *AccountsUserLinksBatchDeleteCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4008,21 +5533,21 @@ func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall { +func (c *AccountsUserLinksBatchDeleteCall) Context(ctx context.Context) *AccountsUserLinksBatchDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsPatchCall) Header() http.Header { +func (c *AccountsUserLinksBatchDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksBatchDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4030,35 +5555,34 @@ func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaccount) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchDelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAccount or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleAnalyticsAdminV1alphaAccount.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccount, error) { +// Do executes the "analyticsadmin.accounts.userLinks.batchDelete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4077,7 +5601,7 @@ func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAd if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaAccount{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4089,120 +5613,138 @@ func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAd } return ret, nil // { - // "description": "Updates an account.", - // "flatPath": "v1alpha/accounts/{accountsId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.accounts.patch", + // "description": "Deletes information about multiple users' links to an account or property.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchDelete", + // "httpMethod": "POST", + // "id": "analyticsadmin.accounts.userLinks.batchDelete", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. Resource name of this account. Format: accounts/{account} Example: \"accounts/100\"", + // "parent": { + // "description": "Required. The account or property that all user links in the request are for. The parent of all values for user link names to delete must match this field. Example format: accounts/1234", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "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.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/userLinks:batchDelete", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAccount" + // "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAccount" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" + // "https://www.googleapis.com/auth/analytics.manage.users" // ] // } } -// method id "analyticsadmin.accounts.provisionAccountTicket": +// method id "analyticsadmin.accounts.userLinks.batchGet": -type AccountsProvisionAccountTicketCall struct { - s *Service - googleanalyticsadminv1alphaprovisionaccountticketrequest *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUserLinksBatchGetCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ProvisionAccountTicket: Requests a ticket for creating an account. -func (r *AccountsService) ProvisionAccountTicket(googleanalyticsadminv1alphaprovisionaccountticketrequest *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest) *AccountsProvisionAccountTicketCall { - c := &AccountsProvisionAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphaprovisionaccountticketrequest = googleanalyticsadminv1alphaprovisionaccountticketrequest +// BatchGet: Gets information about multiple users' links to an account +// or property. +// +// - parent: The account or property that all user links in the request +// are for. The parent of all provided values for the 'names' field +// must match this field. Example format: accounts/1234. +func (r *AccountsUserLinksService) BatchGet(parent string) *AccountsUserLinksBatchGetCall { + c := &AccountsUserLinksBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Names sets the optional parameter "names": Required. The names of the +// user links to retrieve. A maximum of 1000 user links can be retrieved +// in a batch. Format: accounts/{accountId}/userLinks/{userLinkId} +func (c *AccountsUserLinksBatchGetCall) Names(names ...string) *AccountsUserLinksBatchGetCall { + c.urlParams_.SetMulti("names", append([]string{}, names...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsProvisionAccountTicketCall) Fields(s ...googleapi.Field) *AccountsProvisionAccountTicketCall { +func (c *AccountsUserLinksBatchGetCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsUserLinksBatchGetCall) IfNoneMatch(entityTag string) *AccountsUserLinksBatchGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsProvisionAccountTicketCall) Context(ctx context.Context) *AccountsProvisionAccountTicketCall { +func (c *AccountsUserLinksBatchGetCall) Context(ctx context.Context) *AccountsUserLinksBatchGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsProvisionAccountTicketCall) Header() http.Header { +func (c *AccountsUserLinksBatchGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsProvisionAccountTicketCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksBatchGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaprovisionaccountticketrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accounts:provisionAccountTicket") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchGet") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.provisionAccountTicket" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse.ServerRespo -// nse.Header or (if a response was returned at all) in +// Do executes the "analyticsadmin.accounts.userLinks.batchGet" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.ServerResponse.H +// eader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsProvisionAccountTicketCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse, error) { +func (c *AccountsUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4221,7 +5763,7 @@ func (c *AccountsProvisionAccountTicketCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse{ + ret := &GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4233,53 +5775,69 @@ func (c *AccountsProvisionAccountTicketCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Requests a ticket for creating an account.", - // "flatPath": "v1alpha/accounts:provisionAccountTicket", - // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.provisionAccountTicket", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/accounts:provisionAccountTicket", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest" + // "description": "Gets information about multiple users' links to an account or property.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchGet", + // "httpMethod": "GET", + // "id": "analyticsadmin.accounts.userLinks.batchGet", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "names": { + // "description": "Required. The names of the user links to retrieve. A maximum of 1000 user links can be retrieved in a batch. Format: accounts/{accountId}/userLinks/{userLinkId}", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "parent": { + // "description": "Required. The account or property that all user links in the request are for. The parent of all provided values for the 'names' field must match this field. Example format: accounts/1234", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } // }, + // "path": "v1alpha/{+parent}/userLinks:batchGet", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" + // "https://www.googleapis.com/auth/analytics.manage.users", + // "https://www.googleapis.com/auth/analytics.manage.users.readonly" // ] // } } -// method id "analyticsadmin.accounts.searchChangeHistoryEvents": +// method id "analyticsadmin.accounts.userLinks.batchUpdate": -type AccountsSearchChangeHistoryEventsCall struct { - s *Service - account string - googleanalyticsadminv1alphasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUserLinksBatchUpdateCall struct { + s *Service + parent string + googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchChangeHistoryEvents: Searches through all changes to an account -// or its children given the specified set of filters. +// BatchUpdate: Updates information about multiple users' links to an +// account or property. // -// - account: The account resource for which to return change history -// resources. -func (r *AccountsService) SearchChangeHistoryEvents(account string, googleanalyticsadminv1alphasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest) *AccountsSearchChangeHistoryEventsCall { - c := &AccountsSearchChangeHistoryEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.account = account - c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest = googleanalyticsadminv1alphasearchchangehistoryeventsrequest +// - parent: The account or property that all user links in the request +// are for. The parent field in the UpdateUserLinkRequest messages +// must either be empty or match this field. Example format: +// accounts/1234. +func (r *AccountsUserLinksService) BatchUpdate(parent string, googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) *AccountsUserLinksBatchUpdateCall { + c := &AccountsUserLinksBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphabatchupdateuserlinksrequest = googleanalyticsadminv1alphabatchupdateuserlinksrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsSearchChangeHistoryEventsCall) Fields(s ...googleapi.Field) *AccountsSearchChangeHistoryEventsCall { +func (c *AccountsUserLinksBatchUpdateCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4287,21 +5845,21 @@ func (c *AccountsSearchChangeHistoryEventsCall) Fields(s ...googleapi.Field) *Ac // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsSearchChangeHistoryEventsCall) Context(ctx context.Context) *AccountsSearchChangeHistoryEventsCall { +func (c *AccountsUserLinksBatchUpdateCall) Context(ctx context.Context) *AccountsUserLinksBatchUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsSearchChangeHistoryEventsCall) Header() http.Header { +func (c *AccountsUserLinksBatchUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsSearchChangeHistoryEventsCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksBatchUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4309,14 +5867,14 @@ func (c *AccountsSearchChangeHistoryEventsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchupdateuserlinksrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+account}:searchChangeHistoryEvents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchUpdate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4324,22 +5882,22 @@ func (c *AccountsSearchChangeHistoryEventsCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "account": c.account, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.searchChangeHistoryEvents" call. +// Do executes the "analyticsadmin.accounts.userLinks.batchUpdate" call. // Exactly one of -// *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse.ServerRe -// sponse.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse.ServerRespons +// e.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsSearchChangeHistoryEventsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse, error) { +func (c *AccountsUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4358,7 +5916,7 @@ func (c *AccountsSearchChangeHistoryEventsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse{ + ret := &GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4370,88 +5928,72 @@ func (c *AccountsSearchChangeHistoryEventsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Searches through all changes to an account or its children given the specified set of filters.", - // "flatPath": "v1alpha/accounts/{accountsId}:searchChangeHistoryEvents", + // "description": "Updates information about multiple users' links to an account or property.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchUpdate", // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.searchChangeHistoryEvents", + // "id": "analyticsadmin.accounts.userLinks.batchUpdate", // "parameterOrder": [ - // "account" + // "parent" // ], // "parameters": { - // "account": { - // "description": "Required. The account resource for which to return change history resources.", + // "parent": { + // "description": "Required. The account or property that all user links in the request are for. The parent field in the UpdateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+account}:searchChangeHistoryEvents", + // "path": "v1alpha/{+parent}/userLinks:batchUpdate", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" + // "https://www.googleapis.com/auth/analytics.manage.users" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsSearchChangeHistoryEventsCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest.PageToken = pt }(c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest.PageToken) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest.PageToken = x.NextPageToken - } -} - -// method id "analyticsadmin.accounts.userLinks.audit": +// method id "analyticsadmin.accounts.userLinks.create": -type AccountsUserLinksAuditCall struct { - s *Service - parent string - googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUserLinksCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Audit: Lists all user links on an account or property, including -// implicit ones that come from effective permissions granted by groups -// or organization admin roles. If a returned user link does not have -// direct permissions, they cannot be removed from the account or -// property directly with the DeleteUserLink command. They have to be -// removed from the group/etc that gives them permissions, which is -// currently only usable/discoverable in the GA or GMP UIs. +// Create: Creates a user link on an account or property. If the user +// with the specified email already has permissions on the account or +// property, then the user's existing permissions will be unioned with +// the permissions specified in the new UserLink. // // - parent: Example format: accounts/1234. -func (r *AccountsUserLinksService) Audit(parent string, googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) *AccountsUserLinksAuditCall { - c := &AccountsUserLinksAuditCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsUserLinksService) Create(parent string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *AccountsUserLinksCreateCall { + c := &AccountsUserLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleanalyticsadminv1alphaaudituserlinksrequest = googleanalyticsadminv1alphaaudituserlinksrequest + c.googleanalyticsadminv1alphauserlink = googleanalyticsadminv1alphauserlink + return c +} + +// NotifyNewUser sets the optional parameter "notifyNewUser": If set, +// then email the new user notifying them that they've been granted +// permissions to the resource. +func (c *AccountsUserLinksCreateCall) NotifyNewUser(notifyNewUser bool) *AccountsUserLinksCreateCall { + c.urlParams_.Set("notifyNewUser", fmt.Sprint(notifyNewUser)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksAuditCall) Fields(s ...googleapi.Field) *AccountsUserLinksAuditCall { +func (c *AccountsUserLinksCreateCall) Fields(s ...googleapi.Field) *AccountsUserLinksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4459,21 +6001,21 @@ func (c *AccountsUserLinksAuditCall) Fields(s ...googleapi.Field) *AccountsUserL // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksAuditCall) Context(ctx context.Context) *AccountsUserLinksAuditCall { +func (c *AccountsUserLinksCreateCall) Context(ctx context.Context) *AccountsUserLinksCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksAuditCall) Header() http.Header { +func (c *AccountsUserLinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksAuditCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4481,14 +6023,14 @@ func (c *AccountsUserLinksAuditCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaudituserlinksrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphauserlink) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:audit") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4501,16 +6043,15 @@ func (c *AccountsUserLinksAuditCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.audit" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// Do executes the "analyticsadmin.accounts.userLinks.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse, error) { +func (c *AccountsUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4529,7 +6070,7 @@ func (c *AccountsUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAn if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaAuditUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaUserLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4541,14 +6082,19 @@ func (c *AccountsUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAn } return ret, nil // { - // "description": "Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles. If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:audit", + // "description": "Creates a user link on an account or property. If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks", // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.audit", + // "id": "analyticsadmin.accounts.userLinks.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "notifyNewUser": { + // "description": "Optional. If set, then email the new user notifying them that they've been granted permissions to the resource.", + // "location": "query", + // "type": "boolean" + // }, // "parent": { // "description": "Required. Example format: accounts/1234", // "location": "path", @@ -4557,72 +6103,43 @@ func (c *AccountsUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAn // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks:audit", + // "path": "v1alpha/{+parent}/userLinks", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users", - // "https://www.googleapis.com/auth/analytics.manage.users.readonly" + // "https://www.googleapis.com/auth/analytics.manage.users" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsUserLinksAuditCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = pt }(c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = x.NextPageToken - } -} - -// method id "analyticsadmin.accounts.userLinks.batchCreate": +// method id "analyticsadmin.accounts.userLinks.delete": -type AccountsUserLinksBatchCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUserLinksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates information about multiple users' links to an -// account or property. This method is transactional. If any UserLink -// cannot be created, none of the UserLinks will be created. +// Delete: Deletes a user link on an account or property. // -// - parent: The account or property that all user links in the request -// are for. This field is required. The parent field in the -// CreateUserLinkRequest messages must either be empty or match this -// field. Example format: accounts/1234. -func (r *AccountsUserLinksService) BatchCreate(parent string, googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) *AccountsUserLinksBatchCreateCall { - c := &AccountsUserLinksBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphabatchcreateuserlinksrequest = googleanalyticsadminv1alphabatchcreateuserlinksrequest +// - name: Example format: accounts/1234/userLinks/5678. +func (r *AccountsUserLinksService) Delete(name string) *AccountsUserLinksDeleteCall { + c := &AccountsUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksBatchCreateCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchCreateCall { +func (c *AccountsUserLinksDeleteCall) Fields(s ...googleapi.Field) *AccountsUserLinksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4630,21 +6147,21 @@ func (c *AccountsUserLinksBatchCreateCall) Fields(s ...googleapi.Field) *Account // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksBatchCreateCall) Context(ctx context.Context) *AccountsUserLinksBatchCreateCall { +func (c *AccountsUserLinksDeleteCall) Context(ctx context.Context) *AccountsUserLinksDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksBatchCreateCall) Header() http.Header { +func (c *AccountsUserLinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4652,37 +6169,29 @@ func (c *AccountsUserLinksBatchCreateCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchcreateuserlinksrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.batchCreate" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.ServerRespons -// e.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccountsUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse, error) { +// Do executes the "analyticsadmin.accounts.userLinks.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsUserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4701,7 +6210,7 @@ func (c *AccountsUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4713,28 +6222,25 @@ func (c *AccountsUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Creates information about multiple users' links to an account or property. This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchCreate", - // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.batchCreate", + // "description": "Deletes a user link on an account or property.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.accounts.userLinks.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The account or property that all user links in the request are for. This field is required. The parent field in the CreateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234", + // "name": { + // "description": "Required. Example format: accounts/1234/userLinks/5678", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks:batchCreate", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.manage.users" @@ -4743,91 +6249,96 @@ func (c *AccountsUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "analyticsadmin.accounts.userLinks.batchDelete": +// method id "analyticsadmin.accounts.userLinks.get": -type AccountsUserLinksBatchDeleteCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUserLinksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// BatchDelete: Deletes information about multiple users' links to an -// account or property. +// Get: Gets information about a user's link to an account or property. // -// - parent: The account or property that all user links in the request -// are for. The parent of all values for user link names to delete -// must match this field. Example format: accounts/1234. -func (r *AccountsUserLinksService) BatchDelete(parent string, googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) *AccountsUserLinksBatchDeleteCall { - c := &AccountsUserLinksBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest = googleanalyticsadminv1alphabatchdeleteuserlinksrequest +// - name: Example format: accounts/1234/userLinks/5678. +func (r *AccountsUserLinksService) Get(name string) *AccountsUserLinksGetCall { + c := &AccountsUserLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksBatchDeleteCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchDeleteCall { +func (c *AccountsUserLinksGetCall) Fields(s ...googleapi.Field) *AccountsUserLinksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsUserLinksGetCall) IfNoneMatch(entityTag string) *AccountsUserLinksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksBatchDeleteCall) Context(ctx context.Context) *AccountsUserLinksBatchDeleteCall { +func (c *AccountsUserLinksGetCall) Context(ctx context.Context) *AccountsUserLinksGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksBatchDeleteCall) Header() http.Header { +func (c *AccountsUserLinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksBatchDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.batchDelete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.accounts.userLinks.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4846,7 +6357,7 @@ func (c *AccountsUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaUserLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4858,39 +6369,37 @@ func (c *AccountsUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Deletes information about multiple users' links to an account or property.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchDelete", - // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.batchDelete", + // "description": "Gets information about a user's link to an account or property.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.accounts.userLinks.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The account or property that all user links in the request are for. The parent of all values for user link names to delete must match this field. Example format: accounts/1234", + // "name": { + // "description": "Required. Example format: accounts/1234/userLinks/5678", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks:batchDelete", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.manage.users", + // "https://www.googleapis.com/auth/analytics.manage.users.readonly" // ] // } } -// method id "analyticsadmin.accounts.userLinks.batchGet": +// method id "analyticsadmin.accounts.userLinks.list": -type AccountsUserLinksBatchGetCall struct { +type AccountsUserLinksListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -4899,30 +6408,38 @@ type AccountsUserLinksBatchGetCall struct { header_ http.Header } -// BatchGet: Gets information about multiple users' links to an account -// or property. +// List: Lists all user links on an account or property. // -// - parent: The account or property that all user links in the request -// are for. The parent of all provided values for the 'names' field -// must match this field. Example format: accounts/1234. -func (r *AccountsUserLinksService) BatchGet(parent string) *AccountsUserLinksBatchGetCall { - c := &AccountsUserLinksBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Example format: accounts/1234. +func (r *AccountsUserLinksService) List(parent string) *AccountsUserLinksListCall { + c := &AccountsUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Names sets the optional parameter "names": Required. The names of the -// user links to retrieve. A maximum of 1000 user links can be retrieved -// in a batch. Format: accounts/{accountId}/userLinks/{userLinkId} -func (c *AccountsUserLinksBatchGetCall) Names(names ...string) *AccountsUserLinksBatchGetCall { - c.urlParams_.SetMulti("names", append([]string{}, names...)) +// PageSize sets the optional parameter "pageSize": The maximum number +// of user links to return. The service may return fewer than this +// value. If unspecified, at most 200 user links will be returned. The +// maximum value is 500; values above 500 will be coerced to 500. +func (c *AccountsUserLinksListCall) PageSize(pageSize int64) *AccountsUserLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListUserLinks` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListUserLinks` must match the call that provided the +// page token. +func (c *AccountsUserLinksListCall) PageToken(pageToken string) *AccountsUserLinksListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksBatchGetCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchGetCall { +func (c *AccountsUserLinksListCall) Fields(s ...googleapi.Field) *AccountsUserLinksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4932,7 +6449,7 @@ func (c *AccountsUserLinksBatchGetCall) Fields(s ...googleapi.Field) *AccountsUs // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AccountsUserLinksBatchGetCall) IfNoneMatch(entityTag string) *AccountsUserLinksBatchGetCall { +func (c *AccountsUserLinksListCall) IfNoneMatch(entityTag string) *AccountsUserLinksListCall { c.ifNoneMatch_ = entityTag return c } @@ -4940,21 +6457,21 @@ func (c *AccountsUserLinksBatchGetCall) IfNoneMatch(entityTag string) *AccountsU // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksBatchGetCall) Context(ctx context.Context) *AccountsUserLinksBatchGetCall { +func (c *AccountsUserLinksListCall) Context(ctx context.Context) *AccountsUserLinksListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksBatchGetCall) Header() http.Header { +func (c *AccountsUserLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksBatchGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4967,7 +6484,7 @@ func (c *AccountsUserLinksBatchGetCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchGet") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4980,16 +6497,16 @@ func (c *AccountsUserLinksBatchGetCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.batchGet" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "analyticsadmin.accounts.userLinks.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListUserLinksResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListUserLinksResponse.ServerResponse.Heade +// r or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse, error) { +func (c *AccountsUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListUserLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5008,7 +6525,7 @@ func (c *AccountsUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaListUserLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5020,31 +6537,36 @@ func (c *AccountsUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Gets information about multiple users' links to an account or property.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchGet", + // "description": "Lists all user links on an account or property.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks", // "httpMethod": "GET", - // "id": "analyticsadmin.accounts.userLinks.batchGet", + // "id": "analyticsadmin.accounts.userLinks.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "names": { - // "description": "Required. The names of the user links to retrieve. A maximum of 1000 user links can be retrieved in a batch. Format: accounts/{accountId}/userLinks/{userLinkId}", + // "pageSize": { + // "description": "The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListUserLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUserLinks` must match the call that provided the page token.", // "location": "query", - // "repeated": true, // "type": "string" // }, // "parent": { - // "description": "Required. The account or property that all user links in the request are for. The parent of all provided values for the 'names' field must match this field. Example format: accounts/1234", + // "description": "Required. Example format: accounts/1234", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks:batchGet", + // "path": "v1alpha/{+parent}/userLinks", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaListUserLinksResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.manage.users", @@ -5054,35 +6576,52 @@ func (c *AccountsUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*Googl } -// method id "analyticsadmin.accounts.userLinks.batchUpdate": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsUserLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListUserLinksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type AccountsUserLinksBatchUpdateCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.accounts.userLinks.patch": + +type AccountsUserLinksPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchUpdate: Updates information about multiple users' links to an -// account or property. +// Patch: Updates a user link on an account or property. // -// - parent: The account or property that all user links in the request -// are for. The parent field in the UpdateUserLinkRequest messages -// must either be empty or match this field. Example format: -// accounts/1234. -func (r *AccountsUserLinksService) BatchUpdate(parent string, googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) *AccountsUserLinksBatchUpdateCall { - c := &AccountsUserLinksBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphabatchupdateuserlinksrequest = googleanalyticsadminv1alphabatchupdateuserlinksrequest +// - name: Output only. Example format: properties/1234/userLinks/5678. +func (r *AccountsUserLinksService) Patch(name string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *AccountsUserLinksPatchCall { + c := &AccountsUserLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphauserlink = googleanalyticsadminv1alphauserlink return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksBatchUpdateCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchUpdateCall { +func (c *AccountsUserLinksPatchCall) Fields(s ...googleapi.Field) *AccountsUserLinksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5090,21 +6629,21 @@ func (c *AccountsUserLinksBatchUpdateCall) Fields(s ...googleapi.Field) *Account // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksBatchUpdateCall) Context(ctx context.Context) *AccountsUserLinksBatchUpdateCall { +func (c *AccountsUserLinksPatchCall) Context(ctx context.Context) *AccountsUserLinksPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksBatchUpdateCall) Header() http.Header { +func (c *AccountsUserLinksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksBatchUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUserLinksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5112,37 +6651,35 @@ func (c *AccountsUserLinksBatchUpdateCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchupdateuserlinksrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphauserlink) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchUpdate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.batchUpdate" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse.ServerRespons -// e.Header or (if a response was returned at all) in +// Do executes the "analyticsadmin.accounts.userLinks.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse, error) { +func (c *AccountsUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5161,7 +6698,7 @@ func (c *AccountsUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaUserLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5173,28 +6710,28 @@ func (c *AccountsUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Updates information about multiple users' links to an account or property.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchUpdate", - // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.batchUpdate", + // "description": "Updates a user link on an account or property.", + // "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.accounts.userLinks.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The account or property that all user links in the request are for. The parent field in the UpdateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234", + // "name": { + // "description": "Output only. Example format: properties/1234/userLinks/5678", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks:batchUpdate", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.manage.users" @@ -5203,42 +6740,35 @@ func (c *AccountsUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "analyticsadmin.accounts.userLinks.create": +// method id "analyticsadmin.properties.acknowledgeUserDataCollection": -type AccountsUserLinksCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesAcknowledgeUserDataCollectionCall struct { + s *Service + property string + googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a user link on an account or property. If the user -// with the specified email already has permissions on the account or -// property, then the user's existing permissions will be unioned with -// the permissions specified in the new UserLink. +// AcknowledgeUserDataCollection: Acknowledges the terms of user data +// collection for the specified property. This acknowledgement must be +// completed (either in the Google Analytics UI or via this API) before +// MeasurementProtocolSecret resources may be created. // -// - parent: Example format: accounts/1234. -func (r *AccountsUserLinksService) Create(parent string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *AccountsUserLinksCreateCall { - c := &AccountsUserLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphauserlink = googleanalyticsadminv1alphauserlink - return c -} - -// NotifyNewUser sets the optional parameter "notifyNewUser": If set, -// then email the new user notifying them that they've been granted -// permissions to the resource. -func (c *AccountsUserLinksCreateCall) NotifyNewUser(notifyNewUser bool) *AccountsUserLinksCreateCall { - c.urlParams_.Set("notifyNewUser", fmt.Sprint(notifyNewUser)) +// - property: The property for which to acknowledge user data +// collection. +func (r *PropertiesService) AcknowledgeUserDataCollection(property string, googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionRequest) *PropertiesAcknowledgeUserDataCollectionCall { + c := &PropertiesAcknowledgeUserDataCollectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.property = property + c.googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest = googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksCreateCall) Fields(s ...googleapi.Field) *AccountsUserLinksCreateCall { +func (c *PropertiesAcknowledgeUserDataCollectionCall) Fields(s ...googleapi.Field) *PropertiesAcknowledgeUserDataCollectionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5246,21 +6776,21 @@ func (c *AccountsUserLinksCreateCall) Fields(s ...googleapi.Field) *AccountsUser // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksCreateCall) Context(ctx context.Context) *AccountsUserLinksCreateCall { +func (c *PropertiesAcknowledgeUserDataCollectionCall) Context(ctx context.Context) *PropertiesAcknowledgeUserDataCollectionCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksCreateCall) Header() http.Header { +func (c *PropertiesAcknowledgeUserDataCollectionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAcknowledgeUserDataCollectionCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5268,14 +6798,14 @@ func (c *AccountsUserLinksCreateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphauserlink) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+property}:acknowledgeUserDataCollection") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5283,20 +6813,22 @@ func (c *AccountsUserLinksCreateCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "property": c.property, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.acknowledgeUserDataCollection" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse.Serv +// erResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { +func (c *PropertiesAcknowledgeUserDataCollectionCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5315,7 +6847,7 @@ func (c *AccountsUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleA if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaUserLink{ + ret := &GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5327,64 +6859,58 @@ func (c *AccountsUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleA } return ret, nil // { - // "description": "Creates a user link on an account or property. If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks", + // "description": "Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or via this API) before MeasurementProtocolSecret resources may be created.", + // "flatPath": "v1alpha/properties/{propertiesId}:acknowledgeUserDataCollection", // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.create", + // "id": "analyticsadmin.properties.acknowledgeUserDataCollection", // "parameterOrder": [ - // "parent" + // "property" // ], // "parameters": { - // "notifyNewUser": { - // "description": "Optional. If set, then email the new user notifying them that they've been granted permissions to the resource.", - // "location": "query", - // "type": "boolean" - // }, - // "parent": { - // "description": "Required. Example format: accounts/1234", + // "property": { + // "description": "Required. The property for which to acknowledge user data collection.", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks", + // "path": "v1alpha/{+property}:acknowledgeUserDataCollection", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.accounts.userLinks.delete": +// method id "analyticsadmin.properties.create": -type AccountsUserLinksDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesCreateCall struct { + s *Service + googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a user link on an account or property. -// -// - name: Example format: accounts/1234/userLinks/5678. -func (r *AccountsUserLinksService) Delete(name string) *AccountsUserLinksDeleteCall { - c := &AccountsUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// Create: Creates an "GA4" property with the specified location and +// attributes. +func (r *PropertiesService) Create(googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty) *PropertiesCreateCall { + c := &PropertiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphaproperty = googleanalyticsadminv1alphaproperty return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksDeleteCall) Fields(s ...googleapi.Field) *AccountsUserLinksDeleteCall { +func (c *PropertiesCreateCall) Fields(s ...googleapi.Field) *PropertiesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5392,21 +6918,21 @@ func (c *AccountsUserLinksDeleteCall) Fields(s ...googleapi.Field) *AccountsUser // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksDeleteCall) Context(ctx context.Context) *AccountsUserLinksDeleteCall { +func (c *PropertiesCreateCall) Context(ctx context.Context) *PropertiesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksDeleteCall) Header() http.Header { +func (c *PropertiesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5414,29 +6940,32 @@ func (c *AccountsUserLinksDeleteCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaproperty) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsUserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *PropertiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5455,7 +6984,7 @@ func (c *AccountsUserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleP if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaProperty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5467,49 +6996,49 @@ func (c *AccountsUserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleP } return ret, nil // { - // "description": "Deletes a user link on an account or property.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.accounts.userLinks.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Example format: accounts/1234/userLinks/5678", - // "location": "path", - // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", - // "required": true, - // "type": "string" - // } + // "description": "Creates an \"GA4\" property with the specified location and attributes.", + // "flatPath": "v1alpha/properties", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.create", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/properties", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, - // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.accounts.userLinks.get": +// method id "analyticsadmin.properties.delete": -type AccountsUserLinksGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a user's link to an account or property. +// Delete: Marks target Property as soft-deleted (ie: "trashed") and +// returns it. This API does not have a method to restore soft-deleted +// properties. 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) will be permanently purged. +// https://support.google.com/analytics/answer/6154772 Returns an error +// if the target is not found, or is not an GA4 Property. // -// - name: Example format: accounts/1234/userLinks/5678. -func (r *AccountsUserLinksService) Get(name string) *AccountsUserLinksGetCall { - c := &AccountsUserLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Property to soft-delete. Format: +// properties/{property_id} Example: "properties/1000". +func (r *PropertiesService) Delete(name string) *PropertiesDeleteCall { + c := &PropertiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -5517,54 +7046,41 @@ func (r *AccountsUserLinksService) Get(name string) *AccountsUserLinksGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksGetCall) Fields(s ...googleapi.Field) *AccountsUserLinksGetCall { +func (c *PropertiesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsUserLinksGetCall) IfNoneMatch(entityTag string) *AccountsUserLinksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksGetCall) Context(ctx context.Context) *AccountsUserLinksGetCall { +func (c *PropertiesDeleteCall) Context(ctx context.Context) *PropertiesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksGetCall) Header() http.Header { +func (c *PropertiesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -5575,15 +7091,15 @@ func (c *AccountsUserLinksGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be +// Do executes the "analyticsadmin.properties.delete" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or +// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { +func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5602,7 +7118,7 @@ func (c *AccountsUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaUserLink{ + ret := &GoogleAnalyticsAdminV1alphaProperty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5614,77 +7130,58 @@ func (c *AccountsUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnal } return ret, nil // { - // "description": "Gets information about a user's link to an account or property.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.accounts.userLinks.get", + // "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. 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) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not an GA4 Property.", + // "flatPath": "v1alpha/properties/{propertiesId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Example format: accounts/1234/userLinks/5678", + // "description": "Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: \"properties/1000\"", // "location": "path", - // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users", - // "https://www.googleapis.com/auth/analytics.manage.users.readonly" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.accounts.userLinks.list": +// method id "analyticsadmin.properties.get": -type AccountsUserLinksListCall struct { +type PropertiesGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all user links on an account or property. +// Get: Lookup for a single "GA4" Property. // -// - parent: Example format: accounts/1234. -func (r *AccountsUserLinksService) List(parent string) *AccountsUserLinksListCall { - c := &AccountsUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of user links to return. The service may return fewer than this -// value. If unspecified, at most 200 user links will be returned. The -// maximum value is 500; values above 500 will be coerced to 500. -func (c *AccountsUserLinksListCall) PageSize(pageSize int64) *AccountsUserLinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListUserLinks` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListUserLinks` must match the call that provided the -// page token. -func (c *AccountsUserLinksListCall) PageToken(pageToken string) *AccountsUserLinksListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the property to lookup. Format: +// properties/{property_id} Example: "properties/1000". +func (r *PropertiesService) Get(name string) *PropertiesGetCall { + c := &PropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksListCall) Fields(s ...googleapi.Field) *AccountsUserLinksListCall { +func (c *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5694,7 +7191,7 @@ func (c *AccountsUserLinksListCall) Fields(s ...googleapi.Field) *AccountsUserLi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AccountsUserLinksListCall) IfNoneMatch(entityTag string) *AccountsUserLinksListCall { +func (c *PropertiesGetCall) IfNoneMatch(entityTag string) *PropertiesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5702,21 +7199,21 @@ func (c *AccountsUserLinksListCall) IfNoneMatch(entityTag string) *AccountsUserL // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksListCall) Context(ctx context.Context) *AccountsUserLinksListCall { +func (c *PropertiesGetCall) Context(ctx context.Context) *PropertiesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksListCall) Header() http.Header { +func (c *PropertiesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5729,7 +7226,7 @@ func (c *AccountsUserLinksListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5737,21 +7234,20 @@ func (c *AccountsUserLinksListCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListUserLinksResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaListUserLinksResponse.ServerResponse.Heade -// r or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListUserLinksResponse, error) { +func (c *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5770,7 +7266,7 @@ func (c *AccountsUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAna if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaListUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaProperty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5782,130 +7278,106 @@ func (c *AccountsUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAna } return ret, nil // { - // "description": "Lists all user links on an account or property.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks", + // "description": "Lookup for a single \"GA4\" Property.", + // "flatPath": "v1alpha/properties/{propertiesId}", // "httpMethod": "GET", - // "id": "analyticsadmin.accounts.userLinks.list", + // "id": "analyticsadmin.properties.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListUserLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUserLinks` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Example format: accounts/1234", + // "name": { + // "description": "Required. The name of the property to lookup. Format: properties/{property_id} Example: \"properties/1000\"", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users", - // "https://www.googleapis.com/auth/analytics.manage.users.readonly" + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsUserLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListUserLinksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "analyticsadmin.accounts.userLinks.patch": +// method id "analyticsadmin.properties.getAttributionSettings": -type AccountsUserLinksPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesGetAttributionSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a user link on an account or property. +// GetAttributionSettings: Lookup for a AttributionSettings singleton. // -// - name: Output only. Example format: properties/1234/userLinks/5678. -func (r *AccountsUserLinksService) Patch(name string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *AccountsUserLinksPatchCall { - c := &AccountsUserLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the attribution settings to retrieve. Format: +// properties/{property}/attributionSettings. +func (r *PropertiesService) GetAttributionSettings(name string) *PropertiesGetAttributionSettingsCall { + c := &PropertiesGetAttributionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphauserlink = googleanalyticsadminv1alphauserlink return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsUserLinksPatchCall) Fields(s ...googleapi.Field) *AccountsUserLinksPatchCall { +func (c *PropertiesGetAttributionSettingsCall) Fields(s ...googleapi.Field) *PropertiesGetAttributionSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesGetAttributionSettingsCall) IfNoneMatch(entityTag string) *PropertiesGetAttributionSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsUserLinksPatchCall) Context(ctx context.Context) *AccountsUserLinksPatchCall { +func (c *PropertiesGetAttributionSettingsCall) Context(ctx context.Context) *PropertiesGetAttributionSettingsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsUserLinksPatchCall) Header() http.Header { +func (c *PropertiesGetAttributionSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUserLinksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesGetAttributionSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphauserlink) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -5916,15 +7388,16 @@ func (c *AccountsUserLinksPatchCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.getAttributionSettings" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAttributionSettings or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaAttributionSettings.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { +func (c *PropertiesGetAttributionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAttributionSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5943,7 +7416,7 @@ func (c *AccountsUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAn if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaUserLink{ + ret := &GoogleAnalyticsAdminV1alphaAttributionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5955,125 +7428,128 @@ func (c *AccountsUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAn } return ret, nil // { - // "description": "Updates a user link on an account or property.", - // "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.accounts.userLinks.patch", + // "description": "Lookup for a AttributionSettings singleton.", + // "flatPath": "v1alpha/properties/{propertiesId}/attributionSettings", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.getAttributionSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Example format: properties/1234/userLinks/5678", + // "description": "Required. The name of the attribution settings to retrieve. Format: properties/{property}/attributionSettings", // "location": "path", - // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", + // "pattern": "^properties/[^/]+/attributionSettings$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" // ] // } } -// method id "analyticsadmin.properties.acknowledgeUserDataCollection": +// method id "analyticsadmin.properties.getDataRetentionSettings": -type PropertiesAcknowledgeUserDataCollectionCall struct { - s *Service - property string - googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesGetDataRetentionSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// AcknowledgeUserDataCollection: Acknowledges the terms of user data -// collection for the specified property. This acknowledgement must be -// completed (either in the Google Analytics UI or via this API) before -// MeasurementProtocolSecret resources may be created. +// GetDataRetentionSettings: Returns the singleton data retention +// settings for this property. // -// - property: The property for which to acknowledge user data -// collection. -func (r *PropertiesService) AcknowledgeUserDataCollection(property string, googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionRequest) *PropertiesAcknowledgeUserDataCollectionCall { - c := &PropertiesAcknowledgeUserDataCollectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.property = property - c.googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest = googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest +// - name: The name of the settings to lookup. Format: +// properties/{property}/dataRetentionSettings Example: +// "properties/1000/dataRetentionSettings". +func (r *PropertiesService) GetDataRetentionSettings(name string) *PropertiesGetDataRetentionSettingsCall { + c := &PropertiesGetDataRetentionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesAcknowledgeUserDataCollectionCall) Fields(s ...googleapi.Field) *PropertiesAcknowledgeUserDataCollectionCall { +func (c *PropertiesGetDataRetentionSettingsCall) Fields(s ...googleapi.Field) *PropertiesGetDataRetentionSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesGetDataRetentionSettingsCall) IfNoneMatch(entityTag string) *PropertiesGetDataRetentionSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesAcknowledgeUserDataCollectionCall) Context(ctx context.Context) *PropertiesAcknowledgeUserDataCollectionCall { +func (c *PropertiesGetDataRetentionSettingsCall) Context(ctx context.Context) *PropertiesGetDataRetentionSettingsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesAcknowledgeUserDataCollectionCall) Header() http.Header { +func (c *PropertiesGetDataRetentionSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAcknowledgeUserDataCollectionCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesGetDataRetentionSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+property}:acknowledgeUserDataCollection") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "property": c.property, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.acknowledgeUserDataCollection" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse or +// Do executes the "analyticsadmin.properties.getDataRetentionSettings" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaDataRetentionSettings or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse.Serv -// erResponse.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaDataRetentionSettings.ServerResponse.Heade +// r or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesAcknowledgeUserDataCollectionCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse, error) { +func (c *PropertiesGetDataRetentionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRetentionSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6092,7 +7568,7 @@ func (c *PropertiesAcknowledgeUserDataCollectionCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse{ + ret := &GoogleAnalyticsAdminV1alphaDataRetentionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6104,113 +7580,127 @@ func (c *PropertiesAcknowledgeUserDataCollectionCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or via this API) before MeasurementProtocolSecret resources may be created.", - // "flatPath": "v1alpha/properties/{propertiesId}:acknowledgeUserDataCollection", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.acknowledgeUserDataCollection", + // "description": "Returns the singleton data retention settings for this property.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataRetentionSettings", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.getDataRetentionSettings", // "parameterOrder": [ - // "property" + // "name" // ], // "parameters": { - // "property": { - // "description": "Required. The property for which to acknowledge user data collection.", + // "name": { + // "description": "Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: \"properties/1000/dataRetentionSettings\"", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/dataRetentionSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+property}:acknowledgeUserDataCollection", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaDataRetentionSettings" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" // ] // } } -// method id "analyticsadmin.properties.create": +// method id "analyticsadmin.properties.getGoogleSignalsSettings": -type PropertiesCreateCall struct { - s *Service - googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesGetGoogleSignalsSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an "GA4" property with the specified location and -// attributes. -func (r *PropertiesService) Create(googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty) *PropertiesCreateCall { - c := &PropertiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphaproperty = googleanalyticsadminv1alphaproperty +// GetGoogleSignalsSettings: Lookup for Google Signals settings for a +// property. +// +// - name: The name of the google signals settings to retrieve. Format: +// properties/{property}/googleSignalsSettings. +func (r *PropertiesService) GetGoogleSignalsSettings(name string) *PropertiesGetGoogleSignalsSettingsCall { + c := &PropertiesGetGoogleSignalsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesCreateCall) Fields(s ...googleapi.Field) *PropertiesCreateCall { +func (c *PropertiesGetGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) *PropertiesGetGoogleSignalsSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesGetGoogleSignalsSettingsCall) IfNoneMatch(entityTag string) *PropertiesGetGoogleSignalsSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesCreateCall) Context(ctx context.Context) *PropertiesCreateCall { +func (c *PropertiesGetGoogleSignalsSettingsCall) Context(ctx context.Context) *PropertiesGetGoogleSignalsSettingsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesCreateCall) Header() http.Header { +func (c *PropertiesGetGoogleSignalsSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesGetGoogleSignalsSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaproperty) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.getGoogleSignalsSettings" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings.ServerResponse.Heade +// r or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { +func (c *PropertiesGetGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleSignalsSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6229,7 +7719,7 @@ func (c *PropertiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalytic if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaProperty{ + ret := &GoogleAnalyticsAdminV1alphaGoogleSignalsSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6241,110 +7731,170 @@ func (c *PropertiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalytic } return ret, nil // { - // "description": "Creates an \"GA4\" property with the specified location and attributes.", - // "flatPath": "v1alpha/properties", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.create", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/properties", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaProperty" + // "description": "Lookup for Google Signals settings for a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/googleSignalsSettings", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.getGoogleSignalsSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the google signals settings to retrieve. Format: properties/{property}/googleSignalsSettings", + // "location": "path", + // "pattern": "^properties/[^/]+/googleSignalsSettings$", + // "required": true, + // "type": "string" + // } // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaProperty" + // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" // ] // } } -// method id "analyticsadmin.properties.delete": +// method id "analyticsadmin.properties.list": + +type PropertiesListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns child Properties under the specified parent Account. +// Only "GA4" properties will be returned. Properties will be excluded +// if the caller does not have access. Soft-deleted (ie: "trashed") +// properties are excluded by default. Returns an empty list if no +// relevant properties are found. +func (r *PropertiesService) List() *PropertiesListCall { + c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": Required. An expression +// for filtering the results of the request. Fields eligible for +// filtering are: `parent:`(The resource name of the parent +// account/property) or `ancestor:`(The resource name of the parent +// account) or `firebase_project:`(The id or number of the linked +// firebase project). Some examples of filters: ``` | Filter | +// Description | +// |-----------------------------|--------------------------------------- +// ----| | parent:accounts/123 | The account with account id: 123. | | +// parent:properties/123 | The property with property id: 123. | | +// ancestor:accounts/123 | The account with account id: 123. | | +// firebase_project:project-id | The firebase project with id: +// project-id. | | firebase_project:123 | The firebase project with +// number: 123. | ``` +func (c *PropertiesListCall) Filter(filter string) *PropertiesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of resources to return. The service may return fewer than this value, +// even if there are additional pages. If unspecified, at most 50 +// resources will be returned. The maximum value is 200; (higher values +// will be coerced to the maximum) +func (c *PropertiesListCall) PageSize(pageSize int64) *PropertiesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} -type PropertiesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListProperties` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListProperties` must match the call that provided the +// page token. +func (c *PropertiesListCall) PageToken(pageToken string) *PropertiesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -// Delete: Marks target Property as soft-deleted (ie: "trashed") and -// returns it. This API does not have a method to restore soft-deleted -// properties. 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) will be permanently purged. -// https://support.google.com/analytics/answer/6154772 Returns an error -// if the target is not found, or is not an GA4 Property. -// -// - name: The name of the Property to soft-delete. Format: -// properties/{property_id} Example: "properties/1000". -func (r *PropertiesService) Delete(name string) *PropertiesDeleteCall { - c := &PropertiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// ShowDeleted sets the optional parameter "showDeleted": Whether to +// include soft-deleted (ie: "trashed") Properties in the results. +// Properties can be inspected to determine whether they are deleted or +// not. +func (c *PropertiesListCall) ShowDeleted(showDeleted bool) *PropertiesListCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDeleteCall { +func (c *PropertiesListCall) Fields(s ...googleapi.Field) *PropertiesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesListCall) IfNoneMatch(entityTag string) *PropertiesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesDeleteCall) Context(ctx context.Context) *PropertiesDeleteCall { +func (c *PropertiesListCall) Context(ctx context.Context) *PropertiesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesDeleteCall) Header() http.Header { +func (c *PropertiesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.delete" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListPropertiesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListPropertiesResponse.ServerResponse.Head +// er or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { +func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListPropertiesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6363,7 +7913,7 @@ func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleAnalytic if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaProperty{ + ret := &GoogleAnalyticsAdminV1alphaListPropertiesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6375,105 +7925,142 @@ func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleAnalytic } return ret, nil // { - // "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. 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) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not an GA4 Property.", - // "flatPath": "v1alpha/properties/{propertiesId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.delete", - // "parameterOrder": [ - // "name" - // ], + // "description": "Returns child Properties under the specified parent Account. Only \"GA4\" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", + // "flatPath": "v1alpha/properties", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.list", + // "parameterOrder": [], // "parameters": { - // "name": { - // "description": "Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: \"properties/1000\"", - // "location": "path", - // "pattern": "^properties/[^/]+$", - // "required": true, + // "filter": { + // "description": "Required. An expression for filtering the results of the request. Fields eligible for filtering are: `parent:`(The resource name of the parent account/property) or `ancestor:`(The resource name of the parent account) or `firebase_project:`(The id or number of the linked firebase project). Some examples of filters: ``` | Filter | Description | |-----------------------------|-------------------------------------------| | parent:accounts/123 | The account with account id: 123. | | parent:properties/123 | The property with property id: 123. | | ancestor:accounts/123 | The account with account id: 123. | | firebase_project:project-id | The firebase project with id: project-id. | | firebase_project:123 | The firebase project with number: 123. | ```", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListProperties` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProperties` must match the call that provided the page token.", + // "location": "query", // "type": "string" + // }, + // "showDeleted": { + // "description": "Whether to include soft-deleted (ie: \"trashed\") Properties in the results. Properties can be inspected to determine whether they are deleted or not.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/properties", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaProperty" + // "$ref": "GoogleAnalyticsAdminV1alphaListPropertiesResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" // ] // } } -// method id "analyticsadmin.properties.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PropertiesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListPropertiesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type PropertiesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.patch": + +type PropertiesPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Lookup for a single "GA4" Property. +// Patch: Updates a property. // -// - name: The name of the property to lookup. Format: +// - name: Output only. Resource name of this property. Format: // properties/{property_id} Example: "properties/1000". -func (r *PropertiesService) Get(name string) *PropertiesGetCall { - c := &PropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *PropertiesService) Patch(name string, googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty) *PropertiesPatchCall { + c := &PropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphaproperty = googleanalyticsadminv1alphaproperty + return c +} + +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *PropertiesPatchCall) UpdateMask(updateMask string) *PropertiesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall { +func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *PropertiesGetCall) IfNoneMatch(entityTag string) *PropertiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesGetCall) Context(ctx context.Context) *PropertiesGetCall { +func (c *PropertiesPatchCall) Context(ctx context.Context) *PropertiesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesGetCall) Header() http.Header { +func (c *PropertiesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaproperty) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -6484,7 +8071,7 @@ func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.get" call. +// Do executes the "analyticsadmin.properties.patch" call. // Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or @@ -6492,7 +8079,7 @@ func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) { // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { +func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6523,106 +8110,119 @@ func (c *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAd } return ret, nil // { - // "description": "Lookup for a single \"GA4\" Property.", + // "description": "Updates a property.", // "flatPath": "v1alpha/properties/{propertiesId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.get", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the property to lookup. Format: properties/{property_id} Example: \"properties/1000\"", + // "description": "Output only. Resource name of this property. Format: properties/{property_id} Example: \"properties/1000\"", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "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.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" + // }, // "response": { // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.getAttributionSettings": +// method id "analyticsadmin.properties.updateAttributionSettings": -type PropertiesGetAttributionSettingsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesUpdateAttributionSettingsCall struct { + s *Service + name string + googleanalyticsadminv1alphaattributionsettings *GoogleAnalyticsAdminV1alphaAttributionSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetAttributionSettings: Lookup for a AttributionSettings singleton. +// UpdateAttributionSettings: Updates attribution settings on a +// property. // -// - name: The name of the attribution settings to retrieve. Format: -// properties/{property}/attributionSettings. -func (r *PropertiesService) GetAttributionSettings(name string) *PropertiesGetAttributionSettingsCall { - c := &PropertiesGetAttributionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name of this attribution settings +// resource. Format: properties/{property_id}/attributionSettings +// Example: "properties/1000/attributionSettings". +func (r *PropertiesService) UpdateAttributionSettings(name string, googleanalyticsadminv1alphaattributionsettings *GoogleAnalyticsAdminV1alphaAttributionSettings) *PropertiesUpdateAttributionSettingsCall { + c := &PropertiesUpdateAttributionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphaattributionsettings = googleanalyticsadminv1alphaattributionsettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *PropertiesUpdateAttributionSettingsCall) UpdateMask(updateMask string) *PropertiesUpdateAttributionSettingsCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesGetAttributionSettingsCall) Fields(s ...googleapi.Field) *PropertiesGetAttributionSettingsCall { +func (c *PropertiesUpdateAttributionSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateAttributionSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *PropertiesGetAttributionSettingsCall) IfNoneMatch(entityTag string) *PropertiesGetAttributionSettingsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesGetAttributionSettingsCall) Context(ctx context.Context) *PropertiesGetAttributionSettingsCall { +func (c *PropertiesUpdateAttributionSettingsCall) Context(ctx context.Context) *PropertiesUpdateAttributionSettingsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesGetAttributionSettingsCall) Header() http.Header { +func (c *PropertiesUpdateAttributionSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesGetAttributionSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesUpdateAttributionSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaattributionsettings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -6633,7 +8233,7 @@ func (c *PropertiesGetAttributionSettingsCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.getAttributionSettings" call. +// Do executes the "analyticsadmin.properties.updateAttributionSettings" call. // Exactly one of *GoogleAnalyticsAdminV1alphaAttributionSettings or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -6642,7 +8242,7 @@ func (c *PropertiesGetAttributionSettingsCall) doRequest(alt string) (*http.Resp // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesGetAttributionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAttributionSettings, error) { +func (c *PropertiesUpdateAttributionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAttributionSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6673,108 +8273,118 @@ func (c *PropertiesGetAttributionSettingsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lookup for a AttributionSettings singleton.", + // "description": "Updates attribution settings on a property.", // "flatPath": "v1alpha/properties/{propertiesId}/attributionSettings", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.getAttributionSettings", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.updateAttributionSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the attribution settings to retrieve. Format: properties/{property}/attributionSettings", + // "description": "Output only. Resource name of this attribution settings resource. Format: properties/{property_id}/attributionSettings Example: \"properties/1000/attributionSettings\"", // "location": "path", // "pattern": "^properties/[^/]+/attributionSettings$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "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.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings" + // }, // "response": { // "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.getDataRetentionSettings": +// method id "analyticsadmin.properties.updateDataRetentionSettings": -type PropertiesGetDataRetentionSettingsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesUpdateDataRetentionSettingsCall struct { + s *Service + name string + googleanalyticsadminv1alphadataretentionsettings *GoogleAnalyticsAdminV1alphaDataRetentionSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetDataRetentionSettings: Returns the singleton data retention +// UpdateDataRetentionSettings: Updates the singleton data retention // settings for this property. // -// - name: The name of the settings to lookup. Format: -// properties/{property}/dataRetentionSettings Example: -// "properties/1000/dataRetentionSettings". -func (r *PropertiesService) GetDataRetentionSettings(name string) *PropertiesGetDataRetentionSettingsCall { - c := &PropertiesGetDataRetentionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name for this DataRetentionSetting +// resource. Format: properties/{property}/dataRetentionSettings. +func (r *PropertiesService) UpdateDataRetentionSettings(name string, googleanalyticsadminv1alphadataretentionsettings *GoogleAnalyticsAdminV1alphaDataRetentionSettings) *PropertiesUpdateDataRetentionSettingsCall { + c := &PropertiesUpdateDataRetentionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphadataretentionsettings = googleanalyticsadminv1alphadataretentionsettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *PropertiesUpdateDataRetentionSettingsCall) UpdateMask(updateMask string) *PropertiesUpdateDataRetentionSettingsCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesGetDataRetentionSettingsCall) Fields(s ...googleapi.Field) *PropertiesGetDataRetentionSettingsCall { +func (c *PropertiesUpdateDataRetentionSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateDataRetentionSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *PropertiesGetDataRetentionSettingsCall) IfNoneMatch(entityTag string) *PropertiesGetDataRetentionSettingsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesGetDataRetentionSettingsCall) Context(ctx context.Context) *PropertiesGetDataRetentionSettingsCall { +func (c *PropertiesUpdateDataRetentionSettingsCall) Context(ctx context.Context) *PropertiesUpdateDataRetentionSettingsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesGetDataRetentionSettingsCall) Header() http.Header { +func (c *PropertiesUpdateDataRetentionSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesGetDataRetentionSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesUpdateDataRetentionSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphadataretentionsettings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -6785,7 +8395,7 @@ func (c *PropertiesGetDataRetentionSettingsCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.getDataRetentionSettings" call. +// Do executes the "analyticsadmin.properties.updateDataRetentionSettings" call. // Exactly one of *GoogleAnalyticsAdminV1alphaDataRetentionSettings or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -6794,7 +8404,7 @@ func (c *PropertiesGetDataRetentionSettingsCall) doRequest(alt string) (*http.Re // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesGetDataRetentionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRetentionSettings, error) { +func (c *PropertiesUpdateDataRetentionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRetentionSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6825,107 +8435,119 @@ func (c *PropertiesGetDataRetentionSettingsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns the singleton data retention settings for this property.", + // "description": "Updates the singleton data retention settings for this property.", // "flatPath": "v1alpha/properties/{propertiesId}/dataRetentionSettings", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.getDataRetentionSettings", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.updateDataRetentionSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: \"properties/1000/dataRetentionSettings\"", + // "description": "Output only. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings", // "location": "path", // "pattern": "^properties/[^/]+/dataRetentionSettings$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "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.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaDataRetentionSettings" + // }, // "response": { // "$ref": "GoogleAnalyticsAdminV1alphaDataRetentionSettings" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.getGoogleSignalsSettings": +// method id "analyticsadmin.properties.updateGoogleSignalsSettings": -type PropertiesGetGoogleSignalsSettingsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesUpdateGoogleSignalsSettingsCall struct { + s *Service + name string + googleanalyticsadminv1alphagooglesignalssettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetGoogleSignalsSettings: Lookup for Google Signals settings for a +// UpdateGoogleSignalsSettings: Updates Google Signals settings for a // property. // -// - name: The name of the google signals settings to retrieve. Format: -// properties/{property}/googleSignalsSettings. -func (r *PropertiesService) GetGoogleSignalsSettings(name string) *PropertiesGetGoogleSignalsSettingsCall { - c := &PropertiesGetGoogleSignalsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name of this setting. Format: +// properties/{property_id}/googleSignalsSettings Example: +// "properties/1000/googleSignalsSettings". +func (r *PropertiesService) UpdateGoogleSignalsSettings(name string, googleanalyticsadminv1alphagooglesignalssettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings) *PropertiesUpdateGoogleSignalsSettingsCall { + c := &PropertiesUpdateGoogleSignalsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphagooglesignalssettings = googleanalyticsadminv1alphagooglesignalssettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": 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. +func (c *PropertiesUpdateGoogleSignalsSettingsCall) UpdateMask(updateMask string) *PropertiesUpdateGoogleSignalsSettingsCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesGetGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) *PropertiesGetGoogleSignalsSettingsCall { +func (c *PropertiesUpdateGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateGoogleSignalsSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *PropertiesGetGoogleSignalsSettingsCall) IfNoneMatch(entityTag string) *PropertiesGetGoogleSignalsSettingsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesGetGoogleSignalsSettingsCall) Context(ctx context.Context) *PropertiesGetGoogleSignalsSettingsCall { +func (c *PropertiesUpdateGoogleSignalsSettingsCall) Context(ctx context.Context) *PropertiesUpdateGoogleSignalsSettingsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesGetGoogleSignalsSettingsCall) Header() http.Header { +func (c *PropertiesUpdateGoogleSignalsSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesGetGoogleSignalsSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesUpdateGoogleSignalsSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphagooglesignalssettings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -6936,7 +8558,7 @@ func (c *PropertiesGetGoogleSignalsSettingsCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.getGoogleSignalsSettings" call. +// Do executes the "analyticsadmin.properties.updateGoogleSignalsSettings" call. // Exactly one of *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -6945,7 +8567,7 @@ func (c *PropertiesGetGoogleSignalsSettingsCall) doRequest(alt string) (*http.Re // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesGetGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleSignalsSettings, error) { +func (c *PropertiesUpdateGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleSignalsSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6976,170 +8598,124 @@ func (c *PropertiesGetGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Lookup for Google Signals settings for a property.", + // "description": "Updates Google Signals settings for a property.", // "flatPath": "v1alpha/properties/{propertiesId}/googleSignalsSettings", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.getGoogleSignalsSettings", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.updateGoogleSignalsSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the google signals settings to retrieve. Format: properties/{property}/googleSignalsSettings", + // "description": "Output only. Resource name of this setting. Format: properties/{property_id}/googleSignalsSettings Example: \"properties/1000/googleSignalsSettings\"", // "location": "path", // "pattern": "^properties/[^/]+/googleSignalsSettings$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "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.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" + // }, // "response": { // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.list": - -type PropertiesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns child Properties under the specified parent Account. -// Only "GA4" properties will be returned. Properties will be excluded -// if the caller does not have access. Soft-deleted (ie: "trashed") -// properties are excluded by default. Returns an empty list if no -// relevant properties are found. -func (r *PropertiesService) List() *PropertiesListCall { - c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": Required. An expression -// for filtering the results of the request. Fields eligible for -// filtering are: `parent:`(The resource name of the parent -// account/property) or `ancestor:`(The resource name of the parent -// account) or `firebase_project:`(The id or number of the linked -// firebase project). Some examples of filters: ``` | Filter | -// Description | -// |-----------------------------|--------------------------------------- -// ----| | parent:accounts/123 | The account with account id: 123. | | -// parent:properties/123 | The property with property id: 123. | | -// ancestor:accounts/123 | The account with account id: 123. | | -// firebase_project:project-id | The firebase project with id: -// project-id. | | firebase_project:123 | The firebase project with -// number: 123. | ``` -func (c *PropertiesListCall) Filter(filter string) *PropertiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of resources to return. The service may return fewer than this value, -// even if there are additional pages. If unspecified, at most 50 -// resources will be returned. The maximum value is 200; (higher values -// will be coerced to the maximum) -func (c *PropertiesListCall) PageSize(pageSize int64) *PropertiesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} +// method id "analyticsadmin.properties.audiences.archive": -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListProperties` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListProperties` must match the call that provided the -// page token. -func (c *PropertiesListCall) PageToken(pageToken string) *PropertiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type PropertiesAudiencesArchiveCall struct { + s *Service + name string + googleanalyticsadminv1alphaarchiveaudiencerequest *GoogleAnalyticsAdminV1alphaArchiveAudienceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ShowDeleted sets the optional parameter "showDeleted": Whether to -// include soft-deleted (ie: "trashed") Properties in the results. -// Properties can be inspected to determine whether they are deleted or -// not. -func (c *PropertiesListCall) ShowDeleted(showDeleted bool) *PropertiesListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) +// Archive: Archives an Audience on a property. +// +// - name: Example format: properties/1234/audiences/5678. +func (r *PropertiesAudiencesService) Archive(name string, googleanalyticsadminv1alphaarchiveaudiencerequest *GoogleAnalyticsAdminV1alphaArchiveAudienceRequest) *PropertiesAudiencesArchiveCall { + c := &PropertiesAudiencesArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphaarchiveaudiencerequest = googleanalyticsadminv1alphaarchiveaudiencerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesListCall) Fields(s ...googleapi.Field) *PropertiesListCall { +func (c *PropertiesAudiencesArchiveCall) Fields(s ...googleapi.Field) *PropertiesAudiencesArchiveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *PropertiesListCall) IfNoneMatch(entityTag string) *PropertiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesListCall) Context(ctx context.Context) *PropertiesListCall { +func (c *PropertiesAudiencesArchiveCall) Context(ctx context.Context) *PropertiesAudiencesArchiveCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesListCall) Header() http.Header { +func (c *PropertiesAudiencesArchiveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAudiencesArchiveCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaarchiveaudiencerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:archive") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListPropertiesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaListPropertiesResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListPropertiesResponse, error) { +// Do executes the "analyticsadmin.properties.audiences.archive" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PropertiesAudiencesArchiveCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7158,7 +8734,7 @@ func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsA if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaListPropertiesResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7170,103 +8746,61 @@ func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsA } return ret, nil // { - // "description": "Returns child Properties under the specified parent Account. Only \"GA4\" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", - // "flatPath": "v1alpha/properties", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.list", - // "parameterOrder": [], + // "description": "Archives an Audience on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}:archive", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.audiences.archive", + // "parameterOrder": [ + // "name" + // ], // "parameters": { - // "filter": { - // "description": "Required. An expression for filtering the results of the request. Fields eligible for filtering are: `parent:`(The resource name of the parent account/property) or `ancestor:`(The resource name of the parent account) or `firebase_project:`(The id or number of the linked firebase project). Some examples of filters: ``` | Filter | Description | |-----------------------------|-------------------------------------------| | parent:accounts/123 | The account with account id: 123. | | parent:properties/123 | The property with property id: 123. | | ancestor:accounts/123 | The account with account id: 123. | | firebase_project:project-id | The firebase project with id: project-id. | | firebase_project:123 | The firebase project with number: 123. | ```", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListProperties` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProperties` must match the call that provided the page token.", - // "location": "query", + // "name": { + // "description": "Required. Example format: properties/1234/audiences/5678", + // "location": "path", + // "pattern": "^properties/[^/]+/audiences/[^/]+$", + // "required": true, // "type": "string" - // }, - // "showDeleted": { - // "description": "Whether to include soft-deleted (ie: \"trashed\") Properties in the results. Properties can be inspected to determine whether they are deleted or not.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/properties", + // "path": "v1alpha/{+name}:archive", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaArchiveAudienceRequest" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListPropertiesResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *PropertiesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListPropertiesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "analyticsadmin.properties.patch": +// method id "analyticsadmin.properties.audiences.create": -type PropertiesPatchCall struct { +type PropertiesAudiencesCreateCall struct { s *Service - name string - googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty + parent string + googleanalyticsadminv1alphaaudience *GoogleAnalyticsAdminV1alphaAudience urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a property. +// Create: Creates an Audience. // -// - name: Output only. Resource name of this property. Format: -// properties/{property_id} Example: "properties/1000". -func (r *PropertiesService) Patch(name string, googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty) *PropertiesPatchCall { - c := &PropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphaproperty = googleanalyticsadminv1alphaproperty - return c -} - -// UpdateMask sets the optional parameter "updateMask": 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. -func (c *PropertiesPatchCall) UpdateMask(updateMask string) *PropertiesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: Example format: properties/1234. +func (r *PropertiesAudiencesService) Create(parent string, googleanalyticsadminv1alphaaudience *GoogleAnalyticsAdminV1alphaAudience) *PropertiesAudiencesCreateCall { + c := &PropertiesAudiencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphaaudience = googleanalyticsadminv1alphaaudience return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall { +func (c *PropertiesAudiencesCreateCall) Fields(s ...googleapi.Field) *PropertiesAudiencesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7274,21 +8808,21 @@ func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesPatchCall) Context(ctx context.Context) *PropertiesPatchCall { +func (c *PropertiesAudiencesCreateCall) Context(ctx context.Context) *PropertiesAudiencesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesPatchCall) Header() http.Header { +func (c *PropertiesAudiencesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAudiencesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -7296,35 +8830,35 @@ func (c *PropertiesPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaproperty) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaudience) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/audiences") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be +// Do executes the "analyticsadmin.properties.audiences.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAudience or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or +// either *GoogleAnalyticsAdminV1alphaAudience.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { +func (c *PropertiesAudiencesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAudience, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7343,7 +8877,7 @@ func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalytics if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaProperty{ + ret := &GoogleAnalyticsAdminV1alphaAudience{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7355,119 +8889,108 @@ func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalytics } return ret, nil // { - // "description": "Updates a property.", - // "flatPath": "v1alpha/properties/{propertiesId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.patch", + // "description": "Creates an Audience.", + // "flatPath": "v1alpha/properties/{propertiesId}/audiences", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.audiences.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. Resource name of this property. Format: properties/{property_id} Example: \"properties/1000\"", + // "parent": { + // "description": "Required. Example format: properties/1234", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "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.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/audiences", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaProperty" + // "$ref": "GoogleAnalyticsAdminV1alphaAudience" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaProperty" + // "$ref": "GoogleAnalyticsAdminV1alphaAudience" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" // ] // } - -} - -// method id "analyticsadmin.properties.updateAttributionSettings": - -type PropertiesUpdateAttributionSettingsCall struct { - s *Service - name string - googleanalyticsadminv1alphaattributionsettings *GoogleAnalyticsAdminV1alphaAttributionSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + } -// UpdateAttributionSettings: Updates attribution settings on a -// property. -// -// - name: Output only. Resource name of this attribution settings -// resource. Format: properties/{property_id}/attributionSettings -// Example: "properties/1000/attributionSettings". -func (r *PropertiesService) UpdateAttributionSettings(name string, googleanalyticsadminv1alphaattributionsettings *GoogleAnalyticsAdminV1alphaAttributionSettings) *PropertiesUpdateAttributionSettingsCall { - c := &PropertiesUpdateAttributionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphaattributionsettings = googleanalyticsadminv1alphaattributionsettings - return c +// method id "analyticsadmin.properties.audiences.get": + +type PropertiesAudiencesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateMask sets the optional parameter "updateMask": 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. -func (c *PropertiesUpdateAttributionSettingsCall) UpdateMask(updateMask string) *PropertiesUpdateAttributionSettingsCall { - c.urlParams_.Set("updateMask", updateMask) +// Get: Lookup for a single Audience. +// +// - name: The name of the Audience to get. Example format: +// properties/1234/audiences/5678. +func (r *PropertiesAudiencesService) Get(name string) *PropertiesAudiencesGetCall { + c := &PropertiesAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesUpdateAttributionSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateAttributionSettingsCall { +func (c *PropertiesAudiencesGetCall) Fields(s ...googleapi.Field) *PropertiesAudiencesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesAudiencesGetCall) IfNoneMatch(entityTag string) *PropertiesAudiencesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesUpdateAttributionSettingsCall) Context(ctx context.Context) *PropertiesUpdateAttributionSettingsCall { +func (c *PropertiesAudiencesGetCall) Context(ctx context.Context) *PropertiesAudiencesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesUpdateAttributionSettingsCall) Header() http.Header { +func (c *PropertiesAudiencesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUpdateAttributionSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAudiencesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaattributionsettings) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -7478,16 +9001,15 @@ func (c *PropertiesUpdateAttributionSettingsCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.updateAttributionSettings" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAttributionSettings or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaAttributionSettings.ServerResponse.Header -// or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.audiences.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAudience or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaAudience.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesUpdateAttributionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAttributionSettings, error) { +func (c *PropertiesAudiencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAudience, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7506,7 +9028,7 @@ func (c *PropertiesUpdateAttributionSettingsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaAttributionSettings{ + ret := &GoogleAnalyticsAdminV1alphaAudience{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7518,138 +9040,144 @@ func (c *PropertiesUpdateAttributionSettingsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Updates attribution settings on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/attributionSettings", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.updateAttributionSettings", + // "description": "Lookup for a single Audience.", + // "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.audiences.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name of this attribution settings resource. Format: properties/{property_id}/attributionSettings Example: \"properties/1000/attributionSettings\"", + // "description": "Required. The name of the Audience to get. Example format: properties/1234/audiences/5678", // "location": "path", - // "pattern": "^properties/[^/]+/attributionSettings$", + // "pattern": "^properties/[^/]+/audiences/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "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.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings" - // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaAudience" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" // ] // } } -// method id "analyticsadmin.properties.updateDataRetentionSettings": +// method id "analyticsadmin.properties.audiences.list": -type PropertiesUpdateDataRetentionSettingsCall struct { - s *Service - name string - googleanalyticsadminv1alphadataretentionsettings *GoogleAnalyticsAdminV1alphaDataRetentionSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesAudiencesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateDataRetentionSettings: Updates the singleton data retention -// settings for this property. +// List: Lists Audiences on a property. // -// - name: Output only. Resource name for this DataRetentionSetting -// resource. Format: properties/{property}/dataRetentionSettings. -func (r *PropertiesService) UpdateDataRetentionSettings(name string, googleanalyticsadminv1alphadataretentionsettings *GoogleAnalyticsAdminV1alphaDataRetentionSettings) *PropertiesUpdateDataRetentionSettingsCall { - c := &PropertiesUpdateDataRetentionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphadataretentionsettings = googleanalyticsadminv1alphadataretentionsettings +// - parent: Example format: properties/1234. +func (r *PropertiesAudiencesService) List(parent string) *PropertiesAudiencesListCall { + c := &PropertiesAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UpdateMask sets the optional parameter "updateMask": 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. -func (c *PropertiesUpdateDataRetentionSettingsCall) UpdateMask(updateMask string) *PropertiesUpdateDataRetentionSettingsCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": 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). +func (c *PropertiesAudiencesListCall) PageSize(pageSize int64) *PropertiesAudiencesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListAudiences` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListAudiences` must match the call that provided the +// page token. +func (c *PropertiesAudiencesListCall) PageToken(pageToken string) *PropertiesAudiencesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesUpdateDataRetentionSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateDataRetentionSettingsCall { +func (c *PropertiesAudiencesListCall) Fields(s ...googleapi.Field) *PropertiesAudiencesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesAudiencesListCall) IfNoneMatch(entityTag string) *PropertiesAudiencesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesUpdateDataRetentionSettingsCall) Context(ctx context.Context) *PropertiesUpdateDataRetentionSettingsCall { +func (c *PropertiesAudiencesListCall) Context(ctx context.Context) *PropertiesAudiencesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesUpdateDataRetentionSettingsCall) Header() http.Header { +func (c *PropertiesAudiencesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUpdateDataRetentionSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAudiencesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphadataretentionsettings) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/audiences") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.updateDataRetentionSettings" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaDataRetentionSettings or +// Do executes the "analyticsadmin.properties.audiences.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListAudiencesResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaDataRetentionSettings.ServerResponse.Heade +// *GoogleAnalyticsAdminV1alphaListAudiencesResponse.ServerResponse.Heade // r or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesUpdateDataRetentionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRetentionSettings, error) { +func (c *PropertiesAudiencesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAudiencesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7668,7 +9196,7 @@ func (c *PropertiesUpdateDataRetentionSettingsCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaDataRetentionSettings{ + ret := &GoogleAnalyticsAdminV1alphaListAudiencesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7680,63 +9208,85 @@ func (c *PropertiesUpdateDataRetentionSettingsCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Updates the singleton data retention settings for this property.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataRetentionSettings", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.updateDataRetentionSettings", + // "description": "Lists Audiences on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/audiences", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.audiences.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings", - // "location": "path", - // "pattern": "^properties/[^/]+/dataRetentionSettings$", - // "required": true, - // "type": "string" + // "pageSize": { + // "description": "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).", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, - // "updateMask": { - // "description": "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.", - // "format": "google-fieldmask", + // "pageToken": { + // "description": "A page token, received from a previous `ListAudiences` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAudiences` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. Example format: properties/1234", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataRetentionSettings" - // }, + // "path": "v1alpha/{+parent}/audiences", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataRetentionSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaListAudiencesResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" // ] // } } -// method id "analyticsadmin.properties.updateGoogleSignalsSettings": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PropertiesAudiencesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAudiencesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type PropertiesUpdateGoogleSignalsSettingsCall struct { - s *Service - name string - googleanalyticsadminv1alphagooglesignalssettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.audiences.patch": + +type PropertiesAudiencesPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaaudience *GoogleAnalyticsAdminV1alphaAudience + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateGoogleSignalsSettings: Updates Google Signals settings for a -// property. +// Patch: Updates an Audience on a property. // -// - name: Output only. Resource name of this setting. Format: -// properties/{property_id}/googleSignalsSettings Example: -// "properties/1000/googleSignalsSettings". -func (r *PropertiesService) UpdateGoogleSignalsSettings(name string, googleanalyticsadminv1alphagooglesignalssettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings) *PropertiesUpdateGoogleSignalsSettingsCall { - c := &PropertiesUpdateGoogleSignalsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The resource name for this Audience resource. +// Format: properties/{propertyId}/audiences/{audienceId}. +func (r *PropertiesAudiencesService) Patch(name string, googleanalyticsadminv1alphaaudience *GoogleAnalyticsAdminV1alphaAudience) *PropertiesAudiencesPatchCall { + c := &PropertiesAudiencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphagooglesignalssettings = googleanalyticsadminv1alphagooglesignalssettings + c.googleanalyticsadminv1alphaaudience = googleanalyticsadminv1alphaaudience return c } @@ -7745,7 +9295,7 @@ func (r *PropertiesService) UpdateGoogleSignalsSettings(name string, googleanaly // (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. -func (c *PropertiesUpdateGoogleSignalsSettingsCall) UpdateMask(updateMask string) *PropertiesUpdateGoogleSignalsSettingsCall { +func (c *PropertiesAudiencesPatchCall) UpdateMask(updateMask string) *PropertiesAudiencesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -7753,7 +9303,7 @@ func (c *PropertiesUpdateGoogleSignalsSettingsCall) UpdateMask(updateMask string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesUpdateGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateGoogleSignalsSettingsCall { +func (c *PropertiesAudiencesPatchCall) Fields(s ...googleapi.Field) *PropertiesAudiencesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7761,21 +9311,21 @@ func (c *PropertiesUpdateGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *PropertiesUpdateGoogleSignalsSettingsCall) Context(ctx context.Context) *PropertiesUpdateGoogleSignalsSettingsCall { +func (c *PropertiesAudiencesPatchCall) Context(ctx context.Context) *PropertiesAudiencesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *PropertiesUpdateGoogleSignalsSettingsCall) Header() http.Header { +func (c *PropertiesAudiencesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUpdateGoogleSignalsSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAudiencesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -7783,7 +9333,7 @@ func (c *PropertiesUpdateGoogleSignalsSettingsCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphagooglesignalssettings) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaudience) if err != nil { return nil, err } @@ -7803,16 +9353,15 @@ func (c *PropertiesUpdateGoogleSignalsSettingsCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.updateGoogleSignalsSettings" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings.ServerResponse.Heade -// r or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.audiences.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAudience or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaAudience.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *PropertiesUpdateGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleSignalsSettings, error) { +func (c *PropertiesAudiencesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAudience, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7831,7 +9380,7 @@ func (c *PropertiesUpdateGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleAnalyticsAdminV1alphaGoogleSignalsSettings{ + ret := &GoogleAnalyticsAdminV1alphaAudience{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7843,18 +9392,18 @@ func (c *PropertiesUpdateGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Updates Google Signals settings for a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/googleSignalsSettings", + // "description": "Updates an Audience on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}", // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.updateGoogleSignalsSettings", + // "id": "analyticsadmin.properties.audiences.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name of this setting. Format: properties/{property_id}/googleSignalsSettings Example: \"properties/1000/googleSignalsSettings\"", + // "description": "Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}", // "location": "path", - // "pattern": "^properties/[^/]+/googleSignalsSettings$", + // "pattern": "^properties/[^/]+/audiences/[^/]+$", // "required": true, // "type": "string" // }, @@ -7867,10 +9416,10 @@ func (c *PropertiesUpdateGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOpt // }, // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaAudience" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaAudience" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 79e637cf9c3..1bcb9feff50 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -595,7 +595,7 @@ "type": "string" }, "updateMask": { - "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) - attachment", + "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) ", "format": "google-fieldmask", "location": "query", "type": "string" @@ -642,7 +642,7 @@ } } }, - "revision": "20220716", + "revision": "20220720", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -2627,13 +2627,17 @@ "readOnly": true, "type": "boolean" }, + "spaceDetails": { + "$ref": "SpaceDetails", + "description": "Details about the space including description and rules." + }, "threaded": { "description": "Output only. Whether messages are threaded in this space.", "readOnly": true, "type": "boolean" }, "type": { - "description": "Output only. Deprecated: Use `single_user_bot_dm` or `space_type` (developer preview) instead. The type of a space.", + "description": "Output only. Deprecated: Use `singleUserBotDm` or `spaceType` (developer preview) instead. The type of a space.", "enum": [ "TYPE_UNSPECIFIED", "ROOM", @@ -2650,6 +2654,21 @@ }, "type": "object" }, + "SpaceDetails": { + "description": "Details about the space including description and rules.", + "id": "SpaceDetails", + "properties": { + "description": { + "description": "Optional. A description of the space. It could describe the space's discussion topic, functional purpose, or participants.", + "type": "string" + }, + "guidelines": { + "description": "Optional. The space's rules, expectations, and etiquette.", + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 328a4d9b302..8d033922aa8 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -3359,11 +3359,15 @@ type Space struct { // Chat app and a single human. SingleUserBotDm bool `json:"singleUserBotDm,omitempty"` + // SpaceDetails: Details about the space including description and + // rules. + SpaceDetails *SpaceDetails `json:"spaceDetails,omitempty"` + // Threaded: Output only. Whether messages are threaded in this space. Threaded bool `json:"threaded,omitempty"` - // Type: Output only. Deprecated: Use `single_user_bot_dm` or - // `space_type` (developer preview) instead. The type of a space. + // Type: Output only. Deprecated: Use `singleUserBotDm` or `spaceType` + // (developer preview) instead. The type of a space. // // Possible values: // "TYPE_UNSPECIFIED" @@ -3400,6 +3404,39 @@ func (s *Space) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SpaceDetails: Details about the space including description and +// rules. +type SpaceDetails struct { + // Description: Optional. A description of the space. It could describe + // the space's discussion topic, functional purpose, or participants. + Description string `json:"description,omitempty"` + + // Guidelines: Optional. The space's rules, expectations, and etiquette. + Guidelines string `json:"guidelines,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SpaceDetails) MarshalJSON() ([]byte, error) { + type NoMethod SpaceDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -6237,8 +6274,7 @@ func (r *SpacesMessagesService) Update(name string, message *Message) *SpacesMes // UpdateMask sets the optional parameter "updateMask": Required. The // field paths to update. Separate multiple values with commas. // Currently supported field paths: - text - cards (Requires service -// account authentication (/chat/api/guides/auth/service-accounts).) - -// attachment +// account authentication (/chat/api/guides/auth/service-accounts).) func (c *SpacesMessagesUpdateCall) UpdateMask(updateMask string) *SpacesMessagesUpdateCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -6351,7 +6387,7 @@ func (c *SpacesMessagesUpdateCall) Do(opts ...googleapi.CallOption) (*Message, e // "type": "string" // }, // "updateMask": { - // "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) - attachment", + // "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) ", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 5dfaeaac3a4..e274304e827 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -5908,7 +5908,7 @@ } } }, - "revision": "20220713", + "revision": "20220720", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -6749,7 +6749,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, "kind": { "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsCustomBatchResponseEntry`\"", @@ -6944,7 +6944,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." } }, "type": "object" @@ -7044,7 +7044,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, "kind": { "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxCustomBatchResponseEntry`\"", @@ -7903,7 +7903,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." } }, "type": "object" @@ -8017,7 +8017,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." } }, "type": "object" @@ -9302,7 +9302,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, "kind": { "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localinventoryCustomBatchResponseEntry`\"", @@ -13353,7 +13353,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, "kind": { "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#productsCustomBatchResponseEntry`\"", @@ -13463,7 +13463,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors, if the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, "kind": { "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#productstatusesCustomBatchResponseEntry`\"", @@ -14017,7 +14017,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, "kind": { "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#regionalinventoryCustomBatchResponseEntry`\".", @@ -15689,7 +15689,7 @@ }, "errors": { "$ref": "Errors", - "description": "A list of errors defined if, and only if, the request failed." + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, "kind": { "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#shippingsettingsCustomBatchResponseEntry`\"", diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 6b51da9f200..6de8b9a37f9 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -2039,7 +2039,8 @@ type AccountsCustomBatchResponseEntry struct { // BatchId: The ID of the request entry this entry responds to. BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if and only if the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed @@ -2401,7 +2402,8 @@ type AccountstatusesCustomBatchResponseEntry struct { // BatchId: The ID of the request entry this entry responds to. BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if and only if the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // ForceSendFields is a list of field names (e.g. "AccountStatus") to @@ -2580,7 +2582,8 @@ type AccounttaxCustomBatchResponseEntry struct { // BatchId: The ID of the request entry this entry responds to. BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if and only if the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed @@ -3912,7 +3915,8 @@ type DatafeedsCustomBatchResponseEntry struct { // was successful. Datafeed *Datafeed `json:"datafeed,omitempty"` - // Errors: A list of errors defined if and only if the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // ForceSendFields is a list of field names (e.g. "BatchId") to @@ -4129,7 +4133,8 @@ type DatafeedstatusesCustomBatchResponseEntry struct { // if the request was successful. DatafeedStatus *DatafeedStatus `json:"datafeedStatus,omitempty"` - // Errors: A list of errors defined if and only if the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // ForceSendFields is a list of field names (e.g. "BatchId") to @@ -6425,7 +6430,8 @@ type LocalinventoryCustomBatchResponseEntry struct { // BatchId: The ID of the request entry this entry responds to. BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if and only if the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed @@ -13276,7 +13282,8 @@ type ProductsCustomBatchResponseEntry struct { // BatchId: The ID of the request entry this entry responds to. BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if and only if the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed @@ -13463,7 +13470,8 @@ type ProductstatusesCustomBatchResponseEntry struct { // BatchId: The ID of the request entry this entry responds to. BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors, if the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed @@ -14225,7 +14233,8 @@ type RegionalinventoryCustomBatchResponseEntry struct { // BatchId: The ID of the request entry this entry responds to. BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if and only if the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed @@ -17049,7 +17058,8 @@ type ShippingsettingsCustomBatchResponseEntry struct { // BatchId: The ID of the request entry to which this entry responds. BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if, and only if, the request failed. + // Errors: A list of errors for failed custombatch entries. *Note:* + // Schema errors fail the whole request. Errors *Errors `json:"errors,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed diff --git a/slides/v1/slides-api.json b/slides/v1/slides-api.json index 3460d98ca26..41fb10c2683 100644 --- a/slides/v1/slides-api.json +++ b/slides/v1/slides-api.json @@ -313,7 +313,7 @@ } } }, - "revision": "20220404", + "revision": "20220722", "rootUrl": "https://slides.googleapis.com/", "schemas": { "AffineTransform": { @@ -1037,20 +1037,20 @@ "type": "object" }, "CreateSlideRequest": { - "description": "Creates a new slide.", + "description": "Creates a slide.", "id": "CreateSlideRequest", "properties": { "insertionIndex": { - "description": "The optional zero-based index indicating where to insert the slides. If you don't specify an index, the new slide is created at the end.", + "description": "The optional zero-based index indicating where to insert the slides. If you don't specify an index, the slide is created at the end.", "format": "int32", "type": "integer" }, "objectId": { - "description": "A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated.", + "description": "A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The ID length must be between 5 and 50 characters, inclusive. If you don't specify an ID, a unique one is generated.", "type": "string" }, "placeholderIdMappings": { - "description": "An optional list of object ID mappings from the placeholder(s) on the layout to the placeholder(s) that will be created on the new slide from that specified layout. Can only be used when `slide_layout_reference` is specified.", + "description": "An optional list of object ID mappings from the placeholder(s) on the layout to the placeholders that are created on the slide from the specified layout. Can only be used when `slide_layout_reference` is specified.", "items": { "$ref": "LayoutPlaceholderIdMapping" }, @@ -1058,7 +1058,7 @@ }, "slideLayoutReference": { "$ref": "LayoutReference", - "description": "Layout reference of the slide to be inserted, based on the *current master*, which is one of the following: - The master of the previous slide index. - The master of the first slide, if the insertion_index is zero. - The first master in the presentation, if there are no slides. If the LayoutReference is not found in the current master, a 400 bad request error is returned. If you don't specify a layout reference, then the new slide will use the predefined layout `BLANK`." + "description": "Layout reference of the slide to be inserted, based on the *current master*, which is one of the following: - The master of the previous slide index. - The master of the first slide, if the insertion_index is zero. - The first master in the presentation, if there are no slides. If the LayoutReference is not found in the current master, a 400 bad request error is returned. If you don't specify a layout reference, the slide uses the predefined `BLANK` layout." } }, "type": "object" diff --git a/slides/v1/slides-gen.go b/slides/v1/slides-gen.go index b9ed3b2301b..4ebb98f204c 100644 --- a/slides/v1/slides-gen.go +++ b/slides/v1/slides-gen.go @@ -1272,10 +1272,10 @@ func (s *CreateSheetsChartResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CreateSlideRequest: Creates a new slide. +// CreateSlideRequest: Creates a slide. type CreateSlideRequest struct { // InsertionIndex: The optional zero-based index indicating where to - // insert the slides. If you don't specify an index, the new slide is + // insert the slides. If you don't specify an index, the slide is // created at the end. InsertionIndex int64 `json:"insertionIndex,omitempty"` @@ -1283,15 +1283,15 @@ type CreateSlideRequest struct { // unique among all pages and page elements in the presentation. The ID // must start with an alphanumeric character or an underscore (matches // regex `[a-zA-Z0-9_]`); remaining characters may include those as well - // as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of - // the ID must not be less than 5 or greater than 50. If you don't - // specify an ID, a unique one is generated. + // as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The ID length + // must be between 5 and 50 characters, inclusive. If you don't specify + // an ID, a unique one is generated. ObjectId string `json:"objectId,omitempty"` // PlaceholderIdMappings: An optional list of object ID mappings from - // the placeholder(s) on the layout to the placeholder(s) that will be - // created on the new slide from that specified layout. Can only be used - // when `slide_layout_reference` is specified. + // the placeholder(s) on the layout to the placeholders that are created + // on the slide from the specified layout. Can only be used when + // `slide_layout_reference` is specified. PlaceholderIdMappings []*LayoutPlaceholderIdMapping `json:"placeholderIdMappings,omitempty"` // SlideLayoutReference: Layout reference of the slide to be inserted, @@ -1300,8 +1300,8 @@ type CreateSlideRequest struct { // if the insertion_index is zero. - The first master in the // presentation, if there are no slides. If the LayoutReference is not // found in the current master, a 400 bad request error is returned. If - // you don't specify a layout reference, then the new slide will use the - // predefined layout `BLANK`. + // you don't specify a layout reference, the slide uses the predefined + // `BLANK` layout. SlideLayoutReference *LayoutReference `json:"slideLayoutReference,omitempty"` // ForceSendFields is a list of field names (e.g. "InsertionIndex") to