diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index bd3be903620..6b26671391b 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -149,7 +149,7 @@ "accounts": { "methods": { "delete": { - "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.", + "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, AccessBindings) 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", @@ -632,304 +632,6 @@ ] } } - }, - "userLinks": { - "methods": { - "audit": { - "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": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Example format: accounts/1234", - "location": "path", - "pattern": "^accounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/userLinks:audit", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users", - "https://www.googleapis.com/auth/analytics.manage.users.readonly" - ] - }, - "batchCreate": { - "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": { - "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" - } - }, - "path": "v1alpha/{+parent}/userLinks:batchCreate", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" - ] - }, - "batchDelete": { - "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": [ - "parent" - ], - "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", - "location": "path", - "pattern": "^accounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/userLinks:batchDelete", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest" - }, - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" - ] - }, - "batchGet": { - "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": "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users", - "https://www.googleapis.com/auth/analytics.manage.users.readonly" - ] - }, - "batchUpdate": { - "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", - "parameterOrder": [ - "parent" - ], - "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", - "location": "path", - "pattern": "^accounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/userLinks:batchUpdate", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" - ] - }, - "create": { - "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.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", - "pattern": "^accounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/userLinks", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" - ] - }, - "delete": { - "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" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" - ] - }, - "get": { - "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": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Example format: accounts/1234/userLinks/5678", - "location": "path", - "pattern": "^accounts/[^/]+/userLinks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users", - "https://www.googleapis.com/auth/analytics.manage.users.readonly" - ] - }, - "list": { - "description": "Lists all user links on an account or property.", - "flatPath": "v1alpha/accounts/{accountsId}/userLinks", - "httpMethod": "GET", - "id": "analyticsadmin.accounts.userLinks.list", - "parameterOrder": [ - "parent" - ], - "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", - "location": "path", - "pattern": "^accounts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/userLinks", - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaListUserLinksResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users", - "https://www.googleapis.com/auth/analytics.manage.users.readonly" - ] - }, - "patch": { - "description": "Updates a user link on an account or property.", - "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", - "httpMethod": "PATCH", - "id": "analyticsadmin.accounts.userLinks.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Output only. Example format: properties/1234/userLinks/5678", - "location": "path", - "pattern": "^accounts/[^/]+/userLinks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" - ] - } - } } } }, @@ -1036,7 +738,7 @@ ] }, "delete": { - "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 a GA4 Property.", + "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, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", "flatPath": "v1alpha/properties/{propertiesId}", "httpMethod": "DELETE", "id": "analyticsadmin.properties.delete", @@ -4359,433 +4061,129 @@ }, "path": "v1alpha/{+name}", "response": { - "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.edit", - "https://www.googleapis.com/auth/analytics.readonly" - ] - }, - "list": { - "description": "Lists all SearchAds360Links on a property.", - "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links", - "httpMethod": "GET", - "id": "analyticsadmin.properties.searchAds360Links.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 `ListSearchAds360Links` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSearchAds360Links` 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}/searchAds360Links", - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.edit", - "https://www.googleapis.com/auth/analytics.readonly" - ] - }, - "patch": { - "description": "Updates a SearchAds360Link on a property.", - "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links/{searchAds360LinksId}", - "httpMethod": "PATCH", - "id": "analyticsadmin.properties.searchAds360Links.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Output only. The resource name for this SearchAds360Link resource. Format: properties/{propertyId}/searchAds360Links/{linkId} Note: linkId is not the Search Ads 360 advertiser ID", - "location": "path", - "pattern": "^properties/[^/]+/searchAds360Links/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to be updated. 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": "GoogleAnalyticsAdminV1alphaSearchAds360Link" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.edit" - ] - } - } - }, - "subpropertyEventFilters": { - "methods": { - "create": { - "description": "Creates a subproperty Event Filter.", - "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters", - "httpMethod": "POST", - "id": "analyticsadmin.properties.subpropertyEventFilters.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The ordinary property for which to create a subproperty event filter. Format: properties/property_id Example: properties/123", - "location": "path", - "pattern": "^properties/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/subpropertyEventFilters", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.edit" - ] - }, - "delete": { - "description": "Deletes a subproperty event filter.", - "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", - "httpMethod": "DELETE", - "id": "analyticsadmin.properties.subpropertyEventFilters.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Resource name of the subproperty event filter to delete. Format: properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: properties/123/subpropertyEventFilters/456", - "location": "path", - "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.edit" - ] - }, - "get": { - "description": "Lookup for a single subproperty Event Filter.", - "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", - "httpMethod": "GET", - "id": "analyticsadmin.properties.subpropertyEventFilters.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Resource name of the subproperty event filter to lookup. Format: properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: properties/123/subpropertyEventFilters/456", - "location": "path", - "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.edit", - "https://www.googleapis.com/auth/analytics.readonly" - ] - }, - "list": { - "description": "List all subproperty Event Filters on a property.", - "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters", - "httpMethod": "GET", - "id": "analyticsadmin.properties.subpropertyEventFilters.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. 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": "Optional. A page token, received from a previous `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubpropertyEventFilters` must match the call that provided the page token.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Resource name of the ordinary property. Format: properties/property_id Example: properties/123", - "location": "path", - "pattern": "^properties/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/subpropertyEventFilters", - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.edit", - "https://www.googleapis.com/auth/analytics.readonly" - ] - }, - "patch": { - "description": "Updates a subproperty Event Filter.", - "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", - "httpMethod": "PATCH", - "id": "analyticsadmin.properties.subpropertyEventFilters.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Output only. Format: properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter} Example: properties/1234/subpropertyEventFilters/5678", - "location": "path", - "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The list of fields to update. Field names must be in snake case (for example, \"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": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.edit" - ] - } - } - }, - "userLinks": { - "methods": { - "audit": { - "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/properties/{propertiesId}/userLinks:audit", - "httpMethod": "POST", - "id": "analyticsadmin.properties.userLinks.audit", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Example format: accounts/1234", - "location": "path", - "pattern": "^properties/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/userLinks:audit", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users", - "https://www.googleapis.com/auth/analytics.manage.users.readonly" - ] - }, - "batchCreate": { - "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/properties/{propertiesId}/userLinks:batchCreate", - "httpMethod": "POST", - "id": "analyticsadmin.properties.userLinks.batchCreate", - "parameterOrder": [ - "parent" - ], - "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", - "location": "path", - "pattern": "^properties/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/userLinks:batchCreate", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" - ] - }, - "batchDelete": { - "description": "Deletes information about multiple users' links to an account or property.", - "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchDelete", - "httpMethod": "POST", - "id": "analyticsadmin.properties.userLinks.batchDelete", - "parameterOrder": [ - "parent" - ], - "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", - "location": "path", - "pattern": "^properties/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/userLinks:batchDelete", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest" - }, - "response": { - "$ref": "GoogleProtobufEmpty" + "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" }, "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" ] }, - "batchGet": { - "description": "Gets information about multiple users' links to an account or property.", - "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchGet", + "list": { + "description": "Lists all SearchAds360Links on a property.", + "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links", "httpMethod": "GET", - "id": "analyticsadmin.properties.userLinks.batchGet", + "id": "analyticsadmin.properties.searchAds360Links.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 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 `ListSearchAds360Links` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSearchAds360Links` 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: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, "type": "string" } }, - "path": "v1alpha/{+parent}/userLinks:batchGet", + "path": "v1alpha/{+parent}/searchAds360Links", "response": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse" + "$ref": "GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse" }, "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" ] }, - "batchUpdate": { - "description": "Updates information about multiple users' links to an account or property.", - "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchUpdate", - "httpMethod": "POST", - "id": "analyticsadmin.properties.userLinks.batchUpdate", + "patch": { + "description": "Updates a SearchAds360Link on a property.", + "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links/{searchAds360LinksId}", + "httpMethod": "PATCH", + "id": "analyticsadmin.properties.searchAds360Links.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. The resource name for this SearchAds360Link resource. Format: properties/{propertyId}/searchAds360Links/{linkId} Note: linkId is not the Search Ads 360 advertiser ID", "location": "path", - "pattern": "^properties/[^/]+$", + "pattern": "^properties/[^/]+/searchAds360Links/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to be updated. 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/{+parent}/userLinks:batchUpdate", + "path": "v1alpha/{+name}", "request": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest" + "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" }, "response": { - "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse" + "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" }, "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" + "https://www.googleapis.com/auth/analytics.edit" ] - }, + } + } + }, + "subpropertyEventFilters": { + "methods": { "create": { - "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/properties/{propertiesId}/userLinks", + "description": "Creates a subproperty Event Filter.", + "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters", "httpMethod": "POST", - "id": "analyticsadmin.properties.userLinks.create", + "id": "analyticsadmin.properties.subpropertyEventFilters.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", + "description": "Required. The ordinary property for which to create a subproperty event filter. Format: properties/property_id Example: properties/123", "location": "path", "pattern": "^properties/[^/]+$", "required": true, "type": "string" } }, - "path": "v1alpha/{+parent}/userLinks", + "path": "v1alpha/{+parent}/subpropertyEventFilters", "request": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" }, "response": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" }, "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" + "https://www.googleapis.com/auth/analytics.edit" ] }, "delete": { - "description": "Deletes a user link on an account or property.", - "flatPath": "v1alpha/properties/{propertiesId}/userLinks/{userLinksId}", + "description": "Deletes a subproperty event filter.", + "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", "httpMethod": "DELETE", - "id": "analyticsadmin.properties.userLinks.delete", + "id": "analyticsadmin.properties.subpropertyEventFilters.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Example format: accounts/1234/userLinks/5678", + "description": "Required. Resource name of the subproperty event filter to delete. Format: properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: properties/123/subpropertyEventFilters/456", "location": "path", - "pattern": "^properties/[^/]+/userLinks/[^/]+$", + "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", "required": true, "type": "string" } @@ -4795,98 +4193,104 @@ "$ref": "GoogleProtobufEmpty" }, "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" + "https://www.googleapis.com/auth/analytics.edit" ] }, "get": { - "description": "Gets information about a user's link to an account or property.", - "flatPath": "v1alpha/properties/{propertiesId}/userLinks/{userLinksId}", + "description": "Lookup for a single subproperty Event Filter.", + "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", "httpMethod": "GET", - "id": "analyticsadmin.properties.userLinks.get", + "id": "analyticsadmin.properties.subpropertyEventFilters.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Example format: accounts/1234/userLinks/5678", + "description": "Required. Resource name of the subproperty event filter to lookup. Format: properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: properties/123/subpropertyEventFilters/456", "location": "path", - "pattern": "^properties/[^/]+/userLinks/[^/]+$", + "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", "required": true, "type": "string" } }, "path": "v1alpha/{+name}", "response": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" }, "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" ] }, "list": { - "description": "Lists all user links on an account or property.", - "flatPath": "v1alpha/properties/{propertiesId}/userLinks", + "description": "List all subproperty Event Filters on a property.", + "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters", "httpMethod": "GET", - "id": "analyticsadmin.properties.userLinks.list", + "id": "analyticsadmin.properties.subpropertyEventFilters.list", "parameterOrder": [ "parent" ], "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.", + "description": "Optional. 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 `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.", + "description": "Optional. A page token, received from a previous `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubpropertyEventFilters` must match the call that provided the page token.", "location": "query", "type": "string" }, "parent": { - "description": "Required. Example format: accounts/1234", + "description": "Required. Resource name of the ordinary property. Format: properties/property_id Example: properties/123", "location": "path", "pattern": "^properties/[^/]+$", "required": true, "type": "string" } }, - "path": "v1alpha/{+parent}/userLinks", + "path": "v1alpha/{+parent}/subpropertyEventFilters", "response": { - "$ref": "GoogleAnalyticsAdminV1alphaListUserLinksResponse" + "$ref": "GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse" }, "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" ] }, "patch": { - "description": "Updates a user link on an account or property.", - "flatPath": "v1alpha/properties/{propertiesId}/userLinks/{userLinksId}", + "description": "Updates a subproperty Event Filter.", + "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", "httpMethod": "PATCH", - "id": "analyticsadmin.properties.userLinks.patch", + "id": "analyticsadmin.properties.subpropertyEventFilters.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Output only. Example format: properties/1234/userLinks/5678", + "description": "Output only. Format: properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter} Example: properties/1234/subpropertyEventFilters/5678", "location": "path", - "pattern": "^properties/[^/]+/userLinks/[^/]+$", + "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to update. Field names must be in snake case (for example, \"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": "GoogleAnalyticsAdminV1alphaUserLink" + "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" }, "response": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" }, "scopes": [ - "https://www.googleapis.com/auth/analytics.manage.users" + "https://www.googleapis.com/auth/analytics.edit" ] } } @@ -4894,7 +4298,7 @@ } } }, - "revision": "20231001", + "revision": "20231003", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -5912,69 +5316,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaAuditUserLink": { - "description": "Read-only resource used to summarize a principal's effective roles.", - "id": "GoogleAnalyticsAdminV1alphaAuditUserLink", - "properties": { - "directRoles": { - "description": "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.", - "items": { - "type": "string" - }, - "type": "array" - }, - "effectiveRoles": { - "description": "Union of all permissions a user has at this account or property (includes direct permissions, group-inherited permissions, etc.). Format: predefinedRoles/viewer", - "items": { - "type": "string" - }, - "type": "array" - }, - "emailAddress": { - "description": "Email address of the linked user", - "type": "string" - }, - "name": { - "description": "Example format: properties/1234/userLinks/5678", - "type": "string" - } - }, - "type": "object" - }, - "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest": { - "description": "Request message for AuditUserLinks RPC.", - "id": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest", - "properties": { - "pageSize": { - "description": "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.", - "format": "int32", - "type": "integer" - }, - "pageToken": { - "description": "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.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse": { - "description": "Response message for AuditUserLinks RPC.", - "id": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse", - "properties": { - "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" - }, - "userLinks": { - "description": "List of AuditUserLinks. These will be ordered stably, but in an arbitrary order.", - "items": { - "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLink" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest": { "description": "Request message for BatchCreateAccessBindings RPC.", "id": "GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest", @@ -6003,38 +5344,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest": { - "description": "Request message for BatchCreateUserLinks RPC.", - "id": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest", - "properties": { - "notifyNewUsers": { - "description": "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.", - "type": "boolean" - }, - "requests": { - "description": "Required. The requests specifying the user links to create. A maximum of 1000 user links can be created in a batch.", - "items": { - "$ref": "GoogleAnalyticsAdminV1alphaCreateUserLinkRequest" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse": { - "description": "Response message for BatchCreateUserLinks RPC.", - "id": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse", - "properties": { - "userLinks": { - "description": "The user links created.", - "items": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest": { "description": "Request message for BatchDeleteAccessBindings RPC.", "id": "GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest", @@ -6049,20 +5358,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest": { - "description": "Request message for BatchDeleteUserLinks RPC.", - "id": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest", - "properties": { - "requests": { - "description": "Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch.", - "items": { - "$ref": "GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse": { "description": "Response message for BatchGetAccessBindings RPC.", "id": "GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse", @@ -6077,20 +5372,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse": { - "description": "Response message for BatchGetUserLinks RPC.", - "id": "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse", - "properties": { - "userLinks": { - "description": "The requested user links.", - "items": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest": { "description": "Request message for BatchUpdateAccessBindings RPC.", "id": "GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest", @@ -6119,34 +5400,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest": { - "description": "Request message for BatchUpdateUserLinks RPC.", - "id": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest", - "properties": { - "requests": { - "description": "Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch.", - "items": { - "$ref": "GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse": { - "description": "Response message for BatchUpdateUserLinks RPC.", - "id": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse", - "properties": { - "userLinks": { - "description": "The user links updated.", - "items": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaBigQueryLink": { "description": "A link between a GA4 Property and BigQuery project.", "id": "GoogleAnalyticsAdminV1alphaBigQueryLink", @@ -6735,25 +5988,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaCreateUserLinkRequest": { - "description": "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.", - "id": "GoogleAnalyticsAdminV1alphaCreateUserLinkRequest", - "properties": { - "notifyNewUser": { - "description": "Optional. If set, then email the new user notifying them that they've been granted permissions to the resource.", - "type": "boolean" - }, - "parent": { - "description": "Required. Example format: accounts/1234", - "type": "string" - }, - "userLink": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink", - "description": "Required. The user link to create." - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaCustomDimension": { "description": "A definition for a CustomDimension.", "id": "GoogleAnalyticsAdminV1alphaCustomDimension", @@ -7111,17 +6345,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest": { - "description": "Request message for DeleteUserLink RPC.", - "id": "GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest", - "properties": { - "name": { - "description": "Required. Example format: accounts/1234/userLinks/5678", - "type": "string" - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink": { "description": "A link between a GA4 property and a Display \u0026 Video 360 advertiser.", "id": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink", @@ -8115,24 +7338,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaListUserLinksResponse": { - "description": "Response message for ListUserLinks RPC.", - "id": "GoogleAnalyticsAdminV1alphaListUserLinksResponse", - "properties": { - "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" - }, - "userLinks": { - "description": "List of UserLinks. These will be ordered stably, but in an arbitrary order.", - "items": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaMatchingCondition": { "description": "Defines a condition for when an Event Edit or Event Creation rule applies to an event.", "id": "GoogleAnalyticsAdminV1alphaMatchingCondition", @@ -8952,40 +8157,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest": { - "description": "Request message for UpdateUserLink RPC.", - "id": "GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest", - "properties": { - "userLink": { - "$ref": "GoogleAnalyticsAdminV1alphaUserLink", - "description": "Required. The user link to update." - } - }, - "type": "object" - }, - "GoogleAnalyticsAdminV1alphaUserLink": { - "description": "A resource message representing a user's permissions on an Account or Property resource.", - "id": "GoogleAnalyticsAdminV1alphaUserLink", - "properties": { - "directRoles": { - "description": "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.", - "items": { - "type": "string" - }, - "type": "array" - }, - "emailAddress": { - "description": "Immutable. Email address of the user to link", - "type": "string" - }, - "name": { - "description": "Output only. Example format: properties/1234/userLinks/5678", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, "GoogleProtobufEmpty": { "description": "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); }", "id": "GoogleProtobufEmpty", diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 499d8d96669..76abf37021c 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -185,7 +185,6 @@ type AccountSummariesService struct { func NewAccountsService(s *Service) *AccountsService { rs := &AccountsService{s: s} rs.AccessBindings = NewAccountsAccessBindingsService(s) - rs.UserLinks = NewAccountsUserLinksService(s) return rs } @@ -193,8 +192,6 @@ type AccountsService struct { s *Service AccessBindings *AccountsAccessBindingsService - - UserLinks *AccountsUserLinksService } func NewAccountsAccessBindingsService(s *Service) *AccountsAccessBindingsService { @@ -206,15 +203,6 @@ type AccountsAccessBindingsService struct { s *Service } -func NewAccountsUserLinksService(s *Service) *AccountsUserLinksService { - rs := &AccountsUserLinksService{s: s} - return rs -} - -type AccountsUserLinksService struct { - s *Service -} - func NewPropertiesService(s *Service) *PropertiesService { rs := &PropertiesService{s: s} rs.AccessBindings = NewPropertiesAccessBindingsService(s) @@ -234,7 +222,6 @@ func NewPropertiesService(s *Service) *PropertiesService { rs.RollupPropertySourceLinks = NewPropertiesRollupPropertySourceLinksService(s) rs.SearchAds360Links = NewPropertiesSearchAds360LinksService(s) rs.SubpropertyEventFilters = NewPropertiesSubpropertyEventFiltersService(s) - rs.UserLinks = NewPropertiesUserLinksService(s) return rs } @@ -274,8 +261,6 @@ type PropertiesService struct { SearchAds360Links *PropertiesSearchAds360LinksService SubpropertyEventFilters *PropertiesSubpropertyEventFiltersService - - UserLinks *PropertiesUserLinksService } func NewPropertiesAccessBindingsService(s *Service) *PropertiesAccessBindingsService { @@ -467,15 +452,6 @@ type PropertiesSubpropertyEventFiltersService struct { s *Service } -func NewPropertiesUserLinksService(s *Service) *PropertiesUserLinksService { - rs := &PropertiesUserLinksService{s: s} - return rs -} - -type PropertiesUserLinksService struct { - s *Service -} - // GoogleAnalyticsAdminV1alphaAccessBetweenFilter: To express that the // result needs to be between two numbers (inclusive). type GoogleAnalyticsAdminV1alphaAccessBetweenFilter struct { @@ -2322,126 +2298,6 @@ func (s *GoogleAnalyticsAdminV1alphaAudienceSimpleFilter) 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"` - - // 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"` - - // EmailAddress: Email address of the linked user - EmailAddress string `json:"emailAddress,omitempty"` - - // Name: Example format: properties/1234/userLinks/5678 - Name string `json:"name,omitempty"` - - // 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 *GoogleAnalyticsAdminV1alphaAuditUserLink) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLink - 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"` - - // 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"` - - // 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:"-"` - - // 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:"-"` -} - -func (s *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksRequest - 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"` - - // 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 *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest: Request // message for BatchCreateAccessBindings RPC. type GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest struct { @@ -2506,76 +2362,6 @@ func (s *GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse) MarshalJS 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 - // 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. "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 []string `json:"-"` -} - -func (s *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest - 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"` - - // 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 - // 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. "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 *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest: Request // message for BatchDeleteAccessBindings RPC. type GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest struct { @@ -2606,36 +2392,6 @@ func (s *GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest) MarshalJSO 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"` - - // 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:"-"` - - // 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 *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse: Response // message for BatchGetAccessBindings RPC. type GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse struct { @@ -2670,39 +2426,6 @@ func (s *GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse) MarshalJSON( 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:"-"` - - // 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. "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 *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest: Request // message for BatchUpdateAccessBindings RPC. type GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest struct { @@ -2767,69 +2490,6 @@ func (s *GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse) MarshalJS 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"` - - // 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:"-"` - - // 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 *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest - 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 - // 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. "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 *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleAnalyticsAdminV1alphaBigQueryLink: A link between a GA4 // Property and BigQuery project. type GoogleAnalyticsAdminV1alphaBigQueryLink struct { @@ -3752,48 +3412,6 @@ func (s *GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse) MarshalJSON() ([] 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"` - - // UserLink: Required. The user link to create. - UserLink *GoogleAnalyticsAdminV1alphaUserLink `json:"userLink,omitempty"` - - // 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 - // 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. "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 *GoogleAnalyticsAdminV1alphaCreateUserLinkRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaCreateUserLinkRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleAnalyticsAdminV1alphaCustomDimension: A definition for a // CustomDimension. type GoogleAnalyticsAdminV1alphaCustomDimension struct { @@ -4364,35 +3982,6 @@ func (s *GoogleAnalyticsAdminV1alphaDeleteConnectedSiteTagRequest) MarshalJSON() 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"` - - // 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 { @@ -6386,45 +5975,6 @@ func (s *GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse) Marshal 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) -} - // GoogleAnalyticsAdminV1alphaMatchingCondition: Defines a condition for // when an Event Edit or Event Creation rule applies to an event. type GoogleAnalyticsAdminV1alphaMatchingCondition struct { @@ -7705,80 +7255,6 @@ func (s *GoogleAnalyticsAdminV1alphaUpdateAccessBindingRequest) MarshalJSON() ([ 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 @@ -7991,7 +7467,7 @@ type AccountsDeleteCall struct { // 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. +// AccessBindings) will be permanently purged. // https://support.google.com/analytics/answer/6154772 Returns an error // if the target is not found. // @@ -8089,7 +7565,7 @@ 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.", + // "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, AccessBindings) 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", @@ -10629,37 +10105,35 @@ func (c *AccountsAccessBindingsPatchCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "analyticsadmin.accounts.userLinks.audit": +// method id "analyticsadmin.properties.acknowledgeUserDataCollection": -type AccountsUserLinksAuditCall struct { - s *Service - parent string - googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest - 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 } -// 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. +// AcknowledgeUserDataCollection: Acknowledges the terms of user data +// collection for the specified property. This acknowledgement must be +// completed (either in the Google Analytics UI or through this API) +// before MeasurementProtocolSecret resources may be created. // -// - 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 +// - 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 *AccountsUserLinksAuditCall) Fields(s ...googleapi.Field) *AccountsUserLinksAuditCall { +func (c *PropertiesAcknowledgeUserDataCollectionCall) Fields(s ...googleapi.Field) *PropertiesAcknowledgeUserDataCollectionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10667,21 +10141,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 *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 *AccountsUserLinksAuditCall) Header() http.Header { +func (c *PropertiesAcknowledgeUserDataCollectionCall) 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 *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_ { @@ -10689,14 +10163,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.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:audit") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+property}:acknowledgeUserDataCollection") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10704,21 +10178,22 @@ func (c *AccountsUserLinksAuditCall) doRequest(alt string) (*http.Response, erro } 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.audit" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse or +// 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 -// *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *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 *AccountsUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse, 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 { @@ -10737,7 +10212,7 @@ func (c *AccountsUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAn if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAuditUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10749,88 +10224,58 @@ 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": "Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or through this API) before MeasurementProtocolSecret resources may be created.", + // "flatPath": "v1alpha/properties/{propertiesId}:acknowledgeUserDataCollection", // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.audit", + // "id": "analyticsadmin.properties.acknowledgeUserDataCollection", // "parameterOrder": [ - // "parent" + // "property" // ], // "parameters": { - // "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:audit", + // "path": "v1alpha/{+property}:acknowledgeUserDataCollection", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse" // }, // "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" // ] // } } -// 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.properties.create": -type AccountsUserLinksBatchCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest - 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 } -// 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 +// 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 *AccountsUserLinksBatchCreateCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchCreateCall { +func (c *PropertiesCreateCall) Fields(s ...googleapi.Field) *PropertiesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10838,21 +10283,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 *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 *AccountsUserLinksBatchCreateCall) Header() http.Header { +func (c *PropertiesCreateCall) 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 *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_ { @@ -10860,37 +10305,32 @@ 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) + 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/{+parent}/userLinks:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties") urls += "?" + c.urlParams_.Encode() 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.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 +// 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 *AccountsUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse, error) { +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 { @@ -10909,7 +10349,7 @@ func (c *AccountsUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaProperty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10921,64 +10361,49 @@ 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", + // "description": "Creates an \"GA4\" property with the specified location and attributes.", + // "flatPath": "v1alpha/properties", // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.batchCreate", - // "parameterOrder": [ - // "parent" - // ], - // "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", - // "location": "path", - // "pattern": "^accounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/userLinks:batchCreate", + // "id": "analyticsadmin.properties.create", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/properties", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.accounts.userLinks.batchDelete": +// method id "analyticsadmin.properties.createConnectedSiteTag": -type AccountsUserLinksBatchDeleteCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesCreateConnectedSiteTagCall struct { + s *Service + googleanalyticsadminv1alphacreateconnectedsitetagrequest *GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchDelete: Deletes 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 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 +// CreateConnectedSiteTag: Creates a connected site tag for a Universal +// Analytics property. You can create a maximum of 20 connected site +// tags per property. Note: This API cannot be used on GA4 properties. +func (r *PropertiesService) CreateConnectedSiteTag(googleanalyticsadminv1alphacreateconnectedsitetagrequest *GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagRequest) *PropertiesCreateConnectedSiteTagCall { + c := &PropertiesCreateConnectedSiteTagCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphacreateconnectedsitetagrequest = googleanalyticsadminv1alphacreateconnectedsitetagrequest 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 *PropertiesCreateConnectedSiteTagCall) Fields(s ...googleapi.Field) *PropertiesCreateConnectedSiteTagCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10986,21 +10411,21 @@ func (c *AccountsUserLinksBatchDeleteCall) 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 *AccountsUserLinksBatchDeleteCall) Context(ctx context.Context) *AccountsUserLinksBatchDeleteCall { +func (c *PropertiesCreateConnectedSiteTagCall) Context(ctx context.Context) *PropertiesCreateConnectedSiteTagCall { 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 *PropertiesCreateConnectedSiteTagCall) 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 *PropertiesCreateConnectedSiteTagCall) 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_ { @@ -11008,34 +10433,34 @@ func (c *AccountsUserLinksBatchDeleteCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacreateconnectedsitetagrequest) 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:batchDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties:createConnectedSiteTag") urls += "?" + c.urlParams_.Encode() 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.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.properties.createConnectedSiteTag" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse.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 *PropertiesCreateConnectedSiteTagCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11054,7 +10479,7 @@ func (c *AccountsUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11066,138 +10491,105 @@ 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", + // "description": "Creates a connected site tag for a Universal Analytics property. You can create a maximum of 20 connected site tags per property. Note: This API cannot be used on GA4 properties.", + // "flatPath": "v1alpha/properties:createConnectedSiteTag", // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.batchDelete", - // "parameterOrder": [ - // "parent" - // ], - // "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", - // "location": "path", - // "pattern": "^accounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/userLinks:batchDelete", + // "id": "analyticsadmin.properties.createConnectedSiteTag", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/properties:createConnectedSiteTag", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagRequest" // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.accounts.userLinks.batchGet": - -type AccountsUserLinksBatchGetCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} +// method id "analyticsadmin.properties.createRollupProperty": -// 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 +type PropertiesCreateRollupPropertyCall struct { + s *Service + googleanalyticsadminv1alphacreaterolluppropertyrequest *GoogleAnalyticsAdminV1alphaCreateRollupPropertyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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...)) +// CreateRollupProperty: Create a roll-up property and all roll-up +// property source links. +func (r *PropertiesService) CreateRollupProperty(googleanalyticsadminv1alphacreaterolluppropertyrequest *GoogleAnalyticsAdminV1alphaCreateRollupPropertyRequest) *PropertiesCreateRollupPropertyCall { + c := &PropertiesCreateRollupPropertyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphacreaterolluppropertyrequest = googleanalyticsadminv1alphacreaterolluppropertyrequest 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 *PropertiesCreateRollupPropertyCall) Fields(s ...googleapi.Field) *PropertiesCreateRollupPropertyCall { 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 *AccountsUserLinksBatchGetCall) Context(ctx context.Context) *AccountsUserLinksBatchGetCall { +func (c *PropertiesCreateRollupPropertyCall) Context(ctx context.Context) *PropertiesCreateRollupPropertyCall { 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 *PropertiesCreateRollupPropertyCall) 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 *PropertiesCreateRollupPropertyCall) 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.googleanalyticsadminv1alphacreaterolluppropertyrequest) + 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:batchGet") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties:createRollupProperty") 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.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.properties.createRollupProperty" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse.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 *AccountsUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse, error) { +func (c *PropertiesCreateRollupPropertyCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11216,7 +10608,7 @@ func (c *AccountsUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11228,69 +10620,48 @@ 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", - // "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" - // } + // "description": "Create a roll-up property and all roll-up property source links.", + // "flatPath": "v1alpha/properties:createRollupProperty", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.createRollupProperty", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/properties:createRollupProperty", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaCreateRollupPropertyRequest" // }, - // "path": "v1alpha/{+parent}/userLinks:batchGet", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse" // }, // "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.batchUpdate": +// method id "analyticsadmin.properties.createSubproperty": -type AccountsUserLinksBatchUpdateCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesCreateSubpropertyCall struct { + s *Service + googleanalyticsadminv1alphacreatesubpropertyrequest *GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchUpdate: Updates 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 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 +// CreateSubproperty: Create a subproperty and a subproperty event +// filter that applies to the created subproperty. +func (r *PropertiesService) CreateSubproperty(googleanalyticsadminv1alphacreatesubpropertyrequest *GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest) *PropertiesCreateSubpropertyCall { + c := &PropertiesCreateSubpropertyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphacreatesubpropertyrequest = googleanalyticsadminv1alphacreatesubpropertyrequest 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 *PropertiesCreateSubpropertyCall) Fields(s ...googleapi.Field) *PropertiesCreateSubpropertyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11298,21 +10669,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 *PropertiesCreateSubpropertyCall) Context(ctx context.Context) *PropertiesCreateSubpropertyCall { 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 *PropertiesCreateSubpropertyCall) 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 *PropertiesCreateSubpropertyCall) 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_ { @@ -11320,37 +10691,33 @@ 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.googleanalyticsadminv1alphacreatesubpropertyrequest) 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/properties:createSubproperty") urls += "?" + c.urlParams_.Encode() 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.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.properties.createSubproperty" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse.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 *AccountsUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse, error) { +func (c *PropertiesCreateSubpropertyCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11369,7 +10736,7 @@ func (c *AccountsUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11381,72 +10748,57 @@ 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", + // "description": "Create a subproperty and a subproperty event filter that applies to the created subproperty.", + // "flatPath": "v1alpha/properties:createSubproperty", // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.batchUpdate", - // "parameterOrder": [ - // "parent" - // ], - // "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", - // "location": "path", - // "pattern": "^accounts/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/userLinks:batchUpdate", + // "id": "analyticsadmin.properties.createSubproperty", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/properties:createSubproperty", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.accounts.userLinks.create": +// method id "analyticsadmin.properties.delete": -type AccountsUserLinksCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDeleteCall struct { + s *Service + name string + 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. +// 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, +// AccessBindings) will be permanently purged. +// https://support.google.com/analytics/answer/6154772 Returns an error +// if the target is not found, or is not a GA4 Property. // -// - 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)) +// - 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 } // 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 *PropertiesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11454,21 +10806,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 *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 *AccountsUserLinksCreateCall) Header() http.Header { +func (c *PropertiesDeleteCall) 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 *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_ { @@ -11476,35 +10828,30 @@ 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) - 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/{+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.create" 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 *AccountsUserLinksCreateCall) 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 { @@ -11523,7 +10870,7 @@ func (c *AccountsUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleA if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaUserLink{ + ret := &GoogleAnalyticsAdminV1alphaProperty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11535,64 +10882,55 @@ 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", - // "httpMethod": "POST", - // "id": "analyticsadmin.accounts.userLinks.create", + // "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, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", + // "flatPath": "v1alpha/properties/{propertiesId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "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", - // "pattern": "^accounts/[^/]+$", + // "name": { + // "description": "Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: \"properties/1000\"", + // "location": "path", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, // "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.deleteConnectedSiteTag": -type AccountsUserLinksDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDeleteConnectedSiteTagCall struct { + s *Service + googleanalyticsadminv1alphadeleteconnectedsitetagrequest *GoogleAnalyticsAdminV1alphaDeleteConnectedSiteTagRequest + 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 +// DeleteConnectedSiteTag: Deletes a connected site tag for a Universal +// Analytics property. Note: this has no effect on GA4 properties. +func (r *PropertiesService) DeleteConnectedSiteTag(googleanalyticsadminv1alphadeleteconnectedsitetagrequest *GoogleAnalyticsAdminV1alphaDeleteConnectedSiteTagRequest) *PropertiesDeleteConnectedSiteTagCall { + c := &PropertiesDeleteConnectedSiteTagCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphadeleteconnectedsitetagrequest = googleanalyticsadminv1alphadeleteconnectedsitetagrequest 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 *PropertiesDeleteConnectedSiteTagCall) Fields(s ...googleapi.Field) *PropertiesDeleteConnectedSiteTagCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11600,21 +10938,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 *PropertiesDeleteConnectedSiteTagCall) Context(ctx context.Context) *PropertiesDeleteConnectedSiteTagCall { 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 *PropertiesDeleteConnectedSiteTagCall) 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 *PropertiesDeleteConnectedSiteTagCall) 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_ { @@ -11622,29 +10960,31 @@ 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.googleanalyticsadminv1alphadeleteconnectedsitetagrequest) + 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:deleteConnectedSiteTag") 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. +// Do executes the "analyticsadmin.properties.deleteConnectedSiteTag" 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) { +func (c *PropertiesDeleteConnectedSiteTagCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11675,123 +11015,106 @@ 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": "Deletes a connected site tag for a Universal Analytics property. Note: this has no effect on GA4 properties.", + // "flatPath": "v1alpha/properties:deleteConnectedSiteTag", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.deleteConnectedSiteTag", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/properties:deleteConnectedSiteTag", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaDeleteConnectedSiteTagRequest" // }, - // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleProtobufEmpty" // }, // "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.fetchAutomatedGa4ConfigurationOptOut": -type AccountsUserLinksGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesFetchAutomatedGa4ConfigurationOptOutCall struct { + s *Service + googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest *GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a user's link to an account or property. -// -// - 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 +// FetchAutomatedGa4ConfigurationOptOut: Fetches the opt out status for +// the automated GA4 setup process for a UA property. Note: this has no +// effect on GA4 property. +func (r *PropertiesService) FetchAutomatedGa4ConfigurationOptOut(googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest *GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRequest) *PropertiesFetchAutomatedGa4ConfigurationOptOutCall { + c := &PropertiesFetchAutomatedGa4ConfigurationOptOutCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest = googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest 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 *AccountsUserLinksGetCall) Fields(s ...googleapi.Field) *AccountsUserLinksGetCall { +func (c *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) Fields(s ...googleapi.Field) *PropertiesFetchAutomatedGa4ConfigurationOptOutCall { 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 *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) Context(ctx context.Context) *PropertiesFetchAutomatedGa4ConfigurationOptOutCall { 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 *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) 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 *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) 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.googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest) + 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:fetchAutomatedGa4ConfigurationOptOut") 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.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 +// Do executes the "analyticsadmin.properties.fetchAutomatedGa4ConfigurationOptOut" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRespon +// se or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRespon +// se.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 *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11810,7 +11133,7 @@ func (c *AccountsUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaUserLink{ + ret := &GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11822,77 +11145,59 @@ 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", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Example format: accounts/1234/userLinks/5678", - // "location": "path", - // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", - // "required": true, - // "type": "string" - // } + // "description": "Fetches the opt out status for the automated GA4 setup process for a UA property. Note: this has no effect on GA4 property.", + // "flatPath": "v1alpha/properties:fetchAutomatedGa4ConfigurationOptOut", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.fetchAutomatedGa4ConfigurationOptOut", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/properties:fetchAutomatedGa4ConfigurationOptOut", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRequest" // }, - // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutResponse" // }, // "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" // ] // } } -// method id "analyticsadmin.accounts.userLinks.list": +// method id "analyticsadmin.properties.fetchConnectedGa4Property": -type AccountsUserLinksListCall struct { +type PropertiesFetchConnectedGa4PropertyCall struct { s *Service - parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all user links on an account or 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)) +// FetchConnectedGa4Property: Given a specified UA property, looks up +// the GA4 property connected to it. Note: this cannot be used with GA4 +// properties. +func (r *PropertiesService) FetchConnectedGa4Property() *PropertiesFetchConnectedGa4PropertyCall { + c := &PropertiesFetchConnectedGa4PropertyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 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) +// Property sets the optional parameter "property": Required. The UA +// property for which to look up the connected GA4 property. Note this +// request uses the internal property ID, not the tracking ID of the +// form UA-XXXXXX-YY. Format: properties/{internal_web_property_id} +// Example: properties/1234 +func (c *PropertiesFetchConnectedGa4PropertyCall) Property(property string) *PropertiesFetchConnectedGa4PropertyCall { + c.urlParams_.Set("property", property) 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 *PropertiesFetchConnectedGa4PropertyCall) Fields(s ...googleapi.Field) *PropertiesFetchConnectedGa4PropertyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11902,7 +11207,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 *PropertiesFetchConnectedGa4PropertyCall) IfNoneMatch(entityTag string) *PropertiesFetchConnectedGa4PropertyCall { c.ifNoneMatch_ = entityTag return c } @@ -11910,21 +11215,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 *PropertiesFetchConnectedGa4PropertyCall) Context(ctx context.Context) *PropertiesFetchConnectedGa4PropertyCall { 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 *PropertiesFetchConnectedGa4PropertyCall) 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 *PropertiesFetchConnectedGa4PropertyCall) 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_ { @@ -11937,29 +11242,27 @@ 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/properties:fetchConnectedGa4Property") 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{ - "parent": c.parent, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.accounts.userLinks.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListUserLinksResponse or +// Do executes the "analyticsadmin.properties.fetchConnectedGa4Property" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse 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 +// *GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse.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 *AccountsUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListUserLinksResponse, error) { +func (c *PropertiesFetchConnectedGa4PropertyCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11978,7 +11281,7 @@ func (c *AccountsUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAna if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11990,130 +11293,102 @@ 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": "Given a specified UA property, looks up the GA4 property connected to it. Note: this cannot be used with GA4 properties.", + // "flatPath": "v1alpha/properties:fetchConnectedGa4Property", // "httpMethod": "GET", - // "id": "analyticsadmin.accounts.userLinks.list", - // "parameterOrder": [ - // "parent" - // ], + // "id": "analyticsadmin.properties.fetchConnectedGa4Property", + // "parameterOrder": [], // "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.", + // "property": { + // "description": "Required. The UA property for which to look up the connected GA4 property. Note this request uses the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. Format: properties/{internal_web_property_id} Example: properties/1234", // "location": "query", // "type": "string" - // }, - // "parent": { - // "description": "Required. Example format: accounts/1234", - // "location": "path", - // "pattern": "^accounts/[^/]+$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks", + // "path": "v1alpha/properties:fetchConnectedGa4Property", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse" // }, // "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.properties.get": -// method id "analyticsadmin.accounts.userLinks.patch": +type PropertiesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} -type AccountsUserLinksPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a user link on an account or property. +// Get: Lookup for a single "GA4" Property. // -// - 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 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 - 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 *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall { 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 *AccountsUserLinksPatchCall) Context(ctx context.Context) *AccountsUserLinksPatchCall { +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 *AccountsUserLinksPatchCall) Header() http.Header { +func (c *PropertiesGetCall) 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 *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_ { 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 } @@ -12124,15 +11399,15 @@ 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 +// 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 *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 *AccountsUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, 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 { @@ -12151,7 +11426,7 @@ func (c *AccountsUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAn if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaUserLink{ + ret := &GoogleAnalyticsAdminV1alphaProperty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12163,125 +11438,126 @@ 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 single \"GA4\" Property.", + // "flatPath": "v1alpha/properties/{propertiesId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Example format: properties/1234/userLinks/5678", + // "description": "Required. The name of the property to lookup. Format: properties/{property_id} Example: \"properties/1000\"", // "location": "path", - // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" - // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, // "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.getAttributionSettings": -type PropertiesAcknowledgeUserDataCollectionCall struct { - s *Service - property string - googleanalyticsadminv1alphaacknowledgeuserdatacollectionrequest *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionRequest - 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 } -// AcknowledgeUserDataCollection: Acknowledges the terms of user data -// collection for the specified property. This acknowledgement must be -// completed (either in the Google Analytics UI or through this API) -// before MeasurementProtocolSecret resources may be created. +// GetAttributionSettings: Lookup for a AttributionSettings singleton. // -// - 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 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 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 *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 *PropertiesAcknowledgeUserDataCollectionCall) Context(ctx context.Context) *PropertiesAcknowledgeUserDataCollectionCall { +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 *PropertiesAcknowledgeUserDataCollectionCall) Header() http.Header { +func (c *PropertiesGetAttributionSettingsCall) 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 *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.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.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 -// *GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse.Serv -// erResponse.Header or (if a response was returned at all) in +// *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 *PropertiesAcknowledgeUserDataCollectionCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse, 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 { @@ -12300,7 +11576,7 @@ func (c *PropertiesAcknowledgeUserDataCollectionCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse{ + ret := &GoogleAnalyticsAdminV1alphaAttributionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12312,113 +11588,128 @@ 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 through this API) before MeasurementProtocolSecret resources may be created.", - // "flatPath": "v1alpha/properties/{propertiesId}:acknowledgeUserDataCollection", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.acknowledgeUserDataCollection", + // "description": "Lookup for a AttributionSettings singleton.", + // "flatPath": "v1alpha/properties/{propertiesId}/attributionSettings", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.getAttributionSettings", // "parameterOrder": [ - // "property" + // "name" // ], // "parameters": { - // "property": { - // "description": "Required. The property for which to acknowledge user data collection.", + // "name": { + // "description": "Required. The name of the attribution settings to retrieve. Format: properties/{property}/attributionSettings", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/attributionSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+property}:acknowledgeUserDataCollection", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings" // }, // "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.getDataRetentionSettings": -type PropertiesCreateCall struct { - s *Service - googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty - 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 } -// 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 +// GetDataRetentionSettings: Returns 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)} + 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 *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 *PropertiesCreateCall) Context(ctx context.Context) *PropertiesCreateCall { +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 *PropertiesCreateCall) Header() http.Header { +func (c *PropertiesGetDataRetentionSettingsCall) 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 *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.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.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 +// *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 *PropertiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, 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 { @@ -12437,7 +11728,7 @@ func (c *PropertiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalytic if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaProperty{ + ret := &GoogleAnalyticsAdminV1alphaDataRetentionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12449,3198 +11740,60 @@ 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": "Returns the singleton data retention settings for this property.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataRetentionSettings", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.getDataRetentionSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: \"properties/1000/dataRetentionSettings\"", + // "location": "path", + // "pattern": "^properties/[^/]+/dataRetentionSettings$", + // "required": true, + // "type": "string" + // } // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaProperty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" - // ] - // } - -} - -// method id "analyticsadmin.properties.createConnectedSiteTag": - -type PropertiesCreateConnectedSiteTagCall struct { - s *Service - googleanalyticsadminv1alphacreateconnectedsitetagrequest *GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateConnectedSiteTag: Creates a connected site tag for a Universal -// Analytics property. You can create a maximum of 20 connected site -// tags per property. Note: This API cannot be used on GA4 properties. -func (r *PropertiesService) CreateConnectedSiteTag(googleanalyticsadminv1alphacreateconnectedsitetagrequest *GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagRequest) *PropertiesCreateConnectedSiteTagCall { - c := &PropertiesCreateConnectedSiteTagCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphacreateconnectedsitetagrequest = googleanalyticsadminv1alphacreateconnectedsitetagrequest - 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 *PropertiesCreateConnectedSiteTagCall) Fields(s ...googleapi.Field) *PropertiesCreateConnectedSiteTagCall { - 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 *PropertiesCreateConnectedSiteTagCall) Context(ctx context.Context) *PropertiesCreateConnectedSiteTagCall { - 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 *PropertiesCreateConnectedSiteTagCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesCreateConnectedSiteTagCall) 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.googleanalyticsadminv1alphacreateconnectedsitetagrequest) - 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:createConnectedSiteTag") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "analyticsadmin.properties.createConnectedSiteTag" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse.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 *PropertiesCreateConnectedSiteTagCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse{ - 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": "Creates a connected site tag for a Universal Analytics property. You can create a maximum of 20 connected site tags per property. Note: This API cannot be used on GA4 properties.", - // "flatPath": "v1alpha/properties:createConnectedSiteTag", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.createConnectedSiteTag", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/properties:createConnectedSiteTag", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagRequest" - // }, - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaCreateConnectedSiteTagResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" - // ] - // } - -} - -// method id "analyticsadmin.properties.createRollupProperty": - -type PropertiesCreateRollupPropertyCall struct { - s *Service - googleanalyticsadminv1alphacreaterolluppropertyrequest *GoogleAnalyticsAdminV1alphaCreateRollupPropertyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateRollupProperty: Create a roll-up property and all roll-up -// property source links. -func (r *PropertiesService) CreateRollupProperty(googleanalyticsadminv1alphacreaterolluppropertyrequest *GoogleAnalyticsAdminV1alphaCreateRollupPropertyRequest) *PropertiesCreateRollupPropertyCall { - c := &PropertiesCreateRollupPropertyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphacreaterolluppropertyrequest = googleanalyticsadminv1alphacreaterolluppropertyrequest - 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 *PropertiesCreateRollupPropertyCall) Fields(s ...googleapi.Field) *PropertiesCreateRollupPropertyCall { - 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 *PropertiesCreateRollupPropertyCall) Context(ctx context.Context) *PropertiesCreateRollupPropertyCall { - 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 *PropertiesCreateRollupPropertyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesCreateRollupPropertyCall) 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.googleanalyticsadminv1alphacreaterolluppropertyrequest) - 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:createRollupProperty") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "analyticsadmin.properties.createRollupProperty" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse.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 *PropertiesCreateRollupPropertyCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse{ - 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": "Create a roll-up property and all roll-up property source links.", - // "flatPath": "v1alpha/properties:createRollupProperty", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.createRollupProperty", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/properties:createRollupProperty", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaCreateRollupPropertyRequest" - // }, - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" - // ] - // } - -} - -// method id "analyticsadmin.properties.createSubproperty": - -type PropertiesCreateSubpropertyCall struct { - s *Service - googleanalyticsadminv1alphacreatesubpropertyrequest *GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSubproperty: Create a subproperty and a subproperty event -// filter that applies to the created subproperty. -func (r *PropertiesService) CreateSubproperty(googleanalyticsadminv1alphacreatesubpropertyrequest *GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest) *PropertiesCreateSubpropertyCall { - c := &PropertiesCreateSubpropertyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphacreatesubpropertyrequest = googleanalyticsadminv1alphacreatesubpropertyrequest - 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 *PropertiesCreateSubpropertyCall) Fields(s ...googleapi.Field) *PropertiesCreateSubpropertyCall { - 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 *PropertiesCreateSubpropertyCall) Context(ctx context.Context) *PropertiesCreateSubpropertyCall { - 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 *PropertiesCreateSubpropertyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesCreateSubpropertyCall) 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.googleanalyticsadminv1alphacreatesubpropertyrequest) - 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:createSubproperty") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "analyticsadmin.properties.createSubproperty" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse.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 *PropertiesCreateSubpropertyCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse{ - 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": "Create a subproperty and a subproperty event filter that applies to the created subproperty.", - // "flatPath": "v1alpha/properties:createSubproperty", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.createSubproperty", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/properties:createSubproperty", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest" - // }, - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" - // ] - // } - -} - -// method id "analyticsadmin.properties.delete": - -type PropertiesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// 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 a 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 - 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 { - 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 *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 *PropertiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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()) - 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.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 -// 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) { - 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaProperty{ - 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 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 a GA4 Property.", - // "flatPath": "v1alpha/properties/{propertiesId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.delete", - // "parameterOrder": [ - // "name" - // ], - // "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, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+name}", - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaProperty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" - // ] - // } - -} - -// method id "analyticsadmin.properties.deleteConnectedSiteTag": - -type PropertiesDeleteConnectedSiteTagCall struct { - s *Service - googleanalyticsadminv1alphadeleteconnectedsitetagrequest *GoogleAnalyticsAdminV1alphaDeleteConnectedSiteTagRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteConnectedSiteTag: Deletes a connected site tag for a Universal -// Analytics property. Note: this has no effect on GA4 properties. -func (r *PropertiesService) DeleteConnectedSiteTag(googleanalyticsadminv1alphadeleteconnectedsitetagrequest *GoogleAnalyticsAdminV1alphaDeleteConnectedSiteTagRequest) *PropertiesDeleteConnectedSiteTagCall { - c := &PropertiesDeleteConnectedSiteTagCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphadeleteconnectedsitetagrequest = googleanalyticsadminv1alphadeleteconnectedsitetagrequest - 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 *PropertiesDeleteConnectedSiteTagCall) Fields(s ...googleapi.Field) *PropertiesDeleteConnectedSiteTagCall { - 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 *PropertiesDeleteConnectedSiteTagCall) Context(ctx context.Context) *PropertiesDeleteConnectedSiteTagCall { - 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 *PropertiesDeleteConnectedSiteTagCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesDeleteConnectedSiteTagCall) 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.googleanalyticsadminv1alphadeleteconnectedsitetagrequest) - 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:deleteConnectedSiteTag") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "analyticsadmin.properties.deleteConnectedSiteTag" 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 *PropertiesDeleteConnectedSiteTagCall) 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, gensupport.WrapError(&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, gensupport.WrapError(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": "Deletes a connected site tag for a Universal Analytics property. Note: this has no effect on GA4 properties.", - // "flatPath": "v1alpha/properties:deleteConnectedSiteTag", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.deleteConnectedSiteTag", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/properties:deleteConnectedSiteTag", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaDeleteConnectedSiteTagRequest" - // }, - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" - // ] - // } - -} - -// method id "analyticsadmin.properties.fetchAutomatedGa4ConfigurationOptOut": - -type PropertiesFetchAutomatedGa4ConfigurationOptOutCall struct { - s *Service - googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest *GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// FetchAutomatedGa4ConfigurationOptOut: Fetches the opt out status for -// the automated GA4 setup process for a UA property. Note: this has no -// effect on GA4 property. -func (r *PropertiesService) FetchAutomatedGa4ConfigurationOptOut(googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest *GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRequest) *PropertiesFetchAutomatedGa4ConfigurationOptOutCall { - c := &PropertiesFetchAutomatedGa4ConfigurationOptOutCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest = googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest - 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 *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) Fields(s ...googleapi.Field) *PropertiesFetchAutomatedGa4ConfigurationOptOutCall { - 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 *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) Context(ctx context.Context) *PropertiesFetchAutomatedGa4ConfigurationOptOutCall { - 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 *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) 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.googleanalyticsadminv1alphafetchautomatedga4configurationoptoutrequest) - 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:fetchAutomatedGa4ConfigurationOptOut") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "analyticsadmin.properties.fetchAutomatedGa4ConfigurationOptOut" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRespon -// se or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRespon -// se.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 *PropertiesFetchAutomatedGa4ConfigurationOptOutCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutResponse{ - 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": "Fetches the opt out status for the automated GA4 setup process for a UA property. Note: this has no effect on GA4 property.", - // "flatPath": "v1alpha/properties:fetchAutomatedGa4ConfigurationOptOut", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.fetchAutomatedGa4ConfigurationOptOut", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/properties:fetchAutomatedGa4ConfigurationOptOut", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutRequest" - // }, - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaFetchAutomatedGa4ConfigurationOptOutResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" - // ] - // } - -} - -// method id "analyticsadmin.properties.fetchConnectedGa4Property": - -type PropertiesFetchConnectedGa4PropertyCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// FetchConnectedGa4Property: Given a specified UA property, looks up -// the GA4 property connected to it. Note: this cannot be used with GA4 -// properties. -func (r *PropertiesService) FetchConnectedGa4Property() *PropertiesFetchConnectedGa4PropertyCall { - c := &PropertiesFetchConnectedGa4PropertyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Property sets the optional parameter "property": Required. The UA -// property for which to look up the connected GA4 property. Note this -// request uses the internal property ID, not the tracking ID of the -// form UA-XXXXXX-YY. Format: properties/{internal_web_property_id} -// Example: properties/1234 -func (c *PropertiesFetchConnectedGa4PropertyCall) Property(property string) *PropertiesFetchConnectedGa4PropertyCall { - c.urlParams_.Set("property", property) - 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 *PropertiesFetchConnectedGa4PropertyCall) Fields(s ...googleapi.Field) *PropertiesFetchConnectedGa4PropertyCall { - 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 *PropertiesFetchConnectedGa4PropertyCall) IfNoneMatch(entityTag string) *PropertiesFetchConnectedGa4PropertyCall { - 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 *PropertiesFetchConnectedGa4PropertyCall) Context(ctx context.Context) *PropertiesFetchConnectedGa4PropertyCall { - 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 *PropertiesFetchConnectedGa4PropertyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesFetchConnectedGa4PropertyCall) 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/properties:fetchConnectedGa4Property") - 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.properties.fetchConnectedGa4Property" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse.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 *PropertiesFetchConnectedGa4PropertyCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse{ - 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": "Given a specified UA property, looks up the GA4 property connected to it. Note: this cannot be used with GA4 properties.", - // "flatPath": "v1alpha/properties:fetchConnectedGa4Property", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.fetchConnectedGa4Property", - // "parameterOrder": [], - // "parameters": { - // "property": { - // "description": "Required. The UA property for which to look up the connected GA4 property. Note this request uses the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. Format: properties/{internal_web_property_id} Example: properties/1234", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1alpha/properties:fetchConnectedGa4Property", - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" - // ] - // } - -} - -// method id "analyticsadmin.properties.get": - -type PropertiesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Lookup for a single "GA4" Property. -// -// - 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 *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall { - 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 { - 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 { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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_ { - 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.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 *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaProperty{ - 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 \"GA4\" Property.", - // "flatPath": "v1alpha/properties/{propertiesId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the property to lookup. Format: properties/{property_id} Example: \"properties/1000\"", - // "location": "path", - // "pattern": "^properties/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+name}", - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaProperty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" - // ] - // } - -} - -// method id "analyticsadmin.properties.getAttributionSettings": - -type PropertiesGetAttributionSettingsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAttributionSettings: Lookup for a AttributionSettings singleton. -// -// - 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 - 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 { - 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 { - 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 { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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()) - 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.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 *PropertiesGetAttributionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAttributionSettings, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaAttributionSettings{ - 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 AttributionSettings singleton.", - // "flatPath": "v1alpha/properties/{propertiesId}/attributionSettings", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.getAttributionSettings", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the attribution settings to retrieve. Format: properties/{property}/attributionSettings", - // "location": "path", - // "pattern": "^properties/[^/]+/attributionSettings$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+name}", - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" - // ] - // } - -} - -// method id "analyticsadmin.properties.getDataRetentionSettings": - -type PropertiesGetDataRetentionSettingsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetDataRetentionSettings: Returns 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)} - 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 *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 *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 *PropertiesGetDataRetentionSettingsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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()) - 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.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 -// *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 *PropertiesGetDataRetentionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRetentionSettings, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaDataRetentionSettings{ - 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 the singleton data retention settings for this property.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataRetentionSettings", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.getDataRetentionSettings", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: \"properties/1000/dataRetentionSettings\"", - // "location": "path", - // "pattern": "^properties/[^/]+/dataRetentionSettings$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+name}", - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataRetentionSettings" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" - // ] - // } - -} - -// method id "analyticsadmin.properties.getGoogleSignalsSettings": - -type PropertiesGetGoogleSignalsSettingsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// 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 *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 *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 *PropertiesGetGoogleSignalsSettingsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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()) - 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.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 *PropertiesGetGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleSignalsSettings, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaGoogleSignalsSettings{ - 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 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": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" - // ] - // } - -} - -// 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 -} - -// 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 -} - -// 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 *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 *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 *PropertiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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/properties") - 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.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) { - 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaListPropertiesResponse{ - 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 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": { - // "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/properties", - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListPropertiesResponse" - // }, - // "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 *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.listConnectedSiteTags": - -type PropertiesListConnectedSiteTagsCall struct { - s *Service - googleanalyticsadminv1alphalistconnectedsitetagsrequest *GoogleAnalyticsAdminV1alphaListConnectedSiteTagsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListConnectedSiteTags: Lists the connected site tags for a Universal -// Analytics property. A maximum of 20 connected site tags will be -// returned. Note: this has no effect on GA4 property. -func (r *PropertiesService) ListConnectedSiteTags(googleanalyticsadminv1alphalistconnectedsitetagsrequest *GoogleAnalyticsAdminV1alphaListConnectedSiteTagsRequest) *PropertiesListConnectedSiteTagsCall { - c := &PropertiesListConnectedSiteTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphalistconnectedsitetagsrequest = googleanalyticsadminv1alphalistconnectedsitetagsrequest - 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 *PropertiesListConnectedSiteTagsCall) Fields(s ...googleapi.Field) *PropertiesListConnectedSiteTagsCall { - 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 *PropertiesListConnectedSiteTagsCall) Context(ctx context.Context) *PropertiesListConnectedSiteTagsCall { - 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 *PropertiesListConnectedSiteTagsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesListConnectedSiteTagsCall) 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.googleanalyticsadminv1alphalistconnectedsitetagsrequest) - 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:listConnectedSiteTags") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "analyticsadmin.properties.listConnectedSiteTags" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse.ServerRespon -// se.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 *PropertiesListConnectedSiteTagsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse{ - 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": "Lists the connected site tags for a Universal Analytics property. A maximum of 20 connected site tags will be returned. Note: this has no effect on GA4 property.", - // "flatPath": "v1alpha/properties:listConnectedSiteTags", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.listConnectedSiteTags", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/properties:listConnectedSiteTags", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaListConnectedSiteTagsRequest" - // }, - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" - // ] - // } - -} - -// method id "analyticsadmin.properties.patch": - -type PropertiesPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a property. -// -// - 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) - 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 { - 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 *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 *PropertiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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()) - 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("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.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 -// (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) { - 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaProperty{ - 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 a property.", - // "flatPath": "v1alpha/properties/{propertiesId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "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" - // ] - // } - -} - -// method id "analyticsadmin.properties.runAccessReport": - -type PropertiesRunAccessReportCall struct { - s *Service - entity string - googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RunAccessReport: Returns a customized report of data access records. -// The report provides records of each time a user reads Google -// Analytics reporting data. Access records are retained for up to 2 -// years. Data Access Reports can be requested for a property. The -// property must be in Google Analytics 360. This method is only -// available to Administrators. These data access records include GA4 UI -// Reporting, GA4 UI Explorations, GA4 Data API, and other products like -// Firebase & Admob that can retrieve data from Google Analytics through -// a linkage. These records don't include property configuration changes -// like adding a stream or changing a property's time zone. For -// configuration change history, see searchChangeHistoryEvents -// (https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). -// -// - entity: The Data Access Report supports requesting at the property -// level or account level. If requested at the account level, Data -// Access Reports include all access for all properties under that -// account. To request at the property level, entity should be for -// example 'properties/123' if "123" is your GA4 property ID. To -// request at the account level, entity should be for example -// 'accounts/1234' if "1234" is your GA4 Account ID. -func (r *PropertiesService) RunAccessReport(entity string, googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest) *PropertiesRunAccessReportCall { - c := &PropertiesRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entity = entity - c.googleanalyticsadminv1alpharunaccessreportrequest = googleanalyticsadminv1alpharunaccessreportrequest - 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 *PropertiesRunAccessReportCall) Fields(s ...googleapi.Field) *PropertiesRunAccessReportCall { - 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 *PropertiesRunAccessReportCall) Context(ctx context.Context) *PropertiesRunAccessReportCall { - 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 *PropertiesRunAccessReportCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesRunAccessReportCall) 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.googleanalyticsadminv1alpharunaccessreportrequest) - 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/{+entity}:runAccessReport") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "entity": c.entity, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "analyticsadmin.properties.runAccessReport" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaRunAccessReportResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaRunAccessReportResponse.ServerResponse.Hea -// der 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 *PropertiesRunAccessReportCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaRunAccessReportResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaRunAccessReportResponse{ - 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 a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", - // "flatPath": "v1alpha/properties/{propertiesId}:runAccessReport", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.runAccessReport", - // "parameterOrder": [ - // "entity" - // ], - // "parameters": { - // "entity": { - // "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", - // "location": "path", - // "pattern": "^properties/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+entity}:runAccessReport", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaRunAccessReportRequest" - // }, - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaRunAccessReportResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" - // ] - // } - -} - -// method id "analyticsadmin.properties.setAutomatedGa4ConfigurationOptOut": - -type PropertiesSetAutomatedGa4ConfigurationOptOutCall struct { - s *Service - googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest *GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutomatedGa4ConfigurationOptOut: Sets the opt out status for the -// automated GA4 setup process for a UA property. Note: this has no -// effect on GA4 property. -func (r *PropertiesService) SetAutomatedGa4ConfigurationOptOut(googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest *GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutRequest) *PropertiesSetAutomatedGa4ConfigurationOptOutCall { - c := &PropertiesSetAutomatedGa4ConfigurationOptOutCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest = googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest - 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 *PropertiesSetAutomatedGa4ConfigurationOptOutCall) Fields(s ...googleapi.Field) *PropertiesSetAutomatedGa4ConfigurationOptOutCall { - 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 *PropertiesSetAutomatedGa4ConfigurationOptOutCall) Context(ctx context.Context) *PropertiesSetAutomatedGa4ConfigurationOptOutCall { - 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 *PropertiesSetAutomatedGa4ConfigurationOptOutCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesSetAutomatedGa4ConfigurationOptOutCall) 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.googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest) - 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:setAutomatedGa4ConfigurationOptOut") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "analyticsadmin.properties.setAutomatedGa4ConfigurationOptOut" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse -// -// or error will be non-nil. Any non-2xx status code is an error. -// -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse -// .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 *PropertiesSetAutomatedGa4ConfigurationOptOutCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse{ - 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": "Sets the opt out status for the automated GA4 setup process for a UA property. Note: this has no effect on GA4 property.", - // "flatPath": "v1alpha/properties:setAutomatedGa4ConfigurationOptOut", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.setAutomatedGa4ConfigurationOptOut", - // "parameterOrder": [], - // "parameters": {}, - // "path": "v1alpha/properties:setAutomatedGa4ConfigurationOptOut", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutRequest" - // }, - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse" - // }, - // "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 -} - -// 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 *PropertiesUpdateAttributionSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateAttributionSettingsCall { - 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 *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 *PropertiesUpdateAttributionSettingsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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()) - 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("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.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 -// 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) { - 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaAttributionSettings{ - 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 attribution settings on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/attributionSettings", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.updateAttributionSettings", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "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" - // ] - // } - -} - -// method id "analyticsadmin.properties.updateDataRetentionSettings": - -type PropertiesUpdateDataRetentionSettingsCall struct { - s *Service - name string - googleanalyticsadminv1alphadataretentionsettings *GoogleAnalyticsAdminV1alphaDataRetentionSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateDataRetentionSettings: Updates the singleton data retention -// settings for this 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 - 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 *PropertiesUpdateDataRetentionSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateDataRetentionSettingsCall { - 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 *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 *PropertiesUpdateDataRetentionSettingsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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()) - 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("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.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 -// *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 *PropertiesUpdateDataRetentionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRetentionSettings, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaDataRetentionSettings{ - 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 the singleton data retention settings for this property.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataRetentionSettings", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.updateDataRetentionSettings", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "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" - // ] - // } - -} - -// method id "analyticsadmin.properties.updateGoogleSignalsSettings": - -type PropertiesUpdateGoogleSignalsSettingsCall struct { - s *Service - name string - googleanalyticsadminv1alphagooglesignalssettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateGoogleSignalsSettings: Updates Google Signals settings for 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)} - 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 *PropertiesUpdateGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateGoogleSignalsSettingsCall { - 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 *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 *PropertiesUpdateGoogleSignalsSettingsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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()) - 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("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.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 -// 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) { - 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaGoogleSignalsSettings{ - 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 Google Signals settings for a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/googleSignalsSettings", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.updateGoogleSignalsSettings", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "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" - // ] - // } - -} - -// method id "analyticsadmin.properties.accessBindings.batchCreate": - -type PropertiesAccessBindingsBatchCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchcreateaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BatchCreate: Creates information about multiple access bindings to an -// account or property. This method is transactional. If any -// AccessBinding cannot be created, none of the AccessBindings will be -// created. -// -// - parent: The account or property that owns the access bindings. The -// parent field in the CreateAccessBindingRequest messages must either -// be empty or match this field. Formats: - accounts/{account} - -// properties/{property}. -func (r *PropertiesAccessBindingsService) BatchCreate(parent string, googleanalyticsadminv1alphabatchcreateaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest) *PropertiesAccessBindingsBatchCreateCall { - c := &PropertiesAccessBindingsBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphabatchcreateaccessbindingsrequest = googleanalyticsadminv1alphabatchcreateaccessbindingsrequest - 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 *PropertiesAccessBindingsBatchCreateCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsBatchCreateCall { - 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 *PropertiesAccessBindingsBatchCreateCall) Context(ctx context.Context) *PropertiesAccessBindingsBatchCreateCall { - 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 *PropertiesAccessBindingsBatchCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesAccessBindingsBatchCreateCall) 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.googleanalyticsadminv1alphabatchcreateaccessbindingsrequest) - 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}/accessBindings:batchCreate") - urls += "?" + c.urlParams_.Encode() - 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.properties.accessBindings.batchCreate" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse.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 *PropertiesAccessBindingsBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) - } - ret := &GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse{ - 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": "Creates information about multiple access bindings to an account or property. This method is transactional. If any AccessBinding cannot be created, none of the AccessBindings will be created.", - // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings:batchCreate", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.accessBindings.batchCreate", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The account or property that owns the access bindings. The parent field in the CreateAccessBindingRequest messages must either be empty or match this field. Formats: - accounts/{account} - properties/{property}", - // "location": "path", - // "pattern": "^properties/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/accessBindings:batchCreate", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest" - // }, - // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" - // ] - // } - -} - -// method id "analyticsadmin.properties.accessBindings.batchDelete": - -type PropertiesAccessBindingsBatchDeleteCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BatchDelete: Deletes information about multiple users' links to an -// account or property. -// -// - parent: The account or property that owns the access bindings. The -// parent of all provided values for the 'names' field in -// DeleteAccessBindingRequest messages must match this field. Formats: -// - accounts/{account} - properties/{property}. -func (r *PropertiesAccessBindingsService) BatchDelete(parent string, googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest) *PropertiesAccessBindingsBatchDeleteCall { - c := &PropertiesAccessBindingsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest = googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest - 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 *PropertiesAccessBindingsBatchDeleteCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsBatchDeleteCall { - 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 *PropertiesAccessBindingsBatchDeleteCall) Context(ctx context.Context) *PropertiesAccessBindingsBatchDeleteCall { - 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 *PropertiesAccessBindingsBatchDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesAccessBindingsBatchDeleteCall) 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.googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest) - 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}/accessBindings:batchDelete") - urls += "?" + c.urlParams_.Encode() - 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.properties.accessBindings.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 *PropertiesAccessBindingsBatchDeleteCall) 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, gensupport.WrapError(&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, gensupport.WrapError(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": "Deletes information about multiple users' links to an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings:batchDelete", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.accessBindings.batchDelete", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The account or property that owns the access bindings. The parent of all provided values for the 'names' field in DeleteAccessBindingRequest messages must match this field. Formats: - accounts/{account} - properties/{property}", - // "location": "path", - // "pattern": "^properties/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/accessBindings:batchDelete", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest" - // }, - // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaDataRetentionSettings" // }, // "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.accessBindings.batchGet": +// method id "analyticsadmin.properties.getGoogleSignalsSettings": -type PropertiesAccessBindingsBatchGetCall struct { +type PropertiesGetGoogleSignalsSettingsCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } - -// BatchGet: Gets information about multiple access bindings to an -// account or property. -// -// - parent: The account or property that owns the access bindings. The -// parent of all provided values for the 'names' field must match this -// field. Formats: - accounts/{account} - properties/{property}. -func (r *PropertiesAccessBindingsService) BatchGet(parent string) *PropertiesAccessBindingsBatchGetCall { - c := &PropertiesAccessBindingsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Names sets the optional parameter "names": Required. The names of the -// access bindings to retrieve. A maximum of 1000 access bindings can be -// retrieved in a batch. Formats: - -// accounts/{account}/accessBindings/{accessBinding} - -// properties/{property}/accessBindings/{accessBinding} -func (c *PropertiesAccessBindingsBatchGetCall) Names(names ...string) *PropertiesAccessBindingsBatchGetCall { - c.urlParams_.SetMulti("names", append([]string{}, names...)) + +// 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 *PropertiesAccessBindingsBatchGetCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsBatchGetCall { +func (c *PropertiesGetGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) *PropertiesGetGoogleSignalsSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15650,7 +11803,7 @@ func (c *PropertiesAccessBindingsBatchGetCall) Fields(s ...googleapi.Field) *Pro // 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 *PropertiesAccessBindingsBatchGetCall) IfNoneMatch(entityTag string) *PropertiesAccessBindingsBatchGetCall { +func (c *PropertiesGetGoogleSignalsSettingsCall) IfNoneMatch(entityTag string) *PropertiesGetGoogleSignalsSettingsCall { c.ifNoneMatch_ = entityTag return c } @@ -15658,21 +11811,21 @@ func (c *PropertiesAccessBindingsBatchGetCall) IfNoneMatch(entityTag string) *Pr // 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 *PropertiesAccessBindingsBatchGetCall) Context(ctx context.Context) *PropertiesAccessBindingsBatchGetCall { +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 *PropertiesAccessBindingsBatchGetCall) Header() http.Header { +func (c *PropertiesGetGoogleSignalsSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAccessBindingsBatchGetCall) 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_ { @@ -15685,7 +11838,7 @@ func (c *PropertiesAccessBindingsBatchGetCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/accessBindings:batchGet") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15693,22 +11846,21 @@ func (c *PropertiesAccessBindingsBatchGetCall) doRequest(alt string) (*http.Resp } 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.properties.accessBindings.batchGet" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// 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 -// *GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse.ServerRespo -// nse.Header or (if a response was returned at all) in +// *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 *PropertiesAccessBindingsBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse, 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 { @@ -15727,7 +11879,7 @@ func (c *PropertiesAccessBindingsBatchGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse{ + ret := &GoogleAnalyticsAdminV1alphaGoogleSignalsSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15739,129 +11891,170 @@ func (c *PropertiesAccessBindingsBatchGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets information about multiple access bindings to an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings:batchGet", + // "description": "Lookup for Google Signals settings for a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/googleSignalsSettings", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.accessBindings.batchGet", + // "id": "analyticsadmin.properties.getGoogleSignalsSettings", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "names": { - // "description": "Required. The names of the access bindings to retrieve. A maximum of 1000 access bindings can be retrieved in a batch. Formats: - accounts/{account}/accessBindings/{accessBinding} - properties/{property}/accessBindings/{accessBinding}", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "parent": { - // "description": "Required. The account or property that owns the access bindings. The parent of all provided values for the 'names' field must match this field. Formats: - accounts/{account} - properties/{property}", + // "name": { + // "description": "Required. The name of the google signals settings to retrieve. Format: properties/{property}/googleSignalsSettings", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/googleSignalsSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/accessBindings:batchGet", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" // }, // "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" // ] // } } -// method id "analyticsadmin.properties.accessBindings.batchUpdate": +// method id "analyticsadmin.properties.list": -type PropertiesAccessBindingsBatchUpdateCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchupdateaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// BatchUpdate: Updates information about multiple access bindings to an -// account or property. -// -// - parent: The account or property that owns the access bindings. The -// parent of all provided AccessBinding in UpdateAccessBindingRequest -// messages must match this field. Formats: - accounts/{account} - -// properties/{property}. -func (r *PropertiesAccessBindingsService) BatchUpdate(parent string, googleanalyticsadminv1alphabatchupdateaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest) *PropertiesAccessBindingsBatchUpdateCall { - c := &PropertiesAccessBindingsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphabatchupdateaccessbindingsrequest = googleanalyticsadminv1alphabatchupdateaccessbindingsrequest +// 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 +} + +// 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 +} + +// 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 *PropertiesAccessBindingsBatchUpdateCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsBatchUpdateCall { +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 *PropertiesAccessBindingsBatchUpdateCall) Context(ctx context.Context) *PropertiesAccessBindingsBatchUpdateCall { +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 *PropertiesAccessBindingsBatchUpdateCall) Header() http.Header { +func (c *PropertiesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAccessBindingsBatchUpdateCall) 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()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchupdateaccessbindingsrequest) - 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}/accessBindings:batchUpdate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties") 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.properties.accessBindings.batchUpdate" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse or +// 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 -// *GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse.ServerRe -// sponse.Header or (if a response was returned at all) in +// *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 *PropertiesAccessBindingsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse, 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 { @@ -15880,7 +12073,7 @@ func (c *PropertiesAccessBindingsBatchUpdateCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse{ + ret := &GoogleAnalyticsAdminV1alphaListPropertiesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15892,61 +12085,90 @@ func (c *PropertiesAccessBindingsBatchUpdateCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Updates information about multiple access bindings to an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings:batchUpdate", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.accessBindings.batchUpdate", - // "parameterOrder": [ - // "parent" - // ], + // "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": { - // "parent": { - // "description": "Required. The account or property that owns the access bindings. The parent of all provided AccessBinding in UpdateAccessBindingRequest messages must match this field. Formats: - accounts/{account} - properties/{property}", - // "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/{+parent}/accessBindings:batchUpdate", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest" - // }, + // "path": "v1alpha/properties", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaListPropertiesResponse" // }, // "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.accessBindings.create": +// 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.listConnectedSiteTags": -type PropertiesAccessBindingsCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphaaccessbinding *GoogleAnalyticsAdminV1alphaAccessBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesListConnectedSiteTagsCall struct { + s *Service + googleanalyticsadminv1alphalistconnectedsitetagsrequest *GoogleAnalyticsAdminV1alphaListConnectedSiteTagsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an access binding on an account or property. -// -// - parent: Formats: - accounts/{account} - properties/{property}. -func (r *PropertiesAccessBindingsService) Create(parent string, googleanalyticsadminv1alphaaccessbinding *GoogleAnalyticsAdminV1alphaAccessBinding) *PropertiesAccessBindingsCreateCall { - c := &PropertiesAccessBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphaaccessbinding = googleanalyticsadminv1alphaaccessbinding +// ListConnectedSiteTags: Lists the connected site tags for a Universal +// Analytics property. A maximum of 20 connected site tags will be +// returned. Note: this has no effect on GA4 property. +func (r *PropertiesService) ListConnectedSiteTags(googleanalyticsadminv1alphalistconnectedsitetagsrequest *GoogleAnalyticsAdminV1alphaListConnectedSiteTagsRequest) *PropertiesListConnectedSiteTagsCall { + c := &PropertiesListConnectedSiteTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphalistconnectedsitetagsrequest = googleanalyticsadminv1alphalistconnectedsitetagsrequest 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 *PropertiesAccessBindingsCreateCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsCreateCall { +func (c *PropertiesListConnectedSiteTagsCall) Fields(s ...googleapi.Field) *PropertiesListConnectedSiteTagsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15954,21 +12176,21 @@ func (c *PropertiesAccessBindingsCreateCall) Fields(s ...googleapi.Field) *Prope // 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 *PropertiesAccessBindingsCreateCall) Context(ctx context.Context) *PropertiesAccessBindingsCreateCall { +func (c *PropertiesListConnectedSiteTagsCall) Context(ctx context.Context) *PropertiesListConnectedSiteTagsCall { 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 *PropertiesAccessBindingsCreateCall) Header() http.Header { +func (c *PropertiesListConnectedSiteTagsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAccessBindingsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesListConnectedSiteTagsCall) 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_ { @@ -15976,36 +12198,34 @@ func (c *PropertiesAccessBindingsCreateCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaccessbinding) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphalistconnectedsitetagsrequest) 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}/accessBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties:listConnectedSiteTags") urls += "?" + c.urlParams_.Encode() 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.properties.accessBindings.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAccessBinding or error +// Do executes the "analyticsadmin.properties.listConnectedSiteTags" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaAccessBinding.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse.ServerRespon +// se.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 *PropertiesAccessBindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccessBinding, error) { +func (c *PropertiesListConnectedSiteTagsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16024,7 +12244,7 @@ func (c *PropertiesAccessBindingsCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAccessBinding{ + ret := &GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16036,60 +12256,63 @@ func (c *PropertiesAccessBindingsCreateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates an access binding on an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings", + // "description": "Lists the connected site tags for a Universal Analytics property. A maximum of 20 connected site tags will be returned. Note: this has no effect on GA4 property.", + // "flatPath": "v1alpha/properties:listConnectedSiteTags", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.accessBindings.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. Formats: - accounts/{account} - properties/{property}", - // "location": "path", - // "pattern": "^properties/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/accessBindings", + // "id": "analyticsadmin.properties.listConnectedSiteTags", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/properties:listConnectedSiteTags", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAccessBinding" + // "$ref": "GoogleAnalyticsAdminV1alphaListConnectedSiteTagsRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAccessBinding" + // "$ref": "GoogleAnalyticsAdminV1alphaListConnectedSiteTagsResponse" // }, // "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.accessBindings.delete": +// method id "analyticsadmin.properties.patch": -type PropertiesAccessBindingsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an access binding on an account or property. +// Patch: Updates a property. // -// - name: Formats: - accounts/{account}/accessBindings/{accessBinding} -// - properties/{property}/accessBindings/{accessBinding}. -func (r *PropertiesAccessBindingsService) Delete(name string) *PropertiesAccessBindingsDeleteCall { - c := &PropertiesAccessBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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) 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 *PropertiesAccessBindingsDeleteCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsDeleteCall { +func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16097,21 +12320,21 @@ func (c *PropertiesAccessBindingsDeleteCall) Fields(s ...googleapi.Field) *Prope // 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 *PropertiesAccessBindingsDeleteCall) Context(ctx context.Context) *PropertiesAccessBindingsDeleteCall { +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 *PropertiesAccessBindingsDeleteCall) Header() http.Header { +func (c *PropertiesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAccessBindingsDeleteCall) 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_ { @@ -16119,11 +12342,16 @@ func (c *PropertiesAccessBindingsDeleteCall) doRequest(alt string) (*http.Respon } 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 += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -16134,14 +12362,15 @@ func (c *PropertiesAccessBindingsDeleteCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.accessBindings.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 *PropertiesAccessBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// 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 +// (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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16160,7 +12389,7 @@ func (c *PropertiesAccessBindingsDeleteCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaProperty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16172,126 +12401,143 @@ func (c *PropertiesAccessBindingsDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes an access binding on an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings/{accessBindingsId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.accessBindings.delete", + // "description": "Updates a property.", + // "flatPath": "v1alpha/properties/{propertiesId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Formats: - accounts/{account}/accessBindings/{accessBinding} - properties/{property}/accessBindings/{accessBinding}", + // "description": "Output only. Resource name of this property. Format: properties/{property_id} Example: \"properties/1000\"", // "location": "path", - // "pattern": "^properties/[^/]+/accessBindings/[^/]+$", + // "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": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaProperty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.accessBindings.get": +// method id "analyticsadmin.properties.runAccessReport": -type PropertiesAccessBindingsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesRunAccessReportCall struct { + s *Service + entity string + googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about an access binding. +// RunAccessReport: Returns a customized report of data access records. +// The report provides records of each time a user reads Google +// Analytics reporting data. Access records are retained for up to 2 +// years. Data Access Reports can be requested for a property. The +// property must be in Google Analytics 360. This method is only +// available to Administrators. These data access records include GA4 UI +// Reporting, GA4 UI Explorations, GA4 Data API, and other products like +// Firebase & Admob that can retrieve data from Google Analytics through +// a linkage. These records don't include property configuration changes +// like adding a stream or changing a property's time zone. For +// configuration change history, see searchChangeHistoryEvents +// (https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). // -// - name: The name of the access binding to retrieve. Formats: - -// accounts/{account}/accessBindings/{accessBinding} - -// properties/{property}/accessBindings/{accessBinding}. -func (r *PropertiesAccessBindingsService) Get(name string) *PropertiesAccessBindingsGetCall { - c := &PropertiesAccessBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - entity: The Data Access Report supports requesting at the property +// level or account level. If requested at the account level, Data +// Access Reports include all access for all properties under that +// account. To request at the property level, entity should be for +// example 'properties/123' if "123" is your GA4 property ID. To +// request at the account level, entity should be for example +// 'accounts/1234' if "1234" is your GA4 Account ID. +func (r *PropertiesService) RunAccessReport(entity string, googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest) *PropertiesRunAccessReportCall { + c := &PropertiesRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entity = entity + c.googleanalyticsadminv1alpharunaccessreportrequest = googleanalyticsadminv1alpharunaccessreportrequest 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 *PropertiesAccessBindingsGetCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsGetCall { +func (c *PropertiesRunAccessReportCall) Fields(s ...googleapi.Field) *PropertiesRunAccessReportCall { 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 *PropertiesAccessBindingsGetCall) IfNoneMatch(entityTag string) *PropertiesAccessBindingsGetCall { - 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 *PropertiesAccessBindingsGetCall) Context(ctx context.Context) *PropertiesAccessBindingsGetCall { +func (c *PropertiesRunAccessReportCall) Context(ctx context.Context) *PropertiesRunAccessReportCall { 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 *PropertiesAccessBindingsGetCall) Header() http.Header { +func (c *PropertiesRunAccessReportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAccessBindingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesRunAccessReportCall) 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.googleanalyticsadminv1alpharunaccessreportrequest) + 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/{+entity}:runAccessReport") 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, + "entity": c.entity, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.accessBindings.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAccessBinding or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "analyticsadmin.properties.runAccessReport" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaRunAccessReportResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaAccessBinding.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaRunAccessReportResponse.ServerResponse.Hea +// der 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 *PropertiesAccessBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccessBinding, error) { +func (c *PropertiesRunAccessReportCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaRunAccessReportResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16310,7 +12556,7 @@ func (c *PropertiesAccessBindingsGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAccessBinding{ + ret := &GoogleAnalyticsAdminV1alphaRunAccessReportResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16322,144 +12568,119 @@ func (c *PropertiesAccessBindingsGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets information about an access binding.", - // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings/{accessBindingsId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.accessBindings.get", + // "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + // "flatPath": "v1alpha/properties/{propertiesId}:runAccessReport", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.runAccessReport", // "parameterOrder": [ - // "name" + // "entity" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the access binding to retrieve. Formats: - accounts/{account}/accessBindings/{accessBinding} - properties/{property}/accessBindings/{accessBinding}", + // "entity": { + // "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", // "location": "path", - // "pattern": "^properties/[^/]+/accessBindings/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+entity}:runAccessReport", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaRunAccessReportRequest" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAccessBinding" + // "$ref": "GoogleAnalyticsAdminV1alphaRunAccessReportResponse" // }, // "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" // ] // } } -// method id "analyticsadmin.properties.accessBindings.list": - -type PropertiesAccessBindingsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all access bindings on an account or property. -// -// - parent: Formats: - accounts/{account} - properties/{property}. -func (r *PropertiesAccessBindingsService) List(parent string) *PropertiesAccessBindingsListCall { - c := &PropertiesAccessBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} +// method id "analyticsadmin.properties.setAutomatedGa4ConfigurationOptOut": -// PageSize sets the optional parameter "pageSize": The maximum number -// of access bindings to return. The service may return fewer than this -// value. If unspecified, at most 200 access bindings will be returned. -// The maximum value is 500; values above 500 will be coerced to 500. -func (c *PropertiesAccessBindingsListCall) PageSize(pageSize int64) *PropertiesAccessBindingsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type PropertiesSetAutomatedGa4ConfigurationOptOutCall struct { + s *Service + googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest *GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListAccessBindings` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListAccessBindings` must match the call that provided -// the page token. -func (c *PropertiesAccessBindingsListCall) PageToken(pageToken string) *PropertiesAccessBindingsListCall { - c.urlParams_.Set("pageToken", pageToken) +// SetAutomatedGa4ConfigurationOptOut: Sets the opt out status for the +// automated GA4 setup process for a UA property. Note: this has no +// effect on GA4 property. +func (r *PropertiesService) SetAutomatedGa4ConfigurationOptOut(googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest *GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutRequest) *PropertiesSetAutomatedGa4ConfigurationOptOutCall { + c := &PropertiesSetAutomatedGa4ConfigurationOptOutCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest = googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest 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 *PropertiesAccessBindingsListCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsListCall { +func (c *PropertiesSetAutomatedGa4ConfigurationOptOutCall) Fields(s ...googleapi.Field) *PropertiesSetAutomatedGa4ConfigurationOptOutCall { 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 *PropertiesAccessBindingsListCall) IfNoneMatch(entityTag string) *PropertiesAccessBindingsListCall { - 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 *PropertiesAccessBindingsListCall) Context(ctx context.Context) *PropertiesAccessBindingsListCall { +func (c *PropertiesSetAutomatedGa4ConfigurationOptOutCall) Context(ctx context.Context) *PropertiesSetAutomatedGa4ConfigurationOptOutCall { 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 *PropertiesAccessBindingsListCall) Header() http.Header { +func (c *PropertiesSetAutomatedGa4ConfigurationOptOutCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAccessBindingsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSetAutomatedGa4ConfigurationOptOutCall) 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.googleanalyticsadminv1alphasetautomatedga4configurationoptoutrequest) + 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}/accessBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties:setAutomatedGa4ConfigurationOptOut") 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.properties.accessBindings.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListAccessBindingsResponse -// or error will be non-nil. Any non-2xx status code is an error. +// Do executes the "analyticsadmin.properties.setAutomatedGa4ConfigurationOptOut" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse +// +// or error will be non-nil. Any non-2xx status code is an error. +// // Response headers are in either -// *GoogleAnalyticsAdminV1alphaListAccessBindingsResponse.ServerResponse. -// Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse +// .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 *PropertiesAccessBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccessBindingsResponse, error) { +func (c *PropertiesSetAutomatedGa4ConfigurationOptOutCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16478,7 +12699,7 @@ func (c *PropertiesAccessBindingsListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListAccessBindingsResponse{ + ret := &GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16490,94 +12711,64 @@ func (c *PropertiesAccessBindingsListCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Lists all access bindings on an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.accessBindings.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "The maximum number of access bindings to return. The service may return fewer than this value. If unspecified, at most 200 access bindings 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 `ListAccessBindings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccessBindings` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Formats: - accounts/{account} - properties/{property}", - // "location": "path", - // "pattern": "^properties/[^/]+$", - // "required": true, - // "type": "string" - // } + // "description": "Sets the opt out status for the automated GA4 setup process for a UA property. Note: this has no effect on GA4 property.", + // "flatPath": "v1alpha/properties:setAutomatedGa4ConfigurationOptOut", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.setAutomatedGa4ConfigurationOptOut", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/properties:setAutomatedGa4ConfigurationOptOut", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutRequest" // }, - // "path": "v1alpha/{+parent}/accessBindings", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListAccessBindingsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse" // }, // "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" // ] // } } -// 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 *PropertiesAccessBindingsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccessBindingsResponse) 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.accessBindings.patch": +// method id "analyticsadmin.properties.updateAttributionSettings": -type PropertiesAccessBindingsPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphaaccessbinding *GoogleAnalyticsAdminV1alphaAccessBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesUpdateAttributionSettingsCall struct { + s *Service + name string + googleanalyticsadminv1alphaattributionsettings *GoogleAnalyticsAdminV1alphaAttributionSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an access binding on an account or property. +// UpdateAttributionSettings: Updates attribution settings on a +// property. // -// - name: Output only. Resource name of this binding. Format: -// accounts/{account}/accessBindings/{access_binding} or -// properties/{property}/accessBindings/{access_binding} Example: -// "accounts/100/accessBindings/200". -func (r *PropertiesAccessBindingsService) Patch(name string, googleanalyticsadminv1alphaaccessbinding *GoogleAnalyticsAdminV1alphaAccessBinding) *PropertiesAccessBindingsPatchCall { - c := &PropertiesAccessBindingsPatchCall{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.googleanalyticsadminv1alphaaccessbinding = googleanalyticsadminv1alphaaccessbinding + 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 *PropertiesAccessBindingsPatchCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsPatchCall { +func (c *PropertiesUpdateAttributionSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateAttributionSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16585,21 +12776,21 @@ func (c *PropertiesAccessBindingsPatchCall) Fields(s ...googleapi.Field) *Proper // 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 *PropertiesAccessBindingsPatchCall) Context(ctx context.Context) *PropertiesAccessBindingsPatchCall { +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 *PropertiesAccessBindingsPatchCall) Header() http.Header { +func (c *PropertiesUpdateAttributionSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAccessBindingsPatchCall) 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_ { @@ -16607,7 +12798,7 @@ func (c *PropertiesAccessBindingsPatchCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaccessbinding) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaattributionsettings) if err != nil { return nil, err } @@ -16627,16 +12818,16 @@ func (c *PropertiesAccessBindingsPatchCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.accessBindings.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAccessBinding or error -// will be non-nil. Any non-2xx status code is an error. Response +// 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 -// *GoogleAnalyticsAdminV1alphaAccessBinding.ServerResponse.Header or -// (if a response was returned at all) in +// *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 *PropertiesAccessBindingsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccessBinding, 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 { @@ -16655,7 +12846,7 @@ func (c *PropertiesAccessBindingsPatchCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAccessBinding{ + ret := &GoogleAnalyticsAdminV1alphaAttributionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16667,62 +12858,79 @@ func (c *PropertiesAccessBindingsPatchCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Updates an access binding on an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings/{accessBindingsId}", + // "description": "Updates attribution settings on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/attributionSettings", // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.accessBindings.patch", + // "id": "analyticsadmin.properties.updateAttributionSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name of this binding. Format: accounts/{account}/accessBindings/{access_binding} or properties/{property}/accessBindings/{access_binding} Example: \"accounts/100/accessBindings/200\"", + // "description": "Output only. Resource name of this attribution settings resource. Format: properties/{property_id}/attributionSettings Example: \"properties/1000/attributionSettings\"", // "location": "path", - // "pattern": "^properties/[^/]+/accessBindings/[^/]+$", + // "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": "GoogleAnalyticsAdminV1alphaAccessBinding" + // "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAccessBinding" + // "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.adSenseLinks.create": +// method id "analyticsadmin.properties.updateDataRetentionSettings": -type PropertiesAdSenseLinksCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphaadsenselink *GoogleAnalyticsAdminV1alphaAdSenseLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesUpdateDataRetentionSettingsCall struct { + s *Service + name string + googleanalyticsadminv1alphadataretentionsettings *GoogleAnalyticsAdminV1alphaDataRetentionSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an AdSenseLink. +// UpdateDataRetentionSettings: Updates the singleton data retention +// settings for this property. // -// - parent: The property for which to create an AdSense Link. Format: -// properties/{propertyId} Example: properties/1234. -func (r *PropertiesAdSenseLinksService) Create(parent string, googleanalyticsadminv1alphaadsenselink *GoogleAnalyticsAdminV1alphaAdSenseLink) *PropertiesAdSenseLinksCreateCall { - c := &PropertiesAdSenseLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphaadsenselink = googleanalyticsadminv1alphaadsenselink +// - 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 *PropertiesAdSenseLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksCreateCall { +func (c *PropertiesUpdateDataRetentionSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateDataRetentionSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16730,21 +12938,21 @@ func (c *PropertiesAdSenseLinksCreateCall) Fields(s ...googleapi.Field) *Propert // 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 *PropertiesAdSenseLinksCreateCall) Context(ctx context.Context) *PropertiesAdSenseLinksCreateCall { +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 *PropertiesAdSenseLinksCreateCall) Header() http.Header { +func (c *PropertiesUpdateDataRetentionSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAdSenseLinksCreateCall) 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_ { @@ -16752,35 +12960,36 @@ func (c *PropertiesAdSenseLinksCreateCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaadsenselink) + 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/{+parent}/adSenseLinks") + 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.properties.adSenseLinks.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAdSenseLink or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaAdSenseLink.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 *PropertiesAdSenseLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAdSenseLink, error) { +// 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 +// *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 *PropertiesUpdateDataRetentionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRetentionSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16799,7 +13008,7 @@ func (c *PropertiesAdSenseLinksCreateCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAdSenseLink{ + ret := &GoogleAnalyticsAdminV1alphaDataRetentionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16811,28 +13020,34 @@ func (c *PropertiesAdSenseLinksCreateCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Creates an AdSenseLink.", - // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.adSenseLinks.create", + // "description": "Updates the singleton data retention settings for this property.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataRetentionSettings", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.updateDataRetentionSettings", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The property for which to create an AdSense Link. Format: properties/{propertyId} Example: properties/1234", + // "name": { + // "description": "Output only. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "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/{+parent}/adSenseLinks", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + // "$ref": "GoogleAnalyticsAdminV1alphaDataRetentionSettings" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + // "$ref": "GoogleAnalyticsAdminV1alphaDataRetentionSettings" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -16841,31 +13056,44 @@ func (c *PropertiesAdSenseLinksCreateCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "analyticsadmin.properties.adSenseLinks.delete": +// method id "analyticsadmin.properties.updateGoogleSignalsSettings": -type PropertiesAdSenseLinksDeleteCall struct { - s *Service - nameid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesUpdateGoogleSignalsSettingsCall struct { + s *Service + name string + googleanalyticsadminv1alphagooglesignalssettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an AdSenseLink. +// UpdateGoogleSignalsSettings: Updates Google Signals settings for a +// property. // -// - name: Unique identifier for the AdSense Link to be deleted. Format: -// properties/{propertyId}/adSenseLinks/{linkId} Example: -// properties/1234/adSenseLinks/5678. -func (r *PropertiesAdSenseLinksService) Delete(nameid string) *PropertiesAdSenseLinksDeleteCall { - c := &PropertiesAdSenseLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.nameid = nameid +// - 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 *PropertiesAdSenseLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksDeleteCall { +func (c *PropertiesUpdateGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateGoogleSignalsSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16873,21 +13101,21 @@ func (c *PropertiesAdSenseLinksDeleteCall) Fields(s ...googleapi.Field) *Propert // 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 *PropertiesAdSenseLinksDeleteCall) Context(ctx context.Context) *PropertiesAdSenseLinksDeleteCall { +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 *PropertiesAdSenseLinksDeleteCall) Header() http.Header { +func (c *PropertiesUpdateGoogleSignalsSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAdSenseLinksDeleteCall) 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_ { @@ -16895,29 +13123,36 @@ func (c *PropertiesAdSenseLinksDeleteCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) 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("DELETE", 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{ - "name": c.nameid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.adSenseLinks.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 *PropertiesAdSenseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// 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 +// 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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16936,7 +13171,7 @@ func (c *PropertiesAdSenseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaGoogleSignalsSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16948,25 +13183,34 @@ func (c *PropertiesAdSenseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Deletes an AdSenseLink.", - // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks/{adSenseLinksId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.adSenseLinks.delete", + // "description": "Updates Google Signals settings for a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/googleSignalsSettings", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.updateGoogleSignalsSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Unique identifier for the AdSense Link to be deleted. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678", + // "description": "Output only. Resource name of this setting. Format: properties/{property_id}/googleSignalsSettings Example: \"properties/1000/googleSignalsSettings\"", // "location": "path", - // "pattern": "^properties/[^/]+/adSenseLinks/[^/]+$", + // "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": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -16975,98 +13219,97 @@ func (c *PropertiesAdSenseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "analyticsadmin.properties.adSenseLinks.get": +// method id "analyticsadmin.properties.accessBindings.batchCreate": -type PropertiesAdSenseLinksGetCall struct { - s *Service - nameid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesAccessBindingsBatchCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphabatchcreateaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Looks up a single AdSenseLink. +// BatchCreate: Creates information about multiple access bindings to an +// account or property. This method is transactional. If any +// AccessBinding cannot be created, none of the AccessBindings will be +// created. // -// - name: Unique identifier for the AdSense Link requested. Format: -// properties/{propertyId}/adSenseLinks/{linkId} Example: -// properties/1234/adSenseLinks/5678. -func (r *PropertiesAdSenseLinksService) Get(nameid string) *PropertiesAdSenseLinksGetCall { - c := &PropertiesAdSenseLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.nameid = nameid +// - parent: The account or property that owns the access bindings. The +// parent field in the CreateAccessBindingRequest messages must either +// be empty or match this field. Formats: - accounts/{account} - +// properties/{property}. +func (r *PropertiesAccessBindingsService) BatchCreate(parent string, googleanalyticsadminv1alphabatchcreateaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest) *PropertiesAccessBindingsBatchCreateCall { + c := &PropertiesAccessBindingsBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphabatchcreateaccessbindingsrequest = googleanalyticsadminv1alphabatchcreateaccessbindingsrequest 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 *PropertiesAdSenseLinksGetCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksGetCall { +func (c *PropertiesAccessBindingsBatchCreateCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsBatchCreateCall { 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 *PropertiesAdSenseLinksGetCall) IfNoneMatch(entityTag string) *PropertiesAdSenseLinksGetCall { - 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 *PropertiesAdSenseLinksGetCall) Context(ctx context.Context) *PropertiesAdSenseLinksGetCall { +func (c *PropertiesAccessBindingsBatchCreateCall) Context(ctx context.Context) *PropertiesAccessBindingsBatchCreateCall { 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 *PropertiesAdSenseLinksGetCall) Header() http.Header { +func (c *PropertiesAccessBindingsBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAdSenseLinksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAccessBindingsBatchCreateCall) 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.googleanalyticsadminv1alphabatchcreateaccessbindingsrequest) + 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}/accessBindings: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{ - "name": c.nameid, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.adSenseLinks.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAdSenseLink or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaAdSenseLink.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 *PropertiesAdSenseLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAdSenseLink, error) { +// Do executes the "analyticsadmin.properties.accessBindings.batchCreate" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse.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 *PropertiesAccessBindingsBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17085,7 +13328,7 @@ func (c *PropertiesAdSenseLinksGetCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAdSenseLink{ + ret := &GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17097,125 +13340,104 @@ func (c *PropertiesAdSenseLinksGetCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Looks up a single AdSenseLink.", - // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks/{adSenseLinksId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.adSenseLinks.get", + // "description": "Creates information about multiple access bindings to an account or property. This method is transactional. If any AccessBinding cannot be created, none of the AccessBindings will be created.", + // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings:batchCreate", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.accessBindings.batchCreate", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Unique identifier for the AdSense Link requested. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678", + // "parent": { + // "description": "Required. The account or property that owns the access bindings. The parent field in the CreateAccessBindingRequest messages must either be empty or match this field. Formats: - accounts/{account} - properties/{property}", // "location": "path", - // "pattern": "^properties/[^/]+/adSenseLinks/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/accessBindings:batchCreate", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsRequest" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateAccessBindingsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.manage.users" // ] // } } -// method id "analyticsadmin.properties.adSenseLinks.list": +// method id "analyticsadmin.properties.accessBindings.batchDelete": -type PropertiesAdSenseLinksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesAccessBindingsBatchDeleteCall struct { + s *Service + parent string + googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists AdSenseLinks on a property. +// BatchDelete: Deletes information about multiple users' links to an +// account or property. // -// - parent: Resource name of the parent property. Format: -// properties/{propertyId} Example: properties/1234. -func (r *PropertiesAdSenseLinksService) List(parent string) *PropertiesAdSenseLinksListCall { - c := &PropertiesAdSenseLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The account or property that owns the access bindings. The +// parent of all provided values for the 'names' field in +// DeleteAccessBindingRequest messages must match this field. Formats: +// - accounts/{account} - properties/{property}. +func (r *PropertiesAccessBindingsService) BatchDelete(parent string, googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest) *PropertiesAccessBindingsBatchDeleteCall { + c := &PropertiesAccessBindingsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// 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 *PropertiesAdSenseLinksListCall) PageSize(pageSize int64) *PropertiesAdSenseLinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// received from a previous `ListAdSenseLinks` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListAdSenseLinks` must match the call that provided the -// page token. -func (c *PropertiesAdSenseLinksListCall) PageToken(pageToken string) *PropertiesAdSenseLinksListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest = googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest 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 *PropertiesAdSenseLinksListCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksListCall { +func (c *PropertiesAccessBindingsBatchDeleteCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsBatchDeleteCall { 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 *PropertiesAdSenseLinksListCall) IfNoneMatch(entityTag string) *PropertiesAdSenseLinksListCall { - 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 *PropertiesAdSenseLinksListCall) Context(ctx context.Context) *PropertiesAdSenseLinksListCall { +func (c *PropertiesAccessBindingsBatchDeleteCall) Context(ctx context.Context) *PropertiesAccessBindingsBatchDeleteCall { 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 *PropertiesAdSenseLinksListCall) Header() http.Header { +func (c *PropertiesAccessBindingsBatchDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAdSenseLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAccessBindingsBatchDeleteCall) 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.googleanalyticsadminv1alphabatchdeleteaccessbindingsrequest) + 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}/adSenseLinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/accessBindings:batchDelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -17226,16 +13448,14 @@ func (c *PropertiesAdSenseLinksListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.adSenseLinks.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse.ServerResponse.He -// ader 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 *PropertiesAdSenseLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse, error) { +// Do executes the "analyticsadmin.properties.accessBindings.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 *PropertiesAccessBindingsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17254,7 +13474,7 @@ func (c *PropertiesAdSenseLinksListCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17266,148 +13486,141 @@ func (c *PropertiesAdSenseLinksListCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Lists AdSenseLinks on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.adSenseLinks.list", + // "description": "Deletes information about multiple users' links to an account or property.", + // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings:batchDelete", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.accessBindings.batchDelete", // "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 `ListAdSenseLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAdSenseLinks` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. Resource name of the parent property. Format: properties/{propertyId} Example: properties/1234", + // "description": "Required. The account or property that owns the access bindings. The parent of all provided values for the 'names' field in DeleteAccessBindingRequest messages must match this field. Formats: - accounts/{account} - properties/{property}", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/adSenseLinks", + // "path": "v1alpha/{+parent}/accessBindings:batchDelete", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteAccessBindingsRequest" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "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 *PropertiesAdSenseLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse) 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.audiences.archive": +// method id "analyticsadmin.properties.accessBindings.batchGet": -type PropertiesAudiencesArchiveCall struct { - s *Service - name string - googleanalyticsadminv1alphaarchiveaudiencerequest *GoogleAnalyticsAdminV1alphaArchiveAudienceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesAccessBindingsBatchGetCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Archive: Archives an Audience on a property. +// BatchGet: Gets information about multiple access bindings to an +// account or 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 +// - parent: The account or property that owns the access bindings. The +// parent of all provided values for the 'names' field must match this +// field. Formats: - accounts/{account} - properties/{property}. +func (r *PropertiesAccessBindingsService) BatchGet(parent string) *PropertiesAccessBindingsBatchGetCall { + c := &PropertiesAccessBindingsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Names sets the optional parameter "names": Required. The names of the +// access bindings to retrieve. A maximum of 1000 access bindings can be +// retrieved in a batch. Formats: - +// accounts/{account}/accessBindings/{accessBinding} - +// properties/{property}/accessBindings/{accessBinding} +func (c *PropertiesAccessBindingsBatchGetCall) Names(names ...string) *PropertiesAccessBindingsBatchGetCall { + 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 *PropertiesAudiencesArchiveCall) Fields(s ...googleapi.Field) *PropertiesAudiencesArchiveCall { +func (c *PropertiesAccessBindingsBatchGetCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsBatchGetCall { 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 *PropertiesAccessBindingsBatchGetCall) IfNoneMatch(entityTag string) *PropertiesAccessBindingsBatchGetCall { + 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 *PropertiesAudiencesArchiveCall) Context(ctx context.Context) *PropertiesAudiencesArchiveCall { +func (c *PropertiesAccessBindingsBatchGetCall) Context(ctx context.Context) *PropertiesAccessBindingsBatchGetCall { 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 *PropertiesAudiencesArchiveCall) Header() http.Header { +func (c *PropertiesAccessBindingsBatchGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAudiencesArchiveCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAccessBindingsBatchGetCall) 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.googleanalyticsadminv1alphaarchiveaudiencerequest) - 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}:archive") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/accessBindings: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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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) { +// Do executes the "analyticsadmin.properties.accessBindings.batchGet" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse.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 *PropertiesAccessBindingsBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17426,7 +13639,7 @@ func (c *PropertiesAudiencesArchiveCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17438,61 +13651,69 @@ func (c *PropertiesAudiencesArchiveCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Archives an Audience on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}:archive", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.audiences.archive", + // "description": "Gets information about multiple access bindings to an account or property.", + // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings:batchGet", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.accessBindings.batchGet", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Example format: properties/1234/audiences/5678", + // "names": { + // "description": "Required. The names of the access bindings to retrieve. A maximum of 1000 access bindings can be retrieved in a batch. Formats: - accounts/{account}/accessBindings/{accessBinding} - properties/{property}/accessBindings/{accessBinding}", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "parent": { + // "description": "Required. The account or property that owns the access bindings. The parent of all provided values for the 'names' field must match this field. Formats: - accounts/{account} - properties/{property}", // "location": "path", - // "pattern": "^properties/[^/]+/audiences/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:archive", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaArchiveAudienceRequest" - // }, + // "path": "v1alpha/{+parent}/accessBindings:batchGet", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaBatchGetAccessBindingsResponse" // }, // "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.properties.audiences.create": +// method id "analyticsadmin.properties.accessBindings.batchUpdate": -type PropertiesAudiencesCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphaaudience *GoogleAnalyticsAdminV1alphaAudience - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesAccessBindingsBatchUpdateCall struct { + s *Service + parent string + googleanalyticsadminv1alphabatchupdateaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Audience. +// BatchUpdate: Updates information about multiple access bindings to an +// account or property. // -// - parent: Example format: properties/1234. -func (r *PropertiesAudiencesService) Create(parent string, googleanalyticsadminv1alphaaudience *GoogleAnalyticsAdminV1alphaAudience) *PropertiesAudiencesCreateCall { - c := &PropertiesAudiencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The account or property that owns the access bindings. The +// parent of all provided AccessBinding in UpdateAccessBindingRequest +// messages must match this field. Formats: - accounts/{account} - +// properties/{property}. +func (r *PropertiesAccessBindingsService) BatchUpdate(parent string, googleanalyticsadminv1alphabatchupdateaccessbindingsrequest *GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest) *PropertiesAccessBindingsBatchUpdateCall { + c := &PropertiesAccessBindingsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleanalyticsadminv1alphaaudience = googleanalyticsadminv1alphaaudience + c.googleanalyticsadminv1alphabatchupdateaccessbindingsrequest = googleanalyticsadminv1alphabatchupdateaccessbindingsrequest 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 *PropertiesAudiencesCreateCall) Fields(s ...googleapi.Field) *PropertiesAudiencesCreateCall { +func (c *PropertiesAccessBindingsBatchUpdateCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsBatchUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17500,21 +13721,21 @@ func (c *PropertiesAudiencesCreateCall) Fields(s ...googleapi.Field) *Properties // 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 *PropertiesAudiencesCreateCall) Context(ctx context.Context) *PropertiesAudiencesCreateCall { +func (c *PropertiesAccessBindingsBatchUpdateCall) Context(ctx context.Context) *PropertiesAccessBindingsBatchUpdateCall { 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 *PropertiesAudiencesCreateCall) Header() http.Header { +func (c *PropertiesAccessBindingsBatchUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAudiencesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAccessBindingsBatchUpdateCall) 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_ { @@ -17522,14 +13743,14 @@ func (c *PropertiesAudiencesCreateCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaudience) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchupdateaccessbindingsrequest) 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}/audiences") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/accessBindings:batchUpdate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17542,15 +13763,17 @@ func (c *PropertiesAudiencesCreateCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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 *GoogleAnalyticsAdminV1alphaAudience.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.accessBindings.batchUpdate" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse.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 *PropertiesAudiencesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAudience, error) { +func (c *PropertiesAccessBindingsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17569,7 +13792,7 @@ func (c *PropertiesAudiencesCreateCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAudience{ + ret := &GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17581,128 +13804,120 @@ func (c *PropertiesAudiencesCreateCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Creates an Audience.", - // "flatPath": "v1alpha/properties/{propertiesId}/audiences", + // "description": "Updates information about multiple access bindings to an account or property.", + // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings:batchUpdate", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.audiences.create", + // "id": "analyticsadmin.properties.accessBindings.batchUpdate", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Example format: properties/1234", + // "description": "Required. The account or property that owns the access bindings. The parent of all provided AccessBinding in UpdateAccessBindingRequest messages must match this field. Formats: - accounts/{account} - properties/{property}", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/audiences", + // "path": "v1alpha/{+parent}/accessBindings:batchUpdate", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAudience" + // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAudience" + // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit" + // "https://www.googleapis.com/auth/analytics.manage.users" // ] // } } -// method id "analyticsadmin.properties.audiences.get": +// method id "analyticsadmin.properties.accessBindings.create": -type PropertiesAudiencesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesAccessBindingsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphaaccessbinding *GoogleAnalyticsAdminV1alphaAccessBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Lookup for a single Audience. Audiences created before 2020 may -// not be supported. Default audiences will not show filter definitions. +// Create: Creates an access binding on an account or property. // -// - 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 +// - parent: Formats: - accounts/{account} - properties/{property}. +func (r *PropertiesAccessBindingsService) Create(parent string, googleanalyticsadminv1alphaaccessbinding *GoogleAnalyticsAdminV1alphaAccessBinding) *PropertiesAccessBindingsCreateCall { + c := &PropertiesAccessBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphaaccessbinding = googleanalyticsadminv1alphaaccessbinding 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 *PropertiesAudiencesGetCall) Fields(s ...googleapi.Field) *PropertiesAudiencesGetCall { +func (c *PropertiesAccessBindingsCreateCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsCreateCall { 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 *PropertiesAudiencesGetCall) Context(ctx context.Context) *PropertiesAudiencesGetCall { +func (c *PropertiesAccessBindingsCreateCall) Context(ctx context.Context) *PropertiesAccessBindingsCreateCall { 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 *PropertiesAudiencesGetCall) Header() http.Header { +func (c *PropertiesAccessBindingsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAudiencesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAccessBindingsCreateCall) 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.googleanalyticsadminv1alphaaccessbinding) + 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}/accessBindings") 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.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 +// Do executes the "analyticsadmin.properties.accessBindings.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAccessBinding or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaAccessBinding.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 *PropertiesAudiencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAudience, error) { +func (c *PropertiesAccessBindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccessBinding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17721,7 +13936,7 @@ func (c *PropertiesAudiencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAn if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAudience{ + ret := &GoogleAnalyticsAdminV1alphaAccessBinding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17733,146 +13948,112 @@ func (c *PropertiesAudiencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAn } return ret, nil // { - // "description": "Lookup for a single Audience. Audiences created before 2020 may not be supported. Default audiences will not show filter definitions.", - // "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.audiences.get", + // "description": "Creates an access binding on an account or property.", + // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.accessBindings.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the Audience to get. Example format: properties/1234/audiences/5678", + // "parent": { + // "description": "Required. Formats: - accounts/{account} - properties/{property}", // "location": "path", - // "pattern": "^properties/[^/]+/audiences/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/accessBindings", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaAccessBinding" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAudience" + // "$ref": "GoogleAnalyticsAdminV1alphaAccessBinding" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.edit", - // "https://www.googleapis.com/auth/analytics.readonly" + // "https://www.googleapis.com/auth/analytics.manage.users" // ] // } } -// method id "analyticsadmin.properties.audiences.list": +// method id "analyticsadmin.properties.accessBindings.delete": -type PropertiesAudiencesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesAccessBindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Audiences on a property. Audiences created before 2020 -// may not be supported. Default audiences will not show filter -// definitions. +// Delete: Deletes an access binding on an account or property. // -// - 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 -} - -// 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) +// - name: Formats: - accounts/{account}/accessBindings/{accessBinding} +// - properties/{property}/accessBindings/{accessBinding}. +func (r *PropertiesAccessBindingsService) Delete(name string) *PropertiesAccessBindingsDeleteCall { + c := &PropertiesAccessBindingsDeleteCall{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 *PropertiesAudiencesListCall) Fields(s ...googleapi.Field) *PropertiesAudiencesListCall { +func (c *PropertiesAccessBindingsDeleteCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsDeleteCall { 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 *PropertiesAudiencesListCall) Context(ctx context.Context) *PropertiesAudiencesListCall { +func (c *PropertiesAccessBindingsDeleteCall) Context(ctx context.Context) *PropertiesAccessBindingsDeleteCall { 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 *PropertiesAudiencesListCall) Header() http.Header { +func (c *PropertiesAccessBindingsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAudiencesListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAccessBindingsDeleteCall) 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/{+parent}/audiences") + 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 } 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.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 -// *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 *PropertiesAudiencesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAudiencesResponse, error) { +// Do executes the "analyticsadmin.properties.accessBindings.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 *PropertiesAccessBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17891,7 +14072,7 @@ func (c *PropertiesAudiencesListCall) Do(opts ...googleapi.CallOption) (*GoogleA if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListAudiencesResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17903,141 +14084,106 @@ func (c *PropertiesAudiencesListCall) Do(opts ...googleapi.CallOption) (*GoogleA } return ret, nil // { - // "description": "Lists Audiences on a property. Audiences created before 2020 may not be supported. Default audiences will not show filter definitions.", - // "flatPath": "v1alpha/properties/{propertiesId}/audiences", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.audiences.list", + // "description": "Deletes an access binding on an account or property.", + // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings/{accessBindingsId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.accessBindings.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "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", + // "name": { + // "description": "Required. Formats: - accounts/{account}/accessBindings/{accessBinding} - properties/{property}/accessBindings/{accessBinding}", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/accessBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/audiences", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListAudiencesResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "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 *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) - } -} - -// method id "analyticsadmin.properties.audiences.patch": +// method id "analyticsadmin.properties.accessBindings.get": -type PropertiesAudiencesPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphaaudience *GoogleAnalyticsAdminV1alphaAudience - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesAccessBindingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Audience on a property. +// Get: Gets information about an access binding. // -// - 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)} +// - name: The name of the access binding to retrieve. Formats: - +// accounts/{account}/accessBindings/{accessBinding} - +// properties/{property}/accessBindings/{accessBinding}. +func (r *PropertiesAccessBindingsService) Get(name string) *PropertiesAccessBindingsGetCall { + c := &PropertiesAccessBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphaaudience = googleanalyticsadminv1alphaaudience - 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 *PropertiesAudiencesPatchCall) UpdateMask(updateMask string) *PropertiesAudiencesPatchCall { - 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 *PropertiesAudiencesPatchCall) Fields(s ...googleapi.Field) *PropertiesAudiencesPatchCall { +func (c *PropertiesAccessBindingsGetCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsGetCall { 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 *PropertiesAccessBindingsGetCall) IfNoneMatch(entityTag string) *PropertiesAccessBindingsGetCall { + 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 *PropertiesAudiencesPatchCall) Context(ctx context.Context) *PropertiesAudiencesPatchCall { +func (c *PropertiesAccessBindingsGetCall) Context(ctx context.Context) *PropertiesAccessBindingsGetCall { 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 *PropertiesAudiencesPatchCall) Header() http.Header { +func (c *PropertiesAccessBindingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesAudiencesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAccessBindingsGetCall) 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.googleanalyticsadminv1alphaaudience) - 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 } @@ -18048,15 +14194,16 @@ func (c *PropertiesAudiencesPatchCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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 +// Do executes the "analyticsadmin.properties.accessBindings.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAccessBinding or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaAccessBinding.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 *PropertiesAudiencesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAudience, error) { +func (c *PropertiesAccessBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccessBinding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18075,7 +14222,7 @@ func (c *PropertiesAudiencesPatchCall) Do(opts ...googleapi.CallOption) (*Google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAudience{ + ret := &GoogleAnalyticsAdminV1alphaAccessBinding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18087,68 +14234,77 @@ func (c *PropertiesAudiencesPatchCall) Do(opts ...googleapi.CallOption) (*Google } return ret, nil // { - // "description": "Updates an Audience on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.audiences.patch", + // "description": "Gets information about an access binding.", + // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings/{accessBindingsId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.accessBindings.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}", + // "description": "Required. The name of the access binding to retrieve. Formats: - accounts/{account}/accessBindings/{accessBinding} - properties/{property}/accessBindings/{accessBinding}", // "location": "path", - // "pattern": "^properties/[^/]+/audiences/[^/]+$", + // "pattern": "^properties/[^/]+/accessBindings/[^/]+$", // "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" + // "$ref": "GoogleAnalyticsAdminV1alphaAccessBinding" // }, // "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.properties.bigQueryLinks.get": +// method id "analyticsadmin.properties.accessBindings.list": -type PropertiesBigQueryLinksGetCall struct { +type PropertiesAccessBindingsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Lookup for a single BigQuery Link. +// List: Lists all access bindings on an account or property. // -// - name: The name of the BigQuery link to lookup. Format: -// properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: -// properties/123/bigQueryLinks/456. -func (r *PropertiesBigQueryLinksService) Get(name string) *PropertiesBigQueryLinksGetCall { - c := &PropertiesBigQueryLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Formats: - accounts/{account} - properties/{property}. +func (r *PropertiesAccessBindingsService) List(parent string) *PropertiesAccessBindingsListCall { + c := &PropertiesAccessBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of access bindings to return. The service may return fewer than this +// value. If unspecified, at most 200 access bindings will be returned. +// The maximum value is 500; values above 500 will be coerced to 500. +func (c *PropertiesAccessBindingsListCall) PageSize(pageSize int64) *PropertiesAccessBindingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListAccessBindings` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListAccessBindings` must match the call that provided +// the page token. +func (c *PropertiesAccessBindingsListCall) PageToken(pageToken string) *PropertiesAccessBindingsListCall { + 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 *PropertiesBigQueryLinksGetCall) Fields(s ...googleapi.Field) *PropertiesBigQueryLinksGetCall { +func (c *PropertiesAccessBindingsListCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18158,7 +14314,7 @@ func (c *PropertiesBigQueryLinksGetCall) Fields(s ...googleapi.Field) *Propertie // 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 *PropertiesBigQueryLinksGetCall) IfNoneMatch(entityTag string) *PropertiesBigQueryLinksGetCall { +func (c *PropertiesAccessBindingsListCall) IfNoneMatch(entityTag string) *PropertiesAccessBindingsListCall { c.ifNoneMatch_ = entityTag return c } @@ -18166,21 +14322,21 @@ func (c *PropertiesBigQueryLinksGetCall) IfNoneMatch(entityTag string) *Properti // 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 *PropertiesBigQueryLinksGetCall) Context(ctx context.Context) *PropertiesBigQueryLinksGetCall { +func (c *PropertiesAccessBindingsListCall) Context(ctx context.Context) *PropertiesAccessBindingsListCall { 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 *PropertiesBigQueryLinksGetCall) Header() http.Header { +func (c *PropertiesAccessBindingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesBigQueryLinksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAccessBindingsListCall) 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_ { @@ -18193,7 +14349,7 @@ func (c *PropertiesBigQueryLinksGetCall) doRequest(alt string) (*http.Response, 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}/accessBindings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18201,20 +14357,21 @@ func (c *PropertiesBigQueryLinksGetCall) doRequest(alt string) (*http.Response, } 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.bigQueryLinks.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaBigQueryLink or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaBigQueryLink.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 *PropertiesBigQueryLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBigQueryLink, error) { +// Do executes the "analyticsadmin.properties.accessBindings.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListAccessBindingsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListAccessBindingsResponse.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 *PropertiesAccessBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccessBindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18233,7 +14390,7 @@ func (c *PropertiesBigQueryLinksGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaBigQueryLink{ + ret := &GoogleAnalyticsAdminV1alphaListAccessBindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18245,146 +14402,153 @@ func (c *PropertiesBigQueryLinksGetCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Lookup for a single BigQuery Link.", - // "flatPath": "v1alpha/properties/{propertiesId}/bigQueryLinks/{bigQueryLinksId}", + // "description": "Lists all access bindings on an account or property.", + // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.bigQueryLinks.get", + // "id": "analyticsadmin.properties.accessBindings.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the BigQuery link to lookup. Format: properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: properties/123/bigQueryLinks/456", + // "pageSize": { + // "description": "The maximum number of access bindings to return. The service may return fewer than this value. If unspecified, at most 200 access bindings 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 `ListAccessBindings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccessBindings` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Formats: - accounts/{account} - properties/{property}", // "location": "path", - // "pattern": "^properties/[^/]+/bigQueryLinks/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/accessBindings", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBigQueryLink" + // "$ref": "GoogleAnalyticsAdminV1alphaListAccessBindingsResponse" // }, // "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.properties.bigQueryLinks.list": - -type PropertiesBigQueryLinksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *PropertiesAccessBindingsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccessBindingsResponse) 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) + } } -// List: Lists BigQuery Links on a property. -// -// - parent: The name of the property to list BigQuery links under. -// Format: properties/{property_id} Example: properties/1234. -func (r *PropertiesBigQueryLinksService) List(parent string) *PropertiesBigQueryLinksListCall { - c := &PropertiesBigQueryLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} +// method id "analyticsadmin.properties.accessBindings.patch": -// 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 *PropertiesBigQueryLinksListCall) PageSize(pageSize int64) *PropertiesBigQueryLinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type PropertiesAccessBindingsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaaccessbinding *GoogleAnalyticsAdminV1alphaAccessBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListBigQueryLinks` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListBigQueryLinks` must match the call that provided the -// page token. -func (c *PropertiesBigQueryLinksListCall) PageToken(pageToken string) *PropertiesBigQueryLinksListCall { - c.urlParams_.Set("pageToken", pageToken) +// Patch: Updates an access binding on an account or property. +// +// - name: Output only. Resource name of this binding. Format: +// accounts/{account}/accessBindings/{access_binding} or +// properties/{property}/accessBindings/{access_binding} Example: +// "accounts/100/accessBindings/200". +func (r *PropertiesAccessBindingsService) Patch(name string, googleanalyticsadminv1alphaaccessbinding *GoogleAnalyticsAdminV1alphaAccessBinding) *PropertiesAccessBindingsPatchCall { + c := &PropertiesAccessBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphaaccessbinding = googleanalyticsadminv1alphaaccessbinding 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 *PropertiesBigQueryLinksListCall) Fields(s ...googleapi.Field) *PropertiesBigQueryLinksListCall { +func (c *PropertiesAccessBindingsPatchCall) Fields(s ...googleapi.Field) *PropertiesAccessBindingsPatchCall { 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 *PropertiesBigQueryLinksListCall) IfNoneMatch(entityTag string) *PropertiesBigQueryLinksListCall { - 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 *PropertiesBigQueryLinksListCall) Context(ctx context.Context) *PropertiesBigQueryLinksListCall { +func (c *PropertiesAccessBindingsPatchCall) Context(ctx context.Context) *PropertiesAccessBindingsPatchCall { 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 *PropertiesBigQueryLinksListCall) Header() http.Header { +func (c *PropertiesAccessBindingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesBigQueryLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAccessBindingsPatchCall) 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.googleanalyticsadminv1alphaaccessbinding) + 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}/bigQueryLinks") + 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 } 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.properties.bigQueryLinks.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.accessBindings.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAccessBinding or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaAccessBinding.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 *PropertiesBigQueryLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse, error) { +func (c *PropertiesAccessBindingsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccessBinding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18403,7 +14567,7 @@ func (c *PropertiesBigQueryLinksListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaAccessBinding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18415,92 +14579,62 @@ func (c *PropertiesBigQueryLinksListCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Lists BigQuery Links on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/bigQueryLinks", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.bigQueryLinks.list", + // "description": "Updates an access binding on an account or property.", + // "flatPath": "v1alpha/properties/{propertiesId}/accessBindings/{accessBindingsId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.accessBindings.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "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 `ListBigQueryLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBigQueryLinks` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The name of the property to list BigQuery links under. Format: properties/{property_id} Example: properties/1234", + // "name": { + // "description": "Output only. Resource name of this binding. Format: accounts/{account}/accessBindings/{access_binding} or properties/{property}/accessBindings/{access_binding} Example: \"accounts/100/accessBindings/200\"", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/accessBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/bigQueryLinks", + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaAccessBinding" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaAccessBinding" // }, // "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 *PropertiesBigQueryLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse) 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.channelGroups.create": +// method id "analyticsadmin.properties.adSenseLinks.create": -type PropertiesChannelGroupsCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphachannelgroup *GoogleAnalyticsAdminV1alphaChannelGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesAdSenseLinksCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphaadsenselink *GoogleAnalyticsAdminV1alphaAdSenseLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a ChannelGroup. +// Create: Creates an AdSenseLink. // -// - parent: The property for which to create a ChannelGroup. Example -// format: properties/1234. -func (r *PropertiesChannelGroupsService) Create(parent string, googleanalyticsadminv1alphachannelgroup *GoogleAnalyticsAdminV1alphaChannelGroup) *PropertiesChannelGroupsCreateCall { - c := &PropertiesChannelGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The property for which to create an AdSense Link. Format: +// properties/{propertyId} Example: properties/1234. +func (r *PropertiesAdSenseLinksService) Create(parent string, googleanalyticsadminv1alphaadsenselink *GoogleAnalyticsAdminV1alphaAdSenseLink) *PropertiesAdSenseLinksCreateCall { + c := &PropertiesAdSenseLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleanalyticsadminv1alphachannelgroup = googleanalyticsadminv1alphachannelgroup + c.googleanalyticsadminv1alphaadsenselink = googleanalyticsadminv1alphaadsenselink 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 *PropertiesChannelGroupsCreateCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsCreateCall { +func (c *PropertiesAdSenseLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18508,21 +14642,21 @@ func (c *PropertiesChannelGroupsCreateCall) Fields(s ...googleapi.Field) *Proper // 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 *PropertiesChannelGroupsCreateCall) Context(ctx context.Context) *PropertiesChannelGroupsCreateCall { +func (c *PropertiesAdSenseLinksCreateCall) Context(ctx context.Context) *PropertiesAdSenseLinksCreateCall { 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 *PropertiesChannelGroupsCreateCall) Header() http.Header { +func (c *PropertiesAdSenseLinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesChannelGroupsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAdSenseLinksCreateCall) 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_ { @@ -18530,14 +14664,14 @@ func (c *PropertiesChannelGroupsCreateCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphachannelgroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaadsenselink) 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}/channelGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/adSenseLinks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18550,15 +14684,15 @@ func (c *PropertiesChannelGroupsCreateCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.channelGroups.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaChannelGroup or error will +// Do executes the "analyticsadmin.properties.adSenseLinks.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAdSenseLink or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleAnalyticsAdminV1alphaChannelGroup.ServerResponse.Header or (if +// *GoogleAnalyticsAdminV1alphaAdSenseLink.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 *PropertiesChannelGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaChannelGroup, error) { +func (c *PropertiesAdSenseLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAdSenseLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18577,7 +14711,7 @@ func (c *PropertiesChannelGroupsCreateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaChannelGroup{ + ret := &GoogleAnalyticsAdminV1alphaAdSenseLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18589,28 +14723,28 @@ func (c *PropertiesChannelGroupsCreateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Creates a ChannelGroup.", - // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups", + // "description": "Creates an AdSenseLink.", + // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.channelGroups.create", + // "id": "analyticsadmin.properties.adSenseLinks.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The property for which to create a ChannelGroup. Example format: properties/1234", + // "description": "Required. The property for which to create an AdSense Link. Format: properties/{propertyId} Example: properties/1234", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/channelGroups", + // "path": "v1alpha/{+parent}/adSenseLinks", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaChannelGroup" + // "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaChannelGroup" + // "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -18619,30 +14753,31 @@ func (c *PropertiesChannelGroupsCreateCall) Do(opts ...googleapi.CallOption) (*G } -// method id "analyticsadmin.properties.channelGroups.delete": +// method id "analyticsadmin.properties.adSenseLinks.delete": -type PropertiesChannelGroupsDeleteCall struct { +type PropertiesAdSenseLinksDeleteCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a ChannelGroup on a property. +// Delete: Deletes an AdSenseLink. // -// - name: The ChannelGroup to delete. Example format: -// properties/1234/channelGroups/5678. -func (r *PropertiesChannelGroupsService) Delete(name string) *PropertiesChannelGroupsDeleteCall { - c := &PropertiesChannelGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - name: Unique identifier for the AdSense Link to be deleted. Format: +// properties/{propertyId}/adSenseLinks/{linkId} Example: +// properties/1234/adSenseLinks/5678. +func (r *PropertiesAdSenseLinksService) Delete(nameid string) *PropertiesAdSenseLinksDeleteCall { + c := &PropertiesAdSenseLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid 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 *PropertiesChannelGroupsDeleteCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsDeleteCall { +func (c *PropertiesAdSenseLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18650,21 +14785,21 @@ func (c *PropertiesChannelGroupsDeleteCall) Fields(s ...googleapi.Field) *Proper // 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 *PropertiesChannelGroupsDeleteCall) Context(ctx context.Context) *PropertiesChannelGroupsDeleteCall { +func (c *PropertiesAdSenseLinksDeleteCall) Context(ctx context.Context) *PropertiesAdSenseLinksDeleteCall { 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 *PropertiesChannelGroupsDeleteCall) Header() http.Header { +func (c *PropertiesAdSenseLinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesChannelGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAdSenseLinksDeleteCall) 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_ { @@ -18682,19 +14817,19 @@ func (c *PropertiesChannelGroupsDeleteCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.channelGroups.delete" call. +// Do executes the "analyticsadmin.properties.adSenseLinks.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 *PropertiesChannelGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *PropertiesAdSenseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18725,18 +14860,18 @@ func (c *PropertiesChannelGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Deletes a ChannelGroup on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups/{channelGroupsId}", + // "description": "Deletes an AdSenseLink.", + // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks/{adSenseLinksId}", // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.channelGroups.delete", + // "id": "analyticsadmin.properties.adSenseLinks.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The ChannelGroup to delete. Example format: properties/1234/channelGroups/5678", + // "description": "Required. Unique identifier for the AdSense Link to be deleted. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678", // "location": "path", - // "pattern": "^properties/[^/]+/channelGroups/[^/]+$", + // "pattern": "^properties/[^/]+/adSenseLinks/[^/]+$", // "required": true, // "type": "string" // } @@ -18752,31 +14887,32 @@ func (c *PropertiesChannelGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*G } -// method id "analyticsadmin.properties.channelGroups.get": +// method id "analyticsadmin.properties.adSenseLinks.get": -type PropertiesChannelGroupsGetCall struct { +type PropertiesAdSenseLinksGetCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Lookup for a single ChannelGroup. +// Get: Looks up a single AdSenseLink. // -// - name: The ChannelGroup to get. Example format: -// properties/1234/channelGroups/5678. -func (r *PropertiesChannelGroupsService) Get(name string) *PropertiesChannelGroupsGetCall { - c := &PropertiesChannelGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - name: Unique identifier for the AdSense Link requested. Format: +// properties/{propertyId}/adSenseLinks/{linkId} Example: +// properties/1234/adSenseLinks/5678. +func (r *PropertiesAdSenseLinksService) Get(nameid string) *PropertiesAdSenseLinksGetCall { + c := &PropertiesAdSenseLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid 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 *PropertiesChannelGroupsGetCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsGetCall { +func (c *PropertiesAdSenseLinksGetCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18786,7 +14922,7 @@ func (c *PropertiesChannelGroupsGetCall) Fields(s ...googleapi.Field) *Propertie // 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 *PropertiesChannelGroupsGetCall) IfNoneMatch(entityTag string) *PropertiesChannelGroupsGetCall { +func (c *PropertiesAdSenseLinksGetCall) IfNoneMatch(entityTag string) *PropertiesAdSenseLinksGetCall { c.ifNoneMatch_ = entityTag return c } @@ -18794,21 +14930,21 @@ func (c *PropertiesChannelGroupsGetCall) IfNoneMatch(entityTag string) *Properti // 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 *PropertiesChannelGroupsGetCall) Context(ctx context.Context) *PropertiesChannelGroupsGetCall { +func (c *PropertiesAdSenseLinksGetCall) Context(ctx context.Context) *PropertiesAdSenseLinksGetCall { 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 *PropertiesChannelGroupsGetCall) Header() http.Header { +func (c *PropertiesAdSenseLinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesChannelGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAdSenseLinksGetCall) 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_ { @@ -18829,20 +14965,20 @@ func (c *PropertiesChannelGroupsGetCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.channelGroups.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaChannelGroup or error will +// Do executes the "analyticsadmin.properties.adSenseLinks.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAdSenseLink or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleAnalyticsAdminV1alphaChannelGroup.ServerResponse.Header or (if +// *GoogleAnalyticsAdminV1alphaAdSenseLink.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 *PropertiesChannelGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaChannelGroup, error) { +func (c *PropertiesAdSenseLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAdSenseLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18861,7 +14997,7 @@ func (c *PropertiesChannelGroupsGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaChannelGroup{ + ret := &GoogleAnalyticsAdminV1alphaAdSenseLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18873,25 +15009,25 @@ func (c *PropertiesChannelGroupsGetCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Lookup for a single ChannelGroup.", - // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups/{channelGroupsId}", + // "description": "Looks up a single AdSenseLink.", + // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks/{adSenseLinksId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.channelGroups.get", + // "id": "analyticsadmin.properties.adSenseLinks.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The ChannelGroup to get. Example format: properties/1234/channelGroups/5678", + // "description": "Required. Unique identifier for the AdSense Link requested. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678", // "location": "path", - // "pattern": "^properties/[^/]+/channelGroups/[^/]+$", + // "pattern": "^properties/[^/]+/adSenseLinks/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaChannelGroup" + // "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -18901,9 +15037,9 @@ func (c *PropertiesChannelGroupsGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "analyticsadmin.properties.channelGroups.list": +// method id "analyticsadmin.properties.adSenseLinks.list": -type PropertiesChannelGroupsListCall struct { +type PropertiesAdSenseLinksListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -18912,12 +15048,12 @@ type PropertiesChannelGroupsListCall struct { header_ http.Header } -// List: Lists ChannelGroups on a property. +// List: Lists AdSenseLinks on a property. // -// - parent: The property for which to list ChannelGroups. Example -// format: properties/1234. -func (r *PropertiesChannelGroupsService) List(parent string) *PropertiesChannelGroupsListCall { - c := &PropertiesChannelGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Resource name of the parent property. Format: +// properties/{propertyId} Example: properties/1234. +func (r *PropertiesAdSenseLinksService) List(parent string) *PropertiesAdSenseLinksListCall { + c := &PropertiesAdSenseLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -18926,17 +15062,17 @@ func (r *PropertiesChannelGroupsService) List(parent string) *PropertiesChannelG // 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 *PropertiesChannelGroupsListCall) PageSize(pageSize int64) *PropertiesChannelGroupsListCall { +func (c *PropertiesAdSenseLinksListCall) PageSize(pageSize int64) *PropertiesAdSenseLinksListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListChannelGroups` call. Provide this to +// PageToken sets the optional parameter "pageToken": A page token +// received from a previous `ListAdSenseLinks` call. Provide this to // retrieve the subsequent page. When paginating, all other parameters -// provided to `ListChannelGroups` must match the call that provided the +// provided to `ListAdSenseLinks` must match the call that provided the // page token. -func (c *PropertiesChannelGroupsListCall) PageToken(pageToken string) *PropertiesChannelGroupsListCall { +func (c *PropertiesAdSenseLinksListCall) PageToken(pageToken string) *PropertiesAdSenseLinksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18944,7 +15080,7 @@ func (c *PropertiesChannelGroupsListCall) PageToken(pageToken string) *Propertie // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesChannelGroupsListCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsListCall { +func (c *PropertiesAdSenseLinksListCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18954,7 +15090,7 @@ func (c *PropertiesChannelGroupsListCall) Fields(s ...googleapi.Field) *Properti // 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 *PropertiesChannelGroupsListCall) IfNoneMatch(entityTag string) *PropertiesChannelGroupsListCall { +func (c *PropertiesAdSenseLinksListCall) IfNoneMatch(entityTag string) *PropertiesAdSenseLinksListCall { c.ifNoneMatch_ = entityTag return c } @@ -18962,21 +15098,21 @@ func (c *PropertiesChannelGroupsListCall) IfNoneMatch(entityTag string) *Propert // 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 *PropertiesChannelGroupsListCall) Context(ctx context.Context) *PropertiesChannelGroupsListCall { +func (c *PropertiesAdSenseLinksListCall) Context(ctx context.Context) *PropertiesAdSenseLinksListCall { 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 *PropertiesChannelGroupsListCall) Header() http.Header { +func (c *PropertiesAdSenseLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesChannelGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesAdSenseLinksListCall) 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_ { @@ -18989,7 +15125,7 @@ func (c *PropertiesChannelGroupsListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/channelGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/adSenseLinks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19002,16 +15138,16 @@ func (c *PropertiesChannelGroupsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.channelGroups.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListChannelGroupsResponse +// Do executes the "analyticsadmin.properties.adSenseLinks.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse // or error will be non-nil. Any non-2xx status code is an error. // Response headers are in either -// *GoogleAnalyticsAdminV1alphaListChannelGroupsResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse.ServerResponse.He +// ader 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 *PropertiesChannelGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListChannelGroupsResponse, error) { +func (c *PropertiesAdSenseLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19030,7 +15166,7 @@ func (c *PropertiesChannelGroupsListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListChannelGroupsResponse{ + ret := &GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19042,10 +15178,10 @@ func (c *PropertiesChannelGroupsListCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Lists ChannelGroups on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups", + // "description": "Lists AdSenseLinks on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.channelGroups.list", + // "id": "analyticsadmin.properties.adSenseLinks.list", // "parameterOrder": [ // "parent" // ], @@ -19057,21 +15193,21 @@ func (c *PropertiesChannelGroupsListCall) Do(opts ...googleapi.CallOption) (*Goo // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListChannelGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListChannelGroups` must match the call that provided the page token.", + // "description": "A page token received from a previous `ListAdSenseLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAdSenseLinks` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The property for which to list ChannelGroups. Example format: properties/1234", + // "description": "Required. Resource name of the parent property. Format: properties/{propertyId} Example: properties/1234", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/channelGroups", + // "path": "v1alpha/{+parent}/adSenseLinks", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListChannelGroupsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -19084,7 +15220,7 @@ func (c *PropertiesChannelGroupsListCall) Do(opts ...googleapi.CallOption) (*Goo // 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 *PropertiesChannelGroupsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListChannelGroupsResponse) error) error { +func (c *PropertiesAdSenseLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -19102,43 +15238,31 @@ func (c *PropertiesChannelGroupsListCall) Pages(ctx context.Context, f func(*Goo } } -// method id "analyticsadmin.properties.channelGroups.patch": +// method id "analyticsadmin.properties.audiences.archive": -type PropertiesChannelGroupsPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphachannelgroup *GoogleAnalyticsAdminV1alphaChannelGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesAudiencesArchiveCall struct { + s *Service + name string + googleanalyticsadminv1alphaarchiveaudiencerequest *GoogleAnalyticsAdminV1alphaArchiveAudienceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ChannelGroup. +// Archive: Archives an Audience on a property. // -// - name: Output only. The resource name for this Channel Group -// resource. Format: -// properties/{property}/channelGroups/{channel_group}. -func (r *PropertiesChannelGroupsService) Patch(name string, googleanalyticsadminv1alphachannelgroup *GoogleAnalyticsAdminV1alphaChannelGroup) *PropertiesChannelGroupsPatchCall { - c := &PropertiesChannelGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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.googleanalyticsadminv1alphachannelgroup = googleanalyticsadminv1alphachannelgroup - 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 *PropertiesChannelGroupsPatchCall) UpdateMask(updateMask string) *PropertiesChannelGroupsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + 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 *PropertiesChannelGroupsPatchCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsPatchCall { +func (c *PropertiesAudiencesArchiveCall) Fields(s ...googleapi.Field) *PropertiesAudiencesArchiveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19146,21 +15270,21 @@ func (c *PropertiesChannelGroupsPatchCall) Fields(s ...googleapi.Field) *Propert // 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 *PropertiesChannelGroupsPatchCall) Context(ctx context.Context) *PropertiesChannelGroupsPatchCall { +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 *PropertiesChannelGroupsPatchCall) Header() http.Header { +func (c *PropertiesAudiencesArchiveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesChannelGroupsPatchCall) 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_ { @@ -19168,16 +15292,16 @@ func (c *PropertiesChannelGroupsPatchCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphachannelgroup) + 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:archive") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -19188,15 +15312,14 @@ func (c *PropertiesChannelGroupsPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.channelGroups.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaChannelGroup or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaChannelGroup.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 +// 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 *PropertiesChannelGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaChannelGroup, error) { +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 { @@ -19215,7 +15338,7 @@ func (c *PropertiesChannelGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaChannelGroup{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19227,34 +15350,171 @@ func (c *PropertiesChannelGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Updates a ChannelGroup.", - // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups/{channelGroupsId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.channelGroups.patch", + // "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": "Output only. The resource name for this Channel Group resource. Format: properties/{property}/channelGroups/{channel_group}", + // "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" + // ] + // } + +} + +// method id "analyticsadmin.properties.audiences.create": + +type PropertiesAudiencesCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphaaudience *GoogleAnalyticsAdminV1alphaAudience + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an Audience. +// +// - 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 *PropertiesAudiencesCreateCall) Fields(s ...googleapi.Field) *PropertiesAudiencesCreateCall { + 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 *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 *PropertiesAudiencesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + 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/{+parent}/audiences") + urls += "?" + c.urlParams_.Encode() + 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.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 *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 *PropertiesAudiencesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAudience, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleAnalyticsAdminV1alphaAudience{ + 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": "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/[^/]+/channelGroups/[^/]+$", + // "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": "GoogleAnalyticsAdminV1alphaChannelGroup" + // "$ref": "GoogleAnalyticsAdminV1alphaAudience" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaChannelGroup" + // "$ref": "GoogleAnalyticsAdminV1alphaAudience" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -19263,91 +15523,98 @@ func (c *PropertiesChannelGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "analyticsadmin.properties.conversionEvents.create": +// method id "analyticsadmin.properties.audiences.get": -type PropertiesConversionEventsCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesAudiencesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a conversion event with the specified attributes. +// Get: Lookup for a single Audience. Audiences created before 2020 may +// not be supported. Default audiences will not show filter definitions. // -// - parent: The resource name of the parent property where this -// conversion event will be created. Format: properties/123. -func (r *PropertiesConversionEventsService) Create(parent string, googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent) *PropertiesConversionEventsCreateCall { - c := &PropertiesConversionEventsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphaconversionevent = googleanalyticsadminv1alphaconversionevent +// - 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 *PropertiesConversionEventsCreateCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsCreateCall { +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 *PropertiesConversionEventsCreateCall) Context(ctx context.Context) *PropertiesConversionEventsCreateCall { +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 *PropertiesConversionEventsCreateCall) Header() http.Header { +func (c *PropertiesAudiencesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesConversionEventsCreateCall) 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.googleanalyticsadminv1alphaconversionevent) - 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}/conversionEvents") + 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.properties.conversionEvents.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaConversionEvent or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaConversionEvent.ServerResponse.Header or +// 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 *PropertiesConversionEventsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaConversionEvent, 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 { @@ -19366,7 +15633,7 @@ func (c *PropertiesConversionEventsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaConversionEvent{ + ret := &GoogleAnalyticsAdminV1alphaAudience{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19378,113 +15645,146 @@ func (c *PropertiesConversionEventsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a conversion event with the specified attributes.", - // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.conversionEvents.create", + // "description": "Lookup for a single Audience. Audiences created before 2020 may not be supported. Default audiences will not show filter definitions.", + // "flatPath": "v1alpha/properties/{propertiesId}/audiences/{audiencesId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.audiences.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The resource name of the parent property where this conversion event will be created. Format: properties/123", + // "name": { + // "description": "Required. The name of the Audience to get. Example format: properties/1234/audiences/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/audiences/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversionEvents", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" + // "$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.conversionEvents.delete": +// method id "analyticsadmin.properties.audiences.list": -type PropertiesConversionEventsDeleteCall struct { - s *Service - name string - 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 } -// Delete: Deletes a conversion event in a property. +// List: Lists Audiences on a property. Audiences created before 2020 +// may not be supported. Default audiences will not show filter +// definitions. // -// - name: The resource name of the conversion event to delete. Format: -// properties/{property}/conversionEvents/{conversion_event} Example: -// "properties/123/conversionEvents/456". -func (r *PropertiesConversionEventsService) Delete(name string) *PropertiesConversionEventsDeleteCall { - c := &PropertiesConversionEventsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 +} + +// 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 *PropertiesConversionEventsDeleteCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsDeleteCall { +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 *PropertiesConversionEventsDeleteCall) Context(ctx context.Context) *PropertiesConversionEventsDeleteCall { +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 *PropertiesConversionEventsDeleteCall) Header() http.Header { +func (c *PropertiesAudiencesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesConversionEventsDeleteCall) 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()) + 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/{+parent}/audiences") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.conversionEvents.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 *PropertiesConversionEventsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// 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 +// *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 *PropertiesAudiencesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAudiencesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19503,7 +15803,7 @@ func (c *PropertiesConversionEventsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaListAudiencesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19515,106 +15815,141 @@ func (c *PropertiesConversionEventsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a conversion event in a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.conversionEvents.delete", + // "description": "Lists Audiences on a property. Audiences created before 2020 may not be supported. Default audiences will not show filter definitions.", + // "flatPath": "v1alpha/properties/{propertiesId}/audiences", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.audiences.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conversionEvents/456\"", + // "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/[^/]+/conversionEvents/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/audiences", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$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.conversionEvents.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 *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) + } +} + +// method id "analyticsadmin.properties.audiences.patch": -type PropertiesConversionEventsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesAudiencesPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaaudience *GoogleAnalyticsAdminV1alphaAudience + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieve a single conversion event. +// Patch: Updates an Audience on a property. // -// - name: The resource name of the conversion event to retrieve. -// Format: properties/{property}/conversionEvents/{conversion_event} -// Example: "properties/123/conversionEvents/456". -func (r *PropertiesConversionEventsService) Get(name string) *PropertiesConversionEventsGetCall { - c := &PropertiesConversionEventsGetCall{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.googleanalyticsadminv1alphaaudience = googleanalyticsadminv1alphaaudience + 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 *PropertiesAudiencesPatchCall) UpdateMask(updateMask string) *PropertiesAudiencesPatchCall { + 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 *PropertiesConversionEventsGetCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsGetCall { +func (c *PropertiesAudiencesPatchCall) Fields(s ...googleapi.Field) *PropertiesAudiencesPatchCall { 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 *PropertiesConversionEventsGetCall) IfNoneMatch(entityTag string) *PropertiesConversionEventsGetCall { - 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 *PropertiesConversionEventsGetCall) Context(ctx context.Context) *PropertiesConversionEventsGetCall { +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 *PropertiesConversionEventsGetCall) Header() http.Header { +func (c *PropertiesAudiencesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesConversionEventsGetCall) 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_ { 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.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 += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -19625,16 +15960,15 @@ func (c *PropertiesConversionEventsGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.conversionEvents.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaConversionEvent or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaConversionEvent.ServerResponse.Header or +// 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 *PropertiesConversionEventsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaConversionEvent, 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 { @@ -19653,7 +15987,7 @@ func (c *PropertiesConversionEventsGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaConversionEvent{ + ret := &GoogleAnalyticsAdminV1alphaAudience{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19665,79 +15999,68 @@ func (c *PropertiesConversionEventsGetCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Retrieve a single conversion event.", - // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.conversionEvents.get", + // "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": "Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conversionEvents/456\"", + // "description": "Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}", // "location": "path", - // "pattern": "^properties/[^/]+/conversionEvents/[^/]+$", + // "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": "GoogleAnalyticsAdminV1alphaConversionEvent" + // "$ref": "GoogleAnalyticsAdminV1alphaAudience" // }, // "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.conversionEvents.list": +// method id "analyticsadmin.properties.bigQueryLinks.get": -type PropertiesConversionEventsListCall struct { +type PropertiesBigQueryLinksGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Returns a list of conversion events in the specified parent -// property. Returns an empty list if no conversion events are found. +// Get: Lookup for a single BigQuery Link. // -// - parent: The resource name of the parent property. Example: -// 'properties/123'. -func (r *PropertiesConversionEventsService) List(parent string) *PropertiesConversionEventsListCall { - c := &PropertiesConversionEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// 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 *PropertiesConversionEventsListCall) PageSize(pageSize int64) *PropertiesConversionEventsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversionEvents` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListConversionEvents` must match the call that provided -// the page token. -func (c *PropertiesConversionEventsListCall) PageToken(pageToken string) *PropertiesConversionEventsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the BigQuery link to lookup. Format: +// properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: +// properties/123/bigQueryLinks/456. +func (r *PropertiesBigQueryLinksService) Get(name string) *PropertiesBigQueryLinksGetCall { + c := &PropertiesBigQueryLinksGetCall{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 *PropertiesConversionEventsListCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsListCall { +func (c *PropertiesBigQueryLinksGetCall) Fields(s ...googleapi.Field) *PropertiesBigQueryLinksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19747,7 +16070,7 @@ func (c *PropertiesConversionEventsListCall) Fields(s ...googleapi.Field) *Prope // 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 *PropertiesConversionEventsListCall) IfNoneMatch(entityTag string) *PropertiesConversionEventsListCall { +func (c *PropertiesBigQueryLinksGetCall) IfNoneMatch(entityTag string) *PropertiesBigQueryLinksGetCall { c.ifNoneMatch_ = entityTag return c } @@ -19755,21 +16078,21 @@ func (c *PropertiesConversionEventsListCall) IfNoneMatch(entityTag string) *Prop // 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 *PropertiesConversionEventsListCall) Context(ctx context.Context) *PropertiesConversionEventsListCall { +func (c *PropertiesBigQueryLinksGetCall) Context(ctx context.Context) *PropertiesBigQueryLinksGetCall { 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 *PropertiesConversionEventsListCall) Header() http.Header { +func (c *PropertiesBigQueryLinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesConversionEventsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesBigQueryLinksGetCall) 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_ { @@ -19782,7 +16105,7 @@ func (c *PropertiesConversionEventsListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversionEvents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19790,22 +16113,20 @@ func (c *PropertiesConversionEventsListCall) doRequest(alt string) (*http.Respon } 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.properties.conversionEvents.list" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaListConversionEventsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaListConversionEventsResponse.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 *PropertiesConversionEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListConversionEventsResponse, error) { +// Do executes the "analyticsadmin.properties.bigQueryLinks.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaBigQueryLink or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaBigQueryLink.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 *PropertiesBigQueryLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBigQueryLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19824,7 +16145,7 @@ func (c *PropertiesConversionEventsListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListConversionEventsResponse{ + ret := &GoogleAnalyticsAdminV1alphaBigQueryLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19836,36 +16157,25 @@ func (c *PropertiesConversionEventsListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", - // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", + // "description": "Lookup for a single BigQuery Link.", + // "flatPath": "v1alpha/properties/{propertiesId}/bigQueryLinks/{bigQueryLinksId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.conversionEvents.list", + // "id": "analyticsadmin.properties.bigQueryLinks.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "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 `ListConversionEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConversionEvents` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the parent property. Example: 'properties/123'", + // "name": { + // "description": "Required. The name of the BigQuery link to lookup. Format: properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: properties/123/bigQueryLinks/456", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/bigQueryLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversionEvents", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListConversionEventsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaBigQueryLink" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -19875,122 +16185,118 @@ func (c *PropertiesConversionEventsListCall) Do(opts ...googleapi.CallOption) (* } -// 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 *PropertiesConversionEventsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListConversionEventsResponse) 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.conversionEvents.patch": +// method id "analyticsadmin.properties.bigQueryLinks.list": -type PropertiesConversionEventsPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesBigQueryLinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a conversion event with the specified attributes. +// List: Lists BigQuery Links on a property. // -// - name: Output only. Resource name of this conversion event. Format: -// properties/{property}/conversionEvents/{conversion_event}. -func (r *PropertiesConversionEventsService) Patch(name string, googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent) *PropertiesConversionEventsPatchCall { - c := &PropertiesConversionEventsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphaconversionevent = googleanalyticsadminv1alphaconversionevent +// - parent: The name of the property to list BigQuery links under. +// Format: properties/{property_id} Example: properties/1234. +func (r *PropertiesBigQueryLinksService) List(parent string) *PropertiesBigQueryLinksListCall { + c := &PropertiesBigQueryLinksListCall{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 *PropertiesConversionEventsPatchCall) UpdateMask(updateMask string) *PropertiesConversionEventsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// 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 *PropertiesBigQueryLinksListCall) PageSize(pageSize int64) *PropertiesBigQueryLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListBigQueryLinks` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListBigQueryLinks` must match the call that provided the +// page token. +func (c *PropertiesBigQueryLinksListCall) PageToken(pageToken string) *PropertiesBigQueryLinksListCall { + 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 *PropertiesConversionEventsPatchCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsPatchCall { +func (c *PropertiesBigQueryLinksListCall) Fields(s ...googleapi.Field) *PropertiesBigQueryLinksListCall { 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 *PropertiesBigQueryLinksListCall) IfNoneMatch(entityTag string) *PropertiesBigQueryLinksListCall { + 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 *PropertiesConversionEventsPatchCall) Context(ctx context.Context) *PropertiesConversionEventsPatchCall { +func (c *PropertiesBigQueryLinksListCall) Context(ctx context.Context) *PropertiesBigQueryLinksListCall { 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 *PropertiesConversionEventsPatchCall) Header() http.Header { +func (c *PropertiesBigQueryLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesConversionEventsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesBigQueryLinksListCall) 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.googleanalyticsadminv1alphaconversionevent) - 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}/bigQueryLinks") 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.conversionEvents.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaConversionEvent or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaConversionEvent.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.bigQueryLinks.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse.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 *PropertiesConversionEventsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaConversionEvent, error) { +func (c *PropertiesBigQueryLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20009,7 +16315,7 @@ func (c *PropertiesConversionEventsPatchCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaConversionEvent{ + ret := &GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20021,68 +16327,92 @@ func (c *PropertiesConversionEventsPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates a conversion event with the specified attributes.", - // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.conversionEvents.patch", + // "description": "Lists BigQuery Links on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/bigQueryLinks", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.bigQueryLinks.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. Resource name of this conversion event. Format: properties/{property}/conversionEvents/{conversion_event}", - // "location": "path", - // "pattern": "^properties/[^/]+/conversionEvents/[^/]+$", - // "required": true, - // "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" // }, - // "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 `ListBigQueryLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBigQueryLinks` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the property to list BigQuery links under. Format: properties/{property_id} Example: properties/1234", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" - // }, + // "path": "v1alpha/{+parent}/bigQueryLinks", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" + // "$ref": "GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse" // }, // "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.customDimensions.archive": +// 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 *PropertiesBigQueryLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListBigQueryLinksResponse) 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 PropertiesCustomDimensionsArchiveCall struct { - s *Service - name string - googleanalyticsadminv1alphaarchivecustomdimensionrequest *GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.channelGroups.create": + +type PropertiesChannelGroupsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphachannelgroup *GoogleAnalyticsAdminV1alphaChannelGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Archive: Archives a CustomDimension on a property. +// Create: Creates a ChannelGroup. // -// - name: The name of the CustomDimension to archive. Example format: -// properties/1234/customDimensions/5678. -func (r *PropertiesCustomDimensionsService) Archive(name string, googleanalyticsadminv1alphaarchivecustomdimensionrequest *GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest) *PropertiesCustomDimensionsArchiveCall { - c := &PropertiesCustomDimensionsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphaarchivecustomdimensionrequest = googleanalyticsadminv1alphaarchivecustomdimensionrequest +// - parent: The property for which to create a ChannelGroup. Example +// format: properties/1234. +func (r *PropertiesChannelGroupsService) Create(parent string, googleanalyticsadminv1alphachannelgroup *GoogleAnalyticsAdminV1alphaChannelGroup) *PropertiesChannelGroupsCreateCall { + c := &PropertiesChannelGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphachannelgroup = googleanalyticsadminv1alphachannelgroup 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 *PropertiesCustomDimensionsArchiveCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsArchiveCall { +func (c *PropertiesChannelGroupsCreateCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20090,21 +16420,21 @@ func (c *PropertiesCustomDimensionsArchiveCall) Fields(s ...googleapi.Field) *Pr // 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 *PropertiesCustomDimensionsArchiveCall) Context(ctx context.Context) *PropertiesCustomDimensionsArchiveCall { +func (c *PropertiesChannelGroupsCreateCall) Context(ctx context.Context) *PropertiesChannelGroupsCreateCall { 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 *PropertiesCustomDimensionsArchiveCall) Header() http.Header { +func (c *PropertiesChannelGroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomDimensionsArchiveCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesChannelGroupsCreateCall) 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_ { @@ -20112,14 +16442,14 @@ func (c *PropertiesCustomDimensionsArchiveCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaarchivecustomdimensionrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphachannelgroup) 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}:archive") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/channelGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20127,19 +16457,20 @@ func (c *PropertiesCustomDimensionsArchiveCall) doRequest(alt string) (*http.Res } 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.customDimensions.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 +// Do executes the "analyticsadmin.properties.channelGroups.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaChannelGroup or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaChannelGroup.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 *PropertiesCustomDimensionsArchiveCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *PropertiesChannelGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaChannelGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20158,7 +16489,7 @@ func (c *PropertiesCustomDimensionsArchiveCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaChannelGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20170,28 +16501,28 @@ func (c *PropertiesCustomDimensionsArchiveCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Archives a CustomDimension on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions/{customDimensionsId}:archive", + // "description": "Creates a ChannelGroup.", + // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.customDimensions.archive", + // "id": "analyticsadmin.properties.channelGroups.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678", + // "parent": { + // "description": "Required. The property for which to create a ChannelGroup. Example format: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/customDimensions/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:archive", + // "path": "v1alpha/{+parent}/channelGroups", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaChannelGroup" // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaChannelGroup" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -20200,31 +16531,30 @@ func (c *PropertiesCustomDimensionsArchiveCall) Do(opts ...googleapi.CallOption) } -// method id "analyticsadmin.properties.customDimensions.create": +// method id "analyticsadmin.properties.channelGroups.delete": -type PropertiesCustomDimensionsCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesChannelGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a CustomDimension. +// Delete: Deletes a ChannelGroup on a property. // -// - parent: Example format: properties/1234. -func (r *PropertiesCustomDimensionsService) Create(parent string, googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension) *PropertiesCustomDimensionsCreateCall { - c := &PropertiesCustomDimensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphacustomdimension = googleanalyticsadminv1alphacustomdimension +// - name: The ChannelGroup to delete. Example format: +// properties/1234/channelGroups/5678. +func (r *PropertiesChannelGroupsService) Delete(name string) *PropertiesChannelGroupsDeleteCall { + c := &PropertiesChannelGroupsDeleteCall{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 *PropertiesCustomDimensionsCreateCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsCreateCall { +func (c *PropertiesChannelGroupsDeleteCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20232,21 +16562,21 @@ func (c *PropertiesCustomDimensionsCreateCall) Fields(s ...googleapi.Field) *Pro // 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 *PropertiesCustomDimensionsCreateCall) Context(ctx context.Context) *PropertiesCustomDimensionsCreateCall { +func (c *PropertiesChannelGroupsDeleteCall) Context(ctx context.Context) *PropertiesChannelGroupsDeleteCall { 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 *PropertiesCustomDimensionsCreateCall) Header() http.Header { +func (c *PropertiesChannelGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomDimensionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesChannelGroupsDeleteCall) 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_ { @@ -20254,36 +16584,29 @@ func (c *PropertiesCustomDimensionsCreateCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustomdimension) - 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}/customDimensions") + 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.properties.customDimensions.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaCustomDimension or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaCustomDimension.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 *PropertiesCustomDimensionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomDimension, error) { +// Do executes the "analyticsadmin.properties.channelGroups.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 *PropertiesChannelGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20302,7 +16625,7 @@ func (c *PropertiesCustomDimensionsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaCustomDimension{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20314,28 +16637,25 @@ func (c *PropertiesCustomDimensionsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a CustomDimension.", - // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.customDimensions.create", + // "description": "Deletes a ChannelGroup on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups/{channelGroupsId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.channelGroups.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Required. The ChannelGroup to delete. Example format: properties/1234/channelGroups/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/channelGroups/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/customDimensions", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -20344,9 +16664,9 @@ func (c *PropertiesCustomDimensionsCreateCall) Do(opts ...googleapi.CallOption) } -// method id "analyticsadmin.properties.customDimensions.get": +// method id "analyticsadmin.properties.channelGroups.get": -type PropertiesCustomDimensionsGetCall struct { +type PropertiesChannelGroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20355,12 +16675,12 @@ type PropertiesCustomDimensionsGetCall struct { header_ http.Header } -// Get: Lookup for a single CustomDimension. +// Get: Lookup for a single ChannelGroup. // -// - name: The name of the CustomDimension to get. Example format: -// properties/1234/customDimensions/5678. -func (r *PropertiesCustomDimensionsService) Get(name string) *PropertiesCustomDimensionsGetCall { - c := &PropertiesCustomDimensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The ChannelGroup to get. Example format: +// properties/1234/channelGroups/5678. +func (r *PropertiesChannelGroupsService) Get(name string) *PropertiesChannelGroupsGetCall { + c := &PropertiesChannelGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -20368,7 +16688,7 @@ func (r *PropertiesCustomDimensionsService) Get(name string) *PropertiesCustomDi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesCustomDimensionsGetCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsGetCall { +func (c *PropertiesChannelGroupsGetCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20378,7 +16698,7 @@ func (c *PropertiesCustomDimensionsGetCall) Fields(s ...googleapi.Field) *Proper // 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 *PropertiesCustomDimensionsGetCall) IfNoneMatch(entityTag string) *PropertiesCustomDimensionsGetCall { +func (c *PropertiesChannelGroupsGetCall) IfNoneMatch(entityTag string) *PropertiesChannelGroupsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -20386,21 +16706,21 @@ func (c *PropertiesCustomDimensionsGetCall) IfNoneMatch(entityTag string) *Prope // 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 *PropertiesCustomDimensionsGetCall) Context(ctx context.Context) *PropertiesCustomDimensionsGetCall { +func (c *PropertiesChannelGroupsGetCall) Context(ctx context.Context) *PropertiesChannelGroupsGetCall { 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 *PropertiesCustomDimensionsGetCall) Header() http.Header { +func (c *PropertiesChannelGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomDimensionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesChannelGroupsGetCall) 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_ { @@ -20426,16 +16746,15 @@ func (c *PropertiesCustomDimensionsGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.customDimensions.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaCustomDimension or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaCustomDimension.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 *PropertiesCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomDimension, error) { +// Do executes the "analyticsadmin.properties.channelGroups.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaChannelGroup or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaChannelGroup.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 *PropertiesChannelGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaChannelGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20454,7 +16773,7 @@ func (c *PropertiesCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaCustomDimension{ + ret := &GoogleAnalyticsAdminV1alphaChannelGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20466,25 +16785,25 @@ func (c *PropertiesCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Lookup for a single CustomDimension.", - // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions/{customDimensionsId}", + // "description": "Lookup for a single ChannelGroup.", + // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups/{channelGroupsId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.customDimensions.get", + // "id": "analyticsadmin.properties.channelGroups.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678", + // "description": "Required. The ChannelGroup to get. Example format: properties/1234/channelGroups/5678", // "location": "path", - // "pattern": "^properties/[^/]+/customDimensions/[^/]+$", + // "pattern": "^properties/[^/]+/channelGroups/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" + // "$ref": "GoogleAnalyticsAdminV1alphaChannelGroup" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -20494,9 +16813,9 @@ func (c *PropertiesCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*G } -// method id "analyticsadmin.properties.customDimensions.list": +// method id "analyticsadmin.properties.channelGroups.list": -type PropertiesCustomDimensionsListCall struct { +type PropertiesChannelGroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -20505,11 +16824,12 @@ type PropertiesCustomDimensionsListCall struct { header_ http.Header } -// List: Lists CustomDimensions on a property. +// List: Lists ChannelGroups on a property. // -// - parent: Example format: properties/1234. -func (r *PropertiesCustomDimensionsService) List(parent string) *PropertiesCustomDimensionsListCall { - c := &PropertiesCustomDimensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The property for which to list ChannelGroups. Example +// format: properties/1234. +func (r *PropertiesChannelGroupsService) List(parent string) *PropertiesChannelGroupsListCall { + c := &PropertiesChannelGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -20518,17 +16838,17 @@ func (r *PropertiesCustomDimensionsService) List(parent string) *PropertiesCusto // 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 *PropertiesCustomDimensionsListCall) PageSize(pageSize int64) *PropertiesCustomDimensionsListCall { +func (c *PropertiesChannelGroupsListCall) PageSize(pageSize int64) *PropertiesChannelGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListCustomDimensions` call. Provide this to +// received from a previous `ListChannelGroups` call. Provide this to // retrieve the subsequent page. When paginating, all other parameters -// provided to `ListCustomDimensions` must match the call that provided -// the page token. -func (c *PropertiesCustomDimensionsListCall) PageToken(pageToken string) *PropertiesCustomDimensionsListCall { +// provided to `ListChannelGroups` must match the call that provided the +// page token. +func (c *PropertiesChannelGroupsListCall) PageToken(pageToken string) *PropertiesChannelGroupsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20536,7 +16856,7 @@ func (c *PropertiesCustomDimensionsListCall) PageToken(pageToken string) *Proper // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesCustomDimensionsListCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsListCall { +func (c *PropertiesChannelGroupsListCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20546,7 +16866,7 @@ func (c *PropertiesCustomDimensionsListCall) Fields(s ...googleapi.Field) *Prope // 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 *PropertiesCustomDimensionsListCall) IfNoneMatch(entityTag string) *PropertiesCustomDimensionsListCall { +func (c *PropertiesChannelGroupsListCall) IfNoneMatch(entityTag string) *PropertiesChannelGroupsListCall { c.ifNoneMatch_ = entityTag return c } @@ -20554,21 +16874,21 @@ func (c *PropertiesCustomDimensionsListCall) IfNoneMatch(entityTag string) *Prop // 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 *PropertiesCustomDimensionsListCall) Context(ctx context.Context) *PropertiesCustomDimensionsListCall { +func (c *PropertiesChannelGroupsListCall) Context(ctx context.Context) *PropertiesChannelGroupsListCall { 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 *PropertiesCustomDimensionsListCall) Header() http.Header { +func (c *PropertiesChannelGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomDimensionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesChannelGroupsListCall) 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_ { @@ -20581,7 +16901,7 @@ func (c *PropertiesCustomDimensionsListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/customDimensions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/channelGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20594,17 +16914,16 @@ func (c *PropertiesCustomDimensionsListCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.customDimensions.list" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse.ServerRespons -// e.Header or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.channelGroups.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListChannelGroupsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListChannelGroupsResponse.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 *PropertiesCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse, error) { +func (c *PropertiesChannelGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListChannelGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20623,7 +16942,7 @@ func (c *PropertiesCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse{ + ret := &GoogleAnalyticsAdminV1alphaListChannelGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20635,10 +16954,10 @@ func (c *PropertiesCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Lists CustomDimensions on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions", + // "description": "Lists ChannelGroups on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.customDimensions.list", + // "id": "analyticsadmin.properties.channelGroups.list", // "parameterOrder": [ // "parent" // ], @@ -20650,21 +16969,21 @@ func (c *PropertiesCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (* // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListCustomDimensions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomDimensions` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListChannelGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListChannelGroups` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Example format: properties/1234", + // "description": "Required. The property for which to list ChannelGroups. Example format: properties/1234", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/customDimensions", + // "path": "v1alpha/{+parent}/channelGroups", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaListChannelGroupsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -20677,7 +16996,7 @@ func (c *PropertiesCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (* // 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 *PropertiesCustomDimensionsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse) error) error { +func (c *PropertiesChannelGroupsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListChannelGroupsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -20695,33 +17014,35 @@ func (c *PropertiesCustomDimensionsListCall) Pages(ctx context.Context, f func(* } } -// method id "analyticsadmin.properties.customDimensions.patch": +// method id "analyticsadmin.properties.channelGroups.patch": -type PropertiesCustomDimensionsPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesChannelGroupsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphachannelgroup *GoogleAnalyticsAdminV1alphaChannelGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a CustomDimension on a property. +// Patch: Updates a ChannelGroup. // -// - name: Output only. Resource name for this CustomDimension resource. -// Format: properties/{property}/customDimensions/{customDimension}. -func (r *PropertiesCustomDimensionsService) Patch(name string, googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension) *PropertiesCustomDimensionsPatchCall { - c := &PropertiesCustomDimensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The resource name for this Channel Group +// resource. Format: +// properties/{property}/channelGroups/{channel_group}. +func (r *PropertiesChannelGroupsService) Patch(name string, googleanalyticsadminv1alphachannelgroup *GoogleAnalyticsAdminV1alphaChannelGroup) *PropertiesChannelGroupsPatchCall { + c := &PropertiesChannelGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphacustomdimension = googleanalyticsadminv1alphacustomdimension + c.googleanalyticsadminv1alphachannelgroup = googleanalyticsadminv1alphachannelgroup return c } // UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to be updated. Omitted fields will not be updated. To +// 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 *PropertiesCustomDimensionsPatchCall) UpdateMask(updateMask string) *PropertiesCustomDimensionsPatchCall { +func (c *PropertiesChannelGroupsPatchCall) UpdateMask(updateMask string) *PropertiesChannelGroupsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -20729,7 +17050,7 @@ func (c *PropertiesCustomDimensionsPatchCall) UpdateMask(updateMask string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsPatchCall { +func (c *PropertiesChannelGroupsPatchCall) Fields(s ...googleapi.Field) *PropertiesChannelGroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20737,21 +17058,21 @@ func (c *PropertiesCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *Prop // 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 *PropertiesCustomDimensionsPatchCall) Context(ctx context.Context) *PropertiesCustomDimensionsPatchCall { +func (c *PropertiesChannelGroupsPatchCall) Context(ctx context.Context) *PropertiesChannelGroupsPatchCall { 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 *PropertiesCustomDimensionsPatchCall) Header() http.Header { +func (c *PropertiesChannelGroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomDimensionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesChannelGroupsPatchCall) 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_ { @@ -20759,7 +17080,7 @@ func (c *PropertiesCustomDimensionsPatchCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustomdimension) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphachannelgroup) if err != nil { return nil, err } @@ -20779,16 +17100,15 @@ func (c *PropertiesCustomDimensionsPatchCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.customDimensions.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaCustomDimension or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaCustomDimension.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 *PropertiesCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomDimension, error) { +// Do executes the "analyticsadmin.properties.channelGroups.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaChannelGroup or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaChannelGroup.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 *PropertiesChannelGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaChannelGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20807,7 +17127,7 @@ func (c *PropertiesCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaCustomDimension{ + ret := &GoogleAnalyticsAdminV1alphaChannelGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20819,23 +17139,23 @@ func (c *PropertiesCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates a CustomDimension on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions/{customDimensionsId}", + // "description": "Updates a ChannelGroup.", + // "flatPath": "v1alpha/properties/{propertiesId}/channelGroups/{channelGroupsId}", // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.customDimensions.patch", + // "id": "analyticsadmin.properties.channelGroups.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}", + // "description": "Output only. The resource name for this Channel Group resource. Format: properties/{property}/channelGroups/{channel_group}", // "location": "path", - // "pattern": "^properties/[^/]+/customDimensions/[^/]+$", + // "pattern": "^properties/[^/]+/channelGroups/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", + // "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" @@ -20843,10 +17163,10 @@ func (c *PropertiesCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) ( // }, // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" + // "$ref": "GoogleAnalyticsAdminV1alphaChannelGroup" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" + // "$ref": "GoogleAnalyticsAdminV1alphaChannelGroup" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -20855,32 +17175,32 @@ func (c *PropertiesCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) ( } -// method id "analyticsadmin.properties.customMetrics.archive": +// method id "analyticsadmin.properties.conversionEvents.create": -type PropertiesCustomMetricsArchiveCall struct { - s *Service - name string - googleanalyticsadminv1alphaarchivecustommetricrequest *GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesConversionEventsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Archive: Archives a CustomMetric on a property. +// Create: Creates a conversion event with the specified attributes. // -// - name: The name of the CustomMetric to archive. Example format: -// properties/1234/customMetrics/5678. -func (r *PropertiesCustomMetricsService) Archive(name string, googleanalyticsadminv1alphaarchivecustommetricrequest *GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest) *PropertiesCustomMetricsArchiveCall { - c := &PropertiesCustomMetricsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphaarchivecustommetricrequest = googleanalyticsadminv1alphaarchivecustommetricrequest +// - parent: The resource name of the parent property where this +// conversion event will be created. Format: properties/123. +func (r *PropertiesConversionEventsService) Create(parent string, googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent) *PropertiesConversionEventsCreateCall { + c := &PropertiesConversionEventsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphaconversionevent = googleanalyticsadminv1alphaconversionevent 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 *PropertiesCustomMetricsArchiveCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsArchiveCall { +func (c *PropertiesConversionEventsCreateCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20888,21 +17208,21 @@ func (c *PropertiesCustomMetricsArchiveCall) Fields(s ...googleapi.Field) *Prope // 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 *PropertiesCustomMetricsArchiveCall) Context(ctx context.Context) *PropertiesCustomMetricsArchiveCall { +func (c *PropertiesConversionEventsCreateCall) Context(ctx context.Context) *PropertiesConversionEventsCreateCall { 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 *PropertiesCustomMetricsArchiveCall) Header() http.Header { +func (c *PropertiesConversionEventsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomMetricsArchiveCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesConversionEventsCreateCall) 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_ { @@ -20910,14 +17230,14 @@ func (c *PropertiesCustomMetricsArchiveCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaarchivecustommetricrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaconversionevent) 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}:archive") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversionEvents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20925,19 +17245,21 @@ func (c *PropertiesCustomMetricsArchiveCall) doRequest(alt string) (*http.Respon } 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.customMetrics.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 *PropertiesCustomMetricsArchiveCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.conversionEvents.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaConversionEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaConversionEvent.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 *PropertiesConversionEventsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaConversionEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20956,7 +17278,7 @@ func (c *PropertiesCustomMetricsArchiveCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaConversionEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20968,28 +17290,28 @@ func (c *PropertiesCustomMetricsArchiveCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Archives a CustomMetric on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics/{customMetricsId}:archive", + // "description": "Creates a conversion event with the specified attributes.", + // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.customMetrics.archive", + // "id": "analyticsadmin.properties.conversionEvents.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678", + // "parent": { + // "description": "Required. The resource name of the parent property where this conversion event will be created. Format: properties/123", // "location": "path", - // "pattern": "^properties/[^/]+/customMetrics/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:archive", + // "path": "v1alpha/{+parent}/conversionEvents", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -20998,31 +17320,31 @@ func (c *PropertiesCustomMetricsArchiveCall) Do(opts ...googleapi.CallOption) (* } -// method id "analyticsadmin.properties.customMetrics.create": +// method id "analyticsadmin.properties.conversionEvents.delete": -type PropertiesCustomMetricsCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesConversionEventsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a CustomMetric. +// Delete: Deletes a conversion event in a property. // -// - parent: Example format: properties/1234. -func (r *PropertiesCustomMetricsService) Create(parent string, googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric) *PropertiesCustomMetricsCreateCall { - c := &PropertiesCustomMetricsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphacustommetric = googleanalyticsadminv1alphacustommetric +// - name: The resource name of the conversion event to delete. Format: +// properties/{property}/conversionEvents/{conversion_event} Example: +// "properties/123/conversionEvents/456". +func (r *PropertiesConversionEventsService) Delete(name string) *PropertiesConversionEventsDeleteCall { + c := &PropertiesConversionEventsDeleteCall{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 *PropertiesCustomMetricsCreateCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsCreateCall { +func (c *PropertiesConversionEventsDeleteCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21030,21 +17352,21 @@ func (c *PropertiesCustomMetricsCreateCall) Fields(s ...googleapi.Field) *Proper // 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 *PropertiesCustomMetricsCreateCall) Context(ctx context.Context) *PropertiesCustomMetricsCreateCall { +func (c *PropertiesConversionEventsDeleteCall) Context(ctx context.Context) *PropertiesConversionEventsDeleteCall { 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 *PropertiesCustomMetricsCreateCall) Header() http.Header { +func (c *PropertiesConversionEventsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomMetricsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesConversionEventsDeleteCall) 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_ { @@ -21052,35 +17374,29 @@ func (c *PropertiesCustomMetricsCreateCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustommetric) - 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}/customMetrics") + 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.properties.customMetrics.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaCustomMetric or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaCustomMetric.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 +// Do executes the "analyticsadmin.properties.conversionEvents.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 *PropertiesCustomMetricsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomMetric, error) { +func (c *PropertiesConversionEventsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21099,7 +17415,7 @@ func (c *PropertiesCustomMetricsCreateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaCustomMetric{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21111,28 +17427,25 @@ func (c *PropertiesCustomMetricsCreateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Creates a CustomMetric.", - // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.customMetrics.create", + // "description": "Deletes a conversion event in a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.conversionEvents.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conversionEvents/456\"", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/conversionEvents/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/customMetrics", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -21141,9 +17454,9 @@ func (c *PropertiesCustomMetricsCreateCall) Do(opts ...googleapi.CallOption) (*G } -// method id "analyticsadmin.properties.customMetrics.get": +// method id "analyticsadmin.properties.conversionEvents.get": -type PropertiesCustomMetricsGetCall struct { +type PropertiesConversionEventsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21152,12 +17465,13 @@ type PropertiesCustomMetricsGetCall struct { header_ http.Header } -// Get: Lookup for a single CustomMetric. +// Get: Retrieve a single conversion event. // -// - name: The name of the CustomMetric to get. Example format: -// properties/1234/customMetrics/5678. -func (r *PropertiesCustomMetricsService) Get(name string) *PropertiesCustomMetricsGetCall { - c := &PropertiesCustomMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the conversion event to retrieve. +// Format: properties/{property}/conversionEvents/{conversion_event} +// Example: "properties/123/conversionEvents/456". +func (r *PropertiesConversionEventsService) Get(name string) *PropertiesConversionEventsGetCall { + c := &PropertiesConversionEventsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21165,7 +17479,7 @@ func (r *PropertiesCustomMetricsService) Get(name string) *PropertiesCustomMetri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesCustomMetricsGetCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsGetCall { +func (c *PropertiesConversionEventsGetCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21175,7 +17489,7 @@ func (c *PropertiesCustomMetricsGetCall) Fields(s ...googleapi.Field) *Propertie // 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 *PropertiesCustomMetricsGetCall) IfNoneMatch(entityTag string) *PropertiesCustomMetricsGetCall { +func (c *PropertiesConversionEventsGetCall) IfNoneMatch(entityTag string) *PropertiesConversionEventsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -21183,21 +17497,21 @@ func (c *PropertiesCustomMetricsGetCall) IfNoneMatch(entityTag string) *Properti // 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 *PropertiesCustomMetricsGetCall) Context(ctx context.Context) *PropertiesCustomMetricsGetCall { +func (c *PropertiesConversionEventsGetCall) Context(ctx context.Context) *PropertiesConversionEventsGetCall { 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 *PropertiesCustomMetricsGetCall) Header() http.Header { +func (c *PropertiesConversionEventsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomMetricsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesConversionEventsGetCall) 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_ { @@ -21223,15 +17537,16 @@ func (c *PropertiesCustomMetricsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.customMetrics.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaCustomMetric or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaCustomMetric.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 *PropertiesCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomMetric, error) { +// Do executes the "analyticsadmin.properties.conversionEvents.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaConversionEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaConversionEvent.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 *PropertiesConversionEventsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaConversionEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21250,7 +17565,7 @@ func (c *PropertiesCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaCustomMetric{ + ret := &GoogleAnalyticsAdminV1alphaConversionEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21262,25 +17577,25 @@ func (c *PropertiesCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Lookup for a single CustomMetric.", - // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics/{customMetricsId}", + // "description": "Retrieve a single conversion event.", + // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.customMetrics.get", + // "id": "analyticsadmin.properties.conversionEvents.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678", + // "description": "Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conversionEvents/456\"", // "location": "path", - // "pattern": "^properties/[^/]+/customMetrics/[^/]+$", + // "pattern": "^properties/[^/]+/conversionEvents/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" + // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -21290,9 +17605,9 @@ func (c *PropertiesCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "analyticsadmin.properties.customMetrics.list": +// method id "analyticsadmin.properties.conversionEvents.list": -type PropertiesCustomMetricsListCall struct { +type PropertiesConversionEventsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -21301,30 +17616,32 @@ type PropertiesCustomMetricsListCall struct { header_ http.Header } -// List: Lists CustomMetrics on a property. +// List: Returns a list of conversion events in the specified parent +// property. Returns an empty list if no conversion events are found. // -// - parent: Example format: properties/1234. -func (r *PropertiesCustomMetricsService) List(parent string) *PropertiesCustomMetricsListCall { - c := &PropertiesCustomMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent property. Example: +// 'properties/123'. +func (r *PropertiesConversionEventsService) List(parent string) *PropertiesConversionEventsListCall { + c := &PropertiesConversionEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // 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 *PropertiesCustomMetricsListCall) PageSize(pageSize int64) *PropertiesCustomMetricsListCall { +// returned. The maximum value is 200; (higher values will be coerced to +// the maximum) +func (c *PropertiesConversionEventsListCall) PageSize(pageSize int64) *PropertiesConversionEventsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListCustomMetrics` call. Provide this to +// received from a previous `ListConversionEvents` call. Provide this to // retrieve the subsequent page. When paginating, all other parameters -// provided to `ListCustomMetrics` must match the call that provided the -// page token. -func (c *PropertiesCustomMetricsListCall) PageToken(pageToken string) *PropertiesCustomMetricsListCall { +// provided to `ListConversionEvents` must match the call that provided +// the page token. +func (c *PropertiesConversionEventsListCall) PageToken(pageToken string) *PropertiesConversionEventsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21332,7 +17649,7 @@ func (c *PropertiesCustomMetricsListCall) PageToken(pageToken string) *Propertie // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesCustomMetricsListCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsListCall { +func (c *PropertiesConversionEventsListCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21342,7 +17659,7 @@ func (c *PropertiesCustomMetricsListCall) Fields(s ...googleapi.Field) *Properti // 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 *PropertiesCustomMetricsListCall) IfNoneMatch(entityTag string) *PropertiesCustomMetricsListCall { +func (c *PropertiesConversionEventsListCall) IfNoneMatch(entityTag string) *PropertiesConversionEventsListCall { c.ifNoneMatch_ = entityTag return c } @@ -21350,21 +17667,21 @@ func (c *PropertiesCustomMetricsListCall) IfNoneMatch(entityTag string) *Propert // 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 *PropertiesCustomMetricsListCall) Context(ctx context.Context) *PropertiesCustomMetricsListCall { +func (c *PropertiesConversionEventsListCall) Context(ctx context.Context) *PropertiesConversionEventsListCall { 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 *PropertiesCustomMetricsListCall) Header() http.Header { +func (c *PropertiesConversionEventsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomMetricsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesConversionEventsListCall) 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_ { @@ -21377,7 +17694,7 @@ func (c *PropertiesCustomMetricsListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/customMetrics") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversionEvents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21390,16 +17707,17 @@ func (c *PropertiesCustomMetricsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.customMetrics.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListCustomMetricsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaListCustomMetricsResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.conversionEvents.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListConversionEventsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListConversionEventsResponse.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 *PropertiesCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListCustomMetricsResponse, error) { +func (c *PropertiesConversionEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListConversionEventsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21418,7 +17736,7 @@ func (c *PropertiesCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListCustomMetricsResponse{ + ret := &GoogleAnalyticsAdminV1alphaListConversionEventsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21430,36 +17748,36 @@ func (c *PropertiesCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Lists CustomMetrics on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics", + // "description": "Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", + // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.customMetrics.list", + // "id": "analyticsadmin.properties.conversionEvents.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).", + // "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 `ListCustomMetrics` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomMetrics` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListConversionEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConversionEvents` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Example format: properties/1234", + // "description": "Required. The resource name of the parent property. Example: 'properties/123'", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/customMetrics", + // "path": "v1alpha/{+parent}/conversionEvents", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListCustomMetricsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaListConversionEventsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -21472,7 +17790,7 @@ func (c *PropertiesCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*Goo // 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 *PropertiesCustomMetricsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListCustomMetricsResponse) error) error { +func (c *PropertiesConversionEventsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListConversionEventsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -21490,33 +17808,34 @@ func (c *PropertiesCustomMetricsListCall) Pages(ctx context.Context, f func(*Goo } } -// method id "analyticsadmin.properties.customMetrics.patch": +// method id "analyticsadmin.properties.conversionEvents.patch": -type PropertiesCustomMetricsPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesConversionEventsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a CustomMetric on a property. +// Patch: Updates a conversion event with the specified attributes. // -// - name: Output only. Resource name for this CustomMetric resource. -// Format: properties/{property}/customMetrics/{customMetric}. -func (r *PropertiesCustomMetricsService) Patch(name string, googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric) *PropertiesCustomMetricsPatchCall { - c := &PropertiesCustomMetricsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name of this conversion event. Format: +// properties/{property}/conversionEvents/{conversion_event}. +func (r *PropertiesConversionEventsService) Patch(name string, googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent) *PropertiesConversionEventsPatchCall { + c := &PropertiesConversionEventsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphacustommetric = googleanalyticsadminv1alphacustommetric + c.googleanalyticsadminv1alphaconversionevent = googleanalyticsadminv1alphaconversionevent return c } // UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to be updated. Omitted fields will not be updated. To +// 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 *PropertiesCustomMetricsPatchCall) UpdateMask(updateMask string) *PropertiesCustomMetricsPatchCall { +func (c *PropertiesConversionEventsPatchCall) UpdateMask(updateMask string) *PropertiesConversionEventsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -21524,7 +17843,7 @@ func (c *PropertiesCustomMetricsPatchCall) UpdateMask(updateMask string) *Proper // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesCustomMetricsPatchCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsPatchCall { +func (c *PropertiesConversionEventsPatchCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21532,21 +17851,21 @@ func (c *PropertiesCustomMetricsPatchCall) Fields(s ...googleapi.Field) *Propert // 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 *PropertiesCustomMetricsPatchCall) Context(ctx context.Context) *PropertiesCustomMetricsPatchCall { +func (c *PropertiesConversionEventsPatchCall) Context(ctx context.Context) *PropertiesConversionEventsPatchCall { 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 *PropertiesCustomMetricsPatchCall) Header() http.Header { +func (c *PropertiesConversionEventsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesCustomMetricsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesConversionEventsPatchCall) 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_ { @@ -21554,7 +17873,7 @@ func (c *PropertiesCustomMetricsPatchCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustommetric) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaconversionevent) if err != nil { return nil, err } @@ -21574,15 +17893,16 @@ func (c *PropertiesCustomMetricsPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.customMetrics.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaCustomMetric or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaCustomMetric.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 *PropertiesCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomMetric, error) { +// Do executes the "analyticsadmin.properties.conversionEvents.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaConversionEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaConversionEvent.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 *PropertiesConversionEventsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaConversionEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21601,7 +17921,7 @@ func (c *PropertiesCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaCustomMetric{ + ret := &GoogleAnalyticsAdminV1alphaConversionEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21613,23 +17933,23 @@ func (c *PropertiesCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Updates a CustomMetric on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics/{customMetricsId}", + // "description": "Updates a conversion event with the specified attributes.", + // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.customMetrics.patch", + // "id": "analyticsadmin.properties.conversionEvents.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}", + // "description": "Output only. Resource name of this conversion event. Format: properties/{property}/conversionEvents/{conversion_event}", // "location": "path", - // "pattern": "^properties/[^/]+/customMetrics/[^/]+$", + // "pattern": "^properties/[^/]+/conversionEvents/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", + // "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" @@ -21637,10 +17957,10 @@ func (c *PropertiesCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*Go // }, // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" + // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" + // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -21649,31 +17969,32 @@ func (c *PropertiesCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "analyticsadmin.properties.dataStreams.create": +// method id "analyticsadmin.properties.customDimensions.archive": -type PropertiesDataStreamsCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphadatastream *GoogleAnalyticsAdminV1alphaDataStream - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesCustomDimensionsArchiveCall struct { + s *Service + name string + googleanalyticsadminv1alphaarchivecustomdimensionrequest *GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataStream. +// Archive: Archives a CustomDimension on a property. // -// - parent: Example format: properties/1234. -func (r *PropertiesDataStreamsService) Create(parent string, googleanalyticsadminv1alphadatastream *GoogleAnalyticsAdminV1alphaDataStream) *PropertiesDataStreamsCreateCall { - c := &PropertiesDataStreamsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphadatastream = googleanalyticsadminv1alphadatastream +// - name: The name of the CustomDimension to archive. Example format: +// properties/1234/customDimensions/5678. +func (r *PropertiesCustomDimensionsService) Archive(name string, googleanalyticsadminv1alphaarchivecustomdimensionrequest *GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest) *PropertiesCustomDimensionsArchiveCall { + c := &PropertiesCustomDimensionsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphaarchivecustomdimensionrequest = googleanalyticsadminv1alphaarchivecustomdimensionrequest 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 *PropertiesDataStreamsCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsCreateCall { +func (c *PropertiesCustomDimensionsArchiveCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsArchiveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21681,21 +18002,21 @@ func (c *PropertiesDataStreamsCreateCall) Fields(s ...googleapi.Field) *Properti // 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 *PropertiesDataStreamsCreateCall) Context(ctx context.Context) *PropertiesDataStreamsCreateCall { +func (c *PropertiesCustomDimensionsArchiveCall) Context(ctx context.Context) *PropertiesCustomDimensionsArchiveCall { 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 *PropertiesDataStreamsCreateCall) Header() http.Header { +func (c *PropertiesCustomDimensionsArchiveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomDimensionsArchiveCall) 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_ { @@ -21703,14 +18024,14 @@ func (c *PropertiesDataStreamsCreateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphadatastream) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaarchivecustomdimensionrequest) 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}/dataStreams") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:archive") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21718,20 +18039,19 @@ func (c *PropertiesDataStreamsCreateCall) doRequest(alt string) (*http.Response, } 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.properties.dataStreams.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaDataStream or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaDataStream.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "analyticsadmin.properties.customDimensions.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 *PropertiesDataStreamsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataStream, error) { +func (c *PropertiesCustomDimensionsArchiveCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21750,7 +18070,7 @@ func (c *PropertiesDataStreamsCreateCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDataStream{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21762,28 +18082,28 @@ func (c *PropertiesDataStreamsCreateCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Creates a DataStream.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams", + // "description": "Archives a CustomDimension on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions/{customDimensionsId}:archive", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.dataStreams.create", + // "id": "analyticsadmin.properties.customDimensions.archive", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/customDimensions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/dataStreams", + // "path": "v1alpha/{+name}:archive", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataStream" + // "$ref": "GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataStream" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -21792,30 +18112,31 @@ func (c *PropertiesDataStreamsCreateCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "analyticsadmin.properties.dataStreams.delete": +// method id "analyticsadmin.properties.customDimensions.create": -type PropertiesDataStreamsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesCustomDimensionsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataStream on a property. +// Create: Creates a CustomDimension. // -// - name: The name of the DataStream to delete. Example format: -// properties/1234/dataStreams/5678. -func (r *PropertiesDataStreamsService) Delete(name string) *PropertiesDataStreamsDeleteCall { - c := &PropertiesDataStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Example format: properties/1234. +func (r *PropertiesCustomDimensionsService) Create(parent string, googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension) *PropertiesCustomDimensionsCreateCall { + c := &PropertiesCustomDimensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphacustomdimension = googleanalyticsadminv1alphacustomdimension 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 *PropertiesDataStreamsDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsDeleteCall { +func (c *PropertiesCustomDimensionsCreateCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21823,21 +18144,21 @@ func (c *PropertiesDataStreamsDeleteCall) Fields(s ...googleapi.Field) *Properti // 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 *PropertiesDataStreamsDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsDeleteCall { +func (c *PropertiesCustomDimensionsCreateCall) Context(ctx context.Context) *PropertiesCustomDimensionsCreateCall { 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 *PropertiesDataStreamsDeleteCall) Header() http.Header { +func (c *PropertiesCustomDimensionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomDimensionsCreateCall) 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_ { @@ -21845,29 +18166,36 @@ func (c *PropertiesDataStreamsDeleteCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustomdimension) + 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}/customDimensions") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.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 *PropertiesDataStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.customDimensions.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaCustomDimension or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaCustomDimension.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 *PropertiesCustomDimensionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomDimension, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21886,7 +18214,7 @@ func (c *PropertiesDataStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaCustomDimension{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21898,25 +18226,28 @@ func (c *PropertiesDataStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Deletes a DataStream on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.dataStreams.delete", + // "description": "Creates a CustomDimension.", + // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.customDimensions.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678", + // "parent": { + // "description": "Required. Example format: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/customDimensions", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -21925,9 +18256,9 @@ func (c *PropertiesDataStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "analyticsadmin.properties.dataStreams.get": +// method id "analyticsadmin.properties.customDimensions.get": -type PropertiesDataStreamsGetCall struct { +type PropertiesCustomDimensionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21936,12 +18267,12 @@ type PropertiesDataStreamsGetCall struct { header_ http.Header } -// Get: Lookup for a single DataStream. +// Get: Lookup for a single CustomDimension. // -// - name: The name of the DataStream to get. Example format: -// properties/1234/dataStreams/5678. -func (r *PropertiesDataStreamsService) Get(name string) *PropertiesDataStreamsGetCall { - c := &PropertiesDataStreamsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the CustomDimension to get. Example format: +// properties/1234/customDimensions/5678. +func (r *PropertiesCustomDimensionsService) Get(name string) *PropertiesCustomDimensionsGetCall { + c := &PropertiesCustomDimensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21949,7 +18280,7 @@ func (r *PropertiesDataStreamsService) Get(name string) *PropertiesDataStreamsGe // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDataStreamsGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsGetCall { +func (c *PropertiesCustomDimensionsGetCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21959,7 +18290,7 @@ func (c *PropertiesDataStreamsGetCall) Fields(s ...googleapi.Field) *PropertiesD // 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 *PropertiesDataStreamsGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsGetCall { +func (c *PropertiesCustomDimensionsGetCall) IfNoneMatch(entityTag string) *PropertiesCustomDimensionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -21967,21 +18298,21 @@ func (c *PropertiesDataStreamsGetCall) IfNoneMatch(entityTag string) *Properties // 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 *PropertiesDataStreamsGetCall) Context(ctx context.Context) *PropertiesDataStreamsGetCall { +func (c *PropertiesCustomDimensionsGetCall) Context(ctx context.Context) *PropertiesCustomDimensionsGetCall { 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 *PropertiesDataStreamsGetCall) Header() http.Header { +func (c *PropertiesCustomDimensionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomDimensionsGetCall) 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_ { @@ -22007,15 +18338,16 @@ func (c *PropertiesDataStreamsGetCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaDataStream or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaDataStream.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 *PropertiesDataStreamsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataStream, error) { +// Do executes the "analyticsadmin.properties.customDimensions.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaCustomDimension or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaCustomDimension.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 *PropertiesCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomDimension, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22034,7 +18366,7 @@ func (c *PropertiesDataStreamsGetCall) Do(opts ...googleapi.CallOption) (*Google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDataStream{ + ret := &GoogleAnalyticsAdminV1alphaCustomDimension{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22046,25 +18378,25 @@ func (c *PropertiesDataStreamsGetCall) Do(opts ...googleapi.CallOption) (*Google } return ret, nil // { - // "description": "Lookup for a single DataStream.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}", + // "description": "Lookup for a single CustomDimension.", + // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions/{customDimensionsId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.get", + // "id": "analyticsadmin.properties.customDimensions.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678", + // "description": "Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + // "pattern": "^properties/[^/]+/customDimensions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataStream" + // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -22074,32 +18406,49 @@ func (c *PropertiesDataStreamsGetCall) Do(opts ...googleapi.CallOption) (*Google } -// method id "analyticsadmin.properties.dataStreams.getDataRedactionSettings": +// method id "analyticsadmin.properties.customDimensions.list": -type PropertiesDataStreamsGetDataRedactionSettingsCall struct { +type PropertiesCustomDimensionsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetDataRedactionSettings: Lookup for a single DataRedactionSettings. +// List: Lists CustomDimensions on a property. // -// - name: The name of the settings to lookup. Format: -// properties/{property}/dataStreams/{data_stream}/dataRedactionSetting -// s Example: "properties/1000/dataStreams/2000/dataRedactionSettings". -func (r *PropertiesDataStreamsService) GetDataRedactionSettings(name string) *PropertiesDataStreamsGetDataRedactionSettingsCall { - c := &PropertiesDataStreamsGetDataRedactionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Example format: properties/1234. +func (r *PropertiesCustomDimensionsService) List(parent string) *PropertiesCustomDimensionsListCall { + c := &PropertiesCustomDimensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// 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 *PropertiesCustomDimensionsListCall) PageSize(pageSize int64) *PropertiesCustomDimensionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListCustomDimensions` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListCustomDimensions` must match the call that provided +// the page token. +func (c *PropertiesCustomDimensionsListCall) PageToken(pageToken string) *PropertiesCustomDimensionsListCall { + 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 *PropertiesDataStreamsGetDataRedactionSettingsCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsGetDataRedactionSettingsCall { +func (c *PropertiesCustomDimensionsListCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22109,7 +18458,7 @@ func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) Fields(s ...googleap // 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 *PropertiesDataStreamsGetDataRedactionSettingsCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsGetDataRedactionSettingsCall { +func (c *PropertiesCustomDimensionsListCall) IfNoneMatch(entityTag string) *PropertiesCustomDimensionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -22117,21 +18466,21 @@ func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) IfNoneMatch(entityTa // 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 *PropertiesDataStreamsGetDataRedactionSettingsCall) Context(ctx context.Context) *PropertiesDataStreamsGetDataRedactionSettingsCall { +func (c *PropertiesCustomDimensionsListCall) Context(ctx context.Context) *PropertiesCustomDimensionsListCall { 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 *PropertiesDataStreamsGetDataRedactionSettingsCall) Header() http.Header { +func (c *PropertiesCustomDimensionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomDimensionsListCall) 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_ { @@ -22144,7 +18493,7 @@ func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) doRequest(alt string 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}/customDimensions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22152,21 +18501,22 @@ func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) doRequest(alt string } 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.dataStreams.getDataRedactionSettings" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaDataRedactionSettings or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "analyticsadmin.properties.customDimensions.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaDataRedactionSettings.ServerResponse.Heade -// r or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse.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 *PropertiesDataStreamsGetDataRedactionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRedactionSettings, error) { +func (c *PropertiesCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22185,7 +18535,7 @@ func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDataRedactionSettings{ + ret := &GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22197,25 +18547,36 @@ func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Lookup for a single DataRedactionSettings.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/dataRedactionSettings", + // "description": "Lists CustomDimensions on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.getDataRedactionSettings", + // "id": "analyticsadmin.properties.customDimensions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the settings to lookup. Format: properties/{property}/dataStreams/{data_stream}/dataRedactionSettings Example: \"properties/1000/dataStreams/2000/dataRedactionSettings\"", + // "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 `ListCustomDimensions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomDimensions` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Example format: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/dataRedactionSettings$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/customDimensions", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataRedactionSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -22225,82 +18586,101 @@ func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) Do(opts ...googleapi } -// method id "analyticsadmin.properties.dataStreams.getEnhancedMeasurementSettings": +// 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 *PropertiesCustomDimensionsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse) 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 PropertiesDataStreamsGetEnhancedMeasurementSettingsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.customDimensions.patch": + +type PropertiesCustomDimensionsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetEnhancedMeasurementSettings: Returns the enhanced measurement -// settings for this data stream. Note that the stream must enable -// enhanced measurement for these settings to take effect. +// Patch: Updates a CustomDimension on a property. // -// - name: The name of the settings to lookup. Format: -// properties/{property}/dataStreams/{data_stream}/enhancedMeasurementS -// ettings Example: -// "properties/1000/dataStreams/2000/enhancedMeasurementSettings". -func (r *PropertiesDataStreamsService) GetEnhancedMeasurementSettings(name string) *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall { - c := &PropertiesDataStreamsGetEnhancedMeasurementSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name for this CustomDimension resource. +// Format: properties/{property}/customDimensions/{customDimension}. +func (r *PropertiesCustomDimensionsService) Patch(name string, googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension) *PropertiesCustomDimensionsPatchCall { + c := &PropertiesCustomDimensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphacustomdimension = googleanalyticsadminv1alphacustomdimension + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. Omitted fields will not be updated. To +// replace the entire entity, use one path with the string "*" to match +// all fields. +func (c *PropertiesCustomDimensionsPatchCall) UpdateMask(updateMask string) *PropertiesCustomDimensionsPatchCall { + 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 *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall { +func (c *PropertiesCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsPatchCall { 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 *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall { - 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 *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Context(ctx context.Context) *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall { +func (c *PropertiesCustomDimensionsPatchCall) Context(ctx context.Context) *PropertiesCustomDimensionsPatchCall { 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 *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Header() http.Header { +func (c *PropertiesCustomDimensionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomDimensionsPatchCall) 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.googleanalyticsadminv1alphacustomdimension) + 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 } @@ -22311,17 +18691,16 @@ func (c *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.getEnhancedMeasurementSettings" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.ServerResponse -// .Header or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.customDimensions.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaCustomDimension or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaCustomDimension.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 *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings, error) { +func (c *PropertiesCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomDimension, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22340,7 +18719,7 @@ func (c *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings{ + ret := &GoogleAnalyticsAdminV1alphaCustomDimension{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22352,109 +18731,107 @@ func (c *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Do(opts ...goo } return ret, nil // { - // "description": "Returns the enhanced measurement settings for this data stream. Note that the stream must enable enhanced measurement for these settings to take effect.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/enhancedMeasurementSettings", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.getEnhancedMeasurementSettings", + // "description": "Updates a CustomDimension on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions/{customDimensionsId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.customDimensions.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the settings to lookup. Format: properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: \"properties/1000/dataStreams/2000/enhancedMeasurementSettings\"", + // "description": "Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/enhancedMeasurementSettings$", + // "pattern": "^properties/[^/]+/customDimensions/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated. 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": "GoogleAnalyticsAdminV1alphaCustomDimension" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" // }, // "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.dataStreams.getGlobalSiteTag": +// method id "analyticsadmin.properties.customMetrics.archive": -type PropertiesDataStreamsGetGlobalSiteTagCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesCustomMetricsArchiveCall struct { + s *Service + name string + googleanalyticsadminv1alphaarchivecustommetricrequest *GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetGlobalSiteTag: Returns the Site Tag for the specified web stream. -// Site Tags are immutable singletons. +// Archive: Archives a CustomMetric on a property. // -// - name: The name of the site tag to lookup. Note that site tags are -// singletons and do not have unique IDs. Format: -// properties/{property_id}/dataStreams/{stream_id}/globalSiteTag -// Example: "properties/123/dataStreams/456/globalSiteTag". -func (r *PropertiesDataStreamsService) GetGlobalSiteTag(name string) *PropertiesDataStreamsGetGlobalSiteTagCall { - c := &PropertiesDataStreamsGetGlobalSiteTagCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the CustomMetric to archive. Example format: +// properties/1234/customMetrics/5678. +func (r *PropertiesCustomMetricsService) Archive(name string, googleanalyticsadminv1alphaarchivecustommetricrequest *GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest) *PropertiesCustomMetricsArchiveCall { + c := &PropertiesCustomMetricsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphaarchivecustommetricrequest = googleanalyticsadminv1alphaarchivecustommetricrequest 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 *PropertiesDataStreamsGetGlobalSiteTagCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsGetGlobalSiteTagCall { +func (c *PropertiesCustomMetricsArchiveCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsArchiveCall { 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 *PropertiesDataStreamsGetGlobalSiteTagCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsGetGlobalSiteTagCall { - 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 *PropertiesDataStreamsGetGlobalSiteTagCall) Context(ctx context.Context) *PropertiesDataStreamsGetGlobalSiteTagCall { +func (c *PropertiesCustomMetricsArchiveCall) Context(ctx context.Context) *PropertiesCustomMetricsArchiveCall { 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 *PropertiesDataStreamsGetGlobalSiteTagCall) Header() http.Header { +func (c *PropertiesCustomMetricsArchiveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsGetGlobalSiteTagCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomMetricsArchiveCall) 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.googleanalyticsadminv1alphaarchivecustommetricrequest) + 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/{+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 } @@ -22465,16 +18842,14 @@ func (c *PropertiesDataStreamsGetGlobalSiteTagCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.getGlobalSiteTag" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaGlobalSiteTag or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaGlobalSiteTag.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 *PropertiesDataStreamsGetGlobalSiteTagCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGlobalSiteTag, error) { +// Do executes the "analyticsadmin.properties.customMetrics.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 *PropertiesCustomMetricsArchiveCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22493,7 +18868,7 @@ func (c *PropertiesDataStreamsGetGlobalSiteTagCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaGlobalSiteTag{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22505,124 +18880,100 @@ func (c *PropertiesDataStreamsGetGlobalSiteTagCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Returns the Site Tag for the specified web stream. Site Tags are immutable singletons.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/globalSiteTag", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.getGlobalSiteTag", + // "description": "Archives a CustomMetric on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics/{customMetricsId}:archive", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.customMetrics.archive", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the site tag to lookup. Note that site tags are singletons and do not have unique IDs. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: \"properties/123/dataStreams/456/globalSiteTag\"", + // "description": "Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/globalSiteTag$", + // "pattern": "^properties/[^/]+/customMetrics/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}:archive", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaGlobalSiteTag" + // "$ref": "GoogleProtobufEmpty" // }, // "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.dataStreams.list": +// method id "analyticsadmin.properties.customMetrics.create": -type PropertiesDataStreamsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesCustomMetricsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists DataStreams on a property. +// Create: Creates a CustomMetric. // // - parent: Example format: properties/1234. -func (r *PropertiesDataStreamsService) List(parent string) *PropertiesDataStreamsListCall { - c := &PropertiesDataStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *PropertiesCustomMetricsService) Create(parent string, googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric) *PropertiesCustomMetricsCreateCall { + c := &PropertiesCustomMetricsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// 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 *PropertiesDataStreamsListCall) PageSize(pageSize int64) *PropertiesDataStreamsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListDataStreams` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListDataStreams` must match the call that provided the -// page token. -func (c *PropertiesDataStreamsListCall) PageToken(pageToken string) *PropertiesDataStreamsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleanalyticsadminv1alphacustommetric = googleanalyticsadminv1alphacustommetric 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 *PropertiesDataStreamsListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsListCall { +func (c *PropertiesCustomMetricsCreateCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsCreateCall { 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 *PropertiesDataStreamsListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsListCall { - 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 *PropertiesDataStreamsListCall) Context(ctx context.Context) *PropertiesDataStreamsListCall { +func (c *PropertiesCustomMetricsCreateCall) Context(ctx context.Context) *PropertiesCustomMetricsCreateCall { 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 *PropertiesDataStreamsListCall) Header() http.Header { +func (c *PropertiesCustomMetricsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomMetricsCreateCall) 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.googleanalyticsadminv1alphacustommetric) + 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}/dataStreams") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/customMetrics") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -22633,16 +18984,15 @@ func (c *PropertiesDataStreamsListCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListDataStreamsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaListDataStreamsResponse.ServerResponse.Hea -// der 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 *PropertiesDataStreamsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListDataStreamsResponse, error) { +// Do executes the "analyticsadmin.properties.customMetrics.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaCustomMetric or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaCustomMetric.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 *PropertiesCustomMetricsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomMetric, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22661,7 +19011,7 @@ func (c *PropertiesDataStreamsListCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListDataStreamsResponse{ + ret := &GoogleAnalyticsAdminV1alphaCustomMetric{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22673,25 +19023,14 @@ func (c *PropertiesDataStreamsListCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Lists DataStreams on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.list", + // "description": "Creates a CustomMetric.", + // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.customMetrics.create", // "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 `ListDataStreams` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDataStreams` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { // "description": "Required. Example format: properties/1234", // "location": "path", @@ -22700,114 +19039,92 @@ func (c *PropertiesDataStreamsListCall) Do(opts ...googleapi.CallOption) (*Googl // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/dataStreams", + // "path": "v1alpha/{+parent}/customMetrics", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListDataStreamsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" // }, // "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 *PropertiesDataStreamsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListDataStreamsResponse) 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.dataStreams.patch": +// method id "analyticsadmin.properties.customMetrics.get": -type PropertiesDataStreamsPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphadatastream *GoogleAnalyticsAdminV1alphaDataStream - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesCustomMetricsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStream on a property. +// Get: Lookup for a single CustomMetric. // -// - name: Output only. Resource name of this Data Stream. Format: -// properties/{property_id}/dataStreams/{stream_id} Example: -// "properties/1000/dataStreams/2000". -func (r *PropertiesDataStreamsService) Patch(name string, googleanalyticsadminv1alphadatastream *GoogleAnalyticsAdminV1alphaDataStream) *PropertiesDataStreamsPatchCall { - c := &PropertiesDataStreamsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the CustomMetric to get. Example format: +// properties/1234/customMetrics/5678. +func (r *PropertiesCustomMetricsService) Get(name string) *PropertiesCustomMetricsGetCall { + c := &PropertiesCustomMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphadatastream = googleanalyticsadminv1alphadatastream - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to be updated. Omitted fields will not be updated. To -// replace the entire entity, use one path with the string "*" to match -// all fields. -func (c *PropertiesDataStreamsPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsPatchCall { - 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 *PropertiesDataStreamsPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsPatchCall { +func (c *PropertiesCustomMetricsGetCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsGetCall { 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 *PropertiesCustomMetricsGetCall) IfNoneMatch(entityTag string) *PropertiesCustomMetricsGetCall { + 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 *PropertiesDataStreamsPatchCall) Context(ctx context.Context) *PropertiesDataStreamsPatchCall { +func (c *PropertiesCustomMetricsGetCall) Context(ctx context.Context) *PropertiesCustomMetricsGetCall { 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 *PropertiesDataStreamsPatchCall) Header() http.Header { +func (c *PropertiesCustomMetricsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomMetricsGetCall) 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.googleanalyticsadminv1alphadatastream) - 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 } @@ -22818,15 +19135,15 @@ func (c *PropertiesDataStreamsPatchCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaDataStream or error will +// Do executes the "analyticsadmin.properties.customMetrics.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaCustomMetric or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleAnalyticsAdminV1alphaDataStream.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 +// *GoogleAnalyticsAdminV1alphaCustomMetric.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 *PropertiesDataStreamsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataStream, error) { +func (c *PropertiesCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomMetric, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22845,7 +19162,7 @@ func (c *PropertiesDataStreamsPatchCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDataStream{ + ret := &GoogleAnalyticsAdminV1alphaCustomMetric{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22857,141 +19174,144 @@ func (c *PropertiesDataStreamsPatchCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Updates a DataStream on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.dataStreams.patch", + // "description": "Lookup for a single CustomMetric.", + // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics/{customMetricsId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.customMetrics.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name of this Data Stream. Format: properties/{property_id}/dataStreams/{stream_id} Example: \"properties/1000/dataStreams/2000\"", + // "description": "Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + // "pattern": "^properties/[^/]+/customMetrics/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The list of fields to be updated. 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": "GoogleAnalyticsAdminV1alphaDataStream" - // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataStream" + // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" // }, // "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.dataStreams.updateDataRedactionSettings": +// method id "analyticsadmin.properties.customMetrics.list": -type PropertiesDataStreamsUpdateDataRedactionSettingsCall struct { - s *Service - name string - googleanalyticsadminv1alphadataredactionsettings *GoogleAnalyticsAdminV1alphaDataRedactionSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesCustomMetricsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateDataRedactionSettings: Updates a DataRedactionSettings on a -// property. +// List: Lists CustomMetrics on a property. // -// - name: Output only. Name of this Data Redaction Settings resource. -// Format: -// properties/{property_id}/dataStreams/{data_stream}/dataRedactionSett -// ings Example: -// "properties/1000/dataStreams/2000/dataRedactionSettings". -func (r *PropertiesDataStreamsService) UpdateDataRedactionSettings(name string, googleanalyticsadminv1alphadataredactionsettings *GoogleAnalyticsAdminV1alphaDataRedactionSettings) *PropertiesDataStreamsUpdateDataRedactionSettingsCall { - c := &PropertiesDataStreamsUpdateDataRedactionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphadataredactionsettings = googleanalyticsadminv1alphadataredactionsettings +// - parent: Example format: properties/1234. +func (r *PropertiesCustomMetricsService) List(parent string) *PropertiesCustomMetricsListCall { + c := &PropertiesCustomMetricsListCall{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 *PropertiesDataStreamsUpdateDataRedactionSettingsCall) UpdateMask(updateMask string) *PropertiesDataStreamsUpdateDataRedactionSettingsCall { - 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 *PropertiesCustomMetricsListCall) PageSize(pageSize int64) *PropertiesCustomMetricsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListCustomMetrics` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListCustomMetrics` must match the call that provided the +// page token. +func (c *PropertiesCustomMetricsListCall) PageToken(pageToken string) *PropertiesCustomMetricsListCall { + 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 *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsUpdateDataRedactionSettingsCall { +func (c *PropertiesCustomMetricsListCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsListCall { 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 *PropertiesCustomMetricsListCall) IfNoneMatch(entityTag string) *PropertiesCustomMetricsListCall { + 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 *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Context(ctx context.Context) *PropertiesDataStreamsUpdateDataRedactionSettingsCall { +func (c *PropertiesCustomMetricsListCall) Context(ctx context.Context) *PropertiesCustomMetricsListCall { 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 *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Header() http.Header { +func (c *PropertiesCustomMetricsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsUpdateDataRedactionSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomMetricsListCall) 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.googleanalyticsadminv1alphadataredactionsettings) - 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}/customMetrics") 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.dataStreams.updateDataRedactionSettings" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaDataRedactionSettings or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaDataRedactionSettings.ServerResponse.Heade -// r or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.customMetrics.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListCustomMetricsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListCustomMetricsResponse.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 *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRedactionSettings, error) { +func (c *PropertiesCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListCustomMetricsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23010,7 +19330,7 @@ func (c *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDataRedactionSettings{ + ret := &GoogleAnalyticsAdminV1alphaListCustomMetricsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23022,75 +19342,93 @@ func (c *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Do(opts ...google } return ret, nil // { - // "description": "Updates a DataRedactionSettings on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/dataRedactionSettings", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.dataStreams.updateDataRedactionSettings", + // "description": "Lists CustomMetrics on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.customMetrics.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. Name of this Data Redaction Settings resource. Format: properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings Example: \"properties/1000/dataStreams/2000/dataRedactionSettings\"", - // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/dataRedactionSettings$", - // "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 `ListCustomMetrics` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomMetrics` 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": "GoogleAnalyticsAdminV1alphaDataRedactionSettings" - // }, + // "path": "v1alpha/{+parent}/customMetrics", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDataRedactionSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaListCustomMetricsResponse" // }, // "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.dataStreams.updateEnhancedMeasurementSettings": +// 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 *PropertiesCustomMetricsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListCustomMetricsResponse) 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 PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall struct { - s *Service - name string - googleanalyticsadminv1alphaenhancedmeasurementsettings *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.customMetrics.patch": + +type PropertiesCustomMetricsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateEnhancedMeasurementSettings: Updates the enhanced measurement -// settings for this data stream. Note that the stream must enable -// enhanced measurement for these settings to take effect. +// Patch: Updates a CustomMetric on a property. // -// - name: Output only. Resource name of the Enhanced Measurement -// Settings. Format: -// properties/{property_id}/dataStreams/{data_stream}/enhancedMeasureme -// ntSettings Example: -// "properties/1000/dataStreams/2000/enhancedMeasurementSettings". -func (r *PropertiesDataStreamsService) UpdateEnhancedMeasurementSettings(name string, googleanalyticsadminv1alphaenhancedmeasurementsettings *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings) *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall { - c := &PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name for this CustomMetric resource. +// Format: properties/{property}/customMetrics/{customMetric}. +func (r *PropertiesCustomMetricsService) Patch(name string, googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric) *PropertiesCustomMetricsPatchCall { + c := &PropertiesCustomMetricsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphaenhancedmeasurementsettings = googleanalyticsadminv1alphaenhancedmeasurementsettings + c.googleanalyticsadminv1alphacustommetric = googleanalyticsadminv1alphacustommetric 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 +// list of fields to be updated. Omitted fields will not be updated. To // replace the entire entity, use one path with the string "*" to match // all fields. -func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) UpdateMask(updateMask string) *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall { +func (c *PropertiesCustomMetricsPatchCall) UpdateMask(updateMask string) *PropertiesCustomMetricsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -23098,7 +19436,7 @@ func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) UpdateMask( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall { +func (c *PropertiesCustomMetricsPatchCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23106,21 +19444,21 @@ func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Fields(s .. // 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 *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Context(ctx context.Context) *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall { +func (c *PropertiesCustomMetricsPatchCall) Context(ctx context.Context) *PropertiesCustomMetricsPatchCall { 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 *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Header() http.Header { +func (c *PropertiesCustomMetricsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesCustomMetricsPatchCall) 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_ { @@ -23128,7 +19466,7 @@ func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaenhancedmeasurementsettings) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustommetric) if err != nil { return nil, err } @@ -23148,17 +19486,15 @@ func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.updateEnhancedMeasurementSettings" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings or error will +// Do executes the "analyticsadmin.properties.customMetrics.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaCustomMetric or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.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 *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings, error) { +// *GoogleAnalyticsAdminV1alphaCustomMetric.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 *PropertiesCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomMetric, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23177,7 +19513,7 @@ func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings{ + ret := &GoogleAnalyticsAdminV1alphaCustomMetric{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23189,23 +19525,23 @@ func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Do(opts ... } return ret, nil // { - // "description": "Updates the enhanced measurement settings for this data stream. Note that the stream must enable enhanced measurement for these settings to take effect.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/enhancedMeasurementSettings", + // "description": "Updates a CustomMetric on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics/{customMetricsId}", // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.dataStreams.updateEnhancedMeasurementSettings", + // "id": "analyticsadmin.properties.customMetrics.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name of the Enhanced Measurement Settings. Format: properties/{property_id}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: \"properties/1000/dataStreams/2000/enhancedMeasurementSettings\"", + // "description": "Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/enhancedMeasurementSettings$", + // "pattern": "^properties/[^/]+/customMetrics/[^/]+$", // "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.", + // "description": "Required. The list of fields to be updated. 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" @@ -23213,10 +19549,10 @@ func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Do(opts ... // }, // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings" + // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -23225,31 +19561,31 @@ func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Do(opts ... } -// method id "analyticsadmin.properties.dataStreams.eventCreateRules.create": +// method id "analyticsadmin.properties.dataStreams.create": -type PropertiesDataStreamsEventCreateRulesCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphaeventcreaterule *GoogleAnalyticsAdminV1alphaEventCreateRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphadatastream *GoogleAnalyticsAdminV1alphaDataStream + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an EventCreateRule. +// Create: Creates a DataStream. // -// - parent: Example format: properties/123/dataStreams/456. -func (r *PropertiesDataStreamsEventCreateRulesService) Create(parent string, googleanalyticsadminv1alphaeventcreaterule *GoogleAnalyticsAdminV1alphaEventCreateRule) *PropertiesDataStreamsEventCreateRulesCreateCall { - c := &PropertiesDataStreamsEventCreateRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Example format: properties/1234. +func (r *PropertiesDataStreamsService) Create(parent string, googleanalyticsadminv1alphadatastream *GoogleAnalyticsAdminV1alphaDataStream) *PropertiesDataStreamsCreateCall { + c := &PropertiesDataStreamsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleanalyticsadminv1alphaeventcreaterule = googleanalyticsadminv1alphaeventcreaterule + c.googleanalyticsadminv1alphadatastream = googleanalyticsadminv1alphadatastream 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 *PropertiesDataStreamsEventCreateRulesCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesCreateCall { +func (c *PropertiesDataStreamsCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23257,21 +19593,21 @@ func (c *PropertiesDataStreamsEventCreateRulesCreateCall) Fields(s ...googleapi. // 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 *PropertiesDataStreamsEventCreateRulesCreateCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesCreateCall { +func (c *PropertiesDataStreamsCreateCall) Context(ctx context.Context) *PropertiesDataStreamsCreateCall { 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 *PropertiesDataStreamsEventCreateRulesCreateCall) Header() http.Header { +func (c *PropertiesDataStreamsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsEventCreateRulesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsCreateCall) 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_ { @@ -23279,14 +19615,14 @@ func (c *PropertiesDataStreamsEventCreateRulesCreateCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaeventcreaterule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphadatastream) 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}/eventCreateRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStreams") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23299,16 +19635,15 @@ func (c *PropertiesDataStreamsEventCreateRulesCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.eventCreateRules.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaEventCreateRule or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaEventCreateRule.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 *PropertiesDataStreamsEventCreateRulesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEventCreateRule, error) { +// Do executes the "analyticsadmin.properties.dataStreams.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaDataStream or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaDataStream.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 *PropertiesDataStreamsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataStream, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23327,7 +19662,7 @@ func (c *PropertiesDataStreamsEventCreateRulesCreateCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaEventCreateRule{ + ret := &GoogleAnalyticsAdminV1alphaDataStream{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23339,28 +19674,28 @@ func (c *PropertiesDataStreamsEventCreateRulesCreateCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Creates an EventCreateRule.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules", + // "description": "Creates a DataStream.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.create", + // "id": "analyticsadmin.properties.dataStreams.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Example format: properties/123/dataStreams/456", + // "description": "Required. Example format: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/eventCreateRules", + // "path": "v1alpha/{+parent}/dataStreams", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaEventCreateRule" + // "$ref": "GoogleAnalyticsAdminV1alphaDataStream" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaEventCreateRule" + // "$ref": "GoogleAnalyticsAdminV1alphaDataStream" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -23369,22 +19704,22 @@ func (c *PropertiesDataStreamsEventCreateRulesCreateCall) Do(opts ...googleapi.C } -// method id "analyticsadmin.properties.dataStreams.eventCreateRules.delete": +// method id "analyticsadmin.properties.dataStreams.delete": -type PropertiesDataStreamsEventCreateRulesDeleteCall struct { +type PropertiesDataStreamsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } - -// Delete: Deletes an EventCreateRule. -// -// - name: Example format: -// properties/123/dataStreams/456/eventCreateRules/789. -func (r *PropertiesDataStreamsEventCreateRulesService) Delete(name string) *PropertiesDataStreamsEventCreateRulesDeleteCall { - c := &PropertiesDataStreamsEventCreateRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + +// Delete: Deletes a DataStream on a property. +// +// - name: The name of the DataStream to delete. Example format: +// properties/1234/dataStreams/5678. +func (r *PropertiesDataStreamsService) Delete(name string) *PropertiesDataStreamsDeleteCall { + c := &PropertiesDataStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23392,7 +19727,7 @@ func (r *PropertiesDataStreamsEventCreateRulesService) Delete(name string) *Prop // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesDeleteCall { +func (c *PropertiesDataStreamsDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23400,21 +19735,21 @@ func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) Fields(s ...googleapi. // 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 *PropertiesDataStreamsEventCreateRulesDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesDeleteCall { +func (c *PropertiesDataStreamsDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsDeleteCall { 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 *PropertiesDataStreamsEventCreateRulesDeleteCall) Header() http.Header { +func (c *PropertiesDataStreamsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsDeleteCall) 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_ { @@ -23437,14 +19772,14 @@ func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.eventCreateRules.delete" call. +// Do executes the "analyticsadmin.properties.dataStreams.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 *PropertiesDataStreamsEventCreateRulesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *PropertiesDataStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23475,18 +19810,18 @@ func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Deletes an EventCreateRule.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules/{eventCreateRulesId}", + // "description": "Deletes a DataStream on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}", // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.delete", + // "id": "analyticsadmin.properties.dataStreams.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Example format: properties/123/dataStreams/456/eventCreateRules/789", + // "description": "Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/eventCreateRules/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, // "type": "string" // } @@ -23502,9 +19837,9 @@ func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) Do(opts ...googleapi.C } -// method id "analyticsadmin.properties.dataStreams.eventCreateRules.get": +// method id "analyticsadmin.properties.dataStreams.get": -type PropertiesDataStreamsEventCreateRulesGetCall struct { +type PropertiesDataStreamsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23513,12 +19848,12 @@ type PropertiesDataStreamsEventCreateRulesGetCall struct { header_ http.Header } -// Get: Lookup for a single EventCreateRule. +// Get: Lookup for a single DataStream. // -// - name: The name of the EventCreateRule to get. Example format: -// properties/123/dataStreams/456/eventCreateRules/789. -func (r *PropertiesDataStreamsEventCreateRulesService) Get(name string) *PropertiesDataStreamsEventCreateRulesGetCall { - c := &PropertiesDataStreamsEventCreateRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DataStream to get. Example format: +// properties/1234/dataStreams/5678. +func (r *PropertiesDataStreamsService) Get(name string) *PropertiesDataStreamsGetCall { + c := &PropertiesDataStreamsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23526,7 +19861,7 @@ func (r *PropertiesDataStreamsEventCreateRulesService) Get(name string) *Propert // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDataStreamsEventCreateRulesGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesGetCall { +func (c *PropertiesDataStreamsGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23536,7 +19871,7 @@ func (c *PropertiesDataStreamsEventCreateRulesGetCall) Fields(s ...googleapi.Fie // 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 *PropertiesDataStreamsEventCreateRulesGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsEventCreateRulesGetCall { +func (c *PropertiesDataStreamsGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -23544,21 +19879,21 @@ func (c *PropertiesDataStreamsEventCreateRulesGetCall) IfNoneMatch(entityTag str // 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 *PropertiesDataStreamsEventCreateRulesGetCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesGetCall { +func (c *PropertiesDataStreamsGetCall) Context(ctx context.Context) *PropertiesDataStreamsGetCall { 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 *PropertiesDataStreamsEventCreateRulesGetCall) Header() http.Header { +func (c *PropertiesDataStreamsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsEventCreateRulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsGetCall) 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_ { @@ -23584,16 +19919,15 @@ func (c *PropertiesDataStreamsEventCreateRulesGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.eventCreateRules.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaEventCreateRule or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaEventCreateRule.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 *PropertiesDataStreamsEventCreateRulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEventCreateRule, error) { +// Do executes the "analyticsadmin.properties.dataStreams.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaDataStream or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaDataStream.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 *PropertiesDataStreamsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataStream, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23612,7 +19946,7 @@ func (c *PropertiesDataStreamsEventCreateRulesGetCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaEventCreateRule{ + ret := &GoogleAnalyticsAdminV1alphaDataStream{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23624,25 +19958,25 @@ func (c *PropertiesDataStreamsEventCreateRulesGetCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Lookup for a single EventCreateRule.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules/{eventCreateRulesId}", + // "description": "Lookup for a single DataStream.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.get", + // "id": "analyticsadmin.properties.dataStreams.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the EventCreateRule to get. Example format: properties/123/dataStreams/456/eventCreateRules/789", + // "description": "Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/eventCreateRules/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaEventCreateRule" + // "$ref": "GoogleAnalyticsAdminV1alphaDataStream" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -23652,49 +19986,32 @@ func (c *PropertiesDataStreamsEventCreateRulesGetCall) Do(opts ...googleapi.Call } -// method id "analyticsadmin.properties.dataStreams.eventCreateRules.list": +// method id "analyticsadmin.properties.dataStreams.getDataRedactionSettings": -type PropertiesDataStreamsEventCreateRulesListCall struct { +type PropertiesDataStreamsGetDataRedactionSettingsCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists EventCreateRules on a web data stream. +// GetDataRedactionSettings: Lookup for a single DataRedactionSettings. // -// - parent: Example format: properties/123/dataStreams/456. -func (r *PropertiesDataStreamsEventCreateRulesService) List(parent string) *PropertiesDataStreamsEventCreateRulesListCall { - c := &PropertiesDataStreamsEventCreateRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// 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 *PropertiesDataStreamsEventCreateRulesListCall) PageSize(pageSize int64) *PropertiesDataStreamsEventCreateRulesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListEventCreateRules` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListEventCreateRules` must match the call that provided -// the page token. -func (c *PropertiesDataStreamsEventCreateRulesListCall) PageToken(pageToken string) *PropertiesDataStreamsEventCreateRulesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the settings to lookup. Format: +// properties/{property}/dataStreams/{data_stream}/dataRedactionSetting +// s Example: "properties/1000/dataStreams/2000/dataRedactionSettings". +func (r *PropertiesDataStreamsService) GetDataRedactionSettings(name string) *PropertiesDataStreamsGetDataRedactionSettingsCall { + c := &PropertiesDataStreamsGetDataRedactionSettingsCall{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 *PropertiesDataStreamsEventCreateRulesListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesListCall { +func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsGetDataRedactionSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23704,7 +20021,7 @@ func (c *PropertiesDataStreamsEventCreateRulesListCall) Fields(s ...googleapi.Fi // 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 *PropertiesDataStreamsEventCreateRulesListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsEventCreateRulesListCall { +func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsGetDataRedactionSettingsCall { c.ifNoneMatch_ = entityTag return c } @@ -23712,21 +20029,21 @@ func (c *PropertiesDataStreamsEventCreateRulesListCall) IfNoneMatch(entityTag st // 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 *PropertiesDataStreamsEventCreateRulesListCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesListCall { +func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) Context(ctx context.Context) *PropertiesDataStreamsGetDataRedactionSettingsCall { 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 *PropertiesDataStreamsEventCreateRulesListCall) Header() http.Header { +func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsEventCreateRulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) 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_ { @@ -23739,7 +20056,7 @@ func (c *PropertiesDataStreamsEventCreateRulesListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/eventCreateRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23747,22 +20064,21 @@ func (c *PropertiesDataStreamsEventCreateRulesListCall) doRequest(alt string) (* } 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.properties.dataStreams.eventCreateRules.list" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "analyticsadmin.properties.dataStreams.getDataRedactionSettings" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaDataRedactionSettings or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse.ServerRespons -// e.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaDataRedactionSettings.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 *PropertiesDataStreamsEventCreateRulesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse, error) { +func (c *PropertiesDataStreamsGetDataRedactionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRedactionSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23781,7 +20097,7 @@ func (c *PropertiesDataStreamsEventCreateRulesListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse{ + ret := &GoogleAnalyticsAdminV1alphaDataRedactionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23793,36 +20109,25 @@ func (c *PropertiesDataStreamsEventCreateRulesListCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists EventCreateRules on a web data stream.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules", + // "description": "Lookup for a single DataRedactionSettings.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/dataRedactionSettings", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.list", + // "id": "analyticsadmin.properties.dataStreams.getDataRedactionSettings", // "parameterOrder": [ - // "parent" + // "name" // ], // "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 `ListEventCreateRules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventCreateRules` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Example format: properties/123/dataStreams/456", + // "name": { + // "description": "Required. The name of the settings to lookup. Format: properties/{property}/dataStreams/{data_stream}/dataRedactionSettings Example: \"properties/1000/dataStreams/2000/dataRedactionSettings\"", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/dataRedactionSettings$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/eventCreateRules", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaDataRedactionSettings" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -23832,104 +20137,82 @@ func (c *PropertiesDataStreamsEventCreateRulesListCall) Do(opts ...googleapi.Cal } -// 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 *PropertiesDataStreamsEventCreateRulesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse) 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.dataStreams.eventCreateRules.patch": +// method id "analyticsadmin.properties.dataStreams.getEnhancedMeasurementSettings": -type PropertiesDataStreamsEventCreateRulesPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphaeventcreaterule *GoogleAnalyticsAdminV1alphaEventCreateRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsGetEnhancedMeasurementSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an EventCreateRule. +// GetEnhancedMeasurementSettings: Returns the enhanced measurement +// settings for this data stream. Note that the stream must enable +// enhanced measurement for these settings to take effect. // -// - name: Output only. Resource name for this EventCreateRule resource. -// Format: -// properties/{property}/dataStreams/{data_stream}/eventCreateRules/{ev -// ent_create_rule}. -func (r *PropertiesDataStreamsEventCreateRulesService) Patch(name string, googleanalyticsadminv1alphaeventcreaterule *GoogleAnalyticsAdminV1alphaEventCreateRule) *PropertiesDataStreamsEventCreateRulesPatchCall { - c := &PropertiesDataStreamsEventCreateRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the settings to lookup. Format: +// properties/{property}/dataStreams/{data_stream}/enhancedMeasurementS +// ettings Example: +// "properties/1000/dataStreams/2000/enhancedMeasurementSettings". +func (r *PropertiesDataStreamsService) GetEnhancedMeasurementSettings(name string) *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall { + c := &PropertiesDataStreamsGetEnhancedMeasurementSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphaeventcreaterule = googleanalyticsadminv1alphaeventcreaterule - 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 *PropertiesDataStreamsEventCreateRulesPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsEventCreateRulesPatchCall { - 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 *PropertiesDataStreamsEventCreateRulesPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesPatchCall { +func (c *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall { 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 *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall { + 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 *PropertiesDataStreamsEventCreateRulesPatchCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesPatchCall { +func (c *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Context(ctx context.Context) *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall { 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 *PropertiesDataStreamsEventCreateRulesPatchCall) Header() http.Header { +func (c *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsEventCreateRulesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) 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.googleanalyticsadminv1alphaeventcreaterule) - 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 } @@ -23940,16 +20223,17 @@ func (c *PropertiesDataStreamsEventCreateRulesPatchCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.eventCreateRules.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaEventCreateRule or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaEventCreateRule.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.dataStreams.getEnhancedMeasurementSettings" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.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 *PropertiesDataStreamsEventCreateRulesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEventCreateRule, error) { +func (c *PropertiesDataStreamsGetEnhancedMeasurementSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23968,7 +20252,7 @@ func (c *PropertiesDataStreamsEventCreateRulesPatchCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaEventCreateRule{ + ret := &GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23980,127 +20264,129 @@ func (c *PropertiesDataStreamsEventCreateRulesPatchCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Updates an EventCreateRule.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules/{eventCreateRulesId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.patch", + // "description": "Returns the enhanced measurement settings for this data stream. Note that the stream must enable enhanced measurement for these settings to take effect.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/enhancedMeasurementSettings", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.dataStreams.getEnhancedMeasurementSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name for this EventCreateRule resource. Format: properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule}", + // "description": "Required. The name of the settings to lookup. Format: properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: \"properties/1000/dataStreams/2000/enhancedMeasurementSettings\"", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/eventCreateRules/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/enhancedMeasurementSettings$", // "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": "GoogleAnalyticsAdminV1alphaEventCreateRule" - // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaEventCreateRule" + // "$ref": "GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings" // }, // "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.dataStreams.measurementProtocolSecrets.create": +// method id "analyticsadmin.properties.dataStreams.getGlobalSiteTag": -type PropertiesDataStreamsMeasurementProtocolSecretsCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsGetGlobalSiteTagCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a measurement protocol secret. +// GetGlobalSiteTag: Returns the Site Tag for the specified web stream. +// Site Tags are immutable singletons. // -// - parent: The parent resource where this secret will be created. -// Format: properties/{property}/dataStreams/{dataStream}. -func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Create(parent string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall { - c := &PropertiesDataStreamsMeasurementProtocolSecretsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret +// - name: The name of the site tag to lookup. Note that site tags are +// singletons and do not have unique IDs. Format: +// properties/{property_id}/dataStreams/{stream_id}/globalSiteTag +// Example: "properties/123/dataStreams/456/globalSiteTag". +func (r *PropertiesDataStreamsService) GetGlobalSiteTag(name string) *PropertiesDataStreamsGetGlobalSiteTagCall { + c := &PropertiesDataStreamsGetGlobalSiteTagCall{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 *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall { +func (c *PropertiesDataStreamsGetGlobalSiteTagCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsGetGlobalSiteTagCall { 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 *PropertiesDataStreamsGetGlobalSiteTagCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsGetGlobalSiteTagCall { + 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 *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall { +func (c *PropertiesDataStreamsGetGlobalSiteTagCall) Context(ctx context.Context) *PropertiesDataStreamsGetGlobalSiteTagCall { 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 *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Header() http.Header { +func (c *PropertiesDataStreamsGetGlobalSiteTagCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsGetGlobalSiteTagCall) 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.googleanalyticsadminv1alphameasurementprotocolsecret) - 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}/measurementProtocolSecrets") + 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.properties.dataStreams.measurementProtocolSecrets.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.dataStreams.getGlobalSiteTag" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaGlobalSiteTag or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaGlobalSiteTag.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 *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { +func (c *PropertiesDataStreamsGetGlobalSiteTagCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGlobalSiteTag, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24119,7 +20405,7 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ + ret := &GoogleAnalyticsAdminV1alphaGlobalSiteTag{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24131,113 +20417,144 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Do(opts ...g } return ret, nil // { - // "description": "Creates a measurement protocol secret.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.create", + // "description": "Returns the Site Tag for the specified web stream. Site Tags are immutable singletons.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/globalSiteTag", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.dataStreams.getGlobalSiteTag", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}", + // "name": { + // "description": "Required. The name of the site tag to lookup. Note that site tags are singletons and do not have unique IDs. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: \"properties/123/dataStreams/456/globalSiteTag\"", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/globalSiteTag$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/measurementProtocolSecrets", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" + // "$ref": "GoogleAnalyticsAdminV1alphaGlobalSiteTag" // }, // "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.dataStreams.measurementProtocolSecrets.delete": +// method id "analyticsadmin.properties.dataStreams.list": -type PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes target MeasurementProtocolSecret. +// List: Lists DataStreams on a property. // -// - name: The name of the MeasurementProtocolSecret to delete. Format: -// properties/{property}/dataStreams/{dataStream}/measurementProtocolSe -// crets/{measurementProtocolSecret}. -func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Delete(name string) *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall { - c := &PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Example format: properties/1234. +func (r *PropertiesDataStreamsService) List(parent string) *PropertiesDataStreamsListCall { + c := &PropertiesDataStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// 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 *PropertiesDataStreamsListCall) PageSize(pageSize int64) *PropertiesDataStreamsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDataStreams` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListDataStreams` must match the call that provided the +// page token. +func (c *PropertiesDataStreamsListCall) PageToken(pageToken string) *PropertiesDataStreamsListCall { + 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 *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall { +func (c *PropertiesDataStreamsListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsListCall { 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 *PropertiesDataStreamsListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsListCall { + 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 *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall { +func (c *PropertiesDataStreamsListCall) Context(ctx context.Context) *PropertiesDataStreamsListCall { 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 *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Header() http.Header { +func (c *PropertiesDataStreamsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsListCall) 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/{+parent}/dataStreams") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.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 *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.dataStreams.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListDataStreamsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListDataStreamsResponse.ServerResponse.Hea +// der 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 *PropertiesDataStreamsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListDataStreamsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24256,7 +20573,7 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaListDataStreamsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24268,107 +20585,141 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Do(opts ...g } return ret, nil // { - // "description": "Deletes target MeasurementProtocolSecret.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.delete", + // "description": "Lists DataStreams on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.dataStreams.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}", + // "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 `ListDataStreams` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDataStreams` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Example format: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/dataStreams", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaListDataStreamsResponse" // }, // "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.dataStreams.measurementProtocolSecrets.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 *PropertiesDataStreamsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListDataStreamsResponse) 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 PropertiesDataStreamsMeasurementProtocolSecretsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.dataStreams.patch": + +type PropertiesDataStreamsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphadatastream *GoogleAnalyticsAdminV1alphaDataStream + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Lookup for a single "GA4" MeasurementProtocolSecret. +// Patch: Updates a DataStream on a property. // -// - name: The name of the measurement protocol secret to lookup. -// Format: -// properties/{property}/dataStreams/{dataStream}/measurementProtocolSe -// crets/{measurementProtocolSecret}. -func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Get(name string) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall { - c := &PropertiesDataStreamsMeasurementProtocolSecretsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name of this Data Stream. Format: +// properties/{property_id}/dataStreams/{stream_id} Example: +// "properties/1000/dataStreams/2000". +func (r *PropertiesDataStreamsService) Patch(name string, googleanalyticsadminv1alphadatastream *GoogleAnalyticsAdminV1alphaDataStream) *PropertiesDataStreamsPatchCall { + c := &PropertiesDataStreamsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphadatastream = googleanalyticsadminv1alphadatastream + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. Omitted fields will not be updated. To +// replace the entire entity, use one path with the string "*" to match +// all fields. +func (c *PropertiesDataStreamsPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsPatchCall { + 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 *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall { +func (c *PropertiesDataStreamsPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsPatchCall { 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 *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall { - 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 *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall { +func (c *PropertiesDataStreamsPatchCall) Context(ctx context.Context) *PropertiesDataStreamsPatchCall { 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 *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Header() http.Header { +func (c *PropertiesDataStreamsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsPatchCall) 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.googleanalyticsadminv1alphadatastream) + 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 } @@ -24379,16 +20730,15 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.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 *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { +// Do executes the "analyticsadmin.properties.dataStreams.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaDataStream or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaDataStream.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 *PropertiesDataStreamsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataStream, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24407,7 +20757,7 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ + ret := &GoogleAnalyticsAdminV1alphaDataStream{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24419,148 +20769,141 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Do(opts ...goog } return ret, nil // { - // "description": "Lookup for a single \"GA4\" MeasurementProtocolSecret.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get", + // "description": "Updates a DataStream on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.dataStreams.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}", + // "description": "Output only. Resource name of this Data Stream. Format: properties/{property_id}/dataStreams/{stream_id} Example: \"properties/1000/dataStreams/2000\"", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated. 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": "GoogleAnalyticsAdminV1alphaDataStream" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" + // "$ref": "GoogleAnalyticsAdminV1alphaDataStream" // }, // "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.dataStreams.measurementProtocolSecrets.list": +// method id "analyticsadmin.properties.dataStreams.updateDataRedactionSettings": -type PropertiesDataStreamsMeasurementProtocolSecretsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsUpdateDataRedactionSettingsCall struct { + s *Service + name string + googleanalyticsadminv1alphadataredactionsettings *GoogleAnalyticsAdminV1alphaDataRedactionSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Returns child MeasurementProtocolSecrets under the specified -// parent Property. +// UpdateDataRedactionSettings: Updates a DataRedactionSettings on a +// property. // -// - parent: The resource name of the parent stream. Format: -// properties/{property}/dataStreams/{dataStream}/measurementProtocolSe -// crets. -func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) List(parent string) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { - c := &PropertiesDataStreamsMeasurementProtocolSecretsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of resources to return. If unspecified, at most 10 resources will be -// returned. The maximum value is 10. Higher values will be coerced to -// the maximum. -func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) PageSize(pageSize int64) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: Output only. Name of this Data Redaction Settings resource. +// Format: +// properties/{property_id}/dataStreams/{data_stream}/dataRedactionSett +// ings Example: +// "properties/1000/dataStreams/2000/dataRedactionSettings". +func (r *PropertiesDataStreamsService) UpdateDataRedactionSettings(name string, googleanalyticsadminv1alphadataredactionsettings *GoogleAnalyticsAdminV1alphaDataRedactionSettings) *PropertiesDataStreamsUpdateDataRedactionSettingsCall { + c := &PropertiesDataStreamsUpdateDataRedactionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphadataredactionsettings = googleanalyticsadminv1alphadataredactionsettings return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListMeasurementProtocolSecrets` call. -// Provide this to retrieve the subsequent page. When paginating, all -// other parameters provided to `ListMeasurementProtocolSecrets` must -// match the call that provided the page token. -func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) PageToken(pageToken string) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *PropertiesDataStreamsUpdateDataRedactionSettingsCall) UpdateMask(updateMask string) *PropertiesDataStreamsUpdateDataRedactionSettingsCall { + 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 *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { +func (c *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsUpdateDataRedactionSettingsCall { 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 *PropertiesDataStreamsMeasurementProtocolSecretsListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { - 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 *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { +func (c *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Context(ctx context.Context) *PropertiesDataStreamsUpdateDataRedactionSettingsCall { 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 *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Header() http.Header { +func (c *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsUpdateDataRedactionSettingsCall) 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.googleanalyticsadminv1alphadataredactionsettings) + 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}/measurementProtocolSecrets") + 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 } 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.properties.dataStreams.measurementProtocolSecrets.list" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse or +// Do executes the "analyticsadmin.properties.dataStreams.updateDataRedactionSettings" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaDataRedactionSettings or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse.Ser -// verResponse.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaDataRedactionSettings.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 *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse, error) { +func (c *PropertiesDataStreamsUpdateDataRedactionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataRedactionSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24579,7 +20922,7 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse{ + ret := &GoogleAnalyticsAdminV1alphaDataRedactionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24591,93 +20934,75 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Do(opts ...goo } return ret, nil // { - // "description": "Returns child MeasurementProtocolSecrets under the specified parent Property.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.list", + // "description": "Updates a DataRedactionSettings on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/dataRedactionSettings", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.dataStreams.updateDataRedactionSettings", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListMeasurementProtocolSecrets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMeasurementProtocolSecrets` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets", + // "name": { + // "description": "Output only. Name of this Data Redaction Settings resource. Format: properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings Example: \"properties/1000/dataStreams/2000/dataRedactionSettings\"", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/dataRedactionSettings$", // "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/{+parent}/measurementProtocolSecrets", + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaDataRedactionSettings" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaDataRedactionSettings" // }, // "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 *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse) 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.dataStreams.measurementProtocolSecrets.patch": +// method id "analyticsadmin.properties.dataStreams.updateEnhancedMeasurementSettings": -type PropertiesDataStreamsMeasurementProtocolSecretsPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall struct { + s *Service + name string + googleanalyticsadminv1alphaenhancedmeasurementsettings *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a measurement protocol secret. +// UpdateEnhancedMeasurementSettings: Updates the enhanced measurement +// settings for this data stream. Note that the stream must enable +// enhanced measurement for these settings to take effect. // -// - name: Output only. Resource name of this secret. This secret may be -// a child of any type of stream. Format: -// properties/{property}/dataStreams/{dataStream}/measurementProtocolSe -// crets/{measurementProtocolSecret}. -func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Patch(name string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall { - c := &PropertiesDataStreamsMeasurementProtocolSecretsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name of the Enhanced Measurement +// Settings. Format: +// properties/{property_id}/dataStreams/{data_stream}/enhancedMeasureme +// ntSettings Example: +// "properties/1000/dataStreams/2000/enhancedMeasurementSettings". +func (r *PropertiesDataStreamsService) UpdateEnhancedMeasurementSettings(name string, googleanalyticsadminv1alphaenhancedmeasurementsettings *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings) *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall { + c := &PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret + c.googleanalyticsadminv1alphaenhancedmeasurementsettings = googleanalyticsadminv1alphaenhancedmeasurementsettings return c } // UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to be updated. Omitted fields will not be updated. -func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall { +// 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 *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) UpdateMask(updateMask string) *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -24685,7 +21010,7 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) UpdateMask(up // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall { +func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24693,21 +21018,21 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Fields(s ...g // 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 *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall { +func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Context(ctx context.Context) *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall { 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 *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Header() http.Header { +func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) 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_ { @@ -24715,7 +21040,7 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) doRequest(alt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphameasurementprotocolsecret) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaenhancedmeasurementsettings) if err != nil { return nil, err } @@ -24735,16 +21060,17 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.dataStreams.updateEnhancedMeasurementSettings" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.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 *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { +func (c *PropertiesDataStreamsUpdateEnhancedMeasurementSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24763,7 +21089,7 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ + ret := &GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24775,23 +21101,23 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...go } return ret, nil // { - // "description": "Updates a measurement protocol secret.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", + // "description": "Updates the enhanced measurement settings for this data stream. Note that the stream must enable enhanced measurement for these settings to take effect.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/enhancedMeasurementSettings", // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch", + // "id": "analyticsadmin.properties.dataStreams.updateEnhancedMeasurementSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}", + // "description": "Output only. Resource name of the Enhanced Measurement Settings. Format: properties/{property_id}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: \"properties/1000/dataStreams/2000/enhancedMeasurementSettings\"", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/enhancedMeasurementSettings$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "Required. The list of fields to be updated. Omitted fields will not be updated.", + // "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" @@ -24799,10 +21125,10 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...go // }, // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" + // "$ref": "GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" + // "$ref": "GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -24811,32 +21137,31 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...go } -// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create": +// method id "analyticsadmin.properties.dataStreams.eventCreateRules.create": -type PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsEventCreateRulesCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphaeventcreaterule *GoogleAnalyticsAdminV1alphaEventCreateRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a SKAdNetworkConversionValueSchema. +// Create: Creates an EventCreateRule. // -// - parent: The parent resource where this schema will be created. -// Format: properties/{property}/dataStreams/{dataStream}. -func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Create(parent string, googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall { - c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Example format: properties/123/dataStreams/456. +func (r *PropertiesDataStreamsEventCreateRulesService) Create(parent string, googleanalyticsadminv1alphaeventcreaterule *GoogleAnalyticsAdminV1alphaEventCreateRule) *PropertiesDataStreamsEventCreateRulesCreateCall { + c := &PropertiesDataStreamsEventCreateRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema = googleanalyticsadminv1alphaskadnetworkconversionvalueschema + c.googleanalyticsadminv1alphaeventcreaterule = googleanalyticsadminv1alphaeventcreaterule 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall { +func (c *PropertiesDataStreamsEventCreateRulesCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24844,21 +21169,21 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Fields // 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall { +func (c *PropertiesDataStreamsEventCreateRulesCreateCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesCreateCall { 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Header() http.Header { +func (c *PropertiesDataStreamsEventCreateRulesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsEventCreateRulesCreateCall) 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_ { @@ -24866,14 +21191,14 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) doRequ } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaeventcreaterule) 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}/sKAdNetworkConversionValueSchema") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/eventCreateRules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24886,17 +21211,16 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema or error +// Do executes the "analyticsadmin.properties.dataStreams.eventCreateRules.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaEventCreateRule or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema.ServerRes -// ponse.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaEventCreateRule.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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema, error) { +func (c *PropertiesDataStreamsEventCreateRulesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEventCreateRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24915,7 +21239,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema{ + ret := &GoogleAnalyticsAdminV1alphaEventCreateRule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24927,28 +21251,28 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Do(opt } return ret, nil // { - // "description": "Creates a SKAdNetworkConversionValueSchema.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema", + // "description": "Creates an EventCreateRule.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create", + // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource where this schema will be created. Format: properties/{property}/dataStreams/{dataStream}", + // "description": "Required. Example format: properties/123/dataStreams/456", // "location": "path", // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/sKAdNetworkConversionValueSchema", + // "path": "v1alpha/{+parent}/eventCreateRules", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // "$ref": "GoogleAnalyticsAdminV1alphaEventCreateRule" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // "$ref": "GoogleAnalyticsAdminV1alphaEventCreateRule" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -24957,9 +21281,9 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Do(opt } -// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.delete": +// method id "analyticsadmin.properties.dataStreams.eventCreateRules.delete": -type PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall struct { +type PropertiesDataStreamsEventCreateRulesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24967,14 +21291,12 @@ type PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall struct { header_ http.Header } -// Delete: Deletes target SKAdNetworkConversionValueSchema. +// Delete: Deletes an EventCreateRule. // -// - name: The name of the SKAdNetworkConversionValueSchema to delete. -// Format: -// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversion -// ValueSchema/{skadnetwork_conversion_value_schema}. -func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Delete(name string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall { - c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Example format: +// properties/123/dataStreams/456/eventCreateRules/789. +func (r *PropertiesDataStreamsEventCreateRulesService) Delete(name string) *PropertiesDataStreamsEventCreateRulesDeleteCall { + c := &PropertiesDataStreamsEventCreateRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24982,7 +21304,7 @@ func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Delete(na // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall { +func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24990,21 +21312,21 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Fields // 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall { +func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesDeleteCall { 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Header() http.Header { +func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) 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_ { @@ -25027,14 +21349,14 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.delete" call. +// Do executes the "analyticsadmin.properties.dataStreams.eventCreateRules.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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *PropertiesDataStreamsEventCreateRulesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25065,18 +21387,18 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Do(opt } return ret, nil // { - // "description": "Deletes target SKAdNetworkConversionValueSchema.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + // "description": "Deletes an EventCreateRule.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules/{eventCreateRulesId}", // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.delete", + // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the SKAdNetworkConversionValueSchema to delete. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}", + // "description": "Required. Example format: properties/123/dataStreams/456/eventCreateRules/789", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/eventCreateRules/[^/]+$", // "required": true, // "type": "string" // } @@ -25092,9 +21414,9 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Do(opt } -// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get": +// method id "analyticsadmin.properties.dataStreams.eventCreateRules.get": -type PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall struct { +type PropertiesDataStreamsEventCreateRulesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -25103,14 +21425,12 @@ type PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall struct { header_ http.Header } -// Get: Looks up a single SKAdNetworkConversionValueSchema. +// Get: Lookup for a single EventCreateRule. // -// - name: The resource name of SKAdNetwork conversion value schema to -// look up. Format: -// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversion -// ValueSchema/{skadnetwork_conversion_value_schema}. -func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Get(name string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { - c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the EventCreateRule to get. Example format: +// properties/123/dataStreams/456/eventCreateRules/789. +func (r *PropertiesDataStreamsEventCreateRulesService) Get(name string) *PropertiesDataStreamsEventCreateRulesGetCall { + c := &PropertiesDataStreamsEventCreateRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -25118,7 +21438,7 @@ func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Get(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { +func (c *PropertiesDataStreamsEventCreateRulesGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25128,7 +21448,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Fields(s // 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { +func (c *PropertiesDataStreamsEventCreateRulesGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsEventCreateRulesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -25136,21 +21456,21 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) IfNoneMat // 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { +func (c *PropertiesDataStreamsEventCreateRulesGetCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesGetCall { 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Header() http.Header { +func (c *PropertiesDataStreamsEventCreateRulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsEventCreateRulesGetCall) 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_ { @@ -25176,17 +21496,16 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema or error +// Do executes the "analyticsadmin.properties.dataStreams.eventCreateRules.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaEventCreateRule or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema.ServerRes -// ponse.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaEventCreateRule.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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema, error) { +func (c *PropertiesDataStreamsEventCreateRulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEventCreateRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25205,7 +21524,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema{ + ret := &GoogleAnalyticsAdminV1alphaEventCreateRule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25217,25 +21536,25 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Do(opts . } return ret, nil // { - // "description": "Looks up a single SKAdNetworkConversionValueSchema.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + // "description": "Lookup for a single EventCreateRule.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules/{eventCreateRulesId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get", + // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of SKAdNetwork conversion value schema to look up. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}", + // "description": "Required. The name of the EventCreateRule to get. Example format: properties/123/dataStreams/456/eventCreateRules/789", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/eventCreateRules/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // "$ref": "GoogleAnalyticsAdminV1alphaEventCreateRule" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -25245,9 +21564,9 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Do(opts . } -// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list": +// method id "analyticsadmin.properties.dataStreams.eventCreateRules.list": -type PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall struct { +type PropertiesDataStreamsEventCreateRulesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -25256,35 +21575,30 @@ type PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall struct { header_ http.Header } -// List: Lists SKAdNetworkConversionValueSchema on a stream. Properties -// can have at most one SKAdNetworkConversionValueSchema. +// List: Lists EventCreateRules on a web data stream. // -// - parent: The DataStream resource to list schemas for. Format: -// properties/{property_id}/dataStreams/{dataStream} Example: -// properties/1234/dataStreams/5678. -func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) List(parent string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { - c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Example format: properties/123/dataStreams/456. +func (r *PropertiesDataStreamsEventCreateRulesService) List(parent string) *PropertiesDataStreamsEventCreateRulesListCall { + c := &PropertiesDataStreamsEventCreateRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) PageSize(pageSize int64) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { +// 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 *PropertiesDataStreamsEventCreateRulesListCall) PageSize(pageSize int64) *PropertiesDataStreamsEventCreateRulesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListSKAdNetworkConversionValueSchemas` -// call. Provide this to retrieve the subsequent page. When paginating, -// all other parameters provided to -// `ListSKAdNetworkConversionValueSchema` must match the call that -// provided the page token. -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) PageToken(pageToken string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { +// received from a previous `ListEventCreateRules` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListEventCreateRules` must match the call that provided +// the page token. +func (c *PropertiesDataStreamsEventCreateRulesListCall) PageToken(pageToken string) *PropertiesDataStreamsEventCreateRulesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -25292,7 +21606,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) PageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { +func (c *PropertiesDataStreamsEventCreateRulesListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25302,7 +21616,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Fields(s // 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { +func (c *PropertiesDataStreamsEventCreateRulesListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsEventCreateRulesListCall { c.ifNoneMatch_ = entityTag return c } @@ -25310,21 +21624,21 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) IfNoneMa // 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { +func (c *PropertiesDataStreamsEventCreateRulesListCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesListCall { 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Header() http.Header { +func (c *PropertiesDataStreamsEventCreateRulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsEventCreateRulesListCall) 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_ { @@ -25337,7 +21651,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) doReques var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sKAdNetworkConversionValueSchema") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/eventCreateRules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25350,17 +21664,17 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list" call. +// Do executes the "analyticsadmin.properties.dataStreams.eventCreateRules.list" call. // Exactly one of -// *GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasRespo -// nse or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasRespo -// nse.ServerResponse.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse.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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse, error) { +func (c *PropertiesDataStreamsEventCreateRulesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25379,7 +21693,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse{ + ret := &GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25391,36 +21705,36 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Do(opts } return ret, nil // { - // "description": "Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one SKAdNetworkConversionValueSchema.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema", + // "description": "Lists EventCreateRules on a web data stream.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list", + // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.list", // "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)", + // "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 `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSKAdNetworkConversionValueSchema` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListEventCreateRules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventCreateRules` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The DataStream resource to list schemas for. Format: properties/{property_id}/dataStreams/{dataStream} Example: properties/1234/dataStreams/5678", + // "description": "Required. Example format: properties/123/dataStreams/456", // "location": "path", // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/sKAdNetworkConversionValueSchema", + // "path": "v1alpha/{+parent}/eventCreateRules", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -25433,7 +21747,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Do(opts // 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse) error) error { +func (c *PropertiesDataStreamsEventCreateRulesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListEventCreateRulesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -25451,34 +21765,36 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Pages(ct } } -// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch": +// method id "analyticsadmin.properties.dataStreams.eventCreateRules.patch": -type PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsEventCreateRulesPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaeventcreaterule *GoogleAnalyticsAdminV1alphaEventCreateRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a SKAdNetworkConversionValueSchema. +// Patch: Updates an EventCreateRule. // -// - name: Output only. Resource name of the schema. This will be child -// of ONLY an iOS stream, and there can be at most one such child -// under an iOS stream. Format: -// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversion -// ValueSchema. -func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Patch(name string, googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { - c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name for this EventCreateRule resource. +// Format: +// properties/{property}/dataStreams/{data_stream}/eventCreateRules/{ev +// ent_create_rule}. +func (r *PropertiesDataStreamsEventCreateRulesService) Patch(name string, googleanalyticsadminv1alphaeventcreaterule *GoogleAnalyticsAdminV1alphaEventCreateRule) *PropertiesDataStreamsEventCreateRulesPatchCall { + c := &PropertiesDataStreamsEventCreateRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema = googleanalyticsadminv1alphaskadnetworkconversionvalueschema + c.googleanalyticsadminv1alphaeventcreaterule = googleanalyticsadminv1alphaeventcreaterule return c } // UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to be updated. Omitted fields will not be updated. -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { +// 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 *PropertiesDataStreamsEventCreateRulesPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsEventCreateRulesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -25486,7 +21802,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) UpdateM // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { +func (c *PropertiesDataStreamsEventCreateRulesPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventCreateRulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25494,21 +21810,21 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Fields( // 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { +func (c *PropertiesDataStreamsEventCreateRulesPatchCall) Context(ctx context.Context) *PropertiesDataStreamsEventCreateRulesPatchCall { 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Header() http.Header { +func (c *PropertiesDataStreamsEventCreateRulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsEventCreateRulesPatchCall) 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_ { @@ -25516,7 +21832,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) doReque } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaeventcreaterule) if err != nil { return nil, err } @@ -25536,17 +21852,16 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema or error +// Do executes the "analyticsadmin.properties.dataStreams.eventCreateRules.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaEventCreateRule or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema.ServerRes -// ponse.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaEventCreateRule.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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema, error) { +func (c *PropertiesDataStreamsEventCreateRulesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEventCreateRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25565,7 +21880,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema{ + ret := &GoogleAnalyticsAdminV1alphaEventCreateRule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25577,23 +21892,23 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Do(opts } return ret, nil // { - // "description": "Updates a SKAdNetworkConversionValueSchema.", - // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + // "description": "Updates an EventCreateRule.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventCreateRules/{eventCreateRulesId}", // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch", + // "id": "analyticsadmin.properties.dataStreams.eventCreateRules.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name of the schema. This will be child of ONLY an iOS stream, and there can be at most one such child under an iOS stream. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema", + // "description": "Output only. Resource name for this EventCreateRule resource. Format: properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule}", // "location": "path", - // "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/eventCreateRules/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "Required. The list of fields to be updated. Omitted fields will not be updated.", + // "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" @@ -25601,10 +21916,10 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Do(opts // }, // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // "$ref": "GoogleAnalyticsAdminV1alphaEventCreateRule" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // "$ref": "GoogleAnalyticsAdminV1alphaEventCreateRule" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -25613,35 +21928,32 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Do(opts } -// method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.approve": - -type PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall struct { - s *Service - name string - googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest *GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +// method id "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.create": -// Approve: Approves a DisplayVideo360AdvertiserLinkProposal. The -// DisplayVideo360AdvertiserLinkProposal will be deleted and a new -// DisplayVideo360AdvertiserLink will be created. -// -// - name: The name of the DisplayVideo360AdvertiserLinkProposal to -// approve. Example format: -// properties/1234/displayVideo360AdvertiserLinkProposals/5678. -func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Approve(name string, googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest *GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalRequest) *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall { - c := &PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest = googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest +type PropertiesDataStreamsMeasurementProtocolSecretsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a measurement protocol secret. +// +// - parent: The parent resource where this secret will be created. +// Format: properties/{property}/dataStreams/{dataStream}. +func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Create(parent string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall { + c := &PropertiesDataStreamsMeasurementProtocolSecretsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25649,21 +21961,21 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Fields(s . // 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall { 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Header() http.Header { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) 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_ { @@ -25671,14 +21983,14 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) doRequest( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphameasurementprotocolsecret) 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}:approve") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/measurementProtocolSecrets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25686,22 +21998,21 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) doRequest( } 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.displayVideo360AdvertiserLinkProposals.approve" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkPropos -// alResponse or error will be non-nil. Any non-2xx status code is an -// error. Response headers are in either -// *GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkPropos -// alResponse.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalResponse, error) { +// Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.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 *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25720,7 +22031,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalResponse{ + ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25732,28 +22043,28 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Do(opts .. } return ret, nil // { - // "description": "Approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal will be deleted and a new DisplayVideo360AdvertiserLink will be created.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals/{displayVideo360AdvertiserLinkProposalsId}:approve", + // "description": "Creates a measurement protocol secret.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.approve", + // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the DisplayVideo360AdvertiserLinkProposal to approve. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678", + // "parent": { + // "description": "Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}", // "location": "path", - // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinkProposals/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:approve", + // "path": "v1alpha/{+parent}/measurementProtocolSecrets", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -25762,37 +22073,31 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Do(opts .. } -// method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.cancel": +// method id "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.delete": -type PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall struct { - s *Service - name string - googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest *GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposalRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling -// can mean either: - Declining a proposal initiated from Display & -// Video 360 - Withdrawing a proposal initiated from Google Analytics -// After being cancelled, a proposal will eventually be deleted -// automatically. +// Delete: Deletes target MeasurementProtocolSecret. // -// - name: The name of the DisplayVideo360AdvertiserLinkProposal to -// cancel. Example format: -// properties/1234/displayVideo360AdvertiserLinkProposals/5678. -func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Cancel(name string, googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest *GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposalRequest) *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall { - c := &PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the MeasurementProtocolSecret to delete. Format: +// properties/{property}/dataStreams/{dataStream}/measurementProtocolSe +// crets/{measurementProtocolSecret}. +func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Delete(name string) *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall { + c := &PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest = googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25800,21 +22105,21 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Fields(s .. // 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall { 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Header() http.Header { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) 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_ { @@ -25822,16 +22127,11 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest) - 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}:cancel") + 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 } @@ -25842,17 +22142,14 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.cancel" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal, error) { +// Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.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 *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25871,7 +22168,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25883,28 +22180,25 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Do(opts ... } return ret, nil // { - // "description": "Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either: - Declining a proposal initiated from Display \u0026 Video 360 - Withdrawing a proposal initiated from Google Analytics After being cancelled, a proposal will eventually be deleted automatically.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals/{displayVideo360AdvertiserLinkProposalsId}:cancel", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.cancel", + // "description": "Deletes target MeasurementProtocolSecret.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the DisplayVideo360AdvertiserLinkProposal to cancel. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678", + // "description": "Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}", // "location": "path", - // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinkProposals/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:cancel", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposalRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -25913,91 +22207,100 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Do(opts ... } -// method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.create": +// method id "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get": -type PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsMeasurementProtocolSecretsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a DisplayVideo360AdvertiserLinkProposal. +// Get: Lookup for a single "GA4" MeasurementProtocolSecret. // -// - parent: Example format: properties/1234. -func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Create(parent string, googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal) *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall { - c := &PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal = googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal +// - name: The name of the measurement protocol secret to lookup. +// Format: +// properties/{property}/dataStreams/{dataStream}/measurementProtocolSe +// crets/{measurementProtocolSecret}. +func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Get(name string) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall { + c := &PropertiesDataStreamsMeasurementProtocolSecretsGetCall{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 *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall { 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 *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall { + 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall { 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Header() http.Header { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) 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.googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal) - 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}/displayVideo360AdvertiserLinkProposals") + 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.properties.displayVideo360AdvertiserLinkProposals.create" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal.Serv -// erResponse.Header or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal, error) { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26016,7 +22319,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal{ + ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26028,114 +22331,148 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Do(opts ... } return ret, nil // { - // "description": "Creates a DisplayVideo360AdvertiserLinkProposal.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.create", + // "description": "Lookup for a single \"GA4\" MeasurementProtocolSecret.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/displayVideo360AdvertiserLinkProposals", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal" + // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" // }, // "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.displayVideo360AdvertiserLinkProposals.delete": +// method id "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.list": -type PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsMeasurementProtocolSecretsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DisplayVideo360AdvertiserLinkProposal on a -// property. This can only be used on cancelled proposals. +// List: Returns child MeasurementProtocolSecrets under the specified +// parent Property. // -// - name: The name of the DisplayVideo360AdvertiserLinkProposal to -// delete. Example format: -// properties/1234/displayVideo360AdvertiserLinkProposals/5678. -func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Delete(name string) *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall { - c := &PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the parent stream. Format: +// properties/{property}/dataStreams/{dataStream}/measurementProtocolSe +// crets. +func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) List(parent string) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { + c := &PropertiesDataStreamsMeasurementProtocolSecretsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of resources to return. If unspecified, at most 10 resources will be +// returned. The maximum value is 10. Higher values will be coerced to +// the maximum. +func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) PageSize(pageSize int64) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListMeasurementProtocolSecrets` call. +// Provide this to retrieve the subsequent page. When paginating, all +// other parameters provided to `ListMeasurementProtocolSecrets` must +// match the call that provided the page token. +func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) PageToken(pageToken string) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { + 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { 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 *PropertiesDataStreamsMeasurementProtocolSecretsListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { + 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsListCall { 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Header() http.Header { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) 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/{+parent}/measurementProtocolSecrets") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse.Ser +// verResponse.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 *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26154,7 +22491,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26166,106 +22503,140 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Do(opts ... } return ret, nil // { - // "description": "Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on cancelled proposals.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals/{displayVideo360AdvertiserLinkProposalsId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.delete", + // "description": "Returns child MeasurementProtocolSecrets under the specified parent Property.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678", + // "pageSize": { + // "description": "The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListMeasurementProtocolSecrets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMeasurementProtocolSecrets` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets", // "location": "path", - // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinkProposals/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/measurementProtocolSecrets", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse" // }, // "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.displayVideo360AdvertiserLinkProposals.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 *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse) 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 PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch": + +type PropertiesDataStreamsMeasurementProtocolSecretsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Lookup for a single DisplayVideo360AdvertiserLinkProposal. +// Patch: Updates a measurement protocol secret. // -// - name: The name of the DisplayVideo360AdvertiserLinkProposal to get. -// Example format: -// properties/1234/displayVideo360AdvertiserLinkProposals/5678. -func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Get(name string) *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall { - c := &PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name of this secret. This secret may be +// a child of any type of stream. Format: +// properties/{property}/dataStreams/{dataStream}/measurementProtocolSe +// crets/{measurementProtocolSecret}. +func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Patch(name string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall { + c := &PropertiesDataStreamsMeasurementProtocolSecretsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. Omitted fields will not be updated. +func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall { + 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall { 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) IfNoneMatch(entityTag string) *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall { - 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall { 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Header() http.Header { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) 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.googleanalyticsadminv1alphameasurementprotocolsecret) + 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 } @@ -26276,17 +22647,16 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.get" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal.Serv -// erResponse.Header or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal, error) { +func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26305,7 +22675,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal{ + ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26317,125 +22687,107 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Do(opts ...goo } return ret, nil // { - // "description": "Lookup for a single DisplayVideo360AdvertiserLinkProposal.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals/{displayVideo360AdvertiserLinkProposalsId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.get", + // "description": "Updates a measurement protocol secret.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678", + // "description": "Output only. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}", // "location": "path", - // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinkProposals/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated. Omitted fields will not be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal" + // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" // }, // "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.displayVideo360AdvertiserLinkProposals.list": +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create": -type PropertiesDisplayVideo360AdvertiserLinkProposalsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists DisplayVideo360AdvertiserLinkProposals on a property. +// Create: Creates a SKAdNetworkConversionValueSchema. // -// - parent: Example format: properties/1234. -func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) List(parent string) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { - c := &PropertiesDisplayVideo360AdvertiserLinkProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource where this schema will be created. +// Format: properties/{property}/dataStreams/{dataStream}. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Create(parent string, googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) PageSize(pageSize int64) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListDisplayVideo360AdvertiserLinkProposals` -// call. Provide this to retrieve the subsequent page. When paginating, -// all other parameters provided to -// `ListDisplayVideo360AdvertiserLinkProposals` must match the call that -// provided the page token. -func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) PageToken(pageToken string) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema = googleanalyticsadminv1alphaskadnetworkconversionvalueschema 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall { 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) IfNoneMatch(entityTag string) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { - 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall { 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Header() http.Header { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) 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.googleanalyticsadminv1alphaskadnetworkconversionvalueschema) + 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}/displayVideo360AdvertiserLinkProposals") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sKAdNetworkConversionValueSchema") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -26446,17 +22798,17 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.list" call. +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create" call. // Exactly one of -// *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposals -// Response or error will be non-nil. Any non-2xx status code is an -// error. Response headers are in either -// *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposals -// Response.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse, error) { +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema.ServerRes +// ponse.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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26475,7 +22827,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse{ + ret := &GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26487,95 +22839,62 @@ func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Do(opts ...go } return ret, nil // { - // "description": "Lists DisplayVideo360AdvertiserLinkProposals on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.list", + // "description": "Creates a SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create", // "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 `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDisplayVideo360AdvertiserLinkProposals` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. Example format: properties/1234", + // "description": "Required. The parent resource where this schema will be created. Format: properties/{property}/dataStreams/{dataStream}", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/displayVideo360AdvertiserLinkProposals", + // "path": "v1alpha/{+parent}/sKAdNetworkConversionValueSchema", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" // }, // "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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse) 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.displayVideo360AdvertiserLinks.create": +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.delete": -type PropertiesDisplayVideo360AdvertiserLinksCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphadisplayvideo360advertiserlink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a DisplayVideo360AdvertiserLink. This can only be -// utilized by users who have proper authorization both on the Google -// Analytics property and on the Display & Video 360 advertiser. Users -// who do not have access to the Display & Video 360 advertiser should -// instead seek to create a DisplayVideo360LinkProposal. +// Delete: Deletes target SKAdNetworkConversionValueSchema. // -// - parent: Example format: properties/1234. -func (r *PropertiesDisplayVideo360AdvertiserLinksService) Create(parent string, googleanalyticsadminv1alphadisplayvideo360advertiserlink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink) *PropertiesDisplayVideo360AdvertiserLinksCreateCall { - c := &PropertiesDisplayVideo360AdvertiserLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphadisplayvideo360advertiserlink = googleanalyticsadminv1alphadisplayvideo360advertiserlink +// - name: The name of the SKAdNetworkConversionValueSchema to delete. +// Format: +// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversion +// ValueSchema/{skadnetwork_conversion_value_schema}. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Delete(name string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall{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 *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksCreateCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26583,21 +22902,21 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Fields(s ...googlea // 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 *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksCreateCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall { 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 *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Header() http.Header { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) 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_ { @@ -26605,37 +22924,29 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphadisplayvideo360advertiserlink) - 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}/displayVideo360AdvertiserLinks") + 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.properties.displayVideo360AdvertiserLinks.create" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink.ServerRespon -// se.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 *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink, error) { +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26654,7 +22965,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26666,28 +22977,25 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper authorization both on the Google Analytics property and on the Display \u0026 Video 360 advertiser. Users who do not have access to the Display \u0026 Video 360 advertiser should instead seek to create a DisplayVideo360LinkProposal.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.create", + // "description": "Deletes target SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Required. The name of the SKAdNetworkConversionValueSchema to delete. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/displayVideo360AdvertiserLinks", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -26696,22 +23004,25 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Do(opts ...googleap } -// method id "analyticsadmin.properties.displayVideo360AdvertiserLinks.delete": +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get": -type PropertiesDisplayVideo360AdvertiserLinksDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DisplayVideo360AdvertiserLink on a property. +// Get: Looks up a single SKAdNetworkConversionValueSchema. // -// - name: The name of the DisplayVideo360AdvertiserLink to delete. -// Example format: properties/1234/displayVideo360AdvertiserLinks/5678. -func (r *PropertiesDisplayVideo360AdvertiserLinksService) Delete(name string) *PropertiesDisplayVideo360AdvertiserLinksDeleteCall { - c := &PropertiesDisplayVideo360AdvertiserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of SKAdNetwork conversion value schema to +// look up. Format: +// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversion +// ValueSchema/{skadnetwork_conversion_value_schema}. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Get(name string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26719,41 +23030,54 @@ func (r *PropertiesDisplayVideo360AdvertiserLinksService) Delete(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksDeleteCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { + 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 *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksDeleteCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { 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 *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Header() http.Header { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) 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("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -26764,14 +23088,17 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinks.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 *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema.ServerRes +// ponse.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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26790,7 +23117,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26802,58 +23129,82 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Do(opts ...googleap } return ret, nil // { - // "description": "Deletes a DisplayVideo360AdvertiserLink on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks/{displayVideo360AdvertiserLinksId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.delete", + // "description": "Looks up a single SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format: properties/1234/displayVideo360AdvertiserLinks/5678", + // "description": "Required. The resource name of SKAdNetwork conversion value schema to look up. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}", // "location": "path", - // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinks/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" // }, // "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.displayVideo360AdvertiserLinks.get": +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list": -type PropertiesDisplayVideo360AdvertiserLinksGetCall struct { +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Look up a single DisplayVideo360AdvertiserLink +// List: Lists SKAdNetworkConversionValueSchema on a stream. Properties +// can have at most one SKAdNetworkConversionValueSchema. // -// - name: The name of the DisplayVideo360AdvertiserLink to get. Example -// format: properties/1234/displayVideo360AdvertiserLink/5678. -func (r *PropertiesDisplayVideo360AdvertiserLinksService) Get(name string) *PropertiesDisplayVideo360AdvertiserLinksGetCall { - c := &PropertiesDisplayVideo360AdvertiserLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The DataStream resource to list schemas for. Format: +// properties/{property_id}/dataStreams/{dataStream} Example: +// properties/1234/dataStreams/5678. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) List(parent string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) PageSize(pageSize int64) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListSKAdNetworkConversionValueSchemas` +// call. Provide this to retrieve the subsequent page. When paginating, +// all other parameters provided to +// `ListSKAdNetworkConversionValueSchema` must match the call that +// provided the page token. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) PageToken(pageToken string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { + 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 *PropertiesDisplayVideo360AdvertiserLinksGetCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksGetCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26863,7 +23214,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) Fields(s ...googleapi. // 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 *PropertiesDisplayVideo360AdvertiserLinksGetCall) IfNoneMatch(entityTag string) *PropertiesDisplayVideo360AdvertiserLinksGetCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { c.ifNoneMatch_ = entityTag return c } @@ -26871,21 +23222,21 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) IfNoneMatch(entityTag // 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 *PropertiesDisplayVideo360AdvertiserLinksGetCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksGetCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { 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 *PropertiesDisplayVideo360AdvertiserLinksGetCall) Header() http.Header { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) 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_ { @@ -26898,7 +23249,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) doRequest(alt string) 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}/sKAdNetworkConversionValueSchema") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26906,22 +23257,22 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) doRequest(alt string) } 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.displayVideo360AdvertiserLinks.get" call. +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list" call. // Exactly one of -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink.ServerRespon -// se.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasRespo +// nse or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasRespo +// nse.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 *PropertiesDisplayVideo360AdvertiserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink, error) { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26940,7 +23291,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink{ + ret := &GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26952,25 +23303,36 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Look up a single DisplayVideo360AdvertiserLink", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks/{displayVideo360AdvertiserLinksId}", + // "description": "Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.get", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the DisplayVideo360AdvertiserLink to get. Example format: properties/1234/displayVideo360AdvertiserLink/5678", + // "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 `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSKAdNetworkConversionValueSchema` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The DataStream resource to list schemas for. Format: properties/{property_id}/dataStreams/{dataStream} Example: properties/1234/dataStreams/5678", // "location": "path", - // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinks/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/sKAdNetworkConversionValueSchema", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -26980,119 +23342,123 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) Do(opts ...googleapi.C } -// method id "analyticsadmin.properties.displayVideo360AdvertiserLinks.list": - -type PropertiesDisplayVideo360AdvertiserLinksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse) 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) + } } -// List: Lists all DisplayVideo360AdvertiserLinks on a property. -// -// - parent: Example format: properties/1234. -func (r *PropertiesDisplayVideo360AdvertiserLinksService) List(parent string) *PropertiesDisplayVideo360AdvertiserLinksListCall { - c := &PropertiesDisplayVideo360AdvertiserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch": -// 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 *PropertiesDisplayVideo360AdvertiserLinksListCall) PageSize(pageSize int64) *PropertiesDisplayVideo360AdvertiserLinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListDisplayVideo360AdvertiserLinks` call. -// Provide this to retrieve the subsequent page. When paginating, all -// other parameters provided to `ListDisplayVideo360AdvertiserLinks` -// must match the call that provided the page token. -func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) PageToken(pageToken string) *PropertiesDisplayVideo360AdvertiserLinksListCall { - c.urlParams_.Set("pageToken", pageToken) +// Patch: Updates a SKAdNetworkConversionValueSchema. +// +// - name: Output only. Resource name of the schema. This will be child +// of ONLY an iOS stream, and there can be at most one such child +// under an iOS stream. Format: +// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversion +// ValueSchema. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Patch(name string, googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema = googleanalyticsadminv1alphaskadnetworkconversionvalueschema + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. Omitted fields will not be updated. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { + 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 *PropertiesDisplayVideo360AdvertiserLinksListCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksListCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { 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 *PropertiesDisplayVideo360AdvertiserLinksListCall) IfNoneMatch(entityTag string) *PropertiesDisplayVideo360AdvertiserLinksListCall { - 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 *PropertiesDisplayVideo360AdvertiserLinksListCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksListCall { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { 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 *PropertiesDisplayVideo360AdvertiserLinksListCall) Header() http.Header { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) 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.googleanalyticsadminv1alphaskadnetworkconversionvalueschema) + 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}/displayVideo360AdvertiserLinks") + 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 } 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.properties.displayVideo360AdvertiserLinks.list" call. +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch" call. // Exactly one of -// *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse -// -// or error will be non-nil. Any non-2xx status code is an error. -// -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse -// .ServerResponse.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema.ServerRes +// ponse.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 *PropertiesDisplayVideo360AdvertiserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse, error) { +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27111,7 +23477,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27123,103 +23489,71 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Lists all DisplayVideo360AdvertiserLinks on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.list", + // "description": "Updates a SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "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 `ListDisplayVideo360AdvertiserLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDisplayVideo360AdvertiserLinks` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Output only. Resource name of the schema. This will be child of ONLY an iOS stream, and there can be at most one such child under an iOS stream. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated. Omitted fields will not be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/displayVideo360AdvertiserLinks", + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" // }, // "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 *PropertiesDisplayVideo360AdvertiserLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse) 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.displayVideo360AdvertiserLinks.patch": +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.approve": -type PropertiesDisplayVideo360AdvertiserLinksPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphadisplayvideo360advertiserlink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall struct { + s *Service + name string + googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest *GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DisplayVideo360AdvertiserLink on a property. +// Approve: Approves a DisplayVideo360AdvertiserLinkProposal. The +// DisplayVideo360AdvertiserLinkProposal will be deleted and a new +// DisplayVideo360AdvertiserLink will be created. // -// - 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. -func (r *PropertiesDisplayVideo360AdvertiserLinksService) Patch(name string, googleanalyticsadminv1alphadisplayvideo360advertiserlink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink) *PropertiesDisplayVideo360AdvertiserLinksPatchCall { - c := &PropertiesDisplayVideo360AdvertiserLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DisplayVideo360AdvertiserLinkProposal to +// approve. Example format: +// properties/1234/displayVideo360AdvertiserLinkProposals/5678. +func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Approve(name string, googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest *GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalRequest) *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall { + c := &PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphadisplayvideo360advertiserlink = googleanalyticsadminv1alphadisplayvideo360advertiserlink - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to be updated. Omitted fields will not be updated. To -// replace the entire entity, use one path with the string "*" to match -// all fields. -func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) UpdateMask(updateMask string) *PropertiesDisplayVideo360AdvertiserLinksPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest = googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest 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 *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksPatchCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27227,21 +23561,21 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Fields(s ...googleap // 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 *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksPatchCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall { 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 *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) 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_ { @@ -27249,16 +23583,16 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) doRequest(alt string } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphadisplayvideo360advertiserlink) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaapprovedisplayvideo360advertiserlinkproposalrequest) 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/{+name}:approve") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -27269,17 +23603,17 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinks.patch" call. +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.approve" call. // Exactly one of -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink.ServerRespon -// se.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 *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink, error) { +// *GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkPropos +// alResponse or error will be non-nil. Any non-2xx status code is an +// error. Response headers are in either +// *GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkPropos +// alResponse.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27298,7 +23632,7 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink{ + ret := &GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27310,34 +23644,28 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Updates a DisplayVideo360AdvertiserLink on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks/{displayVideo360AdvertiserLinksId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.patch", + // "description": "Approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal will be deleted and a new DisplayVideo360AdvertiserLink will be created.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals/{displayVideo360AdvertiserLinkProposalsId}:approve", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.approve", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The resource name for this DisplayVideo360AdvertiserLink resource. Format: properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId} Note: linkId is not the Display \u0026 Video 360 Advertiser ID", + // "description": "Required. The name of the DisplayVideo360AdvertiserLinkProposal to approve. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678", // "location": "path", - // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinks/[^/]+$", + // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinkProposals/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The list of fields to be updated. 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/{+name}:approve", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -27346,31 +23674,37 @@ func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Do(opts ...googleapi } -// method id "analyticsadmin.properties.expandedDataSets.create": +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.cancel": -type PropertiesExpandedDataSetsCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphaexpandeddataset *GoogleAnalyticsAdminV1alphaExpandedDataSet - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall struct { + s *Service + name string + googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest *GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposalRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a ExpandedDataSet. +// Cancel: Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling +// can mean either: - Declining a proposal initiated from Display & +// Video 360 - Withdrawing a proposal initiated from Google Analytics +// After being cancelled, a proposal will eventually be deleted +// automatically. // -// - parent: Example format: properties/1234. -func (r *PropertiesExpandedDataSetsService) Create(parent string, googleanalyticsadminv1alphaexpandeddataset *GoogleAnalyticsAdminV1alphaExpandedDataSet) *PropertiesExpandedDataSetsCreateCall { - c := &PropertiesExpandedDataSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphaexpandeddataset = googleanalyticsadminv1alphaexpandeddataset +// - name: The name of the DisplayVideo360AdvertiserLinkProposal to +// cancel. Example format: +// properties/1234/displayVideo360AdvertiserLinkProposals/5678. +func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Cancel(name string, googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest *GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposalRequest) *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall { + c := &PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest = googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest 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 *PropertiesExpandedDataSetsCreateCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsCreateCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27378,21 +23712,21 @@ func (c *PropertiesExpandedDataSetsCreateCall) Fields(s ...googleapi.Field) *Pro // 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 *PropertiesExpandedDataSetsCreateCall) Context(ctx context.Context) *PropertiesExpandedDataSetsCreateCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall { 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 *PropertiesExpandedDataSetsCreateCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesExpandedDataSetsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) 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_ { @@ -27400,14 +23734,14 @@ func (c *PropertiesExpandedDataSetsCreateCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaexpandeddataset) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacanceldisplayvideo360advertiserlinkproposalrequest) 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}/expandedDataSets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27415,21 +23749,22 @@ func (c *PropertiesExpandedDataSetsCreateCall) doRequest(alt string) (*http.Resp } 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.properties.expandedDataSets.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaExpandedDataSet or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.cancel" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaExpandedDataSet.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal.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 *PropertiesExpandedDataSetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaExpandedDataSet, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27448,7 +23783,7 @@ func (c *PropertiesExpandedDataSetsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaExpandedDataSet{ + ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27460,28 +23795,28 @@ func (c *PropertiesExpandedDataSetsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a ExpandedDataSet.", - // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets", + // "description": "Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either: - Declining a proposal initiated from Display \u0026 Video 360 - Withdrawing a proposal initiated from Google Analytics After being cancelled, a proposal will eventually be deleted automatically.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals/{displayVideo360AdvertiserLinkProposalsId}:cancel", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.expandedDataSets.create", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.cancel", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Required. The name of the DisplayVideo360AdvertiserLinkProposal to cancel. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinkProposals/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/expandedDataSets", + // "path": "v1alpha/{+name}:cancel", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaExpandedDataSet" + // "$ref": "GoogleAnalyticsAdminV1alphaCancelDisplayVideo360AdvertiserLinkProposalRequest" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaExpandedDataSet" + // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -27490,29 +23825,31 @@ func (c *PropertiesExpandedDataSetsCreateCall) Do(opts ...googleapi.CallOption) } -// method id "analyticsadmin.properties.expandedDataSets.delete": +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.create": -type PropertiesExpandedDataSetsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a ExpandedDataSet on a property. +// Create: Creates a DisplayVideo360AdvertiserLinkProposal. // -// - name: Example format: properties/1234/expandedDataSets/5678. -func (r *PropertiesExpandedDataSetsService) Delete(name string) *PropertiesExpandedDataSetsDeleteCall { - c := &PropertiesExpandedDataSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Example format: properties/1234. +func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Create(parent string, googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal) *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall { + c := &PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal = googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal 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 *PropertiesExpandedDataSetsDeleteCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsDeleteCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27520,21 +23857,21 @@ func (c *PropertiesExpandedDataSetsDeleteCall) Fields(s ...googleapi.Field) *Pro // 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 *PropertiesExpandedDataSetsDeleteCall) Context(ctx context.Context) *PropertiesExpandedDataSetsDeleteCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall { 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 *PropertiesExpandedDataSetsDeleteCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesExpandedDataSetsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) 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_ { @@ -27542,29 +23879,37 @@ func (c *PropertiesExpandedDataSetsDeleteCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphadisplayvideo360advertiserlinkproposal) + 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}/displayVideo360AdvertiserLinkProposals") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.expandedDataSets.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 *PropertiesExpandedDataSetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.create" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27583,7 +23928,7 @@ func (c *PropertiesExpandedDataSetsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27595,25 +23940,28 @@ func (c *PropertiesExpandedDataSetsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a ExpandedDataSet on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets/{expandedDataSetsId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.expandedDataSets.delete", + // "description": "Creates a DisplayVideo360AdvertiserLinkProposal.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Example format: properties/1234/expandedDataSets/5678", + // "parent": { + // "description": "Required. Example format: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/expandedDataSets/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/displayVideo360AdvertiserLinkProposals", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -27622,23 +23970,24 @@ func (c *PropertiesExpandedDataSetsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "analyticsadmin.properties.expandedDataSets.get": +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.delete": -type PropertiesExpandedDataSetsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Lookup for a single ExpandedDataSet. +// Delete: Deletes a DisplayVideo360AdvertiserLinkProposal on a +// property. This can only be used on cancelled proposals. // -// - name: The name of the ExpandedDataSet to get. Example format: -// properties/1234/expandedDataSets/5678. -func (r *PropertiesExpandedDataSetsService) Get(name string) *PropertiesExpandedDataSetsGetCall { - c := &PropertiesExpandedDataSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DisplayVideo360AdvertiserLinkProposal to +// delete. Example format: +// properties/1234/displayVideo360AdvertiserLinkProposals/5678. +func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Delete(name string) *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall { + c := &PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27646,54 +23995,41 @@ func (r *PropertiesExpandedDataSetsService) Get(name string) *PropertiesExpanded // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesExpandedDataSetsGetCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsGetCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall { 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 *PropertiesExpandedDataSetsGetCall) IfNoneMatch(entityTag string) *PropertiesExpandedDataSetsGetCall { - 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 *PropertiesExpandedDataSetsGetCall) Context(ctx context.Context) *PropertiesExpandedDataSetsGetCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall { 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 *PropertiesExpandedDataSetsGetCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesExpandedDataSetsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) 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 } @@ -27704,16 +24040,14 @@ func (c *PropertiesExpandedDataSetsGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.expandedDataSets.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaExpandedDataSet or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaExpandedDataSet.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 *PropertiesExpandedDataSetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaExpandedDataSet, error) { +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27732,7 +24066,7 @@ func (c *PropertiesExpandedDataSetsGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaExpandedDataSet{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27744,77 +24078,59 @@ func (c *PropertiesExpandedDataSetsGetCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Lookup for a single ExpandedDataSet.", - // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets/{expandedDataSetsId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.expandedDataSets.get", + // "description": "Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on cancelled proposals.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals/{displayVideo360AdvertiserLinkProposalsId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the ExpandedDataSet to get. Example format: properties/1234/expandedDataSets/5678", + // "description": "Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678", // "location": "path", - // "pattern": "^properties/[^/]+/expandedDataSets/[^/]+$", + // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinkProposals/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaExpandedDataSet" + // "$ref": "GoogleProtobufEmpty" // }, // "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.expandedDataSets.list": - -type PropertiesExpandedDataSetsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists ExpandedDataSets on a property. -// -// - parent: Example format: properties/1234. -func (r *PropertiesExpandedDataSetsService) List(parent string) *PropertiesExpandedDataSetsListCall { - c := &PropertiesExpandedDataSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.get": -// 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 *PropertiesExpandedDataSetsListCall) PageSize(pageSize int64) *PropertiesExpandedDataSetsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListExpandedDataSets` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListExpandedDataSet` must match the call that provided -// the page token. -func (c *PropertiesExpandedDataSetsListCall) PageToken(pageToken string) *PropertiesExpandedDataSetsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Get: Lookup for a single DisplayVideo360AdvertiserLinkProposal. +// +// - name: The name of the DisplayVideo360AdvertiserLinkProposal to get. +// Example format: +// properties/1234/displayVideo360AdvertiserLinkProposals/5678. +func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) Get(name string) *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall { + c := &PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall{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 *PropertiesExpandedDataSetsListCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsListCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27824,7 +24140,7 @@ func (c *PropertiesExpandedDataSetsListCall) Fields(s ...googleapi.Field) *Prope // 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 *PropertiesExpandedDataSetsListCall) IfNoneMatch(entityTag string) *PropertiesExpandedDataSetsListCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) IfNoneMatch(entityTag string) *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -27832,21 +24148,21 @@ func (c *PropertiesExpandedDataSetsListCall) IfNoneMatch(entityTag string) *Prop // 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 *PropertiesExpandedDataSetsListCall) Context(ctx context.Context) *PropertiesExpandedDataSetsListCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall { 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 *PropertiesExpandedDataSetsListCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesExpandedDataSetsListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) 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_ { @@ -27859,7 +24175,7 @@ func (c *PropertiesExpandedDataSetsListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/expandedDataSets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27867,22 +24183,22 @@ func (c *PropertiesExpandedDataSetsListCall) doRequest(alt string) (*http.Respon } 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.properties.expandedDataSets.list" call. +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.get" call. // Exactly one of -// *GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse.ServerRespons -// e.Header or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal.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 *PropertiesExpandedDataSetsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27901,7 +24217,7 @@ func (c *PropertiesExpandedDataSetsListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse{ + ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27913,36 +24229,25 @@ func (c *PropertiesExpandedDataSetsListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Lists ExpandedDataSets on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets", + // "description": "Lookup for a single DisplayVideo360AdvertiserLinkProposal.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals/{displayVideo360AdvertiserLinkProposalsId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.expandedDataSets.list", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "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 `ListExpandedDataSets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExpandedDataSet` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinkProposals/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/expandedDataSets", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit", @@ -27952,123 +24257,118 @@ func (c *PropertiesExpandedDataSetsListCall) Do(opts ...googleapi.CallOption) (* } -// 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 *PropertiesExpandedDataSetsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse) 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.expandedDataSets.patch": +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.list": -type PropertiesExpandedDataSetsPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphaexpandeddataset *GoogleAnalyticsAdminV1alphaExpandedDataSet - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDisplayVideo360AdvertiserLinkProposalsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ExpandedDataSet on a property. +// List: Lists DisplayVideo360AdvertiserLinkProposals on a property. // -// - name: Output only. The resource name for this ExpandedDataSet -// resource. Format: -// properties/{property_id}/expandedDataSets/{expanded_data_set}. -func (r *PropertiesExpandedDataSetsService) Patch(name string, googleanalyticsadminv1alphaexpandeddataset *GoogleAnalyticsAdminV1alphaExpandedDataSet) *PropertiesExpandedDataSetsPatchCall { - c := &PropertiesExpandedDataSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphaexpandeddataset = googleanalyticsadminv1alphaexpandeddataset +// - parent: Example format: properties/1234. +func (r *PropertiesDisplayVideo360AdvertiserLinkProposalsService) List(parent string) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { + c := &PropertiesDisplayVideo360AdvertiserLinkProposalsListCall{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 *PropertiesExpandedDataSetsPatchCall) UpdateMask(updateMask string) *PropertiesExpandedDataSetsPatchCall { - 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) PageSize(pageSize int64) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDisplayVideo360AdvertiserLinkProposals` +// call. Provide this to retrieve the subsequent page. When paginating, +// all other parameters provided to +// `ListDisplayVideo360AdvertiserLinkProposals` must match the call that +// provided the page token. +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) PageToken(pageToken string) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { + 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 *PropertiesExpandedDataSetsPatchCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsPatchCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) IfNoneMatch(entityTag string) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { + 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 *PropertiesExpandedDataSetsPatchCall) Context(ctx context.Context) *PropertiesExpandedDataSetsPatchCall { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall { 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 *PropertiesExpandedDataSetsPatchCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesExpandedDataSetsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) 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.googleanalyticsadminv1alphaexpandeddataset) - 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}/displayVideo360AdvertiserLinkProposals") 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.expandedDataSets.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaExpandedDataSet or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaExpandedDataSet.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 *PropertiesExpandedDataSetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaExpandedDataSet, error) { +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposals +// Response or error will be non-nil. Any non-2xx status code is an +// error. Response headers are in either +// *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposals +// Response.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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28087,7 +24387,7 @@ func (c *PropertiesExpandedDataSetsPatchCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaExpandedDataSet{ + ret := &GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28099,68 +24399,95 @@ func (c *PropertiesExpandedDataSetsPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates a ExpandedDataSet on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets/{expandedDataSetsId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.expandedDataSets.patch", + // "description": "Lists DisplayVideo360AdvertiserLinkProposals on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinkProposals", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. The resource name for this ExpandedDataSet resource. Format: properties/{property_id}/expandedDataSets/{expanded_data_set}", - // "location": "path", - // "pattern": "^properties/[^/]+/expandedDataSets/[^/]+$", - // "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 `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDisplayVideo360AdvertiserLinkProposals` 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": "GoogleAnalyticsAdminV1alphaExpandedDataSet" - // }, + // "path": "v1alpha/{+parent}/displayVideo360AdvertiserLinkProposals", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaExpandedDataSet" + // "$ref": "GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse" // }, // "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.firebaseLinks.create": +// 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 *PropertiesDisplayVideo360AdvertiserLinkProposalsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinkProposalsResponse) 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.displayVideo360AdvertiserLinks.create": -type PropertiesFirebaseLinksCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphafirebaselink *GoogleAnalyticsAdminV1alphaFirebaseLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDisplayVideo360AdvertiserLinksCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphadisplayvideo360advertiserlink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a FirebaseLink. Properties can have at most one -// FirebaseLink. +// Create: Creates a DisplayVideo360AdvertiserLink. This can only be +// utilized by users who have proper authorization both on the Google +// Analytics property and on the Display & Video 360 advertiser. Users +// who do not have access to the Display & Video 360 advertiser should +// instead seek to create a DisplayVideo360LinkProposal. // -// - parent: Format: properties/{property_id} Example: properties/1234. -func (r *PropertiesFirebaseLinksService) Create(parent string, googleanalyticsadminv1alphafirebaselink *GoogleAnalyticsAdminV1alphaFirebaseLink) *PropertiesFirebaseLinksCreateCall { - c := &PropertiesFirebaseLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Example format: properties/1234. +func (r *PropertiesDisplayVideo360AdvertiserLinksService) Create(parent string, googleanalyticsadminv1alphadisplayvideo360advertiserlink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink) *PropertiesDisplayVideo360AdvertiserLinksCreateCall { + c := &PropertiesDisplayVideo360AdvertiserLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleanalyticsadminv1alphafirebaselink = googleanalyticsadminv1alphafirebaselink + c.googleanalyticsadminv1alphadisplayvideo360advertiserlink = googleanalyticsadminv1alphadisplayvideo360advertiserlink 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 *PropertiesFirebaseLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksCreateCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28168,21 +24495,21 @@ func (c *PropertiesFirebaseLinksCreateCall) Fields(s ...googleapi.Field) *Proper // 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 *PropertiesFirebaseLinksCreateCall) Context(ctx context.Context) *PropertiesFirebaseLinksCreateCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksCreateCall { 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 *PropertiesFirebaseLinksCreateCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesFirebaseLinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinksCreateCall) 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_ { @@ -28190,14 +24517,14 @@ func (c *PropertiesFirebaseLinksCreateCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphafirebaselink) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphadisplayvideo360advertiserlink) 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}/firebaseLinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/displayVideo360AdvertiserLinks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28210,15 +24537,17 @@ func (c *PropertiesFirebaseLinksCreateCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.firebaseLinks.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaFirebaseLink or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleAnalyticsAdminV1alphaFirebaseLink.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 *PropertiesFirebaseLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaFirebaseLink, error) { +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinks.create" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink.ServerRespon +// se.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 *PropertiesDisplayVideo360AdvertiserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28237,7 +24566,7 @@ func (c *PropertiesFirebaseLinksCreateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaFirebaseLink{ + ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28249,28 +24578,28 @@ func (c *PropertiesFirebaseLinksCreateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Creates a FirebaseLink. Properties can have at most one FirebaseLink.", - // "flatPath": "v1alpha/properties/{propertiesId}/firebaseLinks", + // "description": "Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper authorization both on the Google Analytics property and on the Display \u0026 Video 360 advertiser. Users who do not have access to the Display \u0026 Video 360 advertiser should instead seek to create a DisplayVideo360LinkProposal.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.firebaseLinks.create", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Format: properties/{property_id} Example: properties/1234", + // "description": "Required. Example format: properties/1234", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/firebaseLinks", + // "path": "v1alpha/{+parent}/displayVideo360AdvertiserLinks", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaFirebaseLink" + // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaFirebaseLink" + // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -28279,9 +24608,9 @@ func (c *PropertiesFirebaseLinksCreateCall) Do(opts ...googleapi.CallOption) (*G } -// method id "analyticsadmin.properties.firebaseLinks.delete": +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinks.delete": -type PropertiesFirebaseLinksDeleteCall struct { +type PropertiesDisplayVideo360AdvertiserLinksDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28289,13 +24618,12 @@ type PropertiesFirebaseLinksDeleteCall struct { header_ http.Header } -// Delete: Deletes a FirebaseLink on a property +// Delete: Deletes a DisplayVideo360AdvertiserLink on a property. // -// - name: Format: -// properties/{property_id}/firebaseLinks/{firebase_link_id} Example: -// properties/1234/firebaseLinks/5678. -func (r *PropertiesFirebaseLinksService) Delete(name string) *PropertiesFirebaseLinksDeleteCall { - c := &PropertiesFirebaseLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DisplayVideo360AdvertiserLink to delete. +// Example format: properties/1234/displayVideo360AdvertiserLinks/5678. +func (r *PropertiesDisplayVideo360AdvertiserLinksService) Delete(name string) *PropertiesDisplayVideo360AdvertiserLinksDeleteCall { + c := &PropertiesDisplayVideo360AdvertiserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -28303,7 +24631,7 @@ func (r *PropertiesFirebaseLinksService) Delete(name string) *PropertiesFirebase // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesFirebaseLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksDeleteCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28311,21 +24639,21 @@ func (c *PropertiesFirebaseLinksDeleteCall) Fields(s ...googleapi.Field) *Proper // 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 *PropertiesFirebaseLinksDeleteCall) Context(ctx context.Context) *PropertiesFirebaseLinksDeleteCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksDeleteCall { 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 *PropertiesFirebaseLinksDeleteCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesFirebaseLinksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) 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_ { @@ -28348,14 +24676,14 @@ func (c *PropertiesFirebaseLinksDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.firebaseLinks.delete" call. +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinks.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 *PropertiesFirebaseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28386,18 +24714,18 @@ func (c *PropertiesFirebaseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Deletes a FirebaseLink on a property", - // "flatPath": "v1alpha/properties/{propertiesId}/firebaseLinks/{firebaseLinksId}", + // "description": "Deletes a DisplayVideo360AdvertiserLink on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks/{displayVideo360AdvertiserLinksId}", // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.firebaseLinks.delete", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678", + // "description": "Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format: properties/1234/displayVideo360AdvertiserLinks/5678", // "location": "path", - // "pattern": "^properties/[^/]+/firebaseLinks/[^/]+$", + // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinks/[^/]+$", // "required": true, // "type": "string" // } @@ -28413,51 +24741,31 @@ func (c *PropertiesFirebaseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*G } -// method id "analyticsadmin.properties.firebaseLinks.list": +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinks.get": -type PropertiesFirebaseLinksListCall struct { +type PropertiesDisplayVideo360AdvertiserLinksGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists FirebaseLinks on a property. Properties can have at most -// one FirebaseLink. +// Get: Look up a single DisplayVideo360AdvertiserLink // -// - parent: Format: properties/{property_id} Example: properties/1234. -func (r *PropertiesFirebaseLinksService) List(parent string) *PropertiesFirebaseLinksListCall { - c := &PropertiesFirebaseLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - 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 *PropertiesFirebaseLinksListCall) PageSize(pageSize int64) *PropertiesFirebaseLinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListFirebaseLinks` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListFirebaseLinks` must match the call that provided the -// page token. -func (c *PropertiesFirebaseLinksListCall) PageToken(pageToken string) *PropertiesFirebaseLinksListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the DisplayVideo360AdvertiserLink to get. Example +// format: properties/1234/displayVideo360AdvertiserLink/5678. +func (r *PropertiesDisplayVideo360AdvertiserLinksService) Get(name string) *PropertiesDisplayVideo360AdvertiserLinksGetCall { + c := &PropertiesDisplayVideo360AdvertiserLinksGetCall{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 *PropertiesFirebaseLinksListCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksListCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28467,7 +24775,7 @@ func (c *PropertiesFirebaseLinksListCall) Fields(s ...googleapi.Field) *Properti // 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 *PropertiesFirebaseLinksListCall) IfNoneMatch(entityTag string) *PropertiesFirebaseLinksListCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) IfNoneMatch(entityTag string) *PropertiesDisplayVideo360AdvertiserLinksGetCall { c.ifNoneMatch_ = entityTag return c } @@ -28475,21 +24783,21 @@ func (c *PropertiesFirebaseLinksListCall) IfNoneMatch(entityTag string) *Propert // 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 *PropertiesFirebaseLinksListCall) Context(ctx context.Context) *PropertiesFirebaseLinksListCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksGetCall { 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 *PropertiesFirebaseLinksListCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesFirebaseLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) 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_ { @@ -28502,7 +24810,7 @@ func (c *PropertiesFirebaseLinksListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/firebaseLinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28510,21 +24818,22 @@ func (c *PropertiesFirebaseLinksListCall) doRequest(alt string) (*http.Response, } 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.properties.firebaseLinks.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinks.get" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink.ServerRespon +// se.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 *PropertiesFirebaseLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28543,7 +24852,7 @@ func (c *PropertiesFirebaseLinksListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28555,130 +24864,124 @@ func (c *PropertiesFirebaseLinksListCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.", - // "flatPath": "v1alpha/properties/{propertiesId}/firebaseLinks", + // "description": "Look up a single DisplayVideo360AdvertiserLink", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks/{displayVideo360AdvertiserLinksId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.firebaseLinks.list", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "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 `ListFirebaseLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListFirebaseLinks` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Format: properties/{property_id} Example: properties/1234", + // "name": { + // "description": "Required. The name of the DisplayVideo360AdvertiserLink to get. Example format: properties/1234/displayVideo360AdvertiserLink/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/firebaseLinks", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" // }, // "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 *PropertiesFirebaseLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse) 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) - } + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + } -// method id "analyticsadmin.properties.googleAdsLinks.create": +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinks.list": -type PropertiesGoogleAdsLinksCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesDisplayVideo360AdvertiserLinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a GoogleAdsLink. +// List: Lists all DisplayVideo360AdvertiserLinks on a property. // // - parent: Example format: properties/1234. -func (r *PropertiesGoogleAdsLinksService) Create(parent string, googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink) *PropertiesGoogleAdsLinksCreateCall { - c := &PropertiesGoogleAdsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *PropertiesDisplayVideo360AdvertiserLinksService) List(parent string) *PropertiesDisplayVideo360AdvertiserLinksListCall { + c := &PropertiesDisplayVideo360AdvertiserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleanalyticsadminv1alphagoogleadslink = googleanalyticsadminv1alphagoogleadslink + return c +} + +// 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 *PropertiesDisplayVideo360AdvertiserLinksListCall) PageSize(pageSize int64) *PropertiesDisplayVideo360AdvertiserLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDisplayVideo360AdvertiserLinks` call. +// Provide this to retrieve the subsequent page. When paginating, all +// other parameters provided to `ListDisplayVideo360AdvertiserLinks` +// must match the call that provided the page token. +func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) PageToken(pageToken string) *PropertiesDisplayVideo360AdvertiserLinksListCall { + 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 *PropertiesGoogleAdsLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksCreateCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksListCall { 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 *PropertiesDisplayVideo360AdvertiserLinksListCall) IfNoneMatch(entityTag string) *PropertiesDisplayVideo360AdvertiserLinksListCall { + 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 *PropertiesGoogleAdsLinksCreateCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksCreateCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksListCall { 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 *PropertiesGoogleAdsLinksCreateCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesGoogleAdsLinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) 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.googleanalyticsadminv1alphagoogleadslink) - 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}/googleAdsLinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/displayVideo360AdvertiserLinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -28689,16 +24992,19 @@ func (c *PropertiesGoogleAdsLinksCreateCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.googleAdsLinks.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleAdsLink or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaGoogleAdsLink.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinks.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse +// +// or error will be non-nil. Any non-2xx status code is an error. +// +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse +// .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 *PropertiesGoogleAdsLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleAdsLink, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28717,7 +25023,7 @@ func (c *PropertiesGoogleAdsLinksCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaGoogleAdsLink{ + ret := &GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28729,14 +25035,25 @@ func (c *PropertiesGoogleAdsLinksCreateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates a GoogleAdsLink.", - // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.googleAdsLinks.create", + // "description": "Lists all DisplayVideo360AdvertiserLinks on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.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 `ListDisplayVideo360AdvertiserLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDisplayVideo360AdvertiserLinks` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. Example format: properties/1234", // "location": "path", @@ -28745,43 +25062,76 @@ func (c *PropertiesGoogleAdsLinksCreateCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/googleAdsLinks", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" - // }, + // "path": "v1alpha/{+parent}/displayVideo360AdvertiserLinks", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" + // "$ref": "GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse" // }, // "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.googleAdsLinks.delete": +// 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 *PropertiesDisplayVideo360AdvertiserLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse) 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 PropertiesGoogleAdsLinksDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.displayVideo360AdvertiserLinks.patch": + +type PropertiesDisplayVideo360AdvertiserLinksPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphadisplayvideo360advertiserlink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a GoogleAdsLink on a property +// Patch: Updates a DisplayVideo360AdvertiserLink on a property. // -// - name: Example format: properties/1234/googleAdsLinks/5678. -func (r *PropertiesGoogleAdsLinksService) Delete(name string) *PropertiesGoogleAdsLinksDeleteCall { - c := &PropertiesGoogleAdsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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. +func (r *PropertiesDisplayVideo360AdvertiserLinksService) Patch(name string, googleanalyticsadminv1alphadisplayvideo360advertiserlink *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink) *PropertiesDisplayVideo360AdvertiserLinksPatchCall { + c := &PropertiesDisplayVideo360AdvertiserLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleanalyticsadminv1alphadisplayvideo360advertiserlink = googleanalyticsadminv1alphadisplayvideo360advertiserlink + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. Omitted fields will not be updated. To +// replace the entire entity, use one path with the string "*" to match +// all fields. +func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) UpdateMask(updateMask string) *PropertiesDisplayVideo360AdvertiserLinksPatchCall { + 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 *PropertiesGoogleAdsLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksDeleteCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Fields(s ...googleapi.Field) *PropertiesDisplayVideo360AdvertiserLinksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28789,21 +25139,21 @@ func (c *PropertiesGoogleAdsLinksDeleteCall) Fields(s ...googleapi.Field) *Prope // 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 *PropertiesGoogleAdsLinksDeleteCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksDeleteCall { +func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Context(ctx context.Context) *PropertiesDisplayVideo360AdvertiserLinksPatchCall { 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 *PropertiesGoogleAdsLinksDeleteCall) Header() http.Header { +func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesGoogleAdsLinksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesDisplayVideo360AdvertiserLinksPatchCall) 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_ { @@ -28811,11 +25161,16 @@ func (c *PropertiesGoogleAdsLinksDeleteCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphadisplayvideo360advertiserlink) + 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("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -28826,14 +25181,17 @@ func (c *PropertiesGoogleAdsLinksDeleteCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.googleAdsLinks.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 *PropertiesGoogleAdsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.displayVideo360AdvertiserLinks.patch" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink.ServerRespon +// se.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 *PropertiesDisplayVideo360AdvertiserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28852,7 +25210,7 @@ func (c *PropertiesGoogleAdsLinksDeleteCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28864,123 +25222,106 @@ func (c *PropertiesGoogleAdsLinksDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes a GoogleAdsLink on a property", - // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks/{googleAdsLinksId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.googleAdsLinks.delete", + // "description": "Updates a DisplayVideo360AdvertiserLink on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/displayVideo360AdvertiserLinks/{displayVideo360AdvertiserLinksId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.displayVideo360AdvertiserLinks.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Example format: properties/1234/googleAdsLinks/5678", + // "description": "Output only. The resource name for this DisplayVideo360AdvertiserLink resource. Format: properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId} Note: linkId is not the Display \u0026 Video 360 Advertiser ID", // "location": "path", - // "pattern": "^properties/[^/]+/googleAdsLinks/[^/]+$", + // "pattern": "^properties/[^/]+/displayVideo360AdvertiserLinks/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated. 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": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" - // ] - // } - -} - -// method id "analyticsadmin.properties.googleAdsLinks.list": - -type PropertiesGoogleAdsLinksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} + // ] + // } -// List: Lists GoogleAdsLinks on a property. -// -// - parent: Example format: properties/1234. -func (r *PropertiesGoogleAdsLinksService) List(parent string) *PropertiesGoogleAdsLinksListCall { - c := &PropertiesGoogleAdsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c } -// 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 *PropertiesGoogleAdsLinksListCall) PageSize(pageSize int64) *PropertiesGoogleAdsLinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +// method id "analyticsadmin.properties.expandedDataSets.create": + +type PropertiesExpandedDataSetsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphaexpandeddataset *GoogleAnalyticsAdminV1alphaExpandedDataSet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListGoogleAdsLinks` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListGoogleAdsLinks` must match the call that provided -// the page token. -func (c *PropertiesGoogleAdsLinksListCall) PageToken(pageToken string) *PropertiesGoogleAdsLinksListCall { - c.urlParams_.Set("pageToken", pageToken) +// Create: Creates a ExpandedDataSet. +// +// - parent: Example format: properties/1234. +func (r *PropertiesExpandedDataSetsService) Create(parent string, googleanalyticsadminv1alphaexpandeddataset *GoogleAnalyticsAdminV1alphaExpandedDataSet) *PropertiesExpandedDataSetsCreateCall { + c := &PropertiesExpandedDataSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphaexpandeddataset = googleanalyticsadminv1alphaexpandeddataset 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 *PropertiesGoogleAdsLinksListCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksListCall { +func (c *PropertiesExpandedDataSetsCreateCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsCreateCall { 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 *PropertiesGoogleAdsLinksListCall) IfNoneMatch(entityTag string) *PropertiesGoogleAdsLinksListCall { - 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 *PropertiesGoogleAdsLinksListCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksListCall { +func (c *PropertiesExpandedDataSetsCreateCall) Context(ctx context.Context) *PropertiesExpandedDataSetsCreateCall { 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 *PropertiesGoogleAdsLinksListCall) Header() http.Header { +func (c *PropertiesExpandedDataSetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesGoogleAdsLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesExpandedDataSetsCreateCall) 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.googleanalyticsadminv1alphaexpandeddataset) + 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}/googleAdsLinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/expandedDataSets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -28991,16 +25332,16 @@ func (c *PropertiesGoogleAdsLinksListCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.googleAdsLinks.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse.ServerResponse. -// Header or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.expandedDataSets.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaExpandedDataSet or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaExpandedDataSet.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 *PropertiesGoogleAdsLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse, error) { +func (c *PropertiesExpandedDataSetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaExpandedDataSet, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29019,7 +25360,7 @@ func (c *PropertiesGoogleAdsLinksListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaExpandedDataSet{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29031,25 +25372,14 @@ func (c *PropertiesGoogleAdsLinksListCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Lists GoogleAdsLinks on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.googleAdsLinks.list", + // "description": "Creates a ExpandedDataSet.", + // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.expandedDataSets.create", // "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 `ListGoogleAdsLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGoogleAdsLinks` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { // "description": "Required. Example format: properties/1234", // "location": "path", @@ -29058,76 +25388,43 @@ func (c *PropertiesGoogleAdsLinksListCall) Do(opts ...googleapi.CallOption) (*Go // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/googleAdsLinks", + // "path": "v1alpha/{+parent}/expandedDataSets", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaExpandedDataSet" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaExpandedDataSet" // }, // "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 *PropertiesGoogleAdsLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse) 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.googleAdsLinks.patch": +// method id "analyticsadmin.properties.expandedDataSets.delete": -type PropertiesGoogleAdsLinksPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesExpandedDataSetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a GoogleAdsLink on a property +// Delete: Deletes a ExpandedDataSet on a property. // -// - name: Output only. Format: -// properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: -// googleAdsLinkId is not the Google Ads customer ID. -func (r *PropertiesGoogleAdsLinksService) Patch(name string, googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink) *PropertiesGoogleAdsLinksPatchCall { - c := &PropertiesGoogleAdsLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Example format: properties/1234/expandedDataSets/5678. +func (r *PropertiesExpandedDataSetsService) Delete(name string) *PropertiesExpandedDataSetsDeleteCall { + c := &PropertiesExpandedDataSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphagoogleadslink = googleanalyticsadminv1alphagoogleadslink - 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 *PropertiesGoogleAdsLinksPatchCall) UpdateMask(updateMask string) *PropertiesGoogleAdsLinksPatchCall { - 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 *PropertiesGoogleAdsLinksPatchCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksPatchCall { +func (c *PropertiesExpandedDataSetsDeleteCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29135,21 +25432,21 @@ func (c *PropertiesGoogleAdsLinksPatchCall) Fields(s ...googleapi.Field) *Proper // 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 *PropertiesGoogleAdsLinksPatchCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksPatchCall { +func (c *PropertiesExpandedDataSetsDeleteCall) Context(ctx context.Context) *PropertiesExpandedDataSetsDeleteCall { 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 *PropertiesGoogleAdsLinksPatchCall) Header() http.Header { +func (c *PropertiesExpandedDataSetsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesGoogleAdsLinksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesExpandedDataSetsDeleteCall) 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_ { @@ -29157,16 +25454,11 @@ func (c *PropertiesGoogleAdsLinksPatchCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphagoogleadslink) - 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) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -29177,16 +25469,14 @@ func (c *PropertiesGoogleAdsLinksPatchCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.googleAdsLinks.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleAdsLink or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaGoogleAdsLink.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 *PropertiesGoogleAdsLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleAdsLink, error) { +// Do executes the "analyticsadmin.properties.expandedDataSets.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 *PropertiesExpandedDataSetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29205,7 +25495,7 @@ func (c *PropertiesGoogleAdsLinksPatchCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaGoogleAdsLink{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29217,34 +25507,25 @@ func (c *PropertiesGoogleAdsLinksPatchCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Updates a GoogleAdsLink on a property", - // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks/{googleAdsLinksId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.googleAdsLinks.patch", + // "description": "Deletes a ExpandedDataSet on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets/{expandedDataSetsId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.expandedDataSets.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: googleAdsLinkId is not the Google Ads customer ID.", + // "description": "Required. Example format: properties/1234/expandedDataSets/5678", // "location": "path", - // "pattern": "^properties/[^/]+/googleAdsLinks/[^/]+$", + // "pattern": "^properties/[^/]+/expandedDataSets/[^/]+$", // "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": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" - // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -29253,92 +25534,98 @@ func (c *PropertiesGoogleAdsLinksPatchCall) Do(opts ...googleapi.CallOption) (*G } -// method id "analyticsadmin.properties.rollupPropertySourceLinks.create": +// method id "analyticsadmin.properties.expandedDataSets.get": -type PropertiesRollupPropertySourceLinksCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alpharolluppropertysourcelink *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesExpandedDataSetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a roll-up property source link. Only roll-up -// properties can have source links, so this method will throw an error -// if used on other types of properties. +// Get: Lookup for a single ExpandedDataSet. // -// - parent: Format: properties/{property_id} Example: properties/1234. -func (r *PropertiesRollupPropertySourceLinksService) Create(parent string, googleanalyticsadminv1alpharolluppropertysourcelink *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink) *PropertiesRollupPropertySourceLinksCreateCall { - c := &PropertiesRollupPropertySourceLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alpharolluppropertysourcelink = googleanalyticsadminv1alpharolluppropertysourcelink +// - name: The name of the ExpandedDataSet to get. Example format: +// properties/1234/expandedDataSets/5678. +func (r *PropertiesExpandedDataSetsService) Get(name string) *PropertiesExpandedDataSetsGetCall { + c := &PropertiesExpandedDataSetsGetCall{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 *PropertiesRollupPropertySourceLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesRollupPropertySourceLinksCreateCall { +func (c *PropertiesExpandedDataSetsGetCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsGetCall { 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 *PropertiesExpandedDataSetsGetCall) IfNoneMatch(entityTag string) *PropertiesExpandedDataSetsGetCall { + 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 *PropertiesRollupPropertySourceLinksCreateCall) Context(ctx context.Context) *PropertiesRollupPropertySourceLinksCreateCall { +func (c *PropertiesExpandedDataSetsGetCall) Context(ctx context.Context) *PropertiesExpandedDataSetsGetCall { 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 *PropertiesRollupPropertySourceLinksCreateCall) Header() http.Header { +func (c *PropertiesExpandedDataSetsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesRollupPropertySourceLinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesExpandedDataSetsGetCall) 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.googleanalyticsadminv1alpharolluppropertysourcelink) - 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}/rollupPropertySourceLinks") + 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.properties.rollupPropertySourceLinks.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink.ServerResponse.He -// ader or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.expandedDataSets.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaExpandedDataSet or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaExpandedDataSet.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 *PropertiesRollupPropertySourceLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaRollupPropertySourceLink, error) { +func (c *PropertiesExpandedDataSetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaExpandedDataSet, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29357,7 +25644,7 @@ func (c *PropertiesRollupPropertySourceLinksCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaRollupPropertySourceLink{ + ret := &GoogleAnalyticsAdminV1alphaExpandedDataSet{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29369,116 +25656,145 @@ func (c *PropertiesRollupPropertySourceLinksCreateCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Creates a roll-up property source link. Only roll-up properties can have source links, so this method will throw an error if used on other types of properties.", - // "flatPath": "v1alpha/properties/{propertiesId}/rollupPropertySourceLinks", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.rollupPropertySourceLinks.create", + // "description": "Lookup for a single ExpandedDataSet.", + // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets/{expandedDataSetsId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.expandedDataSets.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Format: properties/{property_id} Example: properties/1234", + // "name": { + // "description": "Required. The name of the ExpandedDataSet to get. Example format: properties/1234/expandedDataSets/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/expandedDataSets/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/rollupPropertySourceLinks", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaRollupPropertySourceLink" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaRollupPropertySourceLink" + // "$ref": "GoogleAnalyticsAdminV1alphaExpandedDataSet" // }, // "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.rollupPropertySourceLinks.delete": +// method id "analyticsadmin.properties.expandedDataSets.list": -type PropertiesRollupPropertySourceLinksDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesExpandedDataSetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a roll-up property source link. Only roll-up -// properties can have source links, so this method will throw an error -// if used on other types of properties. +// List: Lists ExpandedDataSets on a property. // -// - name: Format: -// properties/{property_id}/rollupPropertySourceLinks/{rollup_property_ -// source_link_id} Example: -// properties/1234/rollupPropertySourceLinks/5678. -func (r *PropertiesRollupPropertySourceLinksService) Delete(name string) *PropertiesRollupPropertySourceLinksDeleteCall { - c := &PropertiesRollupPropertySourceLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Example format: properties/1234. +func (r *PropertiesExpandedDataSetsService) List(parent string) *PropertiesExpandedDataSetsListCall { + c := &PropertiesExpandedDataSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// 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 *PropertiesExpandedDataSetsListCall) PageSize(pageSize int64) *PropertiesExpandedDataSetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListExpandedDataSets` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListExpandedDataSet` must match the call that provided +// the page token. +func (c *PropertiesExpandedDataSetsListCall) PageToken(pageToken string) *PropertiesExpandedDataSetsListCall { + 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 *PropertiesRollupPropertySourceLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesRollupPropertySourceLinksDeleteCall { +func (c *PropertiesExpandedDataSetsListCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsListCall { 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 *PropertiesExpandedDataSetsListCall) IfNoneMatch(entityTag string) *PropertiesExpandedDataSetsListCall { + 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 *PropertiesRollupPropertySourceLinksDeleteCall) Context(ctx context.Context) *PropertiesRollupPropertySourceLinksDeleteCall { +func (c *PropertiesExpandedDataSetsListCall) Context(ctx context.Context) *PropertiesExpandedDataSetsListCall { 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 *PropertiesRollupPropertySourceLinksDeleteCall) Header() http.Header { +func (c *PropertiesExpandedDataSetsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesRollupPropertySourceLinksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesExpandedDataSetsListCall) 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/{+parent}/expandedDataSets") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.rollupPropertySourceLinks.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 *PropertiesRollupPropertySourceLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.expandedDataSets.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse.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 *PropertiesExpandedDataSetsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29497,7 +25813,7 @@ func (c *PropertiesRollupPropertySourceLinksDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29509,110 +25825,142 @@ func (c *PropertiesRollupPropertySourceLinksDeleteCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Deletes a roll-up property source link. Only roll-up properties can have source links, so this method will throw an error if used on other types of properties.", - // "flatPath": "v1alpha/properties/{propertiesId}/rollupPropertySourceLinks/{rollupPropertySourceLinksId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.rollupPropertySourceLinks.delete", + // "description": "Lists ExpandedDataSets on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.expandedDataSets.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Format: properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} Example: properties/1234/rollupPropertySourceLinks/5678", + // "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 `ListExpandedDataSets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExpandedDataSet` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Example format: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/rollupPropertySourceLinks/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/expandedDataSets", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse" // }, // "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.rollupPropertySourceLinks.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 *PropertiesExpandedDataSetsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListExpandedDataSetsResponse) 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 PropertiesRollupPropertySourceLinksGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.expandedDataSets.patch": + +type PropertiesExpandedDataSetsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaexpandeddataset *GoogleAnalyticsAdminV1alphaExpandedDataSet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a ExpandedDataSet on a property. +// +// - name: Output only. The resource name for this ExpandedDataSet +// resource. Format: +// properties/{property_id}/expandedDataSets/{expanded_data_set}. +func (r *PropertiesExpandedDataSetsService) Patch(name string, googleanalyticsadminv1alphaexpandeddataset *GoogleAnalyticsAdminV1alphaExpandedDataSet) *PropertiesExpandedDataSetsPatchCall { + c := &PropertiesExpandedDataSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphaexpandeddataset = googleanalyticsadminv1alphaexpandeddataset + return c } -// Get: Lookup for a single roll-up property source Link. Only roll-up -// properties can have source links, so this method will throw an error -// if used on other types of properties. -// -// - name: The name of the roll-up property source link to lookup. -// Format: -// properties/{property_id}/rollupPropertySourceLinks/{rollup_property_ -// source_link_id} Example: -// properties/123/rollupPropertySourceLinks/456. -func (r *PropertiesRollupPropertySourceLinksService) Get(name string) *PropertiesRollupPropertySourceLinksGetCall { - c := &PropertiesRollupPropertySourceLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// 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 *PropertiesExpandedDataSetsPatchCall) UpdateMask(updateMask string) *PropertiesExpandedDataSetsPatchCall { + 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 *PropertiesRollupPropertySourceLinksGetCall) Fields(s ...googleapi.Field) *PropertiesRollupPropertySourceLinksGetCall { +func (c *PropertiesExpandedDataSetsPatchCall) Fields(s ...googleapi.Field) *PropertiesExpandedDataSetsPatchCall { 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 *PropertiesRollupPropertySourceLinksGetCall) IfNoneMatch(entityTag string) *PropertiesRollupPropertySourceLinksGetCall { - 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 *PropertiesRollupPropertySourceLinksGetCall) Context(ctx context.Context) *PropertiesRollupPropertySourceLinksGetCall { +func (c *PropertiesExpandedDataSetsPatchCall) Context(ctx context.Context) *PropertiesExpandedDataSetsPatchCall { 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 *PropertiesRollupPropertySourceLinksGetCall) Header() http.Header { +func (c *PropertiesExpandedDataSetsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesRollupPropertySourceLinksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesExpandedDataSetsPatchCall) 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.googleanalyticsadminv1alphaexpandeddataset) + 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 } @@ -29623,16 +25971,16 @@ func (c *PropertiesRollupPropertySourceLinksGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.rollupPropertySourceLinks.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink.ServerResponse.He -// ader or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.expandedDataSets.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaExpandedDataSet or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaExpandedDataSet.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 *PropertiesRollupPropertySourceLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaRollupPropertySourceLink, error) { +func (c *PropertiesExpandedDataSetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaExpandedDataSet, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29651,7 +25999,7 @@ func (c *PropertiesRollupPropertySourceLinksGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaRollupPropertySourceLink{ + ret := &GoogleAnalyticsAdminV1alphaExpandedDataSet{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29663,129 +26011,107 @@ func (c *PropertiesRollupPropertySourceLinksGetCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Lookup for a single roll-up property source Link. Only roll-up properties can have source links, so this method will throw an error if used on other types of properties.", - // "flatPath": "v1alpha/properties/{propertiesId}/rollupPropertySourceLinks/{rollupPropertySourceLinksId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.rollupPropertySourceLinks.get", + // "description": "Updates a ExpandedDataSet on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/expandedDataSets/{expandedDataSetsId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.expandedDataSets.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the roll-up property source link to lookup. Format: properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} Example: properties/123/rollupPropertySourceLinks/456", + // "description": "Output only. The resource name for this ExpandedDataSet resource. Format: properties/{property_id}/expandedDataSets/{expanded_data_set}", // "location": "path", - // "pattern": "^properties/[^/]+/rollupPropertySourceLinks/[^/]+$", + // "pattern": "^properties/[^/]+/expandedDataSets/[^/]+$", // "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": "GoogleAnalyticsAdminV1alphaExpandedDataSet" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaRollupPropertySourceLink" + // "$ref": "GoogleAnalyticsAdminV1alphaExpandedDataSet" // }, // "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.rollupPropertySourceLinks.list": +// method id "analyticsadmin.properties.firebaseLinks.create": -type PropertiesRollupPropertySourceLinksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesFirebaseLinksCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphafirebaselink *GoogleAnalyticsAdminV1alphaFirebaseLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists roll-up property source Links on a property. Only roll-up -// properties can have source links, so this method will throw an error -// if used on other types of properties. +// Create: Creates a FirebaseLink. Properties can have at most one +// FirebaseLink. // -// - parent: The name of the roll-up property to list roll-up property -// source links under. Format: properties/{property_id} Example: -// properties/1234. -func (r *PropertiesRollupPropertySourceLinksService) List(parent string) *PropertiesRollupPropertySourceLinksListCall { - c := &PropertiesRollupPropertySourceLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Format: properties/{property_id} Example: properties/1234. +func (r *PropertiesFirebaseLinksService) Create(parent string, googleanalyticsadminv1alphafirebaselink *GoogleAnalyticsAdminV1alphaFirebaseLink) *PropertiesFirebaseLinksCreateCall { + c := &PropertiesFirebaseLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - 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 *PropertiesRollupPropertySourceLinksListCall) PageSize(pageSize int64) *PropertiesRollupPropertySourceLinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListRollupPropertySourceLinks` call. -// Provide this to retrieve the subsequent page. When paginating, all -// other parameters provided to `ListRollupPropertySourceLinks` must -// match the call that provided the page token. -func (c *PropertiesRollupPropertySourceLinksListCall) PageToken(pageToken string) *PropertiesRollupPropertySourceLinksListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleanalyticsadminv1alphafirebaselink = googleanalyticsadminv1alphafirebaselink 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 *PropertiesRollupPropertySourceLinksListCall) Fields(s ...googleapi.Field) *PropertiesRollupPropertySourceLinksListCall { +func (c *PropertiesFirebaseLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksCreateCall { 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 *PropertiesRollupPropertySourceLinksListCall) IfNoneMatch(entityTag string) *PropertiesRollupPropertySourceLinksListCall { - 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 *PropertiesRollupPropertySourceLinksListCall) Context(ctx context.Context) *PropertiesRollupPropertySourceLinksListCall { +func (c *PropertiesFirebaseLinksCreateCall) Context(ctx context.Context) *PropertiesFirebaseLinksCreateCall { 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 *PropertiesRollupPropertySourceLinksListCall) Header() http.Header { +func (c *PropertiesFirebaseLinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesRollupPropertySourceLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesFirebaseLinksCreateCall) 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.googleanalyticsadminv1alphafirebaselink) + 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}/rollupPropertySourceLinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/firebaseLinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -29796,17 +26122,15 @@ func (c *PropertiesRollupPropertySourceLinksListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.rollupPropertySourceLinks.list" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse.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 *PropertiesRollupPropertySourceLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse, error) { +// Do executes the "analyticsadmin.properties.firebaseLinks.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaFirebaseLink or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaFirebaseLink.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 *PropertiesFirebaseLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaFirebaseLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29825,7 +26149,7 @@ func (c *PropertiesRollupPropertySourceLinksListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaFirebaseLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29837,91 +26161,61 @@ func (c *PropertiesRollupPropertySourceLinksListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists roll-up property source Links on a property. Only roll-up properties can have source links, so this method will throw an error if used on other types of properties.", - // "flatPath": "v1alpha/properties/{propertiesId}/rollupPropertySourceLinks", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.rollupPropertySourceLinks.list", + // "description": "Creates a FirebaseLink. Properties can have at most one FirebaseLink.", + // "flatPath": "v1alpha/properties/{propertiesId}/firebaseLinks", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.firebaseLinks.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. 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": "Optional. A page token, received from a previous `ListRollupPropertySourceLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRollupPropertySourceLinks` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The name of the roll-up property to list roll-up property source links under. Format: properties/{property_id} Example: properties/1234", + // "description": "Required. Format: properties/{property_id} Example: properties/1234", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/rollupPropertySourceLinks", + // "path": "v1alpha/{+parent}/firebaseLinks", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaFirebaseLink" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaFirebaseLink" // }, // "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 *PropertiesRollupPropertySourceLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse) 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.searchAds360Links.create": +// method id "analyticsadmin.properties.firebaseLinks.delete": -type PropertiesSearchAds360LinksCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphasearchads360link *GoogleAnalyticsAdminV1alphaSearchAds360Link - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesFirebaseLinksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a SearchAds360Link. +// Delete: Deletes a FirebaseLink on a property // -// - parent: Example format: properties/1234. -func (r *PropertiesSearchAds360LinksService) Create(parent string, googleanalyticsadminv1alphasearchads360link *GoogleAnalyticsAdminV1alphaSearchAds360Link) *PropertiesSearchAds360LinksCreateCall { - c := &PropertiesSearchAds360LinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphasearchads360link = googleanalyticsadminv1alphasearchads360link +// - name: Format: +// properties/{property_id}/firebaseLinks/{firebase_link_id} Example: +// properties/1234/firebaseLinks/5678. +func (r *PropertiesFirebaseLinksService) Delete(name string) *PropertiesFirebaseLinksDeleteCall { + c := &PropertiesFirebaseLinksDeleteCall{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 *PropertiesSearchAds360LinksCreateCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksCreateCall { +func (c *PropertiesFirebaseLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29929,21 +26223,21 @@ func (c *PropertiesSearchAds360LinksCreateCall) Fields(s ...googleapi.Field) *Pr // 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 *PropertiesSearchAds360LinksCreateCall) Context(ctx context.Context) *PropertiesSearchAds360LinksCreateCall { +func (c *PropertiesFirebaseLinksDeleteCall) Context(ctx context.Context) *PropertiesFirebaseLinksDeleteCall { 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 *PropertiesSearchAds360LinksCreateCall) Header() http.Header { +func (c *PropertiesFirebaseLinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSearchAds360LinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesFirebaseLinksDeleteCall) 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_ { @@ -29951,36 +26245,29 @@ func (c *PropertiesSearchAds360LinksCreateCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphasearchads360link) - 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}/searchAds360Links") + 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.properties.searchAds360Links.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaSearchAds360Link or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaSearchAds360Link.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 *PropertiesSearchAds360LinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSearchAds360Link, error) { +// Do executes the "analyticsadmin.properties.firebaseLinks.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 *PropertiesFirebaseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29999,7 +26286,7 @@ func (c *PropertiesSearchAds360LinksCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaSearchAds360Link{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30011,28 +26298,25 @@ func (c *PropertiesSearchAds360LinksCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a SearchAds360Link.", - // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.searchAds360Links.create", + // "description": "Deletes a FirebaseLink on a property", + // "flatPath": "v1alpha/properties/{propertiesId}/firebaseLinks/{firebaseLinksId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.firebaseLinks.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/firebaseLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/searchAds360Links", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -30041,82 +26325,118 @@ func (c *PropertiesSearchAds360LinksCreateCall) Do(opts ...googleapi.CallOption) } -// method id "analyticsadmin.properties.searchAds360Links.delete": +// method id "analyticsadmin.properties.firebaseLinks.list": -type PropertiesSearchAds360LinksDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesFirebaseLinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a SearchAds360Link on a property. +// List: Lists FirebaseLinks on a property. Properties can have at most +// one FirebaseLink. // -// - name: The name of the SearchAds360Link to delete. Example format: -// properties/1234/SearchAds360Links/5678. -func (r *PropertiesSearchAds360LinksService) Delete(name string) *PropertiesSearchAds360LinksDeleteCall { - c := &PropertiesSearchAds360LinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Format: properties/{property_id} Example: properties/1234. +func (r *PropertiesFirebaseLinksService) List(parent string) *PropertiesFirebaseLinksListCall { + c := &PropertiesFirebaseLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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 *PropertiesFirebaseLinksListCall) PageSize(pageSize int64) *PropertiesFirebaseLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListFirebaseLinks` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListFirebaseLinks` must match the call that provided the +// page token. +func (c *PropertiesFirebaseLinksListCall) PageToken(pageToken string) *PropertiesFirebaseLinksListCall { + 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 *PropertiesSearchAds360LinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksDeleteCall { +func (c *PropertiesFirebaseLinksListCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksListCall { 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 *PropertiesFirebaseLinksListCall) IfNoneMatch(entityTag string) *PropertiesFirebaseLinksListCall { + 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 *PropertiesSearchAds360LinksDeleteCall) Context(ctx context.Context) *PropertiesSearchAds360LinksDeleteCall { +func (c *PropertiesFirebaseLinksListCall) Context(ctx context.Context) *PropertiesFirebaseLinksListCall { 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 *PropertiesSearchAds360LinksDeleteCall) Header() http.Header { +func (c *PropertiesFirebaseLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSearchAds360LinksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesFirebaseLinksListCall) 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/{+parent}/firebaseLinks") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.searchAds360Links.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 *PropertiesSearchAds360LinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.firebaseLinks.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse.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 *PropertiesFirebaseLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30135,7 +26455,7 @@ func (c *PropertiesSearchAds360LinksDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30147,125 +26467,150 @@ func (c *PropertiesSearchAds360LinksDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a SearchAds360Link on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links/{searchAds360LinksId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.searchAds360Links.delete", + // "description": "Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.", + // "flatPath": "v1alpha/properties/{propertiesId}/firebaseLinks", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.firebaseLinks.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the SearchAds360Link to delete. Example format: properties/1234/SearchAds360Links/5678", + // "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 `ListFirebaseLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListFirebaseLinks` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Format: properties/{property_id} Example: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/searchAds360Links/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/firebaseLinks", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse" // }, // "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.searchAds360Links.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 *PropertiesFirebaseLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse) 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 PropertiesSearchAds360LinksGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.googleAdsLinks.create": + +type PropertiesGoogleAdsLinksCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Look up a single SearchAds360Link +// Create: Creates a GoogleAdsLink. // -// - name: The name of the SearchAds360Link to get. Example format: -// properties/1234/SearchAds360Link/5678. -func (r *PropertiesSearchAds360LinksService) Get(name string) *PropertiesSearchAds360LinksGetCall { - c := &PropertiesSearchAds360LinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Example format: properties/1234. +func (r *PropertiesGoogleAdsLinksService) Create(parent string, googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink) *PropertiesGoogleAdsLinksCreateCall { + c := &PropertiesGoogleAdsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphagoogleadslink = googleanalyticsadminv1alphagoogleadslink 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 *PropertiesSearchAds360LinksGetCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksGetCall { +func (c *PropertiesGoogleAdsLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksCreateCall { 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 *PropertiesSearchAds360LinksGetCall) IfNoneMatch(entityTag string) *PropertiesSearchAds360LinksGetCall { - 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 *PropertiesSearchAds360LinksGetCall) Context(ctx context.Context) *PropertiesSearchAds360LinksGetCall { +func (c *PropertiesGoogleAdsLinksCreateCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksCreateCall { 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 *PropertiesSearchAds360LinksGetCall) Header() http.Header { +func (c *PropertiesGoogleAdsLinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSearchAds360LinksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesGoogleAdsLinksCreateCall) 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.googleanalyticsadminv1alphagoogleadslink) + 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}/googleAdsLinks") 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.properties.searchAds360Links.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaSearchAds360Link or error +// Do executes the "analyticsadmin.properties.googleAdsLinks.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleAdsLink or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaSearchAds360Link.ServerResponse.Header or +// *GoogleAnalyticsAdminV1alphaGoogleAdsLink.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 *PropertiesSearchAds360LinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSearchAds360Link, error) { +func (c *PropertiesGoogleAdsLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleAdsLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30284,7 +26629,7 @@ func (c *PropertiesSearchAds360LinksGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaSearchAds360Link{ + ret := &GoogleAnalyticsAdminV1alphaGoogleAdsLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30296,145 +26641,111 @@ func (c *PropertiesSearchAds360LinksGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Look up a single SearchAds360Link", - // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links/{searchAds360LinksId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.searchAds360Links.get", + // "description": "Creates a GoogleAdsLink.", + // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.googleAdsLinks.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the SearchAds360Link to get. Example format: properties/1234/SearchAds360Link/5678", + // "parent": { + // "description": "Required. Example format: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/searchAds360Links/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/googleAdsLinks", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" + // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" + // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" // }, // "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.searchAds360Links.list": +// method id "analyticsadmin.properties.googleAdsLinks.delete": -type PropertiesSearchAds360LinksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesGoogleAdsLinksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all SearchAds360Links on a property. +// Delete: Deletes a GoogleAdsLink on a property // -// - parent: Example format: properties/1234. -func (r *PropertiesSearchAds360LinksService) List(parent string) *PropertiesSearchAds360LinksListCall { - c := &PropertiesSearchAds360LinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// 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 *PropertiesSearchAds360LinksListCall) PageSize(pageSize int64) *PropertiesSearchAds360LinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListSearchAds360Links` call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to `ListSearchAds360Links` must match the call -// that provided the page token. -func (c *PropertiesSearchAds360LinksListCall) PageToken(pageToken string) *PropertiesSearchAds360LinksListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Example format: properties/1234/googleAdsLinks/5678. +func (r *PropertiesGoogleAdsLinksService) Delete(name string) *PropertiesGoogleAdsLinksDeleteCall { + c := &PropertiesGoogleAdsLinksDeleteCall{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 *PropertiesSearchAds360LinksListCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksListCall { +func (c *PropertiesGoogleAdsLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksDeleteCall { 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 *PropertiesSearchAds360LinksListCall) IfNoneMatch(entityTag string) *PropertiesSearchAds360LinksListCall { - 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 *PropertiesSearchAds360LinksListCall) Context(ctx context.Context) *PropertiesSearchAds360LinksListCall { +func (c *PropertiesGoogleAdsLinksDeleteCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksDeleteCall { 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 *PropertiesSearchAds360LinksListCall) Header() http.Header { +func (c *PropertiesGoogleAdsLinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSearchAds360LinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesGoogleAdsLinksDeleteCall) 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/{+parent}/searchAds360Links") + 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 } 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.properties.searchAds360Links.list" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse.ServerRespon -// se.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 *PropertiesSearchAds360LinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse, error) { +// Do executes the "analyticsadmin.properties.googleAdsLinks.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 *PropertiesGoogleAdsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30453,7 +26764,7 @@ func (c *PropertiesSearchAds360LinksListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30465,162 +26776,143 @@ func (c *PropertiesSearchAds360LinksListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists all SearchAds360Links on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.searchAds360Links.list", + // "description": "Deletes a GoogleAdsLink on a property", + // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks/{googleAdsLinksId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.googleAdsLinks.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "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 `ListSearchAds360Links` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSearchAds360Links` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Example format: properties/1234", + // "name": { + // "description": "Required. Example format: properties/1234/googleAdsLinks/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/googleAdsLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/searchAds360Links", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse" + // "$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 *PropertiesSearchAds360LinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse) 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.searchAds360Links.patch": +// method id "analyticsadmin.properties.googleAdsLinks.list": -type PropertiesSearchAds360LinksPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphasearchads360link *GoogleAnalyticsAdminV1alphaSearchAds360Link - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesGoogleAdsLinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a SearchAds360Link on a property. +// List: Lists GoogleAdsLinks on a property. // -// - name: Output only. The resource name for this SearchAds360Link -// resource. Format: -// properties/{propertyId}/searchAds360Links/{linkId} Note: linkId is -// not the Search Ads 360 advertiser ID. -func (r *PropertiesSearchAds360LinksService) Patch(name string, googleanalyticsadminv1alphasearchads360link *GoogleAnalyticsAdminV1alphaSearchAds360Link) *PropertiesSearchAds360LinksPatchCall { - c := &PropertiesSearchAds360LinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphasearchads360link = googleanalyticsadminv1alphasearchads360link +// - parent: Example format: properties/1234. +func (r *PropertiesGoogleAdsLinksService) List(parent string) *PropertiesGoogleAdsLinksListCall { + c := &PropertiesGoogleAdsLinksListCall{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. Omitted fields will not be updated. To -// replace the entire entity, use one path with the string "*" to match -// all fields. -func (c *PropertiesSearchAds360LinksPatchCall) UpdateMask(updateMask string) *PropertiesSearchAds360LinksPatchCall { - 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 *PropertiesGoogleAdsLinksListCall) PageSize(pageSize int64) *PropertiesGoogleAdsLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListGoogleAdsLinks` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListGoogleAdsLinks` must match the call that provided +// the page token. +func (c *PropertiesGoogleAdsLinksListCall) PageToken(pageToken string) *PropertiesGoogleAdsLinksListCall { + 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 *PropertiesSearchAds360LinksPatchCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksPatchCall { +func (c *PropertiesGoogleAdsLinksListCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksListCall { 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 *PropertiesGoogleAdsLinksListCall) IfNoneMatch(entityTag string) *PropertiesGoogleAdsLinksListCall { + 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 *PropertiesSearchAds360LinksPatchCall) Context(ctx context.Context) *PropertiesSearchAds360LinksPatchCall { +func (c *PropertiesGoogleAdsLinksListCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksListCall { 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 *PropertiesSearchAds360LinksPatchCall) Header() http.Header { +func (c *PropertiesGoogleAdsLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSearchAds360LinksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesGoogleAdsLinksListCall) 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.googleanalyticsadminv1alphasearchads360link) - 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}/googleAdsLinks") 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.searchAds360Links.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaSearchAds360Link or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaSearchAds360Link.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.googleAdsLinks.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse.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 *PropertiesSearchAds360LinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSearchAds360Link, error) { +func (c *PropertiesGoogleAdsLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30639,7 +26931,7 @@ func (c *PropertiesSearchAds360LinksPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaSearchAds360Link{ + ret := &GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30651,69 +26943,103 @@ func (c *PropertiesSearchAds360LinksPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a SearchAds360Link on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links/{searchAds360LinksId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.searchAds360Links.patch", + // "description": "Lists GoogleAdsLinks on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.googleAdsLinks.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. The resource name for this SearchAds360Link resource. Format: properties/{propertyId}/searchAds360Links/{linkId} Note: linkId is not the Search Ads 360 advertiser ID", - // "location": "path", - // "pattern": "^properties/[^/]+/searchAds360Links/[^/]+$", - // "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. 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 `ListGoogleAdsLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGoogleAdsLinks` 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": "GoogleAnalyticsAdminV1alphaSearchAds360Link" - // }, + // "path": "v1alpha/{+parent}/googleAdsLinks", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" + // "$ref": "GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse" // }, // "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.subpropertyEventFilters.create": +// 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 *PropertiesGoogleAdsLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse) 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 PropertiesSubpropertyEventFiltersCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphasubpropertyeventfilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "analyticsadmin.properties.googleAdsLinks.patch": + +type PropertiesGoogleAdsLinksPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a subproperty Event Filter. +// Patch: Updates a GoogleAdsLink on a property // -// - parent: The ordinary property for which to create a subproperty -// event filter. Format: properties/property_id Example: -// properties/123. -func (r *PropertiesSubpropertyEventFiltersService) Create(parent string, googleanalyticsadminv1alphasubpropertyeventfilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter) *PropertiesSubpropertyEventFiltersCreateCall { - c := &PropertiesSubpropertyEventFiltersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphasubpropertyeventfilter = googleanalyticsadminv1alphasubpropertyeventfilter +// - name: Output only. Format: +// properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: +// googleAdsLinkId is not the Google Ads customer ID. +func (r *PropertiesGoogleAdsLinksService) Patch(name string, googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink) *PropertiesGoogleAdsLinksPatchCall { + c := &PropertiesGoogleAdsLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphagoogleadslink = googleanalyticsadminv1alphagoogleadslink + 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 *PropertiesGoogleAdsLinksPatchCall) UpdateMask(updateMask string) *PropertiesGoogleAdsLinksPatchCall { + 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 *PropertiesSubpropertyEventFiltersCreateCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersCreateCall { +func (c *PropertiesGoogleAdsLinksPatchCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30721,21 +27047,21 @@ func (c *PropertiesSubpropertyEventFiltersCreateCall) Fields(s ...googleapi.Fiel // 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 *PropertiesSubpropertyEventFiltersCreateCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersCreateCall { +func (c *PropertiesGoogleAdsLinksPatchCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksPatchCall { 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 *PropertiesSubpropertyEventFiltersCreateCall) Header() http.Header { +func (c *PropertiesGoogleAdsLinksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSubpropertyEventFiltersCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesGoogleAdsLinksPatchCall) 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_ { @@ -30743,36 +27069,36 @@ func (c *PropertiesSubpropertyEventFiltersCreateCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphasubpropertyeventfilter) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphagoogleadslink) 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}/subpropertyEventFilters") + 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.properties.subpropertyEventFilters.create" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "analyticsadmin.properties.googleAdsLinks.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleAdsLink or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaGoogleAdsLink.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 *PropertiesSubpropertyEventFiltersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSubpropertyEventFilter, error) { +func (c *PropertiesGoogleAdsLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleAdsLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30791,7 +27117,7 @@ func (c *PropertiesSubpropertyEventFiltersCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaSubpropertyEventFilter{ + ret := &GoogleAnalyticsAdminV1alphaGoogleAdsLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30803,28 +27129,34 @@ func (c *PropertiesSubpropertyEventFiltersCreateCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Creates a subproperty Event Filter.", - // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.subpropertyEventFilters.create", + // "description": "Updates a GoogleAdsLink on a property", + // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks/{googleAdsLinksId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.googleAdsLinks.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The ordinary property for which to create a subproperty event filter. Format: properties/property_id Example: properties/123", + // "name": { + // "description": "Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: googleAdsLinkId is not the Google Ads customer ID.", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/googleAdsLinks/[^/]+$", // "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/{+parent}/subpropertyEventFilters", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" + // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" + // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -30833,32 +27165,33 @@ func (c *PropertiesSubpropertyEventFiltersCreateCall) Do(opts ...googleapi.CallO } -// method id "analyticsadmin.properties.subpropertyEventFilters.delete": +// method id "analyticsadmin.properties.rollupPropertySourceLinks.create": -type PropertiesSubpropertyEventFiltersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesRollupPropertySourceLinksCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alpharolluppropertysourcelink *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a subproperty event filter. +// Create: Creates a roll-up property source link. Only roll-up +// properties can have source links, so this method will throw an error +// if used on other types of properties. // -// - name: Resource name of the subproperty event filter to delete. -// Format: -// properties/property_id/subpropertyEventFilters/subproperty_event_fil -// ter Example: properties/123/subpropertyEventFilters/456. -func (r *PropertiesSubpropertyEventFiltersService) Delete(name string) *PropertiesSubpropertyEventFiltersDeleteCall { - c := &PropertiesSubpropertyEventFiltersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Format: properties/{property_id} Example: properties/1234. +func (r *PropertiesRollupPropertySourceLinksService) Create(parent string, googleanalyticsadminv1alpharolluppropertysourcelink *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink) *PropertiesRollupPropertySourceLinksCreateCall { + c := &PropertiesRollupPropertySourceLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alpharolluppropertysourcelink = googleanalyticsadminv1alpharolluppropertysourcelink 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 *PropertiesSubpropertyEventFiltersDeleteCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersDeleteCall { +func (c *PropertiesRollupPropertySourceLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesRollupPropertySourceLinksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30866,21 +27199,21 @@ func (c *PropertiesSubpropertyEventFiltersDeleteCall) Fields(s ...googleapi.Fiel // 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 *PropertiesSubpropertyEventFiltersDeleteCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersDeleteCall { +func (c *PropertiesRollupPropertySourceLinksCreateCall) Context(ctx context.Context) *PropertiesRollupPropertySourceLinksCreateCall { 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 *PropertiesSubpropertyEventFiltersDeleteCall) Header() http.Header { +func (c *PropertiesRollupPropertySourceLinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSubpropertyEventFiltersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesRollupPropertySourceLinksCreateCall) 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_ { @@ -30888,29 +27221,36 @@ func (c *PropertiesSubpropertyEventFiltersDeleteCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alpharolluppropertysourcelink) + 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}/rollupPropertySourceLinks") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.subpropertyEventFilters.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 *PropertiesSubpropertyEventFiltersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.rollupPropertySourceLinks.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink.ServerResponse.He +// ader 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 *PropertiesRollupPropertySourceLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaRollupPropertySourceLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30929,7 +27269,7 @@ func (c *PropertiesSubpropertyEventFiltersDeleteCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaRollupPropertySourceLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30941,25 +27281,28 @@ func (c *PropertiesSubpropertyEventFiltersDeleteCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Deletes a subproperty event filter.", - // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", - // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.subpropertyEventFilters.delete", + // "description": "Creates a roll-up property source link. Only roll-up properties can have source links, so this method will throw an error if used on other types of properties.", + // "flatPath": "v1alpha/properties/{propertiesId}/rollupPropertySourceLinks", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.rollupPropertySourceLinks.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the subproperty event filter to delete. Format: properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: properties/123/subpropertyEventFilters/456", + // "parent": { + // "description": "Required. Format: properties/{property_id} Example: properties/1234", // "location": "path", - // "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", + // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/rollupPropertySourceLinks", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaRollupPropertySourceLink" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaRollupPropertySourceLink" // }, // "scopes": [ // "https://www.googleapis.com/auth/analytics.edit" @@ -30968,25 +27311,26 @@ func (c *PropertiesSubpropertyEventFiltersDeleteCall) Do(opts ...googleapi.CallO } -// method id "analyticsadmin.properties.subpropertyEventFilters.get": +// method id "analyticsadmin.properties.rollupPropertySourceLinks.delete": -type PropertiesSubpropertyEventFiltersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PropertiesRollupPropertySourceLinksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Lookup for a single subproperty Event Filter. +// Delete: Deletes a roll-up property source link. Only roll-up +// properties can have source links, so this method will throw an error +// if used on other types of properties. // -// - name: Resource name of the subproperty event filter to lookup. -// Format: -// properties/property_id/subpropertyEventFilters/subproperty_event_fil -// ter Example: properties/123/subpropertyEventFilters/456. -func (r *PropertiesSubpropertyEventFiltersService) Get(name string) *PropertiesSubpropertyEventFiltersGetCall { - c := &PropertiesSubpropertyEventFiltersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Format: +// properties/{property_id}/rollupPropertySourceLinks/{rollup_property_ +// source_link_id} Example: +// properties/1234/rollupPropertySourceLinks/5678. +func (r *PropertiesRollupPropertySourceLinksService) Delete(name string) *PropertiesRollupPropertySourceLinksDeleteCall { + c := &PropertiesRollupPropertySourceLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30994,54 +27338,41 @@ func (r *PropertiesSubpropertyEventFiltersService) Get(name string) *PropertiesS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesSubpropertyEventFiltersGetCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersGetCall { +func (c *PropertiesRollupPropertySourceLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesRollupPropertySourceLinksDeleteCall { 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 *PropertiesSubpropertyEventFiltersGetCall) IfNoneMatch(entityTag string) *PropertiesSubpropertyEventFiltersGetCall { - 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 *PropertiesSubpropertyEventFiltersGetCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersGetCall { +func (c *PropertiesRollupPropertySourceLinksDeleteCall) Context(ctx context.Context) *PropertiesRollupPropertySourceLinksDeleteCall { 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 *PropertiesSubpropertyEventFiltersGetCall) Header() http.Header { +func (c *PropertiesRollupPropertySourceLinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSubpropertyEventFiltersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesRollupPropertySourceLinksDeleteCall) 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 } @@ -31052,16 +27383,14 @@ func (c *PropertiesSubpropertyEventFiltersGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.subpropertyEventFilters.get" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter.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 *PropertiesSubpropertyEventFiltersGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSubpropertyEventFilter, error) { +// Do executes the "analyticsadmin.properties.rollupPropertySourceLinks.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 *PropertiesRollupPropertySourceLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31080,7 +27409,7 @@ func (c *PropertiesSubpropertyEventFiltersGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaSubpropertyEventFilter{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31092,79 +27421,63 @@ func (c *PropertiesSubpropertyEventFiltersGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lookup for a single subproperty Event Filter.", - // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", - // "httpMethod": "GET", - // "id": "analyticsadmin.properties.subpropertyEventFilters.get", + // "description": "Deletes a roll-up property source link. Only roll-up properties can have source links, so this method will throw an error if used on other types of properties.", + // "flatPath": "v1alpha/properties/{propertiesId}/rollupPropertySourceLinks/{rollupPropertySourceLinksId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.rollupPropertySourceLinks.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the subproperty event filter to lookup. Format: properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: properties/123/subpropertyEventFilters/456", + // "description": "Required. Format: properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} Example: properties/1234/rollupPropertySourceLinks/5678", // "location": "path", - // "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", + // "pattern": "^properties/[^/]+/rollupPropertySourceLinks/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" + // "$ref": "GoogleProtobufEmpty" // }, // "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.subpropertyEventFilters.list": +// method id "analyticsadmin.properties.rollupPropertySourceLinks.get": -type PropertiesSubpropertyEventFiltersListCall struct { +type PropertiesRollupPropertySourceLinksGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: List all subproperty Event Filters on a property. +// Get: Lookup for a single roll-up property source Link. Only roll-up +// properties can have source links, so this method will throw an error +// if used on other types of properties. // -// - parent: Resource name of the ordinary property. Format: -// properties/property_id Example: properties/123. -func (r *PropertiesSubpropertyEventFiltersService) List(parent string) *PropertiesSubpropertyEventFiltersListCall { - c := &PropertiesSubpropertyEventFiltersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - 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 *PropertiesSubpropertyEventFiltersListCall) PageSize(pageSize int64) *PropertiesSubpropertyEventFiltersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListSubpropertyEventFilters` call. Provide -// this to retrieve the subsequent page. When paginating, all other -// parameters provided to `ListSubpropertyEventFilters` must match the -// call that provided the page token. -func (c *PropertiesSubpropertyEventFiltersListCall) PageToken(pageToken string) *PropertiesSubpropertyEventFiltersListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the roll-up property source link to lookup. +// Format: +// properties/{property_id}/rollupPropertySourceLinks/{rollup_property_ +// source_link_id} Example: +// properties/123/rollupPropertySourceLinks/456. +func (r *PropertiesRollupPropertySourceLinksService) Get(name string) *PropertiesRollupPropertySourceLinksGetCall { + c := &PropertiesRollupPropertySourceLinksGetCall{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 *PropertiesSubpropertyEventFiltersListCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersListCall { +func (c *PropertiesRollupPropertySourceLinksGetCall) Fields(s ...googleapi.Field) *PropertiesRollupPropertySourceLinksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31174,7 +27487,7 @@ func (c *PropertiesSubpropertyEventFiltersListCall) Fields(s ...googleapi.Field) // 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 *PropertiesSubpropertyEventFiltersListCall) IfNoneMatch(entityTag string) *PropertiesSubpropertyEventFiltersListCall { +func (c *PropertiesRollupPropertySourceLinksGetCall) IfNoneMatch(entityTag string) *PropertiesRollupPropertySourceLinksGetCall { c.ifNoneMatch_ = entityTag return c } @@ -31182,21 +27495,21 @@ func (c *PropertiesSubpropertyEventFiltersListCall) IfNoneMatch(entityTag string // 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 *PropertiesSubpropertyEventFiltersListCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersListCall { +func (c *PropertiesRollupPropertySourceLinksGetCall) Context(ctx context.Context) *PropertiesRollupPropertySourceLinksGetCall { 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 *PropertiesSubpropertyEventFiltersListCall) Header() http.Header { +func (c *PropertiesRollupPropertySourceLinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSubpropertyEventFiltersListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesRollupPropertySourceLinksGetCall) 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_ { @@ -31209,7 +27522,7 @@ func (c *PropertiesSubpropertyEventFiltersListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/subpropertyEventFilters") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31217,22 +27530,21 @@ func (c *PropertiesSubpropertyEventFiltersListCall) doRequest(alt string) (*http } 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.properties.subpropertyEventFilters.list" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse.Server -// Response.Header or (if a response was returned at all) in +// Do executes the "analyticsadmin.properties.rollupPropertySourceLinks.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaRollupPropertySourceLink.ServerResponse.He +// ader 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 *PropertiesSubpropertyEventFiltersListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse, error) { +func (c *PropertiesRollupPropertySourceLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaRollupPropertySourceLink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31251,7 +27563,7 @@ func (c *PropertiesSubpropertyEventFiltersListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse{ + ret := &GoogleAnalyticsAdminV1alphaRollupPropertySourceLink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31263,163 +27575,150 @@ func (c *PropertiesSubpropertyEventFiltersListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "List all subproperty Event Filters on a property.", - // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters", + // "description": "Lookup for a single roll-up property source Link. Only roll-up properties can have source links, so this method will throw an error if used on other types of properties.", + // "flatPath": "v1alpha/properties/{propertiesId}/rollupPropertySourceLinks/{rollupPropertySourceLinksId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.subpropertyEventFilters.list", + // "id": "analyticsadmin.properties.rollupPropertySourceLinks.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. 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": "Optional. A page token, received from a previous `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubpropertyEventFilters` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Resource name of the ordinary property. Format: properties/property_id Example: properties/123", + // "name": { + // "description": "Required. The name of the roll-up property source link to lookup. Format: properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} Example: properties/123/rollupPropertySourceLinks/456", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/rollupPropertySourceLinks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/subpropertyEventFilters", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaRollupPropertySourceLink" // }, // "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 *PropertiesSubpropertyEventFiltersListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse) 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.subpropertyEventFilters.patch": +// method id "analyticsadmin.properties.rollupPropertySourceLinks.list": -type PropertiesSubpropertyEventFiltersPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphasubpropertyeventfilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesRollupPropertySourceLinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a subproperty Event Filter. +// List: Lists roll-up property source Links on a property. Only roll-up +// properties can have source links, so this method will throw an error +// if used on other types of properties. // -// - name: Output only. Format: -// properties/{ordinary_property_id}/subpropertyEventFilters/{sub_prope -// rty_event_filter} Example: -// properties/1234/subpropertyEventFilters/5678. -func (r *PropertiesSubpropertyEventFiltersService) Patch(name string, googleanalyticsadminv1alphasubpropertyeventfilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter) *PropertiesSubpropertyEventFiltersPatchCall { - c := &PropertiesSubpropertyEventFiltersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleanalyticsadminv1alphasubpropertyeventfilter = googleanalyticsadminv1alphasubpropertyeventfilter +// - parent: The name of the roll-up property to list roll-up property +// source links under. Format: properties/{property_id} Example: +// properties/1234. +func (r *PropertiesRollupPropertySourceLinksService) List(parent string) *PropertiesRollupPropertySourceLinksListCall { + c := &PropertiesRollupPropertySourceLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to update. Field names must be in snake case (for -// example, "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 *PropertiesSubpropertyEventFiltersPatchCall) UpdateMask(updateMask string) *PropertiesSubpropertyEventFiltersPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// 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 *PropertiesRollupPropertySourceLinksListCall) PageSize(pageSize int64) *PropertiesRollupPropertySourceLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListRollupPropertySourceLinks` call. +// Provide this to retrieve the subsequent page. When paginating, all +// other parameters provided to `ListRollupPropertySourceLinks` must +// match the call that provided the page token. +func (c *PropertiesRollupPropertySourceLinksListCall) PageToken(pageToken string) *PropertiesRollupPropertySourceLinksListCall { + 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 *PropertiesSubpropertyEventFiltersPatchCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersPatchCall { +func (c *PropertiesRollupPropertySourceLinksListCall) Fields(s ...googleapi.Field) *PropertiesRollupPropertySourceLinksListCall { 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 *PropertiesRollupPropertySourceLinksListCall) IfNoneMatch(entityTag string) *PropertiesRollupPropertySourceLinksListCall { + 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 *PropertiesSubpropertyEventFiltersPatchCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersPatchCall { +func (c *PropertiesRollupPropertySourceLinksListCall) Context(ctx context.Context) *PropertiesRollupPropertySourceLinksListCall { 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 *PropertiesSubpropertyEventFiltersPatchCall) Header() http.Header { +func (c *PropertiesRollupPropertySourceLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesSubpropertyEventFiltersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesRollupPropertySourceLinksListCall) 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.googleanalyticsadminv1alphasubpropertyeventfilter) - 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}/rollupPropertySourceLinks") 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.subpropertyEventFilters.patch" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter or +// Do executes the "analyticsadmin.properties.rollupPropertySourceLinks.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse.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 *PropertiesSubpropertyEventFiltersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSubpropertyEventFilter, error) { +func (c *PropertiesRollupPropertySourceLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31438,7 +27737,7 @@ func (c *PropertiesSubpropertyEventFiltersPatchCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaSubpropertyEventFilter{ + ret := &GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31450,73 +27749,91 @@ func (c *PropertiesSubpropertyEventFiltersPatchCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Updates a subproperty Event Filter.", - // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", - // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.subpropertyEventFilters.patch", + // "description": "Lists roll-up property source Links on a property. Only roll-up properties can have source links, so this method will throw an error if used on other types of properties.", + // "flatPath": "v1alpha/properties/{propertiesId}/rollupPropertySourceLinks", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.rollupPropertySourceLinks.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. Format: properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter} Example: properties/1234/subpropertyEventFilters/5678", - // "location": "path", - // "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", - // "required": true, - // "type": "string" + // "pageSize": { + // "description": "Optional. 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" // }, - // "updateMask": { - // "description": "Required. The list of fields to update. Field names must be in snake case (for example, \"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": "Optional. A page token, received from a previous `ListRollupPropertySourceLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRollupPropertySourceLinks` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the roll-up property to list roll-up property source links under. Format: properties/{property_id} Example: properties/1234", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" - // }, + // "path": "v1alpha/{+parent}/rollupPropertySourceLinks", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" + // "$ref": "GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse" // }, // "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.userLinks.audit": +// 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 *PropertiesRollupPropertySourceLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListRollupPropertySourceLinksResponse) 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.searchAds360Links.create": -type PropertiesUserLinksAuditCall struct { - s *Service - parent string - googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesSearchAds360LinksCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphasearchads360link *GoogleAnalyticsAdminV1alphaSearchAds360Link + 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 SearchAds360Link. // -// - parent: Example format: accounts/1234. -func (r *PropertiesUserLinksService) Audit(parent string, googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) *PropertiesUserLinksAuditCall { - c := &PropertiesUserLinksAuditCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Example format: properties/1234. +func (r *PropertiesSearchAds360LinksService) Create(parent string, googleanalyticsadminv1alphasearchads360link *GoogleAnalyticsAdminV1alphaSearchAds360Link) *PropertiesSearchAds360LinksCreateCall { + c := &PropertiesSearchAds360LinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleanalyticsadminv1alphaaudituserlinksrequest = googleanalyticsadminv1alphaaudituserlinksrequest + c.googleanalyticsadminv1alphasearchads360link = googleanalyticsadminv1alphasearchads360link 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 *PropertiesUserLinksAuditCall) Fields(s ...googleapi.Field) *PropertiesUserLinksAuditCall { +func (c *PropertiesSearchAds360LinksCreateCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31524,21 +27841,21 @@ func (c *PropertiesUserLinksAuditCall) Fields(s ...googleapi.Field) *PropertiesU // 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 *PropertiesUserLinksAuditCall) Context(ctx context.Context) *PropertiesUserLinksAuditCall { +func (c *PropertiesSearchAds360LinksCreateCall) Context(ctx context.Context) *PropertiesSearchAds360LinksCreateCall { 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 *PropertiesUserLinksAuditCall) Header() http.Header { +func (c *PropertiesSearchAds360LinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksAuditCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSearchAds360LinksCreateCall) 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_ { @@ -31546,14 +27863,14 @@ func (c *PropertiesUserLinksAuditCall) doRequest(alt string) (*http.Response, er } 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.googleanalyticsadminv1alphasearchads360link) 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}/searchAds360Links") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -31566,16 +27883,16 @@ func (c *PropertiesUserLinksAuditCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.userLinks.audit" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "analyticsadmin.properties.searchAds360Links.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaSearchAds360Link 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 +// *GoogleAnalyticsAdminV1alphaSearchAds360Link.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 *PropertiesUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse, error) { +func (c *PropertiesSearchAds360LinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSearchAds360Link, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31594,7 +27911,7 @@ func (c *PropertiesUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*Google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaAuditUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaSearchAds360Link{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31606,88 +27923,60 @@ func (c *PropertiesUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*Google } 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/properties/{propertiesId}/userLinks:audit", + // "description": "Creates a SearchAds360Link.", + // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.userLinks.audit", + // "id": "analyticsadmin.properties.searchAds360Links.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Example format: accounts/1234", + // "description": "Required. Example format: properties/1234", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks:audit", + // "path": "v1alpha/{+parent}/searchAds360Links", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" // }, // "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" // ] // } } -// 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 *PropertiesUserLinksAuditCall) 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.properties.userLinks.batchCreate": +// method id "analyticsadmin.properties.searchAds360Links.delete": -type PropertiesUserLinksBatchCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesSearchAds360LinksDeleteCall 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 SearchAds360Link on a 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 *PropertiesUserLinksService) BatchCreate(parent string, googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) *PropertiesUserLinksBatchCreateCall { - c := &PropertiesUserLinksBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphabatchcreateuserlinksrequest = googleanalyticsadminv1alphabatchcreateuserlinksrequest +// - name: The name of the SearchAds360Link to delete. Example format: +// properties/1234/SearchAds360Links/5678. +func (r *PropertiesSearchAds360LinksService) Delete(name string) *PropertiesSearchAds360LinksDeleteCall { + c := &PropertiesSearchAds360LinksDeleteCall{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 *PropertiesUserLinksBatchCreateCall) Fields(s ...googleapi.Field) *PropertiesUserLinksBatchCreateCall { +func (c *PropertiesSearchAds360LinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31695,21 +27984,21 @@ func (c *PropertiesUserLinksBatchCreateCall) Fields(s ...googleapi.Field) *Prope // 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 *PropertiesUserLinksBatchCreateCall) Context(ctx context.Context) *PropertiesUserLinksBatchCreateCall { +func (c *PropertiesSearchAds360LinksDeleteCall) Context(ctx context.Context) *PropertiesSearchAds360LinksDeleteCall { 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 *PropertiesUserLinksBatchCreateCall) Header() http.Header { +func (c *PropertiesSearchAds360LinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSearchAds360LinksDeleteCall) 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_ { @@ -31717,37 +28006,29 @@ func (c *PropertiesUserLinksBatchCreateCall) doRequest(alt string) (*http.Respon } 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.properties.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 *PropertiesUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse, error) { +// Do executes the "analyticsadmin.properties.searchAds360Links.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 *PropertiesSearchAds360LinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31766,7 +28047,7 @@ func (c *PropertiesUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31778,121 +28059,125 @@ func (c *PropertiesUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (* } 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/properties/{propertiesId}/userLinks:batchCreate", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.userLinks.batchCreate", + // "description": "Deletes a SearchAds360Link on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links/{searchAds360LinksId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.searchAds360Links.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. The name of the SearchAds360Link to delete. Example format: properties/1234/SearchAds360Links/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/searchAds360Links/[^/]+$", // "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" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.userLinks.batchDelete": +// method id "analyticsadmin.properties.searchAds360Links.get": -type PropertiesUserLinksBatchDeleteCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesSearchAds360LinksGetCall 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: Look up a single SearchAds360Link // -// - 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 *PropertiesUserLinksService) BatchDelete(parent string, googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) *PropertiesUserLinksBatchDeleteCall { - c := &PropertiesUserLinksBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest = googleanalyticsadminv1alphabatchdeleteuserlinksrequest +// - name: The name of the SearchAds360Link to get. Example format: +// properties/1234/SearchAds360Link/5678. +func (r *PropertiesSearchAds360LinksService) Get(name string) *PropertiesSearchAds360LinksGetCall { + c := &PropertiesSearchAds360LinksGetCall{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 *PropertiesUserLinksBatchDeleteCall) Fields(s ...googleapi.Field) *PropertiesUserLinksBatchDeleteCall { +func (c *PropertiesSearchAds360LinksGetCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksGetCall { 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 *PropertiesSearchAds360LinksGetCall) IfNoneMatch(entityTag string) *PropertiesSearchAds360LinksGetCall { + 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 *PropertiesUserLinksBatchDeleteCall) Context(ctx context.Context) *PropertiesUserLinksBatchDeleteCall { +func (c *PropertiesSearchAds360LinksGetCall) Context(ctx context.Context) *PropertiesSearchAds360LinksGetCall { 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 *PropertiesUserLinksBatchDeleteCall) Header() http.Header { +func (c *PropertiesSearchAds360LinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksBatchDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSearchAds360LinksGetCall) 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.properties.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 *PropertiesUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "analyticsadmin.properties.searchAds360Links.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaSearchAds360Link or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSearchAds360Link.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 *PropertiesSearchAds360LinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSearchAds360Link, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31911,7 +28196,7 @@ func (c *PropertiesUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleAnalyticsAdminV1alphaSearchAds360Link{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31923,39 +28208,37 @@ func (c *PropertiesUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes information about multiple users' links to an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchDelete", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.userLinks.batchDelete", + // "description": "Look up a single SearchAds360Link", + // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links/{searchAds360LinksId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.searchAds360Links.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. The name of the SearchAds360Link to get. Example format: properties/1234/SearchAds360Link/5678", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/searchAds360Links/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks:batchDelete", - // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" // }, // "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.userLinks.batchGet": +// method id "analyticsadmin.properties.searchAds360Links.list": -type PropertiesUserLinksBatchGetCall struct { +type PropertiesSearchAds360LinksListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -31964,30 +28247,38 @@ type PropertiesUserLinksBatchGetCall struct { header_ http.Header } -// BatchGet: Gets information about multiple users' links to an account -// or property. +// List: Lists all SearchAds360Links on a 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 *PropertiesUserLinksService) BatchGet(parent string) *PropertiesUserLinksBatchGetCall { - c := &PropertiesUserLinksBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Example format: properties/1234. +func (r *PropertiesSearchAds360LinksService) List(parent string) *PropertiesSearchAds360LinksListCall { + c := &PropertiesSearchAds360LinksListCall{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 *PropertiesUserLinksBatchGetCall) Names(names ...string) *PropertiesUserLinksBatchGetCall { - c.urlParams_.SetMulti("names", append([]string{}, names...)) +// 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 *PropertiesSearchAds360LinksListCall) PageSize(pageSize int64) *PropertiesSearchAds360LinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListSearchAds360Links` call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListSearchAds360Links` must match the call +// that provided the page token. +func (c *PropertiesSearchAds360LinksListCall) PageToken(pageToken string) *PropertiesSearchAds360LinksListCall { + 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 *PropertiesUserLinksBatchGetCall) Fields(s ...googleapi.Field) *PropertiesUserLinksBatchGetCall { +func (c *PropertiesSearchAds360LinksListCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31997,7 +28288,7 @@ func (c *PropertiesUserLinksBatchGetCall) Fields(s ...googleapi.Field) *Properti // 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 *PropertiesUserLinksBatchGetCall) IfNoneMatch(entityTag string) *PropertiesUserLinksBatchGetCall { +func (c *PropertiesSearchAds360LinksListCall) IfNoneMatch(entityTag string) *PropertiesSearchAds360LinksListCall { c.ifNoneMatch_ = entityTag return c } @@ -32005,21 +28296,21 @@ func (c *PropertiesUserLinksBatchGetCall) IfNoneMatch(entityTag string) *Propert // 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 *PropertiesUserLinksBatchGetCall) Context(ctx context.Context) *PropertiesUserLinksBatchGetCall { +func (c *PropertiesSearchAds360LinksListCall) Context(ctx context.Context) *PropertiesSearchAds360LinksListCall { 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 *PropertiesUserLinksBatchGetCall) Header() http.Header { +func (c *PropertiesSearchAds360LinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksBatchGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSearchAds360LinksListCall) 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_ { @@ -32032,7 +28323,7 @@ func (c *PropertiesUserLinksBatchGetCall) doRequest(alt string) (*http.Response, 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}/searchAds360Links") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -32045,16 +28336,17 @@ func (c *PropertiesUserLinksBatchGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.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.properties.searchAds360Links.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse.ServerRespon +// se.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 *PropertiesUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse, error) { +func (c *PropertiesSearchAds360LinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32073,7 +28365,7 @@ func (c *PropertiesUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32085,69 +28377,103 @@ func (c *PropertiesUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets information about multiple users' links to an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchGet", + // "description": "Lists all SearchAds360Links on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.userLinks.batchGet", + // "id": "analyticsadmin.properties.searchAds360Links.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 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 `ListSearchAds360Links` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSearchAds360Links` 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: properties/1234", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks:batchGet", + // "path": "v1alpha/{+parent}/searchAds360Links", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse" // }, // "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" // ] // } } -// method id "analyticsadmin.properties.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 *PropertiesSearchAds360LinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse) 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.searchAds360Links.patch": -type PropertiesUserLinksBatchUpdateCall struct { - s *Service - parent string - googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesSearchAds360LinksPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphasearchads360link *GoogleAnalyticsAdminV1alphaSearchAds360Link + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchUpdate: Updates information about multiple users' links to an -// account or property. +// Patch: Updates a SearchAds360Link on a 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 *PropertiesUserLinksService) BatchUpdate(parent string, googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) *PropertiesUserLinksBatchUpdateCall { - c := &PropertiesUserLinksBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphabatchupdateuserlinksrequest = googleanalyticsadminv1alphabatchupdateuserlinksrequest +// - name: Output only. The resource name for this SearchAds360Link +// resource. Format: +// properties/{propertyId}/searchAds360Links/{linkId} Note: linkId is +// not the Search Ads 360 advertiser ID. +func (r *PropertiesSearchAds360LinksService) Patch(name string, googleanalyticsadminv1alphasearchads360link *GoogleAnalyticsAdminV1alphaSearchAds360Link) *PropertiesSearchAds360LinksPatchCall { + c := &PropertiesSearchAds360LinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphasearchads360link = googleanalyticsadminv1alphasearchads360link + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. Omitted fields will not be updated. To +// replace the entire entity, use one path with the string "*" to match +// all fields. +func (c *PropertiesSearchAds360LinksPatchCall) UpdateMask(updateMask string) *PropertiesSearchAds360LinksPatchCall { + 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 *PropertiesUserLinksBatchUpdateCall) Fields(s ...googleapi.Field) *PropertiesUserLinksBatchUpdateCall { +func (c *PropertiesSearchAds360LinksPatchCall) Fields(s ...googleapi.Field) *PropertiesSearchAds360LinksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32155,21 +28481,21 @@ func (c *PropertiesUserLinksBatchUpdateCall) Fields(s ...googleapi.Field) *Prope // 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 *PropertiesUserLinksBatchUpdateCall) Context(ctx context.Context) *PropertiesUserLinksBatchUpdateCall { +func (c *PropertiesSearchAds360LinksPatchCall) Context(ctx context.Context) *PropertiesSearchAds360LinksPatchCall { 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 *PropertiesUserLinksBatchUpdateCall) Header() http.Header { +func (c *PropertiesSearchAds360LinksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksBatchUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSearchAds360LinksPatchCall) 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_ { @@ -32177,37 +28503,36 @@ func (c *PropertiesUserLinksBatchUpdateCall) doRequest(alt string) (*http.Respon } 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.googleanalyticsadminv1alphasearchads360link) 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.properties.userLinks.batchUpdate" call. -// Exactly one of -// *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse or error +// Do executes the "analyticsadmin.properties.searchAds360Links.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaSearchAds360Link 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 +// *GoogleAnalyticsAdminV1alphaSearchAds360Link.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 *PropertiesUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse, error) { +func (c *PropertiesSearchAds360LinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSearchAds360Link, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32226,7 +28551,7 @@ func (c *PropertiesUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaSearchAds360Link{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32238,72 +28563,69 @@ func (c *PropertiesUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Updates information about multiple users' links to an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchUpdate", - // "httpMethod": "POST", - // "id": "analyticsadmin.properties.userLinks.batchUpdate", + // "description": "Updates a SearchAds360Link on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/searchAds360Links/{searchAds360LinksId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.searchAds360Links.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. The resource name for this SearchAds360Link resource. Format: properties/{propertyId}/searchAds360Links/{linkId} Note: linkId is not the Search Ads 360 advertiser ID", // "location": "path", - // "pattern": "^properties/[^/]+$", + // "pattern": "^properties/[^/]+/searchAds360Links/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated. 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/{+parent}/userLinks:batchUpdate", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest" + // "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.userLinks.create": +// method id "analyticsadmin.properties.subpropertyEventFilters.create": -type PropertiesUserLinksCreateCall struct { - s *Service - parent string - googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesSubpropertyEventFiltersCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphasubpropertyeventfilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter + 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. +// Create: Creates a subproperty Event Filter. // -// - parent: Example format: accounts/1234. -func (r *PropertiesUserLinksService) Create(parent string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *PropertiesUserLinksCreateCall { - c := &PropertiesUserLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The ordinary property for which to create a subproperty +// event filter. Format: properties/property_id Example: +// properties/123. +func (r *PropertiesSubpropertyEventFiltersService) Create(parent string, googleanalyticsadminv1alphasubpropertyeventfilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter) *PropertiesSubpropertyEventFiltersCreateCall { + c := &PropertiesSubpropertyEventFiltersCreateCall{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 *PropertiesUserLinksCreateCall) NotifyNewUser(notifyNewUser bool) *PropertiesUserLinksCreateCall { - c.urlParams_.Set("notifyNewUser", fmt.Sprint(notifyNewUser)) + c.googleanalyticsadminv1alphasubpropertyeventfilter = googleanalyticsadminv1alphasubpropertyeventfilter 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 *PropertiesUserLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesUserLinksCreateCall { +func (c *PropertiesSubpropertyEventFiltersCreateCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32311,21 +28633,21 @@ func (c *PropertiesUserLinksCreateCall) Fields(s ...googleapi.Field) *Properties // 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 *PropertiesUserLinksCreateCall) Context(ctx context.Context) *PropertiesUserLinksCreateCall { +func (c *PropertiesSubpropertyEventFiltersCreateCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersCreateCall { 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 *PropertiesUserLinksCreateCall) Header() http.Header { +func (c *PropertiesSubpropertyEventFiltersCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSubpropertyEventFiltersCreateCall) 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_ { @@ -32333,14 +28655,14 @@ func (c *PropertiesUserLinksCreateCall) doRequest(alt string) (*http.Response, e } 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.googleanalyticsadminv1alphasubpropertyeventfilter) 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/{+parent}/subpropertyEventFilters") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -32353,15 +28675,16 @@ func (c *PropertiesUserLinksCreateCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.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.subpropertyEventFilters.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter.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 *PropertiesUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { +func (c *PropertiesSubpropertyEventFiltersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSubpropertyEventFilter, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32380,7 +28703,7 @@ func (c *PropertiesUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaUserLink{ + ret := &GoogleAnalyticsAdminV1alphaSubpropertyEventFilter{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32392,44 +28715,39 @@ func (c *PropertiesUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*Googl } 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/properties/{propertiesId}/userLinks", + // "description": "Creates a subproperty Event Filter.", + // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters", // "httpMethod": "POST", - // "id": "analyticsadmin.properties.userLinks.create", + // "id": "analyticsadmin.properties.subpropertyEventFilters.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", + // "description": "Required. The ordinary property for which to create a subproperty event filter. Format: properties/property_id Example: properties/123", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks", + // "path": "v1alpha/{+parent}/subpropertyEventFilters", // "request": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.userLinks.delete": +// method id "analyticsadmin.properties.subpropertyEventFilters.delete": -type PropertiesUserLinksDeleteCall struct { +type PropertiesSubpropertyEventFiltersDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32437,11 +28755,14 @@ type PropertiesUserLinksDeleteCall struct { header_ http.Header } -// Delete: Deletes a user link on an account or property. +// Delete: Deletes a subproperty event filter. // -// - name: Example format: accounts/1234/userLinks/5678. -func (r *PropertiesUserLinksService) Delete(name string) *PropertiesUserLinksDeleteCall { - c := &PropertiesUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the subproperty event filter to delete. +// Format: +// properties/property_id/subpropertyEventFilters/subproperty_event_fil +// ter Example: properties/123/subpropertyEventFilters/456. +func (r *PropertiesSubpropertyEventFiltersService) Delete(name string) *PropertiesSubpropertyEventFiltersDeleteCall { + c := &PropertiesSubpropertyEventFiltersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32449,7 +28770,7 @@ func (r *PropertiesUserLinksService) Delete(name string) *PropertiesUserLinksDel // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesUserLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesUserLinksDeleteCall { +func (c *PropertiesSubpropertyEventFiltersDeleteCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32457,21 +28778,21 @@ func (c *PropertiesUserLinksDeleteCall) Fields(s ...googleapi.Field) *Properties // 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 *PropertiesUserLinksDeleteCall) Context(ctx context.Context) *PropertiesUserLinksDeleteCall { +func (c *PropertiesSubpropertyEventFiltersDeleteCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersDeleteCall { 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 *PropertiesUserLinksDeleteCall) Header() http.Header { +func (c *PropertiesSubpropertyEventFiltersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSubpropertyEventFiltersDeleteCall) 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_ { @@ -32494,14 +28815,14 @@ func (c *PropertiesUserLinksDeleteCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.userLinks.delete" call. +// Do executes the "analyticsadmin.properties.subpropertyEventFilters.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 *PropertiesUserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *PropertiesSubpropertyEventFiltersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32532,18 +28853,18 @@ func (c *PropertiesUserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Deletes a user link on an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/userLinks/{userLinksId}", + // "description": "Deletes a subproperty event filter.", + // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", // "httpMethod": "DELETE", - // "id": "analyticsadmin.properties.userLinks.delete", + // "id": "analyticsadmin.properties.subpropertyEventFilters.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Example format: accounts/1234/userLinks/5678", + // "description": "Required. Resource name of the subproperty event filter to delete. Format: properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: properties/123/subpropertyEventFilters/456", // "location": "path", - // "pattern": "^properties/[^/]+/userLinks/[^/]+$", + // "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", // "required": true, // "type": "string" // } @@ -32553,15 +28874,15 @@ func (c *PropertiesUserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Googl // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } } -// method id "analyticsadmin.properties.userLinks.get": +// method id "analyticsadmin.properties.subpropertyEventFilters.get": -type PropertiesUserLinksGetCall struct { +type PropertiesSubpropertyEventFiltersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32570,11 +28891,14 @@ type PropertiesUserLinksGetCall struct { header_ http.Header } -// Get: Gets information about a user's link to an account or property. +// Get: Lookup for a single subproperty Event Filter. // -// - name: Example format: accounts/1234/userLinks/5678. -func (r *PropertiesUserLinksService) Get(name string) *PropertiesUserLinksGetCall { - c := &PropertiesUserLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the subproperty event filter to lookup. +// Format: +// properties/property_id/subpropertyEventFilters/subproperty_event_fil +// ter Example: properties/123/subpropertyEventFilters/456. +func (r *PropertiesSubpropertyEventFiltersService) Get(name string) *PropertiesSubpropertyEventFiltersGetCall { + c := &PropertiesSubpropertyEventFiltersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32582,7 +28906,7 @@ func (r *PropertiesUserLinksService) Get(name string) *PropertiesUserLinksGetCal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesUserLinksGetCall) Fields(s ...googleapi.Field) *PropertiesUserLinksGetCall { +func (c *PropertiesSubpropertyEventFiltersGetCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32592,7 +28916,7 @@ func (c *PropertiesUserLinksGetCall) Fields(s ...googleapi.Field) *PropertiesUse // 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 *PropertiesUserLinksGetCall) IfNoneMatch(entityTag string) *PropertiesUserLinksGetCall { +func (c *PropertiesSubpropertyEventFiltersGetCall) IfNoneMatch(entityTag string) *PropertiesSubpropertyEventFiltersGetCall { c.ifNoneMatch_ = entityTag return c } @@ -32600,21 +28924,21 @@ func (c *PropertiesUserLinksGetCall) IfNoneMatch(entityTag string) *PropertiesUs // 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 *PropertiesUserLinksGetCall) Context(ctx context.Context) *PropertiesUserLinksGetCall { +func (c *PropertiesSubpropertyEventFiltersGetCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersGetCall { 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 *PropertiesUserLinksGetCall) Header() http.Header { +func (c *PropertiesSubpropertyEventFiltersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSubpropertyEventFiltersGetCall) 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_ { @@ -32640,15 +28964,16 @@ func (c *PropertiesUserLinksGetCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.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 +// Do executes the "analyticsadmin.properties.subpropertyEventFilters.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter.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 *PropertiesUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { +func (c *PropertiesSubpropertyEventFiltersGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSubpropertyEventFilter, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32667,7 +28992,7 @@ func (c *PropertiesUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAn if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaUserLink{ + ret := &GoogleAnalyticsAdminV1alphaSubpropertyEventFilter{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32679,37 +29004,37 @@ func (c *PropertiesUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAn } return ret, nil // { - // "description": "Gets information about a user's link to an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/userLinks/{userLinksId}", + // "description": "Lookup for a single subproperty Event Filter.", + // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.userLinks.get", + // "id": "analyticsadmin.properties.subpropertyEventFilters.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Example format: accounts/1234/userLinks/5678", + // "description": "Required. Resource name of the subproperty event filter to lookup. Format: properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: properties/123/subpropertyEventFilters/456", // "location": "path", - // "pattern": "^properties/[^/]+/userLinks/[^/]+$", + // "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" // }, // "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" // ] // } } -// method id "analyticsadmin.properties.userLinks.list": +// method id "analyticsadmin.properties.subpropertyEventFilters.list": -type PropertiesUserLinksListCall struct { +type PropertiesSubpropertyEventFiltersListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -32718,30 +29043,32 @@ type PropertiesUserLinksListCall struct { header_ http.Header } -// List: Lists all user links on an account or property. +// List: List all subproperty Event Filters on a property. // -// - parent: Example format: accounts/1234. -func (r *PropertiesUserLinksService) List(parent string) *PropertiesUserLinksListCall { - c := &PropertiesUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Resource name of the ordinary property. Format: +// properties/property_id Example: properties/123. +func (r *PropertiesSubpropertyEventFiltersService) List(parent string) *PropertiesSubpropertyEventFiltersListCall { + c := &PropertiesSubpropertyEventFiltersListCall{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 *PropertiesUserLinksListCall) PageSize(pageSize int64) *PropertiesUserLinksListCall { +// 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 *PropertiesSubpropertyEventFiltersListCall) PageSize(pageSize int64) *PropertiesSubpropertyEventFiltersListCall { 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 *PropertiesUserLinksListCall) PageToken(pageToken string) *PropertiesUserLinksListCall { +// received from a previous `ListSubpropertyEventFilters` call. Provide +// this to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListSubpropertyEventFilters` must match the +// call that provided the page token. +func (c *PropertiesSubpropertyEventFiltersListCall) PageToken(pageToken string) *PropertiesSubpropertyEventFiltersListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -32749,7 +29076,7 @@ func (c *PropertiesUserLinksListCall) PageToken(pageToken string) *PropertiesUse // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *PropertiesUserLinksListCall) Fields(s ...googleapi.Field) *PropertiesUserLinksListCall { +func (c *PropertiesSubpropertyEventFiltersListCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32759,7 +29086,7 @@ func (c *PropertiesUserLinksListCall) Fields(s ...googleapi.Field) *PropertiesUs // 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 *PropertiesUserLinksListCall) IfNoneMatch(entityTag string) *PropertiesUserLinksListCall { +func (c *PropertiesSubpropertyEventFiltersListCall) IfNoneMatch(entityTag string) *PropertiesSubpropertyEventFiltersListCall { c.ifNoneMatch_ = entityTag return c } @@ -32767,21 +29094,21 @@ func (c *PropertiesUserLinksListCall) IfNoneMatch(entityTag string) *PropertiesU // 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 *PropertiesUserLinksListCall) Context(ctx context.Context) *PropertiesUserLinksListCall { +func (c *PropertiesSubpropertyEventFiltersListCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersListCall { 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 *PropertiesUserLinksListCall) Header() http.Header { +func (c *PropertiesSubpropertyEventFiltersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSubpropertyEventFiltersListCall) 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_ { @@ -32794,7 +29121,7 @@ func (c *PropertiesUserLinksListCall) doRequest(alt string) (*http.Response, err 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/{+parent}/subpropertyEventFilters") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -32807,16 +29134,17 @@ func (c *PropertiesUserLinksListCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.userLinks.list" call. -// Exactly one of *GoogleAnalyticsAdminV1alphaListUserLinksResponse or +// Do executes the "analyticsadmin.properties.subpropertyEventFilters.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse 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 +// *GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse.Server +// Response.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 *PropertiesUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListUserLinksResponse, error) { +func (c *PropertiesSubpropertyEventFiltersListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32835,7 +29163,7 @@ func (c *PropertiesUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleA if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaListUserLinksResponse{ + ret := &GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32847,40 +29175,40 @@ func (c *PropertiesUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleA } return ret, nil // { - // "description": "Lists all user links on an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/userLinks", + // "description": "List all subproperty Event Filters on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters", // "httpMethod": "GET", - // "id": "analyticsadmin.properties.userLinks.list", + // "id": "analyticsadmin.properties.subpropertyEventFilters.list", // "parameterOrder": [ // "parent" // ], // "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.", + // "description": "Optional. 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 `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.", + // "description": "Optional. A page token, received from a previous `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubpropertyEventFilters` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Example format: accounts/1234", + // "description": "Required. Resource name of the ordinary property. Format: properties/property_id Example: properties/123", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userLinks", + // "path": "v1alpha/{+parent}/subpropertyEventFilters", // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaListUserLinksResponse" + // "$ref": "GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse" // }, // "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" // ] // } @@ -32889,7 +29217,7 @@ func (c *PropertiesUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleA // 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 *PropertiesUserLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListUserLinksResponse) error) error { +func (c *PropertiesSubpropertyEventFiltersListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListSubpropertyEventFiltersResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -32907,31 +29235,44 @@ func (c *PropertiesUserLinksListCall) Pages(ctx context.Context, f func(*GoogleA } } -// method id "analyticsadmin.properties.userLinks.patch": +// method id "analyticsadmin.properties.subpropertyEventFilters.patch": -type PropertiesUserLinksPatchCall struct { - s *Service - name string - googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PropertiesSubpropertyEventFiltersPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphasubpropertyeventfilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a user link on an account or property. +// Patch: Updates a subproperty Event Filter. // -// - name: Output only. Example format: properties/1234/userLinks/5678. -func (r *PropertiesUserLinksService) Patch(name string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *PropertiesUserLinksPatchCall { - c := &PropertiesUserLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Format: +// properties/{ordinary_property_id}/subpropertyEventFilters/{sub_prope +// rty_event_filter} Example: +// properties/1234/subpropertyEventFilters/5678. +func (r *PropertiesSubpropertyEventFiltersService) Patch(name string, googleanalyticsadminv1alphasubpropertyeventfilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter) *PropertiesSubpropertyEventFiltersPatchCall { + c := &PropertiesSubpropertyEventFiltersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleanalyticsadminv1alphauserlink = googleanalyticsadminv1alphauserlink + c.googleanalyticsadminv1alphasubpropertyeventfilter = googleanalyticsadminv1alphasubpropertyeventfilter + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to update. Field names must be in snake case (for +// example, "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 *PropertiesSubpropertyEventFiltersPatchCall) UpdateMask(updateMask string) *PropertiesSubpropertyEventFiltersPatchCall { + 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 *PropertiesUserLinksPatchCall) Fields(s ...googleapi.Field) *PropertiesUserLinksPatchCall { +func (c *PropertiesSubpropertyEventFiltersPatchCall) Fields(s ...googleapi.Field) *PropertiesSubpropertyEventFiltersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32939,21 +29280,21 @@ func (c *PropertiesUserLinksPatchCall) Fields(s ...googleapi.Field) *PropertiesU // 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 *PropertiesUserLinksPatchCall) Context(ctx context.Context) *PropertiesUserLinksPatchCall { +func (c *PropertiesSubpropertyEventFiltersPatchCall) Context(ctx context.Context) *PropertiesSubpropertyEventFiltersPatchCall { 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 *PropertiesUserLinksPatchCall) Header() http.Header { +func (c *PropertiesSubpropertyEventFiltersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PropertiesUserLinksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PropertiesSubpropertyEventFiltersPatchCall) 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_ { @@ -32961,7 +29302,7 @@ func (c *PropertiesUserLinksPatchCall) doRequest(alt string) (*http.Response, er } 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.googleanalyticsadminv1alphasubpropertyeventfilter) if err != nil { return nil, err } @@ -32981,15 +29322,16 @@ func (c *PropertiesUserLinksPatchCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticsadmin.properties.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.subpropertyEventFilters.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter.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 *PropertiesUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { +func (c *PropertiesSubpropertyEventFiltersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSubpropertyEventFilter, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33008,7 +29350,7 @@ func (c *PropertiesUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*Google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleAnalyticsAdminV1alphaUserLink{ + ret := &GoogleAnalyticsAdminV1alphaSubpropertyEventFilter{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33020,31 +29362,37 @@ func (c *PropertiesUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*Google } return ret, nil // { - // "description": "Updates a user link on an account or property.", - // "flatPath": "v1alpha/properties/{propertiesId}/userLinks/{userLinksId}", + // "description": "Updates a subproperty Event Filter.", + // "flatPath": "v1alpha/properties/{propertiesId}/subpropertyEventFilters/{subpropertyEventFiltersId}", // "httpMethod": "PATCH", - // "id": "analyticsadmin.properties.userLinks.patch", + // "id": "analyticsadmin.properties.subpropertyEventFilters.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Example format: properties/1234/userLinks/5678", + // "description": "Output only. Format: properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter} Example: properties/1234/subpropertyEventFilters/5678", // "location": "path", - // "pattern": "^properties/[^/]+/userLinks/[^/]+$", + // "pattern": "^properties/[^/]+/subpropertyEventFilters/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to update. Field names must be in snake case (for example, \"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": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" // }, // "response": { - // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" + // "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter" // }, // "scopes": [ - // "https://www.googleapis.com/auth/analytics.manage.users" + // "https://www.googleapis.com/auth/analytics.edit" // ] // } diff --git a/analyticsadmin/v1beta/analyticsadmin-api.json b/analyticsadmin/v1beta/analyticsadmin-api.json index ff007be85e5..3c03e2a7900 100644 --- a/analyticsadmin/v1beta/analyticsadmin-api.json +++ b/analyticsadmin/v1beta/analyticsadmin-api.json @@ -143,7 +143,7 @@ "accounts": { "methods": { "delete": { - "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.", + "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, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", "flatPath": "v1beta/accounts/{accountsId}", "httpMethod": "DELETE", "id": "analyticsadmin.accounts.delete", @@ -412,7 +412,7 @@ ] }, "delete": { - "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 a GA4 Property.", + "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, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", "flatPath": "v1beta/properties/{propertiesId}", "httpMethod": "DELETE", "id": "analyticsadmin.properties.delete", @@ -1628,7 +1628,7 @@ } } }, - "revision": "20231001", + "revision": "20231003", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1betaAccessBetweenFilter": { diff --git a/analyticsadmin/v1beta/analyticsadmin-gen.go b/analyticsadmin/v1beta/analyticsadmin-gen.go index 3a95168575b..43d291d629b 100644 --- a/analyticsadmin/v1beta/analyticsadmin-gen.go +++ b/analyticsadmin/v1beta/analyticsadmin-gen.go @@ -3154,7 +3154,7 @@ type AccountsDeleteCall struct { // 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. +// AccessBindings) will be permanently purged. // https://support.google.com/analytics/answer/6154772 Returns an error // if the target is not found. // @@ -3252,7 +3252,7 @@ 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.", + // "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, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", // "flatPath": "v1beta/accounts/{accountsId}", // "httpMethod": "DELETE", // "id": "analyticsadmin.accounts.delete", @@ -4691,7 +4691,7 @@ type PropertiesDeleteCall struct { // 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. +// AccessBindings) will be permanently purged. // https://support.google.com/analytics/answer/6154772 Returns an error // if the target is not found, or is not a GA4 Property. // @@ -4790,7 +4790,7 @@ 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 a GA4 Property.", + // "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, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", // "flatPath": "v1beta/properties/{propertiesId}", // "httpMethod": "DELETE", // "id": "analyticsadmin.properties.delete", diff --git a/analyticshub/v1/analyticshub-api.json b/analyticshub/v1/analyticshub-api.json index cff1039bbdc..55df386b36a 100644 --- a/analyticshub/v1/analyticshub-api.json +++ b/analyticshub/v1/analyticshub-api.json @@ -964,7 +964,7 @@ } } }, - "revision": "20230904", + "revision": "20230923", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -1470,7 +1470,7 @@ "type": "object" }, "OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", + "description": "Represents the metadata of a long-running operation in Analytics Hub.", "id": "OperationMetadata", "properties": { "apiVersion": { @@ -1478,11 +1478,6 @@ "readOnly": true, "type": "string" }, - "cancelRequested": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "readOnly": true, - "type": "boolean" - }, "createTime": { "description": "Output only. The time the operation was created.", "format": "google-datetime", @@ -1495,7 +1490,12 @@ "readOnly": true, "type": "string" }, - "statusDetail": { + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { "description": "Output only. Human-readable status of the operation, if any.", "readOnly": true, "type": "string" diff --git a/analyticshub/v1/analyticshub-gen.go b/analyticshub/v1/analyticshub-gen.go index d67726e95f7..43d3292186e 100644 --- a/analyticshub/v1/analyticshub-gen.go +++ b/analyticshub/v1/analyticshub-gen.go @@ -1194,27 +1194,27 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationMetadata: Represents the metadata of the long-running -// operation. +// OperationMetadata: Represents the metadata of a long-running +// operation in Analytics Hub. type OperationMetadata struct { // ApiVersion: Output only. API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` - // CancelRequested: Output only. Identifies whether the user has - // requested cancellation of the operation. Operations that have been - // cancelled successfully have Operation.error value with a - // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: Output only. The time the operation was created. CreateTime string `json:"createTime,omitempty"` // EndTime: Output only. The time the operation finished running. EndTime string `json:"endTime,omitempty"` - // StatusDetail: Output only. Human-readable status of the operation, if - // any. - StatusDetail string `json:"statusDetail,omitempty"` + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` // Target: Output only. Server-defined resource path for the target of // the operation. diff --git a/analyticshub/v1beta1/analyticshub-api.json b/analyticshub/v1beta1/analyticshub-api.json index 06f5243135e..81f30be7d5a 100644 --- a/analyticshub/v1beta1/analyticshub-api.json +++ b/analyticshub/v1beta1/analyticshub-api.json @@ -695,7 +695,7 @@ } } }, - "revision": "20230821", + "revision": "20230923", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -1114,7 +1114,7 @@ "type": "object" }, "OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", + "description": "Represents the metadata of a long-running operation in Analytics Hub.", "id": "OperationMetadata", "properties": { "apiVersion": { @@ -1122,11 +1122,6 @@ "readOnly": true, "type": "string" }, - "cancelRequested": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "readOnly": true, - "type": "boolean" - }, "createTime": { "description": "Output only. The time the operation was created.", "format": "google-datetime", @@ -1139,7 +1134,12 @@ "readOnly": true, "type": "string" }, - "statusDetail": { + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { "description": "Output only. Human-readable status of the operation, if any.", "readOnly": true, "type": "string" diff --git a/analyticshub/v1beta1/analyticshub-gen.go b/analyticshub/v1beta1/analyticshub-gen.go index 7197f0dcc1c..cb486348173 100644 --- a/analyticshub/v1beta1/analyticshub-gen.go +++ b/analyticshub/v1beta1/analyticshub-gen.go @@ -1034,27 +1034,27 @@ func (s *Listing) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationMetadata: Represents the metadata of the long-running -// operation. +// OperationMetadata: Represents the metadata of a long-running +// operation in Analytics Hub. type OperationMetadata struct { // ApiVersion: Output only. API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` - // CancelRequested: Output only. Identifies whether the user has - // requested cancellation of the operation. Operations that have been - // cancelled successfully have Operation.error value with a - // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: Output only. The time the operation was created. CreateTime string `json:"createTime,omitempty"` // EndTime: Output only. The time the operation finished running. EndTime string `json:"endTime,omitempty"` - // StatusDetail: Output only. Human-readable status of the operation, if - // any. - StatusDetail string `json:"statusDetail,omitempty"` + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` // Target: Output only. Server-defined resource path for the target of // the operation. diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index aa3243d4799..cf5cfcb3aeb 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1095,7 +1095,7 @@ } } }, - "revision": "20230925", + "revision": "20231004", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -2641,6 +2641,34 @@ ], "type": "string" }, + "cellularTwoGState": { + "description": "Controls whether cellular 2G setting can be toggled by the user or not.", + "enum": [ + "CELLULAR_TWO_G_STATE_UNSPECIFIED", + "CELLULAR_TWO_G_USER_CHOICE", + "CELLULAR_TWO_G_DISABLED" + ], + "enumDescriptions": [ + "Unspecified. Defaults to CELLULAR_TWO_G_USER_CHOICE.", + "The user is allowed to toggle cellular 2G on or off.", + "Cellular 2G is disabled. The user is not allowed to toggle cellular 2G on via settings. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 14." + ], + "type": "string" + }, + "ultraWidebandState": { + "description": "Controls the state of the ultra wideband setting and whether the user can toggle it on or off.", + "enum": [ + "ULTRA_WIDEBAND_STATE_UNSPECIFIED", + "ULTRA_WIDEBAND_USER_CHOICE", + "ULTRA_WIDEBAND_DISABLED" + ], + "enumDescriptions": [ + "Unspecified. Defaults to ULTRA_WIDEBAND_USER_CHOICE.", + "The user is allowed to toggle ultra wideband on or off.", + "Ultra wideband is disabled. The user is not allowed to toggle ultra wideband on via settings. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 14." + ], + "type": "string" + }, "wifiState": { "description": "Controls current state of Wi-Fi and if user can change its state.", "enum": [ diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index cca2a244c28..b78b2656dac 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -2445,6 +2445,34 @@ type DeviceRadioState struct { // API_LEVEL is reported if the Android version is less than 9. AirplaneModeState string `json:"airplaneModeState,omitempty"` + // CellularTwoGState: Controls whether cellular 2G setting can be + // toggled by the user or not. + // + // Possible values: + // "CELLULAR_TWO_G_STATE_UNSPECIFIED" - Unspecified. Defaults to + // CELLULAR_TWO_G_USER_CHOICE. + // "CELLULAR_TWO_G_USER_CHOICE" - The user is allowed to toggle + // cellular 2G on or off. + // "CELLULAR_TWO_G_DISABLED" - Cellular 2G is disabled. The user is + // not allowed to toggle cellular 2G on via settings. A + // nonComplianceDetail with API_LEVEL is reported if the Android version + // is less than 14. + CellularTwoGState string `json:"cellularTwoGState,omitempty"` + + // UltraWidebandState: Controls the state of the ultra wideband setting + // and whether the user can toggle it on or off. + // + // Possible values: + // "ULTRA_WIDEBAND_STATE_UNSPECIFIED" - Unspecified. Defaults to + // ULTRA_WIDEBAND_USER_CHOICE. + // "ULTRA_WIDEBAND_USER_CHOICE" - The user is allowed to toggle ultra + // wideband on or off. + // "ULTRA_WIDEBAND_DISABLED" - Ultra wideband is disabled. The user is + // not allowed to toggle ultra wideband on via settings. A + // nonComplianceDetail with API_LEVEL is reported if the Android version + // is less than 14. + UltraWidebandState string `json:"ultraWidebandState,omitempty"` + // WifiState: Controls current state of Wi-Fi and if user can change its // state. // diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index fbba2ac1b61..481d85e8848 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -23,6 +23,51 @@ "description": "Regional Endpoint", "endpointUrl": "https://artifactregistry.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://apt.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://docker.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://go.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://googet.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://kfp.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://maven.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://npm.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://python.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://yum.me-central2.rep.pkg.dev/", + "location": "me-central2" } ], "fullyEncodeReservedExpansion": true, @@ -360,7 +405,7 @@ "type": "string" }, "repositoryId": { - "description": "The repository id to use for this repository.", + "description": "Required. The repository id to use for this repository.", "location": "query", "type": "string" } @@ -1668,7 +1713,7 @@ } } }, - "revision": "20230913", + "revision": "20231002", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 413fd9b5f77..fc98e76c1fa 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -4669,8 +4669,8 @@ func (r *ProjectsLocationsRepositoriesService) Create(parent string, repository return c } -// RepositoryId sets the optional parameter "repositoryId": The -// repository id to use for this repository. +// RepositoryId sets the optional parameter "repositoryId": Required. +// The repository id to use for this repository. func (c *ProjectsLocationsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsRepositoriesCreateCall { c.urlParams_.Set("repositoryId", repositoryId) return c @@ -4783,7 +4783,7 @@ func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "repositoryId": { - // "description": "The repository id to use for this repository.", + // "description": "Required. The repository id to use for this repository.", // "location": "query", // "type": "string" // } diff --git a/artifactregistry/v1beta1/artifactregistry-api.json b/artifactregistry/v1beta1/artifactregistry-api.json index 8f652b9f475..62951b62c01 100644 --- a/artifactregistry/v1beta1/artifactregistry-api.json +++ b/artifactregistry/v1beta1/artifactregistry-api.json @@ -23,6 +23,51 @@ "description": "Regional Endpoint", "endpointUrl": "https://artifactregistry.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://apt.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://docker.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://go.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://googet.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://kfp.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://maven.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://npm.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://python.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://yum.me-central2.rep.pkg.dev/", + "location": "me-central2" } ], "fullyEncodeReservedExpansion": true, @@ -238,7 +283,7 @@ "type": "string" }, "repositoryId": { - "description": "The repository id to use for this repository.", + "description": "Required. The repository id to use for this repository.", "location": "query", "type": "string" } @@ -936,7 +981,7 @@ } } }, - "revision": "20230913", + "revision": "20231002", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index 57abad7f37a..214c9beb253 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -1816,8 +1816,8 @@ func (r *ProjectsLocationsRepositoriesService) Create(parent string, repository return c } -// RepositoryId sets the optional parameter "repositoryId": The -// repository id to use for this repository. +// RepositoryId sets the optional parameter "repositoryId": Required. +// The repository id to use for this repository. func (c *ProjectsLocationsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsRepositoriesCreateCall { c.urlParams_.Set("repositoryId", repositoryId) return c @@ -1930,7 +1930,7 @@ func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "repositoryId": { - // "description": "The repository id to use for this repository.", + // "description": "Required. The repository id to use for this repository.", // "location": "query", // "type": "string" // } diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index 98eee135dbe..898b8e00140 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -23,6 +23,51 @@ "description": "Regional Endpoint", "endpointUrl": "https://artifactregistry.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://apt.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://docker.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://go.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://googet.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://kfp.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://maven.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://npm.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://python.me-central2.rep.pkg.dev/", + "location": "me-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://yum.me-central2.rep.pkg.dev/", + "location": "me-central2" } ], "fullyEncodeReservedExpansion": true, @@ -300,7 +345,7 @@ "type": "string" }, "repositoryId": { - "description": "The repository id to use for this repository.", + "description": "Required. The repository id to use for this repository.", "location": "query", "type": "string" } @@ -1142,7 +1187,7 @@ } } }, - "revision": "20230913", + "revision": "20231002", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index 3e135e5de42..80f32784413 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -2754,8 +2754,8 @@ func (r *ProjectsLocationsRepositoriesService) Create(parent string, repository return c } -// RepositoryId sets the optional parameter "repositoryId": The -// repository id to use for this repository. +// RepositoryId sets the optional parameter "repositoryId": Required. +// The repository id to use for this repository. func (c *ProjectsLocationsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsRepositoriesCreateCall { c.urlParams_.Set("repositoryId", repositoryId) return c @@ -2868,7 +2868,7 @@ func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "repositoryId": { - // "description": "The repository id to use for this repository.", + // "description": "Required. The repository id to use for this repository.", // "location": "query", // "type": "string" // } diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index ce16fb648bb..b104093f081 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -139,6 +139,11 @@ "required": true, "type": "string" }, + "datasetView": { + "description": "Specifies the view that determines which dataset information is returned. By default, metadata and ACL information are returned. Allowed values: METADATA, ACL, FULL.", + "location": "query", + "type": "string" + }, "projectId": { "description": "Project ID of the requested dataset", "location": "path", @@ -1681,7 +1686,7 @@ } } }, - "revision": "20230812", + "revision": "20230925", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -1738,7 +1743,7 @@ "ANY_TYPE" ], "enumDescriptions": [ - "", + "Default value.", "The argument is a variable with fully specified type, which can be a struct or an array, but not a table.", "The argument is any type, including struct or array, but not a table. To be added: FIXED_TABLE, ANY_TABLE" ], @@ -1748,6 +1753,10 @@ "$ref": "StandardSqlDataType", "description": "Required unless argument_kind = ANY_TYPE." }, + "isAggregate": { + "description": "Optional. Whether the argument is an aggregate function parameter. Must be Unset for routine types other than AGGREGATE_FUNCTION. For AGGREGATE_FUNCTION, if set to false, it is equivalent to adding \"NOT AGGREGATE\" clause in DDL; Otherwise, it is equivalent to omitting \"NOT AGGREGATE\" clause in DDL.", + "type": "boolean" + }, "mode": { "description": "Optional. Specifies whether the argument is input or output. Can be set for procedures only.", "enum": [ @@ -1757,7 +1766,7 @@ "INOUT" ], "enumDescriptions": [ - "", + "Default value.", "The argument is input-only.", "The argument is output-only.", "The argument is both an input and an output." @@ -2679,7 +2688,7 @@ "description": "[Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence \"\\t\" to specify a tab separator. The default value is a comma (',').", "type": "string" }, - "null_marker": { + "nullMarker": { "description": "[Optional] An custom string that will represent a NULL value in CSV import data.", "type": "string" }, @@ -3830,7 +3839,7 @@ "STOPPED_EARLY" ], "enumDescriptions": [ - "", + "Default value.", "Scheduled but not started.", "Running state.", "The trial succeeded.", @@ -4000,6 +4009,10 @@ "description": "[Output-only] Opaque ID field of the job", "type": "string" }, + "jobCreationReason": { + "description": "[Output-only] If set, it provides the reason why a Job was created. If not set, it should be treated as the default: REQUESTED. This feature is not yet available. Jobs will always be created.", + "type": "any" + }, "jobReference": { "$ref": "JobReference", "description": "[Optional] Reference describing the unique-per-user name of the job." @@ -4699,7 +4712,7 @@ }, "ddlTargetDataset": { "$ref": "DatasetReference", - "description": "[Output only] The DDL target dataset. Present only for CREATE/ALTER/DROP SCHEMA queries." + "description": "[Output only] The DDL target dataset. Present only for CREATE/ALTER/DROP/UNDROP SCHEMA queries." }, "ddlTargetRoutine": { "$ref": "RoutineReference", @@ -4956,6 +4969,7 @@ "type": "any" }, "ListModelsResponse": { + "description": "Response format for a single page when listing BigQuery ML models.", "id": "ListModelsResponse", "properties": { "models": { @@ -4973,6 +4987,7 @@ "type": "object" }, "ListRoutinesResponse": { + "description": "Describes the format of a single result page when listing routines.", "id": "ListRoutinesResponse", "properties": { "nextPageToken": { @@ -5192,7 +5207,7 @@ "ONNX" ], "enumDescriptions": [ - "", + "Default value.", "Linear regression model.", "Logistic regression based classification model.", "K-means clustering model.", @@ -5559,6 +5574,10 @@ "description": "[Optional] If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false.", "type": "boolean" }, + "jobCreationMode": { + "description": "Optional. If not set, jobs are always required. If set, the query request will follow the behavior described JobCreationMode. This feature is not yet available. Jobs will always be created.", + "type": "string" + }, "kind": { "default": "bigquery#queryRequest", "description": "The resource type of the request.", @@ -5653,6 +5672,10 @@ "description": "Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available.", "type": "boolean" }, + "jobCreationReason": { + "description": "Optional. Only relevant when a job_reference is present in the response. If job_reference is not present it will always be unset. When job_reference is present, this field should be interpreted as follows: If set, it will provide the reason of why a Job was created. If not set, it should be treated as the default: REQUESTED. This feature is not yet available. Jobs will always be created.", + "type": "any" + }, "jobReference": { "$ref": "JobReference", "description": "Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults)." @@ -5915,13 +5938,13 @@ "type": "string" }, "dataGovernanceType": { - "description": "Optional. Data governance specific option, if the value is DATA_MASKING, the function will be validated as masking functions.", + "description": "Optional. If set to `DATA_MASKING`, the function is validated and made available as a masking function. For more information, see [Create custom masking routines](https://cloud.google.com/bigquery/docs/user-defined-functions#custom-mask).", "enum": [ "DATA_GOVERNANCE_TYPE_UNSPECIFIED", "DATA_MASKING" ], "enumDescriptions": [ - "Unspecified data governance type.", + "The data governance type is unspecified.", "The data governance type is data masking." ], "type": "string" @@ -5971,7 +5994,7 @@ "SCALA" ], "enumDescriptions": [ - "", + "Default value.", "SQL language.", "JavaScript language.", "Python language.", @@ -6012,7 +6035,7 @@ "AGGREGATE_FUNCTION" ], "enumDescriptions": [ - "", + "Default value.", "Non-built-in persistent scalar function.", "Stored procedure.", "Non-built-in persistent TVF.", @@ -6420,9 +6443,11 @@ "type": "object" }, "StandardSqlStructType": { + "description": "The representation of a SQL STRUCT type.", "id": "StandardSqlStructType", "properties": { "fields": { + "description": "Fields within the struct.", "items": { "$ref": "StandardSqlField" }, @@ -6640,6 +6665,13 @@ "description": "[Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.", "type": "boolean" }, + "resourceTags": { + "additionalProperties": { + "type": "string" + }, + "description": "[Optional] The tags associated with this table. Tag keys are globally unique. See additional information on [tags](https://cloud.google.com/iam/docs/tags-access-control#definitions). An object containing a list of \"key\": value pairs. The key is the namespaced friendly name of the tag key, e.g. \"12345/environment\" where 12345 is parent id. The value is the friendly short name of the tag value, e.g. \"production\".", + "type": "object" + }, "schema": { "$ref": "TableSchema", "description": "[Optional] Describes the schema of this table." @@ -7287,7 +7319,7 @@ "PER_MINUTE" ], "enumDescriptions": [ - "", + "Default value.", "Automatically inferred from timestamps.", "Yearly data.", "Quarterly data.", @@ -7319,7 +7351,7 @@ "AUTO_SPLIT" ], "enumDescriptions": [ - "", + "Default value.", "Splits data randomly.", "Splits data with the user provided tags.", "Splits data sequentially.", @@ -7340,7 +7372,7 @@ "COSINE" ], "enumDescriptions": [ - "", + "Default value.", "Eculidean distance.", "Cosine distance." ], @@ -7367,7 +7399,7 @@ "EXPLICIT" ], "enumDescriptions": [ - "", + "Default value.", "Use weighted-als for implicit feedback problems.", "Use nonweighted-als for explicit feedback problems." ], @@ -7815,7 +7847,7 @@ "CONSTANT" ], "enumDescriptions": [ - "", + "Default value.", "Use line search to determine learning rate.", "Use a constant learning rate." ], @@ -7829,7 +7861,7 @@ "MEAN_LOG_LOSS" ], "enumDescriptions": [ - "", + "Default value.", "Mean squared loss, used for linear regression.", "Mean log loss, used for logistic regression." ], @@ -7882,7 +7914,7 @@ "VERTEX_AI" ], "enumDescriptions": [ - "", + "Default value.", "Vertex AI." ], "type": "string" @@ -7928,7 +7960,7 @@ "NORMAL_EQUATION" ], "enumDescriptions": [ - "", + "Default value.", "Uses an iterative batch gradient descent algorithm.", "Uses a normal equation to solve linear regression problem." ], @@ -7952,7 +7984,7 @@ "AUTO" ], "enumDescriptions": [ - "", + "Default value.", "Full eigen-decoposition.", "Randomized SVD.", "Auto." diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 450c2561ff5..5cc3b3f30ad 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -372,7 +372,7 @@ type Argument struct { // ArgumentKind: Optional. Defaults to FIXED_TYPE. // // Possible values: - // "ARGUMENT_KIND_UNSPECIFIED" + // "ARGUMENT_KIND_UNSPECIFIED" - Default value. // "FIXED_TYPE" - The argument is a variable with fully specified // type, which can be a struct or an array, but not a table. // "ANY_TYPE" - The argument is any type, including struct or array, @@ -382,11 +382,18 @@ type Argument struct { // DataType: Required unless argument_kind = ANY_TYPE. DataType *StandardSqlDataType `json:"dataType,omitempty"` + // IsAggregate: Optional. Whether the argument is an aggregate function + // parameter. Must be Unset for routine types other than + // AGGREGATE_FUNCTION. For AGGREGATE_FUNCTION, if set to false, it is + // equivalent to adding "NOT AGGREGATE" clause in DDL; Otherwise, it is + // equivalent to omitting "NOT AGGREGATE" clause in DDL. + IsAggregate bool `json:"isAggregate,omitempty"` + // Mode: Optional. Specifies whether the argument is input or output. // Can be set for procedures only. // // Possible values: - // "MODE_UNSPECIFIED" + // "MODE_UNSPECIFIED" - Default value. // "IN" - The argument is input-only. // "OUT" - The argument is output-only. // "INOUT" - The argument is both an input and an output. @@ -2029,7 +2036,7 @@ type CsvOptions struct { // NullMarker: [Optional] An custom string that will represent a NULL // value in CSV import data. - NullMarker string `json:"null_marker,omitempty"` + NullMarker string `json:"nullMarker,omitempty"` // PreserveAsciiControlCharacters: [Optional] Preserves the embedded // ASCII control characters (the first 32 characters in the ASCII-table, @@ -3978,7 +3985,7 @@ type HparamTuningTrial struct { // Status: The status of the trial. // // Possible values: - // "TRIAL_STATUS_UNSPECIFIED" + // "TRIAL_STATUS_UNSPECIFIED" - Default value. // "NOT_STARTED" - Scheduled but not started. // "RUNNING" - Running state. // "SUCCEEDED" - The trial succeeded. @@ -4286,6 +4293,12 @@ type Job struct { // Id: [Output-only] Opaque ID field of the job Id string `json:"id,omitempty"` + // JobCreationReason: [Output-only] If set, it provides the reason why a + // Job was created. If not set, it should be treated as the default: + // REQUESTED. This feature is not yet available. Jobs will always be + // created. + JobCreationReason interface{} `json:"jobCreationReason,omitempty"` + // JobReference: [Optional] Reference describing the unique-per-user // name of the job. JobReference *JobReference `json:"jobReference,omitempty"` @@ -5327,7 +5340,7 @@ type JobStatistics2 struct { DdlOperationPerformed string `json:"ddlOperationPerformed,omitempty"` // DdlTargetDataset: [Output only] The DDL target dataset. Present only - // for CREATE/ALTER/DROP SCHEMA queries. + // for CREATE/ALTER/DROP/UNDROP SCHEMA queries. DdlTargetDataset *DatasetReference `json:"ddlTargetDataset,omitempty"` // DdlTargetRoutine: The DDL target routine. Present only for @@ -5693,6 +5706,8 @@ func (s *JsonOptions) MarshalJSON() ([]byte, error) { type JsonValue interface{} +// ListModelsResponse: Response format for a single page when listing +// BigQuery ML models. type ListModelsResponse struct { // Models: Models in the requested dataset. Only the following fields // are populated: model_reference, model_type, creation_time, @@ -5729,6 +5744,8 @@ func (s *ListModelsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListRoutinesResponse: Describes the format of a single result page +// when listing routines. type ListRoutinesResponse struct { // NextPageToken: A token to request the next page of results. NextPageToken string `json:"nextPageToken,omitempty"` @@ -6003,7 +6020,7 @@ type Model struct { // ModelType: Output only. Type of the model resource. // // Possible values: - // "MODEL_TYPE_UNSPECIFIED" + // "MODEL_TYPE_UNSPECIFIED" - Default value. // "LINEAR_REGRESSION" - Linear regression model. // "LOGISTIC_REGRESSION" - Logistic regression based classification // model. @@ -6697,6 +6714,12 @@ type QueryRequest struct { // invalid, an error returns. The default value is false. DryRun bool `json:"dryRun,omitempty"` + // JobCreationMode: Optional. If not set, jobs are always required. If + // set, the query request will follow the behavior described + // JobCreationMode. This feature is not yet available. Jobs will always + // be created. + JobCreationMode string `json:"jobCreationMode,omitempty"` + // Kind: The resource type of the request. Kind string `json:"kind,omitempty"` @@ -6836,6 +6859,15 @@ type QueryResponse struct { // totalRows will not be available. JobComplete bool `json:"jobComplete,omitempty"` + // JobCreationReason: Optional. Only relevant when a job_reference is + // present in the response. If job_reference is not present it will + // always be unset. When job_reference is present, this field should be + // interpreted as follows: If set, it will provide the reason of why a + // Job was created. If not set, it should be treated as the default: + // REQUESTED. This feature is not yet available. Jobs will always be + // created. + JobCreationReason interface{} `json:"jobCreationReason,omitempty"` + // JobReference: Reference to the Job that was created to run the query. // This field will be present even if the original request timed out, in // which case GetQueryResults can be used to read the results once the @@ -7272,13 +7304,14 @@ type Routine struct { // milliseconds since the epoch. CreationTime int64 `json:"creationTime,omitempty,string"` - // DataGovernanceType: Optional. Data governance specific option, if the - // value is DATA_MASKING, the function will be validated as masking - // functions. + // DataGovernanceType: Optional. If set to `DATA_MASKING`, the function + // is validated and made available as a masking function. For more + // information, see Create custom masking routines + // (https://cloud.google.com/bigquery/docs/user-defined-functions#custom-mask). // // Possible values: - // "DATA_GOVERNANCE_TYPE_UNSPECIFIED" - Unspecified data governance - // type. + // "DATA_GOVERNANCE_TYPE_UNSPECIFIED" - The data governance type is + // unspecified. // "DATA_MASKING" - The data governance type is data masking. DataGovernanceType string `json:"dataGovernanceType,omitempty"` @@ -7321,7 +7354,7 @@ type Routine struct { // field is absent, not set otherwise. // // Possible values: - // "LANGUAGE_UNSPECIFIED" + // "LANGUAGE_UNSPECIFIED" - Default value. // "SQL" - SQL language. // "JAVASCRIPT" - JavaScript language. // "PYTHON" - Python language. @@ -7368,7 +7401,7 @@ type Routine struct { // RoutineType: Required. The type of routine. // // Possible values: - // "ROUTINE_TYPE_UNSPECIFIED" + // "ROUTINE_TYPE_UNSPECIFIED" - Default value. // "SCALAR_FUNCTION" - Non-built-in persistent scalar function. // "PROCEDURE" - Stored procedure. // "TABLE_VALUED_FUNCTION" - Non-built-in persistent TVF. @@ -8066,7 +8099,9 @@ func (s *StandardSqlField) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StandardSqlStructType: The representation of a SQL STRUCT type. type StandardSqlStructType struct { + // Fields: Fields within the struct. Fields []*StandardSqlField `json:"fields,omitempty"` // ForceSendFields is a list of field names (e.g. "Fields") to @@ -8343,6 +8378,15 @@ type Table struct { // elimination to be specified. RequirePartitionFilter bool `json:"requirePartitionFilter,omitempty"` + // ResourceTags: [Optional] The tags associated with this table. Tag + // keys are globally unique. See additional information on tags + // (https://cloud.google.com/iam/docs/tags-access-control#definitions). + // An object containing a list of "key": value pairs. The key is the + // namespaced friendly name of the tag key, e.g. "12345/environment" + // where 12345 is parent id. The value is the friendly short name of the + // tag value, e.g. "production". + ResourceTags map[string]string `json:"resourceTags,omitempty"` + // Schema: [Optional] Describes the schema of this table. Schema *TableSchema `json:"schema,omitempty"` @@ -9417,7 +9461,7 @@ type TrainingOptions struct { // DataFrequency: The data frequency of a time series. // // Possible values: - // "DATA_FREQUENCY_UNSPECIFIED" + // "DATA_FREQUENCY_UNSPECIFIED" - Default value. // "AUTO_FREQUENCY" - Automatically inferred from timestamps. // "YEARLY" - Yearly data. // "QUARTERLY" - Quarterly data. @@ -9449,7 +9493,7 @@ type TrainingOptions struct { // e.g. RANDOM. // // Possible values: - // "DATA_SPLIT_METHOD_UNSPECIFIED" + // "DATA_SPLIT_METHOD_UNSPECIFIED" - Default value. // "RANDOM" - Splits data randomly. // "CUSTOM" - Splits data with the user provided tags. // "SEQUENTIAL" - Splits data sequentially. @@ -9465,7 +9509,7 @@ type TrainingOptions struct { // DistanceType: Distance type for clustering models. // // Possible values: - // "DISTANCE_TYPE_UNSPECIFIED" + // "DISTANCE_TYPE_UNSPECIFIED" - Default value. // "EUCLIDEAN" - Eculidean distance. // "COSINE" - Cosine distance. DistanceType string `json:"distanceType,omitempty"` @@ -9486,7 +9530,7 @@ type TrainingOptions struct { // matrix factorization. // // Possible values: - // "FEEDBACK_TYPE_UNSPECIFIED" + // "FEEDBACK_TYPE_UNSPECIFIED" - Default value. // "IMPLICIT" - Use weighted-als for implicit feedback problems. // "EXPLICIT" - Use nonweighted-als for explicit feedback problems. FeedbackType string `json:"feedbackType,omitempty"` @@ -9757,7 +9801,7 @@ type TrainingOptions struct { // current iteration. // // Possible values: - // "LEARN_RATE_STRATEGY_UNSPECIFIED" + // "LEARN_RATE_STRATEGY_UNSPECIFIED" - Default value. // "LINE_SEARCH" - Use line search to determine learning rate. // "CONSTANT" - Use a constant learning rate. LearnRateStrategy string `json:"learnRateStrategy,omitempty"` @@ -9765,7 +9809,7 @@ type TrainingOptions struct { // LossType: Type of loss function used during training run. // // Possible values: - // "LOSS_TYPE_UNSPECIFIED" + // "LOSS_TYPE_UNSPECIFIED" - Default value. // "MEAN_SQUARED_LOSS" - Mean squared loss, used for linear // regression. // "MEAN_LOG_LOSS" - Mean log loss, used for logistic regression. @@ -9814,7 +9858,7 @@ type TrainingOptions struct { // ModelRegistry: The model registry. // // Possible values: - // "MODEL_REGISTRY_UNSPECIFIED" + // "MODEL_REGISTRY_UNSPECIFIED" - Default value. // "VERTEX_AI" - Vertex AI. ModelRegistry string `json:"modelRegistry,omitempty"` @@ -9848,7 +9892,7 @@ type TrainingOptions struct { // regression models. // // Possible values: - // "OPTIMIZATION_STRATEGY_UNSPECIFIED" + // "OPTIMIZATION_STRATEGY_UNSPECIFIED" - Default value. // "BATCH_GRADIENT_DESCENT" - Uses an iterative batch gradient descent // algorithm. // "NORMAL_EQUATION" - Uses a normal equation to solve linear @@ -9865,7 +9909,7 @@ type TrainingOptions struct { // PcaSolver: The solver for PCA. // // Possible values: - // "UNSPECIFIED" + // "UNSPECIFIED" - Default value. // "FULL" - Full eigen-decoposition. // "RANDOMIZED" - Randomized SVD. // "AUTO" - Auto. @@ -10395,6 +10439,15 @@ func (r *DatasetsService) Get(projectId string, datasetId string) *DatasetsGetCa return c } +// DatasetView sets the optional parameter "datasetView": Specifies the +// view that determines which dataset information is returned. By +// default, metadata and ACL information are returned. Allowed values: +// METADATA, ACL, FULL. +func (c *DatasetsGetCall) DatasetView(datasetView string) *DatasetsGetCall { + c.urlParams_.Set("datasetView", datasetView) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -10509,6 +10562,11 @@ func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { // "required": true, // "type": "string" // }, + // "datasetView": { + // "description": "Specifies the view that determines which dataset information is returned. By default, metadata and ACL information are returned. Allowed values: METADATA, ACL, FULL.", + // "location": "query", + // "type": "string" + // }, // "projectId": { // "description": "Project ID of the requested dataset", // "location": "path", diff --git a/binaryauthorization/v1/binaryauthorization-api.json b/binaryauthorization/v1/binaryauthorization-api.json index 550ccee1796..1cf61e77021 100644 --- a/binaryauthorization/v1/binaryauthorization-api.json +++ b/binaryauthorization/v1/binaryauthorization-api.json @@ -706,7 +706,7 @@ } } }, - "revision": "20230901", + "revision": "20230929", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -1105,6 +1105,10 @@ "description": "A public key in the PkixPublicKey [format](https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of this type are typically textually encoded using the PEM format.", "id": "PkixPublicKey", "properties": { + "keyId": { + "description": "Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them, and that ID must match the contents of this field exactly. This may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If `key_id` is left blank and this `PkixPublicKey` is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this `PkixPublicKey` is used in the context of a wrapper that has its own notion of key ID (e.g. `AttestorPublicKey`), then this field can either: * Match that value exactly. * Or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.", + "type": "string" + }, "publicKeyPem": { "description": "A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13", "type": "string" diff --git a/binaryauthorization/v1/binaryauthorization-gen.go b/binaryauthorization/v1/binaryauthorization-gen.go index ed42c671495..14693a3e879 100644 --- a/binaryauthorization/v1/binaryauthorization-gen.go +++ b/binaryauthorization/v1/binaryauthorization-gen.go @@ -1151,6 +1151,20 @@ func (s *ListPlatformPoliciesResponse) MarshalJSON() ([]byte, error) { // (https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of // this type are typically textually encoded using the PEM format. type PkixPublicKey struct { + // KeyId: Optional. The ID of this public key. Signatures verified by + // Binary Authorization must include the ID of the public key that can + // be used to verify them, and that ID must match the contents of this + // field exactly. This may be explicitly provided by the caller, but it + // MUST be a valid RFC3986 URI. If `key_id` is left blank and this + // `PkixPublicKey` is not used in the context of a wrapper (see next + // paragraph), a default key ID will be computed based on the digest of + // the DER encoding of the public key. If this `PkixPublicKey` is used + // in the context of a wrapper that has its own notion of key ID (e.g. + // `AttestorPublicKey`), then this field can either: * Match that value + // exactly. * Or be left blank, in which case it behaves exactly as + // though it is equal to that wrapper value. + KeyId string `json:"keyId,omitempty"` + // PublicKeyPem: A PEM-encoded public key, as described in // https://tools.ietf.org/html/rfc7468#section-13 PublicKeyPem string `json:"publicKeyPem,omitempty"` @@ -1201,7 +1215,7 @@ type PkixPublicKey struct { // digest. SignatureAlgorithm string `json:"signatureAlgorithm,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicKeyPem") to + // ForceSendFields is a list of field names (e.g. "KeyId") 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 @@ -1209,10 +1223,10 @@ type PkixPublicKey struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicKeyPem") 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. "KeyId") 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:"-"` diff --git a/cloudtasks/v2beta3/cloudtasks-api.json b/cloudtasks/v2beta3/cloudtasks-api.json index 8172e624e1e..17d6d317d82 100644 --- a/cloudtasks/v2beta3/cloudtasks-api.json +++ b/cloudtasks/v2beta3/cloudtasks-api.json @@ -134,6 +134,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getCmekConfig": { + "description": "Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured.", + "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/cmekConfig", + "httpMethod": "GET", + "id": "cloudtasks.projects.locations.getCmekConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The config resource name. For example: projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cmekConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2beta3/{+name}", + "response": { + "$ref": "CmekConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists information about the supported locations for this service.", "flatPath": "v2beta3/projects/{projectsId}/locations", @@ -174,6 +199,44 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateCmekConfig": { + "description": "Creates or Updates a CMEK config. Updates the Customer Managed Encryption Key assotiated with the Cloud Tasks location (Creates if the key does not already exist). All new tasks created in the location will be encrypted at-rest with the KMS-key provided in the config.", + "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/cmekConfig", + "httpMethod": "PATCH", + "id": "cloudtasks.projects.locations.updateCmekConfig", + "parameterOrder": [ + "projectsId", + "locationsId" + ], + "parameters": { + "locationsId": { + "location": "path", + "required": true, + "type": "string" + }, + "projectsId": { + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "List of fields to be updated in this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta3/projects/{projectsId}/locations/{locationsId}/cmekConfig", + "request": { + "$ref": "CmekConfig" + }, + "response": { + "$ref": "CmekConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -732,7 +795,7 @@ } } }, - "revision": "20230906", + "revision": "20230927", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpQueue": { @@ -890,6 +953,22 @@ }, "type": "object" }, + "CmekConfig": { + "description": "CMEK, or Customer Managed Encryption Keys, enables GCP products to put control over encryption and key management in their customer’s hands.", + "id": "CmekConfig", + "properties": { + "kmsKey": { + "description": "Resource name of the Cloud KMS key, of the form `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID`, that will be used to encrypt the Queues \u0026 Tasks in the region. Setting this as blank will turn off CMEK encryption.", + "type": "string" + }, + "name": { + "description": "Output only. The config resource name which includes the project and location and must end in 'cmekConfig', in the format projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig`", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "CreateTaskRequest": { "description": "Request message for CreateTask.", "id": "CreateTaskRequest", diff --git a/cloudtasks/v2beta3/cloudtasks-gen.go b/cloudtasks/v2beta3/cloudtasks-gen.go index 8e7c545ccd7..0fd6cb49be7 100644 --- a/cloudtasks/v2beta3/cloudtasks-gen.go +++ b/cloudtasks/v2beta3/cloudtasks-gen.go @@ -626,6 +626,48 @@ func (s *BufferTaskResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CmekConfig: CMEK, or Customer Managed Encryption Keys, enables GCP +// products to put control over encryption and key management in their +// customer’s hands. +type CmekConfig struct { + // KmsKey: Resource name of the Cloud KMS key, of the form + // `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/crypto + // Keys/KEY_ID`, that will be used to encrypt the Queues & Tasks in the + // region. Setting this as blank will turn off CMEK encryption. + KmsKey string `json:"kmsKey,omitempty"` + + // Name: Output only. The config resource name which includes the + // project and location and must end in 'cmekConfig', in the format + // projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig` + 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. "KmsKey") 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. "KmsKey") 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 *CmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod CmekConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateTaskRequest: Request message for CreateTask. type CreateTaskRequest struct { // ResponseView: The response_view specifies which subset of the Task @@ -2609,6 +2651,155 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } +// method id "cloudtasks.projects.locations.getCmekConfig": + +type ProjectsLocationsGetCmekConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCmekConfig: Gets the CMEK config. Gets the Customer Managed +// Encryption Key configured with the Cloud Tasks lcoation. By default +// there is no kms_key configured. +// +// - name: The config resource name. For example: +// projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig`. +func (r *ProjectsLocationsService) GetCmekConfig(name string) *ProjectsLocationsGetCmekConfigCall { + c := &ProjectsLocationsGetCmekConfigCall{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 *ProjectsLocationsGetCmekConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCmekConfigCall { + 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 *ProjectsLocationsGetCmekConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCmekConfigCall { + 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 *ProjectsLocationsGetCmekConfigCall) Context(ctx context.Context) *ProjectsLocationsGetCmekConfigCall { + 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 *ProjectsLocationsGetCmekConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCmekConfigCall) 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, "v2beta3/{+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 "cloudtasks.projects.locations.getCmekConfig" call. +// Exactly one of *CmekConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CmekConfig.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 *ProjectsLocationsGetCmekConfigCall) Do(opts ...googleapi.CallOption) (*CmekConfig, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &CmekConfig{ + 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": "Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured.", + // "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/cmekConfig", + // "httpMethod": "GET", + // "id": "cloudtasks.projects.locations.getCmekConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The config resource name. For example: projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/cmekConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta3/{+name}", + // "response": { + // "$ref": "CmekConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "cloudtasks.projects.locations.list": type ProjectsLocationsListCall struct { @@ -2818,6 +3009,173 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +// method id "cloudtasks.projects.locations.updateCmekConfig": + +type ProjectsLocationsUpdateCmekConfigCall struct { + s *Service + projectsId string + locationsId string + cmekconfig *CmekConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateCmekConfig: Creates or Updates a CMEK config. Updates the +// Customer Managed Encryption Key assotiated with the Cloud Tasks +// location (Creates if the key does not already exist). All new tasks +// created in the location will be encrypted at-rest with the KMS-key +// provided in the config. +// +// - locationsId: . +// - projectsId: . +func (r *ProjectsLocationsService) UpdateCmekConfig(projectsId string, locationsId string, cmekconfig *CmekConfig) *ProjectsLocationsUpdateCmekConfigCall { + c := &ProjectsLocationsUpdateCmekConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectsId = projectsId + c.locationsId = locationsId + c.cmekconfig = cmekconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields +// to be updated in this request. +func (c *ProjectsLocationsUpdateCmekConfigCall) UpdateMask(updateMask string) *ProjectsLocationsUpdateCmekConfigCall { + 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 *ProjectsLocationsUpdateCmekConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateCmekConfigCall { + 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 *ProjectsLocationsUpdateCmekConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateCmekConfigCall { + 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 *ProjectsLocationsUpdateCmekConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUpdateCmekConfigCall) 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.cmekconfig) + 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, "v2beta3/projects/{projectsId}/locations/{locationsId}/cmekConfig") + 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{ + "projectsId": c.projectsId, + "locationsId": c.locationsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.updateCmekConfig" call. +// Exactly one of *CmekConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CmekConfig.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 *ProjectsLocationsUpdateCmekConfigCall) Do(opts ...googleapi.CallOption) (*CmekConfig, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &CmekConfig{ + 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": "Creates or Updates a CMEK config. Updates the Customer Managed Encryption Key assotiated with the Cloud Tasks location (Creates if the key does not already exist). All new tasks created in the location will be encrypted at-rest with the KMS-key provided in the config.", + // "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/cmekConfig", + // "httpMethod": "PATCH", + // "id": "cloudtasks.projects.locations.updateCmekConfig", + // "parameterOrder": [ + // "projectsId", + // "locationsId" + // ], + // "parameters": { + // "locationsId": { + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectsId": { + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "List of fields to be updated in this request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta3/projects/{projectsId}/locations/{locationsId}/cmekConfig", + // "request": { + // "$ref": "CmekConfig" + // }, + // "response": { + // "$ref": "CmekConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "cloudtasks.projects.locations.queues.create": type ProjectsLocationsQueuesCreateCall struct { diff --git a/container/v1/container-api.json b/container/v1/container-api.json index bf9c407b552..53dfde6027a 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20230810", + "revision": "20230919", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3312,6 +3312,10 @@ "$ref": "NotificationConfig", "description": "Notification configuration of the cluster." }, + "parentProductConfig": { + "$ref": "ParentProductConfig", + "description": "The configuration of the parent product of the cluster. This field is used by Google internal products that are built on top of the GKE cluster and take the ownership of the cluster." + }, "privateClusterConfig": { "$ref": "PrivateClusterConfig", "description": "Configuration for private cluster." @@ -3621,6 +3625,10 @@ "$ref": "NotificationConfig", "description": "The desired notification configuration." }, + "desiredParentProductConfig": { + "$ref": "ParentProductConfig", + "description": "The desired parent product config for the cluster." + }, "desiredPrivateClusterConfig": { "$ref": "PrivateClusterConfig", "description": "The desired private cluster configuration." @@ -3939,11 +3947,11 @@ "type": "object" }, "EphemeralStorageLocalSsdConfig": { - "description": "EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral storage using Local SSD.", + "description": "EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral storage using Local SSDs.", "id": "EphemeralStorageLocalSsdConfig", "properties": { "localSsdCount": { - "description": "Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size. If zero, it means to disable using local SSDs as ephemeral storage. The limit for this value is dependent upon the maximum number of disks available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information.", + "description": "Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. A zero (or unset) value has different meanings depending on machine type being used: 1. For pre-Gen3 machines, which support flexible numbers of local ssds, zero (or unset) means to disable using local SSDs as ephemeral storage. The limit for this value is dependent upon the maximum number of disk available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information. 2. For Gen3 machines which dictate a specific number of local ssds, zero (or unset) means to use the default number of local ssds that goes with that machine type. For example, for a c3-standard-8-lssd machine, 2 local ssds would be provisioned. For c3-standard-8 (which doesn't support local ssds), 0 will be provisioned. See https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds for more info.", "format": "int32", "type": "integer" } @@ -4062,13 +4070,11 @@ "enum": [ "CHANNEL_UNSPECIFIED", "CHANNEL_DISABLED", - "CHANNEL_EXPERIMENTAL", "CHANNEL_STANDARD" ], "enumDescriptions": [ "Default value.", "Gateway API support is disabled", - "Gateway API support is enabled, experimental CRDs are installed", "Gateway API support is enabled, standard CRDs are installed" ], "type": "string" @@ -4575,11 +4581,11 @@ "type": "object" }, "LocalNvmeSsdBlockConfig": { - "description": "LocalNvmeSsdBlockConfig contains configuration for using raw-block local NVMe SSD.", + "description": "LocalNvmeSsdBlockConfig contains configuration for using raw-block local NVMe SSDs", "id": "LocalNvmeSsdBlockConfig", "properties": { "localSsdCount": { - "description": "The number of raw-block local NVMe SSD disks to be attached to the node. Each local SSD is 375 GB in size. If zero, it means no raw-block local NVMe SSD disks to be attached to the node. The limit for this value is dependent upon the maximum number of disks available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information.", + "description": "Number of local NVMe SSDs to use. The limit for this value is dependent upon the maximum number of disk available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information. A zero (or unset) value has different meanings depending on machine type being used: 1. For pre-Gen3 machines, which support flexible numbers of local ssds, zero (or unset) means to disable using local SSDs as ephemeral storage. 2. For Gen3 machines which dictate a specific number of local ssds, zero (or unset) means to use the default number of local ssds that goes with that machine type. For example, for a c3-standard-8-lssd machine, 2 local ssds would be provisioned. For c3-standard-8 (which doesn't support local ssds), 0 will be provisioned. See https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds for more info.", "format": "int32", "type": "integer" } @@ -5804,6 +5810,24 @@ }, "type": "object" }, + "ParentProductConfig": { + "description": "ParentProductConfig is the configuration of the parent product of the cluster. This field is used by Google internal products that are built on top of a GKE cluster and take the ownership of the cluster.", + "id": "ParentProductConfig", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels contain the configuration of the parent product.", + "type": "object" + }, + "productName": { + "description": "Name of the parent product associated with the cluster.", + "type": "string" + } + }, + "type": "object" + }, "PlacementPolicy": { "description": "PlacementPolicy defines the placement policy used by the node pool.", "id": "PlacementPolicy", diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index a10430b2a70..ac47c66b452 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -1499,6 +1499,12 @@ type Cluster struct { // NotificationConfig: Notification configuration of the cluster. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` + // ParentProductConfig: The configuration of the parent product of the + // cluster. This field is used by Google internal products that are + // built on top of the GKE cluster and take the ownership of the + // cluster. + ParentProductConfig *ParentProductConfig `json:"parentProductConfig,omitempty"` + // PrivateClusterConfig: Configuration for private cluster. PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` @@ -1889,6 +1895,10 @@ type ClusterUpdate struct { // DesiredNotificationConfig: The desired notification configuration. DesiredNotificationConfig *NotificationConfig `json:"desiredNotificationConfig,omitempty"` + // DesiredParentProductConfig: The desired parent product config for the + // cluster. + DesiredParentProductConfig *ParentProductConfig `json:"desiredParentProductConfig,omitempty"` + // DesiredPrivateClusterConfig: The desired private cluster // configuration. DesiredPrivateClusterConfig *PrivateClusterConfig `json:"desiredPrivateClusterConfig,omitempty"` @@ -2451,15 +2461,24 @@ type Empty struct { // EphemeralStorageLocalSsdConfig: EphemeralStorageLocalSsdConfig // contains configuration for the node ephemeral storage using Local -// SSD. +// SSDs. type EphemeralStorageLocalSsdConfig struct { // LocalSsdCount: Number of local SSDs to use to back ephemeral storage. - // Uses NVMe interfaces. Each local SSD is 375 GB in size. If zero, it - // means to disable using local SSDs as ephemeral storage. The limit for - // this value is dependent upon the maximum number of disks available on - // a machine per zone. See: + // Uses NVMe interfaces. A zero (or unset) value has different meanings + // depending on machine type being used: 1. For pre-Gen3 machines, which + // support flexible numbers of local ssds, zero (or unset) means to + // disable using local SSDs as ephemeral storage. The limit for this + // value is dependent upon the maximum number of disk available on a + // machine per zone. See: // https://cloud.google.com/compute/docs/disks/local-ssd for more - // information. + // information. 2. For Gen3 machines which dictate a specific number of + // local ssds, zero (or unset) means to use the default number of local + // ssds that goes with that machine type. For example, for a + // c3-standard-8-lssd machine, 2 local ssds would be provisioned. For + // c3-standard-8 (which doesn't support local ssds), 0 will be + // provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. LocalSsdCount int64 `json:"localSsdCount,omitempty"` // ForceSendFields is a list of field names (e.g. "LocalSsdCount") to @@ -2675,8 +2694,6 @@ type GatewayAPIConfig struct { // Possible values: // "CHANNEL_UNSPECIFIED" - Default value. // "CHANNEL_DISABLED" - Gateway API support is disabled - // "CHANNEL_EXPERIMENTAL" - Gateway API support is enabled, - // experimental CRDs are installed // "CHANNEL_STANDARD" - Gateway API support is enabled, standard CRDs // are installed Channel string `json:"channel,omitempty"` @@ -3661,15 +3678,23 @@ func (s *ListUsableSubnetworksResponse) MarshalJSON() ([]byte, error) { } // LocalNvmeSsdBlockConfig: LocalNvmeSsdBlockConfig contains -// configuration for using raw-block local NVMe SSD. +// configuration for using raw-block local NVMe SSDs type LocalNvmeSsdBlockConfig struct { - // LocalSsdCount: The number of raw-block local NVMe SSD disks to be - // attached to the node. Each local SSD is 375 GB in size. If zero, it - // means no raw-block local NVMe SSD disks to be attached to the node. - // The limit for this value is dependent upon the maximum number of - // disks available on a machine per zone. See: + // LocalSsdCount: Number of local NVMe SSDs to use. The limit for this + // value is dependent upon the maximum number of disk available on a + // machine per zone. See: // https://cloud.google.com/compute/docs/disks/local-ssd for more - // information. + // information. A zero (or unset) value has different meanings depending + // on machine type being used: 1. For pre-Gen3 machines, which support + // flexible numbers of local ssds, zero (or unset) means to disable + // using local SSDs as ephemeral storage. 2. For Gen3 machines which + // dictate a specific number of local ssds, zero (or unset) means to use + // the default number of local ssds that goes with that machine type. + // For example, for a c3-standard-8-lssd machine, 2 local ssds would be + // provisioned. For c3-standard-8 (which doesn't support local ssds), 0 + // will be provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. LocalSsdCount int64 `json:"localSsdCount,omitempty"` // ForceSendFields is a list of field names (e.g. "LocalSsdCount") to @@ -5642,6 +5667,40 @@ func (s *OperationProgress) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ParentProductConfig: ParentProductConfig is the configuration of the +// parent product of the cluster. This field is used by Google internal +// products that are built on top of a GKE cluster and take the +// ownership of the cluster. +type ParentProductConfig struct { + // Labels: Labels contain the configuration of the parent product. + Labels map[string]string `json:"labels,omitempty"` + + // ProductName: Name of the parent product associated with the cluster. + ProductName string `json:"productName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Labels") 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. "Labels") 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 *ParentProductConfig) MarshalJSON() ([]byte, error) { + type NoMethod ParentProductConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PlacementPolicy: PlacementPolicy defines the placement policy used by // the node pool. type PlacementPolicy struct { diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 266dc54175f..37f19d9f780 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -2174,7 +2174,7 @@ ] }, "requestreview": { - "description": "Requests a review of free listings in a specific region.", + "description": "Requests a review of free listings in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review.", "flatPath": "{merchantId}/freelistingsprogram/requestreview", "httpMethod": "POST", "id": "content.freelistingsprogram.requestreview", @@ -6461,7 +6461,7 @@ ] }, "requestreview": { - "description": "Requests a review of Shopping ads in a specific region.", + "description": "Requests a review of Shopping ads in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review.", "flatPath": "{merchantId}/shoppingadsprogram/requestreview", "httpMethod": "POST", "id": "content.shoppingadsprogram.requestreview", @@ -6488,7 +6488,7 @@ } } }, - "revision": "20231001", + "revision": "20231003", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index c46fd91b751..1fced13a756 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -31256,7 +31256,8 @@ type FreelistingsprogramRequestreviewCall struct { } // Requestreview: Requests a review of free listings in a specific -// region. +// region. This method deprecated. Use the `MerchantSupportService` to +// view product and account issues and request a review. // // - merchantId: The ID of the account. func (r *FreelistingsprogramService) Requestreview(merchantId int64, requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest) *FreelistingsprogramRequestreviewCall { @@ -31332,7 +31333,7 @@ func (c *FreelistingsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) } return nil // { - // "description": "Requests a review of free listings in a specific region.", + // "description": "Requests a review of free listings in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review.", // "flatPath": "{merchantId}/freelistingsprogram/requestreview", // "httpMethod": "POST", // "id": "content.freelistingsprogram.requestreview", @@ -50698,7 +50699,8 @@ type ShoppingadsprogramRequestreviewCall struct { } // Requestreview: Requests a review of Shopping ads in a specific -// region. +// region. This method deprecated. Use the `MerchantSupportService` to +// view product and account issues and request a review. // // - merchantId: The ID of the account. func (r *ShoppingadsprogramService) Requestreview(merchantId int64, requestreviewshoppingadsrequest *RequestReviewShoppingAdsRequest) *ShoppingadsprogramRequestreviewCall { @@ -50774,7 +50776,7 @@ func (c *ShoppingadsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) e } return nil // { - // "description": "Requests a review of Shopping ads in a specific region.", + // "description": "Requests a review of Shopping ads in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review.", // "flatPath": "{merchantId}/shoppingadsprogram/requestreview", // "httpMethod": "POST", // "id": "content.shoppingadsprogram.requestreview", diff --git a/contentwarehouse/v1/contentwarehouse-api.json b/contentwarehouse/v1/contentwarehouse-api.json index c6b1fc9f958..6b2715dcf66 100644 --- a/contentwarehouse/v1/contentwarehouse-api.json +++ b/contentwarehouse/v1/contentwarehouse-api.json @@ -1156,7 +1156,7 @@ } } }, - "revision": "20230925", + "revision": "20230929", "rootUrl": "https://contentwarehouse.googleapis.com/", "schemas": { "AbuseiamAbuseType": { @@ -3728,7 +3728,8 @@ "CLOUDCONNECT_AFFINITY", "PERSONAL_AGENT_AFFINITY", "MOBILE_HARNESS_AFFINITY", - "LOOKER_STUDIO_PRO_AFFINITY" + "LOOKER_STUDIO_PRO_AFFINITY", + "SUPPORT_CLASSIFICATION_UI_AFFINITY" ], "enumDeprecated": [ false, @@ -3997,6 +3998,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -4266,6 +4268,7 @@ "", "", "", + "", "" ], "type": "string" @@ -7774,7 +7777,7 @@ "type": "array" }, "encodedContainerId": { - "description": "The encoded id of the data source. The id is only unique within a single container type. This field correlates to person.metadata.identity_info.source_id.id. This field may not be populated in some special cases, where the id is not visible to the querying user. e.g. ListAutocompletions with full phone number query.", + "description": "The encoded id of the data source. The id is only unique within a single container type. This field correlates to person.metadata.identity_info.source_id.id. This field may not be populated in some special cases, where the id is not visible to the querying user. e.g. ListAutocompletions with full phone number query. For value format, see google3/social/graph/api/proto/main_merged_person.proto?q=symbol:SourceIdentity.id", "type": "string" }, "fieldAcl": { @@ -8687,7 +8690,7 @@ "type": "string" }, "id": { - "description": "The base64 serialized social.graph.peopleapi.proto.internal.RawDeviceContactId. This id should be used to correlate to field.metadata.encoded_container_id when the field.metadata.container_type is RAW_DEVICE_CONTACT The id also correlates to person.metadata.identity_info.source_id.id.", + "description": "The base64 serialized social.graph.peopleapi.proto.internal.RawDeviceContactId. This id should be used to correlate to field.metadata.encoded_container_id when the field.metadata.container_type is RAW_DEVICE_CONTACT The id also correlates to person.metadata.identity_info.source_id.id. For value format, see google3/social/graph/api/proto/main_merged_person.proto?q=symbol:SourceIdentity.id", "type": "string" }, "photoType": { @@ -10483,7 +10486,7 @@ "BEDTIME_MODE", "THEATER_MODE", "TOUCH_LOCK", - "ASSISTANT_PRESS_AND_HOLD", + "PRESS_AND_HOLD", "WATCH_FACE", "NOTIFICATION_ANNOUNCEMENT" ], @@ -22017,7 +22020,7 @@ "type": "object" }, "AssistantPrefulfillmentRankerPrefulfillmentSignals": { - "description": "Signals to be used by the Prefulfillment Ranker. Derived from the ParsingSignals and GroundingSignals carried by the FunctionCall. LINT.IfChange Next ID: 65", + "description": "Signals to be used by the Prefulfillment Ranker. Derived from the ParsingSignals and GroundingSignals carried by the FunctionCall. LINT.IfChange Next ID: 66", "id": "AssistantPrefulfillmentRankerPrefulfillmentSignals", "properties": { "bindingSetAuis": { @@ -22188,6 +22191,10 @@ "description": "Whether this intent was generated by Sage.", "type": "boolean" }, + "isScoreBasedIntent": { + "description": "Whether this intent is a score-based intent, relying on PFR for scoring and pruning to the top intent.", + "type": "boolean" + }, "isTvmIntent": { "description": "Whether the intent is a media object tvm intent.", "type": "boolean" @@ -22333,29 +22340,11 @@ "enum": [ "RANKER_NAME_UNSPECIFIED", "RANKER_NAME_GROUNDING_RANKER", - "RANKER_NAME_DEFER_TO_VERTICAL_SCORES", - "RANKER_NAME_GROUNDING_RANKER_V2", - "RANKER_NAME_GROUNDING_RANKER_MEDIA_EXP", - "RANKER_NAME_GROUNDING_RANKER_COMMS_EXP", - "RANKER_NAME_CONSOLIDATED_PFR_HGR", - "RANKER_NAME_CONSOLIDATED_PFR_HGR_V2_COMMS_CALIBRATED", - "RANKER_NAME_CONSOLIDATED_PFR_HGR_V2_COMMS_CALIBRATED_V2", - "RANKER_NAME_GROUNDING_RANKER_COMMS_EXP_CALIBRATED_V2", - "RANKER_NAME_CONSOLIDATED_PFR_HGR_PODCAST", "RANKER_NAME_GROUNDING_RANKER_V4" ], "enumDescriptions": [ "Default value, when there is no ranker specified.", "Name for HGR v1 model.", - "Used for deferring to confidence scores produced by upstream GPs instead of using HGR's scorer.", - "Name for HGR v2 model.", - "Name for experimental HGR model for Media, build on top of HGR v2.", - "Name for experimental HGR model for Comms.", - "Name for consolidated PFR and HGR ranker.", - "Name for consolidated PFR, HGRv2 and comms ranker.", - "Name for consolidated PFR, HGRv2 and comms ranker v2.", - "Name for experimental calibrated HGR model for Comms V2.", - "Name for HGR ranker for podcast based on RANKER_NAME_CONSOLIDATED_PFR_HGR_V2.", "Name for HGR V4 model, the model version that's targeted for Slow media launches." ], "type": "string" @@ -37241,7 +37230,7 @@ }, "disputedArea": { "$ref": "GeostoreDisputedAreaProto", - "description": "RESERVED" + "description": "Represents information about disputed areas. Only TYPE_DISPUTED_AREA features should have the field set." }, "doodle": { "$ref": "GeostoreDoodleProto", @@ -37287,8 +37276,7 @@ "type": "number" }, "geopolitical": { - "$ref": "GeostoreGeopoliticalProto", - "description": "RESERVED" + "$ref": "GeostoreGeopoliticalProto" }, "geopoliticalGeometry": { "$ref": "GeostoreGeopoliticalGeometryProto", @@ -38772,7 +38760,7 @@ "properties": { "curvature": { "$ref": "GeostoreCurvatureProto", - "description": "RESERVED" + "description": "Curvature of the flowline. Note that, curvature can be present even if the flowline doesn't have a track. In which case, curvature will be derived from the segment polyline." }, "track": { "$ref": "GeostoreTrackProto" @@ -44887,7 +44875,7 @@ "description": "Many political regions have a conceptual center (capitals of a country or a top-level division are examples). If set, the target feature must be a TYPE_LOCALITY feature." }, "claim": { - "description": "RESERVED", + "description": "Feature IDs of the features claimed by this feature's government that are not necessarily included in the feature's geometry.", "items": { "$ref": "GeostoreFeatureIdProto" }, @@ -52671,7 +52659,7 @@ "BEDTIME_MODE", "THEATER_MODE", "TOUCH_LOCK", - "ASSISTANT_PRESS_AND_HOLD", + "PRESS_AND_HOLD", "WATCH_FACE", "NOTIFICATION_ANNOUNCEMENT" ], @@ -55983,6 +55971,14 @@ "$ref": "GoogleCloudContentwarehouseV1Document", "description": "Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information." }, + "matchedTokenPageIndices": { + "description": "Return the 1-based page indices where those pages have one or more matched tokens.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, "qaResult": { "$ref": "GoogleCloudContentwarehouseV1QAResult", "description": "Experimental. Additional result info if the question-answering feature is enabled." @@ -73301,6 +73297,18 @@ }, "type": "object" }, + "KnowledgeAnswersIntentQueryConceptSignals": { + "description": "Signal data for associated Concepts (go/concept-roofshot).", + "id": "KnowledgeAnswersIntentQueryConceptSignals", + "properties": { + "dataEpochId": { + "description": "Concepts data epoch used to annotate the queries.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "KnowledgeAnswersIntentQueryCoreference": { "description": "A message representing a coreferenced value defined elsewhere in the meaning struct.", "id": "KnowledgeAnswersIntentQueryCoreference", @@ -73405,7 +73413,7 @@ "type": "object" }, "KnowledgeAnswersIntentQueryFunctionCallSignals": { - "description": "Next ID: 38", + "description": "Next ID: 39", "id": "KnowledgeAnswersIntentQueryFunctionCallSignals", "properties": { "argumentComposingMid": { @@ -73423,6 +73431,10 @@ "description": "An entity that represents the concept of an entity-attribute intent by being composed of an intent equivalent MID and the argument MID.", "type": "string" }, + "conceptSignals": { + "$ref": "KnowledgeAnswersIntentQueryConceptSignals", + "description": "Information about the corresponding Concept attached to the FunctionCall. go/concept-roofshot." + }, "confidenceLevel": { "enum": [ "UNKNOWN", @@ -90790,6 +90802,7 @@ "PERSONAL_AGENT", "MOBILE_HARNESS", "LOOKER_STUDIO_PRO", + "SUPPORT_CLASSIFICATION_UI", "DEPRECATED_QUICKSTART_FLUME", "DUO_CLIENT", "ALBERT", @@ -91442,6 +91455,7 @@ false, false, false, + false, true, false, false, @@ -92094,6 +92108,7 @@ "Personal Agent Team contact: page-1-eng@google.com", "Mobile Harness Team contact: omnilab-lmp@google.com", "Looker Studio Pro Team contact: da-cloudbi-india-ls-adminexp@google.com", + "Support Classification Ui Team contact: support-classification-eng@google.com", "", "Duo Client Team contact: duo-eng@google.com", "Project albert (go/albert-frontend) Team contact: albert-eng@google.com", @@ -101550,6 +101565,7 @@ "type": "object" }, "QualityOrbitAsteroidBeltImageIntentScores": { + "description": "These scores are for image scores *in the context of a landing page*, which is now a discouraged path of building image classifications. See go/orbit-for-images-v2 for an alternative.", "id": "QualityOrbitAsteroidBeltImageIntentScores", "properties": { "intents": { @@ -102198,7 +102214,7 @@ "type": "object" }, "QualityPreviewRanklabTitle": { - "description": "A collection of data corresponding to a single title candidate. This will be used as: - a collection of signals to score and select titles in production - an input for training title models NOTE: When adding a floating point value for Ranklab purposes, use float32 instead of float64, because some of the Ranklab library still does not fully support float64. Next ID: 67", + "description": "A collection of data corresponding to a single title candidate. This will be used as: - a collection of signals to score and select titles in production - an input for training title models NOTE: When adding a floating point value for Ranklab purposes, use float32 instead of float64, because some of the Ranklab library still does not fully support float64. Next ID: 68", "id": "QualityPreviewRanklabTitle", "properties": { "baseGoldmineFinalScore": { @@ -102826,6 +102842,9 @@ "format": "float", "type": "number" }, + "sourceGeneratedTitle": { + "type": "boolean" + }, "sourceGeometry": { "type": "boolean" }, @@ -108869,36 +108888,6 @@ "description": "--------------------------------------------------------------------------- Enums defining the available modifier options.", "id": "RepositoryWebrefFprintModifierProto", "properties": { - "capitalization": { - "enum": [ - "CAPITALIZATION_ANY", - "CAPITALIZATION_FIRST_ONLY", - "CAPITALIZATION_SOME", - "CAPITALIZATION_ALL" - ], - "enumDescriptions": [ - "Unspecified capitalization.", - "Only the first character of the first token is capitalized.", - "At least one character other than the first character of the first token is capitalized.", - "All characters are capitalized." - ], - "type": "string" - }, - "enclosing": { - "enum": [ - "ENCLOSING_ANY", - "ENCLOSING_QUOTES", - "ENCLOSING_PARENTHESIS", - "ENCLOSING_OTHER" - ], - "enumDescriptions": [ - "Unspecified enclosing characters.", - "The name is enclosed in quotes (single or double)", - "The name is enclosed in some kind of parenthesis.", - "The name is enclosed in other characters such as \"|\" or \"*\"." - ], - "type": "string" - }, "language": { "description": "i18.languages.Language enum defined in i18n/languages/proto/languages.proto UNKNOWN_LANGUAGE", "format": "int32", @@ -108914,204 +108903,6 @@ "The namespace for WebIt-specific classification data." ], "type": "string" - }, - "punctuation": { - "enum": [ - "PUNCTUATION_ANY", - "PUNCTUATION_INNER" - ], - "enumDescriptions": [ - "Unspecified punctuation.", - "The name contains punctuation characters." - ], - "type": "string" - }, - "sentence": { - "enum": [ - "SENTENCE_ANY", - "SENTENCE_BEGINNING" - ], - "enumDescriptions": [ - "Unspecified position of the name with respect to the sentence.", - "The name occurs at the beginning of a sentence (i.e., after certain punctuation characters like \".\" or \"!\")." - ], - "type": "string" - }, - "sourceType": { - "enum": [ - "SOURCE_ANY", - "SOURCE_NEWS", - "SOURCE_YOUTUBE" - ], - "enumDescriptions": [ - "Unspecified source type.", - "The source is a news page.", - "The source is a youtube page." - ], - "type": "string" - }, - "stemming": { - "enum": [ - "STEMMING_ANY", - "STEMMING_YES" - ], - "enumDescriptions": [ - "Unspecified stemming.", - "The name results from stemming." - ], - "type": "string" - }, - "style": { - "enum": [ - "STYLE_ANY", - "STYLE_DISTINCT" - ], - "enumDescriptions": [ - "Unspecified formatting.", - "The name has a different format than the surrounding tokens." - ], - "type": "string" - }, - "tokenType": { - "enum": [ - "INVALID", - "CONTENT", - "URL", - "ANCHOR", - "QUERY", - "INSTANT_QUERY", - "A_HREF_TAG", - "LINK_HREF_TAG", - "IMG_ALT_TAG", - "IMG_SRC_TAG", - "META_CONTENT_TAG", - "TITLE", - "ANY", - "IMAGE_QUERY", - "PASSAGE_QUERY", - "CONTEXT_ENTITY", - "RESULT_ENTITY", - "CONTEXT_QUERY", - "SIMILAR_QUERIES", - "SPORE_GRAPH", - "OFFDOMAIN_ANCHOR", - "ONSITE_ANCHOR", - "NAME_CANDIDATE", - "TOPIC_LINK", - "QUERY_NAME_CANDIDATE", - "ANCHOR_NAME_CANDIDATE", - "REFERENCE_PAGE_URL", - "REFERENCE_PAGE_LINK", - "STRONG_IDENTIFIER", - "REFERENCE_PAGE_URL_INLINK", - "REFERENCE_PAGE_LINK_INLINK", - "GEO_LINK", - "VIDEO_TRANSCRIPT", - "VIDEO_OCR", - "IMAGE_OCR", - "LENS", - "VIDEO_DESCRIPTION", - "ONLY_LOOKUP_METADATA", - "DEPRECATED_ENTITY_METADATA", - "DEPRECATED_PRINCIPAL_NAME", - "DEPRECATED_NAME_BLACKLIST", - "DEPRECATED_ENTITY_CONTEXT_TOKENS", - "DEPRECATED_INJECTED_NAME_CANDIDATE", - "DEPRECATED_EMBEDDED_CONTENT" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - true, - true, - true - ], - "enumDescriptions": [ - "To be used to mark an invalid token type. This proto enum does not follow the good practices, which suggest that such a value should be with tag 0: go/protodosdonts#do-include-an-unspecified-value-in-an-enum. Because this is a legacy situation and it is not safe to just change the tags, the enum contains an invalid type at this tag and can be used to specify the default value wherever this is needed.", - "The main html content of a document.", - "The urls of a document/", - "The anchors pointing to a document.", - "The navboost queries of a document", - "The instant navboost queries of a document", - "The href-value of the tags in the document's content", - "The href-value of the tags in the document's content", - "The alt-value of the tags in the document's content", - "The src-value of the tags in the document's content", - "The content-value of the tags \"description\" and \"keyword\"", - "The document ", - "Special value used to represent any other tokentype.", - "The Image Search navboost queries.", - "Radish Passage Queries, specifically, rankembed and generated queries. For offline use only. In offline Q2I runs we can instruct Webref to parse and annotate passge queries using the annoatate_passage_queries option in AnnotateDocjoinTuningOptions. Note that in Goldmine runs these are added to the docjoin *after* Webref has run. However,", - "Entities added from annotation context.", - "Represents an entity found in the results for Qref.", - "A query used as additional context for Qref annotations.", - "Similar Queries. They are only used to retrieve entities that might be able to explain original query. As in Q2@2018 we don't want them to be scored or provide context for scoring because of their overall big CPU impact on qrewrite (+50%).", - "A freetext dump + metadata from Spore GraphAnnotations.", - "Offdomain anchors pointing to a document.", - "Onsite anchors pointing to a document.", - "Name candidate extracted from the topic or generated from trusted source.", - "A link extracted directly from the topic:", - "Queries to reference pages which are potential names of the entity:", - "Anchor texts to reference pages which are potential names of the entity: Tokenized potential reference page URLs of the entity. Token matching is none because lookups are external annotations only.", - "", - "URLs that are linked to the reference page of the entity. Token matching is none because lookups are external annotations only.", - "Tokenized potential strong id of the entity, like phone number, ISBN. Token matching is none because lookups are external annotations only.", - "A special position used for lookup of inlinks to reference page urls.", - "A special position used for lookup of inlink scores for reference page outlinks.", - "", - "", - "", - "", - "", - "", - "Entries which are created in order to instruct the fprint-loader to load metadata for the contained ngrams.", - "Unused.", - "", - "", - "", - "", - "" - ], - "type": "string" } }, "type": "object" @@ -126111,6 +125902,7 @@ "FRESH_RESULTS_SEEKING_CURRENT_YEAR_EVENT_LEVEL", "FILTER_TQ_FAILURE_APP", "EDITORIAL_CONTENT_CLUSTER_FHR_SERP_EVENT_LEVEL", + "HAVE_LOCALIZATION_QUALITY_DIFF_AT_FILTER", "PGSS_DETAILS_PAGE_TQUALITY_UNKNOWN_EVENT_LEVEL", "PGSS_DETAILS_PAGE_TQUALITY_FAILED_EVENT_LEVEL", "PGSS_DETAILS_PAGE_TQUALITY_PASSED_EVENT_LEVEL", @@ -126235,6 +126027,7 @@ "FOP_ORDERING_STORED_VALUE_EVENT_LEVEL", "GEARHEAD_DUPLEX_COMPATIBLE_DIALER_ENABLED", "CUSTOMER_UPDATE_CHALLENGE_EVENT_LEVEL", + "EXPERIMENTAL_TG_QUERY_EVENT_LEVEL", "EVENT_LEVEL_TEST_CODE_LIMIT", "ENTERTAINMENT_CLUSTER_TRIGGERING_AT_SESSION_LEVEL", "BEST_SELLER_CART_TAG_AT_SESSION_LEVEL", @@ -126411,6 +126204,8 @@ "IN_APP_OFFER_BATTLESTAR_APP_WAR_PLANET_AT_SESSION_LEVEL", "IN_APP_OFFER_BATTLESTAR_APP_ESKYFUN_LEGENDS_AT_SESSION_LEVEL", "IN_APP_OFFER_BATTLESTAR_APP_MAHJONG_VILLAGE_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_ONE_PUNCH_MAN_KR_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_ONE_PUNCH_MAN_TW_AT_SESSION_LEVEL", "IN_APP_OFFER_ELIGIBLE_AT_SESSION_LEVEL", "IN_APP_OFFER_ELIGIBLE_APP_1_AT_SESSION_LEVEL", "IN_APP_OFFER_ELIGIBLE_APP_2_AT_SESSION_LEVEL", @@ -126429,6 +126224,8 @@ "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_WAR_PLANET_AT_SESSION_LEVEL", "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ESKYFUN_LEGENDS_AT_SESSION_LEVEL", "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_MAHJONG_VILLAGE_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ONE_PUNCH_MAN_KR_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ONE_PUNCH_MAN_TW_AT_SESSION_LEVEL", "IN_APP_OFFER_SAVED_AT_SESSION_LEVEL", "IN_APP_OFFER_SAVED_APP_1_AT_SESSION_LEVEL", "IN_APP_OFFER_SAVED_APP_2_AT_SESSION_LEVEL", @@ -126592,6 +126389,9 @@ "FRESH_RESULTS_SEEKING_CURRENT_YEAR_SESSION_LEVEL", "FILTER_TQ_FAILURE_APP_SESSION_LEVEL", "EDITORIAL_CONTENT_CLUSTER_FHR_SERP_SESSION_LEVEL", + "HAVE_LOCALIZATION_QUALITY_DIFF_AT_FILTER_SESSION_LEVEL", + "EXPERIMENTAL_TG_QUERY_SESSION_LEVEL", + "NAV_CARD_HIGH_QUALITY_MDP_SESSION_LEVEL", "HAS_DECLINE_REASON_IN_PAYMENT_DECLINE_EMAIL_SESSION_LEVEL", "QUEST_CONTENT_CARD_IN_DEALS_HOME_SESSION_LEVEL", "PRE_INSTALL_LOW_QUALITY_DEEP_LINK_DETAILS_PAGE_SESSION_LEVEL", @@ -126959,6 +126759,7 @@ "PLAY_ONBOARDING_FLOW_SESSION_LEVEL", "BECAUSE_YOU_PLAYED_FIRST_3_ROWS_SESSION_LEVEL", "BECAUSE_YOU_INSTALLED_FIRST_3_ROWS_SESSION_LEVEL", + "LOYALTY_WEEKLY_REWARDS_ICC_FORMAT_NOW_HOME_SESSION_LEVEL", "SESSION_LEVEL_TEST_CODE_LIMIT", "CART_ABANDONMENT_USER_LEVEL", "IN_APP_PRODUCTS_IN_DETAILS_PAGE_USER_LEVEL", @@ -127034,6 +126835,8 @@ "IN_APP_OFFER_BATTLESTAR_APP_WAR_PLANET_AT_USER_LEVEL", "IN_APP_OFFER_BATTLESTAR_APP_ESKYFUN_LEGENDS_AT_USER_LEVEL", "IN_APP_OFFER_BATTLESTAR_APP_MAHJONG_VILLAGE_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_ONE_PUNCH_MAN_KR_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_ONE_PUNCH_MAN_TW_AT_USER_LEVEL", "IN_APP_OFFER_ELIGIBLE_AT_USER_LEVEL", "IN_APP_OFFER_ELIGIBLE_APP_1_AT_USER_LEVEL", "IN_APP_OFFER_ELIGIBLE_APP_2_AT_USER_LEVEL", @@ -127052,6 +126855,8 @@ "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_WAR_PLANET_AT_USER_LEVEL", "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ESKYFUN_LEGENDS_AT_USER_LEVEL", "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_MAHJONG_VILLAGE_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ONE_PUNCH_MAN_KR_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ONE_PUNCH_MAN_TW_AT_USER_LEVEL", "IN_APP_OFFER_SAVED_AT_USER_LEVEL", "IN_APP_OFFER_SAVED_APP_1_AT_USER_LEVEL", "IN_APP_OFFER_SAVED_APP_2_AT_USER_LEVEL", @@ -127237,6 +127042,7 @@ "HAS_REINSTALL_APP_PASSING_FILTERING_USER_LEVEL", "HAS_RECOMMENDED_APP_WITH_OOP_REINSTALL_ELIGIBILITY_USER_LEVEL", "HAS_PAST_OOP_SPEND_ON_GAME_USER_LEVEL", + "HAS_PAST_OOP_SPEND_ON_APPLICATION_USER_LEVEL", "NOTIFICATION_PREDICTED_REV_GAIN_FILTERING_USER_LEVEL", "NOTIFICATION_PUBLICITY_GAIN_DISABLED_USER_LEVEL", "UNACK_IN_APP_SUBSCRIPTION_WARNING_DETAIL_PAGE_USER_LEVEL", @@ -127299,6 +127105,7 @@ "IS_ELIGIBLE_FOR_ONE_CLICK_BAKCUP_FOP_IN_FIX_FLOW_USER_LEVEL", "WEBSKY_DISPLAY_SUBSCRIPTION_ENTITLEMENT_BENEFITS_USER_LEVEL", "HAS_INSUFFICIENT_STORED_VALUE_BALANCE_BEFORE_RENEWAL_V2_USER_LEVEL", + "LOYALTY_WEEKLY_REWARDS_ICC_FORMAT_NOW_HOME_USER_LEVEL", "USER_LEVEL_TEST_CODE_LIMIT" ], "enumDeprecated": [ @@ -127822,6 +127629,12 @@ false, false, false, + false, + false, + false, + false, + false, + false, true, false, false, @@ -127958,6 +127771,9 @@ false, false, false, + false, + false, + false, true, false, false, @@ -128487,6 +128303,11 @@ false, false, false, + false, + false, + false, + false, + false, true, false, false, @@ -128643,6 +128464,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -128799,6 +128622,7 @@ "Event level test code for tracking fresh results seeking within the current year search queries.", "Event level test code for when we filtered \u003e=1 apps due to tq failure.", "Event level test code for Editorial Content/Articles in SERP (FHR)", + "Event level test code for apps with different quality score in different language at filter.", "The following are used by the server side.", "", "", @@ -128923,6 +128747,7 @@ "", "Test code for sessions where a phone dialer that doesn't turn screen on during phone calls is enabled.", "Event-level test code for the presence of customer update challenge.", + "Event-level test code for experimental tg query.", "", "", "", @@ -129124,6 +128949,10 @@ "", "", "", + "", + "", + "", + "", "see go/reordering-subnav-tabs", "see go/reordering-subnav-tabs", "", @@ -129280,6 +129109,9 @@ "Session level test code for tracking fresh results seeking within the current year search queries.", "Event level test code for when we filtered \u003e=1 apps due to tq failure.", "Session level test code for Editorial Content/Articles in SERP (FHR)", + "Session level test code for apps with different quality score in different language at filter.", + "Session level test code for Experimental TG Query.", + "Session level test code for nav card with high quality canonical mdp app.", "Session level test code that indicates the decline reason is populated to payment decline email.", "Session level test code for Quest Content Card launch on Deals Home, for tracking users who made eligible purchases and are eligible for the QCC.", "For low quality deep link details page. go/low-quality-deep-link-details-page Whether the details page comes from a deep link and its app is low quality.", @@ -129647,6 +129479,7 @@ "Session-level test code for Play Onboarding Experience flow.", "Session-level test code for Because You Played experiments.", "Session-level test code for Because You Played experiments.", + "Session-level test code for loyalty weekly rewards in Now! home.", "", "Cart abandonment flow for purchase flow.", "User saw/would have seen the in app products section in App", @@ -129747,6 +129580,10 @@ "", "", "", + "", + "", + "", + "", "User saw/would have seen the subscription one time pass offer", "", "", @@ -129925,6 +129762,7 @@ "User level test code for reinstall enablement. If user has any eligible reinstall passing the per user filtering logic, testcode will be logged. Note that the filtering logics are controlled by gcl flags. Ex. Play Games Home: http://shortn/_2aGCRQqToq. This test code only knows if any app passes the filtering but not which filtering params are applied.", "User level test code for tagging users who have any app which is recommended by PRS and has reinstall eligibility when is_app_with_historical_oop_purchase restriction is turned on.", "User-level test code for tagging users with previous OOP spend on games.", + "User-level test code for tagging users with previous OOP spend on applications.", "User level test code for notification campaign gain filtering experiments. If GE decision changed after applying predicted revenue gain filtering on notification campaigns, log test code.", "User level test code for notification campaign gain filtering experiments. If GE decision changed after disabling publicity gain in notification campaign benefit calculation, log test code.", "Unack Warning Message user-level test code. Design: go/unack-warning-message-on-dp-dd", @@ -129987,6 +129825,7 @@ "User level test code for users who are eligible for one-click backup fop in fix flow", "User level test code for displaying sub-entitlement benefits on websky.", "User level test code for stored value top-up email reminder (V2).", + "User level test code for loyalty weekly rewards in Now! home.", "" ], "type": "string" @@ -131713,6 +131552,10 @@ "ADSBURST_V2_128D", "ADSBURST_V2_64D", "ADSBURST_V2_32D", + "ADSBURST_V2_1", + "ADSBURST_V2_1_128D", + "ADSBURST_V2_1_64D", + "ADSBURST_V2_1_32D", "SHOPPING_IMAGE_TRANSFORMATION_UNCROP", "SHOPPING_IMAGE_TRANSFORMATION_V2", "SCREENAI_V1", @@ -131824,6 +131667,10 @@ false, false, false, + false, + false, + false, + false, true, false, false, @@ -131931,6 +131778,10 @@ "", "", "", + "", + "", + "", + "", "Shopping image transformation versions.", "", "ScreenAI versions. IconNet.", diff --git a/contentwarehouse/v1/contentwarehouse-gen.go b/contentwarehouse/v1/contentwarehouse-gen.go index 107a573f0b9..fd8ef87cadc 100644 --- a/contentwarehouse/v1/contentwarehouse-gen.go +++ b/contentwarehouse/v1/contentwarehouse-gen.go @@ -3246,6 +3246,7 @@ type AppsPeopleOzExternalMergedpeopleapiAffinity struct { // "PERSONAL_AGENT_AFFINITY" // "MOBILE_HARNESS_AFFINITY" // "LOOKER_STUDIO_PRO_AFFINITY" + // "SUPPORT_CLASSIFICATION_UI_AFFINITY" AffinityType string `json:"affinityType,omitempty"` // ContainerId: The ID of the container @@ -7992,6 +7993,9 @@ type AppsPeopleOzExternalMergedpeopleapiPersonFieldMetadata struct { // person.metadata.identity_info.source_id.id. This field may not be // populated in some special cases, where the id is not visible to the // querying user. e.g. ListAutocompletions with full phone number query. + // For value format, see + // google3/social/graph/api/proto/main_merged_person.proto?q=symbol:Sourc + // eIdentity.id EncodedContainerId string `json:"encodedContainerId,omitempty"` // FieldAcl: When the container is PROFILE and the profile owner is the @@ -9218,7 +9222,10 @@ type AppsPeopleOzExternalMergedpeopleapiRawDeviceContactInfo struct { // social.graph.peopleapi.proto.internal.RawDeviceContactId. This id // should be used to correlate to field.metadata.encoded_container_id // when the field.metadata.container_type is RAW_DEVICE_CONTACT The id - // also correlates to person.metadata.identity_info.source_id.id. + // also correlates to person.metadata.identity_info.source_id.id. For + // value format, see + // google3/social/graph/api/proto/main_merged_person.proto?q=symbol:Sourc + // eIdentity.id Id string `json:"id,omitempty"` // PhotoType: The type of photo from the device (if any). @@ -11814,7 +11821,7 @@ type AssistantApiClientOpPropertiesDeviceModifySettingClientOpProperty struct { // "BEDTIME_MODE" // "THEATER_MODE" // "TOUCH_LOCK" - // "ASSISTANT_PRESS_AND_HOLD" + // "PRESS_AND_HOLD" // "WATCH_FACE" - Settings > Display > Change watch face End of // Wearable device settings // "NOTIFICATION_ANNOUNCEMENT" - Assistant Spoken Notification Setting @@ -26729,7 +26736,7 @@ func (s *AssistantPfrTiebreakingMetadata) MarshalJSON() ([]byte, error) { // AssistantPrefulfillmentRankerPrefulfillmentSignals: Signals to be // used by the Prefulfillment Ranker. Derived from the ParsingSignals // and GroundingSignals carried by the FunctionCall. LINT.IfChange Next -// ID: 65 +// ID: 66 type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // BindingSetAuis: Assistant User Interaction Score for binding set. BindingSetAuis float64 `json:"bindingSetAuis,omitempty"` @@ -26884,6 +26891,10 @@ type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // IsSageIntent: Whether this intent was generated by Sage. IsSageIntent bool `json:"isSageIntent,omitempty"` + // IsScoreBasedIntent: Whether this intent is a score-based intent, + // relying on PFR for scoring and pruning to the top intent. + IsScoreBasedIntent bool `json:"isScoreBasedIntent,omitempty"` + // IsTvmIntent: Whether the intent is a media object tvm intent. IsTvmIntent bool `json:"isTvmIntent,omitempty"` @@ -27018,24 +27029,6 @@ type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // "RANKER_NAME_UNSPECIFIED" - Default value, when there is no ranker // specified. // "RANKER_NAME_GROUNDING_RANKER" - Name for HGR v1 model. - // "RANKER_NAME_DEFER_TO_VERTICAL_SCORES" - Used for deferring to - // confidence scores produced by upstream GPs instead of using HGR's - // scorer. - // "RANKER_NAME_GROUNDING_RANKER_V2" - Name for HGR v2 model. - // "RANKER_NAME_GROUNDING_RANKER_MEDIA_EXP" - Name for experimental - // HGR model for Media, build on top of HGR v2. - // "RANKER_NAME_GROUNDING_RANKER_COMMS_EXP" - Name for experimental - // HGR model for Comms. - // "RANKER_NAME_CONSOLIDATED_PFR_HGR" - Name for consolidated PFR and - // HGR ranker. - // "RANKER_NAME_CONSOLIDATED_PFR_HGR_V2_COMMS_CALIBRATED" - Name for - // consolidated PFR, HGRv2 and comms ranker. - // "RANKER_NAME_CONSOLIDATED_PFR_HGR_V2_COMMS_CALIBRATED_V2" - Name - // for consolidated PFR, HGRv2 and comms ranker v2. - // "RANKER_NAME_GROUNDING_RANKER_COMMS_EXP_CALIBRATED_V2" - Name for - // experimental calibrated HGR model for Comms V2. - // "RANKER_NAME_CONSOLIDATED_PFR_HGR_PODCAST" - Name for HGR ranker - // for podcast based on RANKER_NAME_CONSOLIDATED_PFR_HGR_V2. // "RANKER_NAME_GROUNDING_RANKER_V4" - Name for HGR V4 model, the // model version that's targeted for Slow media launches. RankerName string `json:"rankerName,omitempty"` @@ -43201,7 +43194,8 @@ type GeostoreFeatureProto struct { // DisplayData: Data used to render this feature on a map. DisplayData *GeostoreDisplayDataProto `json:"displayData,omitempty"` - // DisputedArea: RESERVED + // DisputedArea: Represents information about disputed areas. Only + // TYPE_DISPUTED_AREA features should have the field set. DisputedArea *GeostoreDisputedAreaProto `json:"disputedArea,omitempty"` // Doodle: ** DEPRECATED ** @@ -43252,7 +43246,6 @@ type GeostoreFeatureProto struct { // non-point use cases for which this field would be useful. GeometryPrecisionMeters float64 `json:"geometryPrecisionMeters,omitempty"` - // Geopolitical: RESERVED Geopolitical *GeostoreGeopoliticalProto `json:"geopolitical,omitempty"` // GeopoliticalGeometry: Geopolitical (unsimplified) polygons for a @@ -44360,7 +44353,9 @@ func (s *GeostoreFieldWithRightsProto) MarshalJSON() ([]byte, error) { // GeostoreFlowLineProto: Wrapper to hold data related to a lane’s // track, extendable for future data. type GeostoreFlowLineProto struct { - // Curvature: RESERVED + // Curvature: Curvature of the flowline. Note that, curvature can be + // present even if the flowline doesn't have a track. In which case, + // curvature will be derived from the segment polyline. Curvature *GeostoreCurvatureProto `json:"curvature,omitempty"` Track *GeostoreTrackProto `json:"track,omitempty"` @@ -48997,7 +48992,9 @@ type GeostorePoliticalProto struct { // feature must be a TYPE_LOCALITY feature. Capital *GeostoreFeatureIdProto `json:"capital,omitempty"` - // Claim: RESERVED + // Claim: Feature IDs of the features claimed by this feature's + // government that are not necessarily included in the feature's + // geometry. Claim []*GeostoreFeatureIdProto `json:"claim,omitempty"` // GrossDomesticProductUsdMillions: The Gross Domestic Product of the @@ -57777,7 +57774,7 @@ type GoogleAssistantAccessoryV1DeviceState struct { // "BEDTIME_MODE" // "THEATER_MODE" // "TOUCH_LOCK" - // "ASSISTANT_PRESS_AND_HOLD" + // "PRESS_AND_HOLD" // "WATCH_FACE" - Settings > Display > Change watch face End of // Wearable device settings // "NOTIFICATION_ANNOUNCEMENT" - Assistant Spoken Notification Setting @@ -62127,6 +62124,10 @@ type GoogleCloudContentwarehouseV1SearchDocumentsResponseMatchingDocument struct // This document only contains indexed metadata information. Document *GoogleCloudContentwarehouseV1Document `json:"document,omitempty"` + // MatchedTokenPageIndices: Return the 1-based page indices where those + // pages have one or more matched tokens. + MatchedTokenPageIndices googleapi.Int64s `json:"matchedTokenPageIndices,omitempty"` + // QaResult: Experimental. Additional result info if the // question-answering feature is enabled. QaResult *GoogleCloudContentwarehouseV1QAResult `json:"qaResult,omitempty"` @@ -83408,6 +83409,35 @@ func (s *KnowledgeAnswersIntentQueryConceptInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// KnowledgeAnswersIntentQueryConceptSignals: Signal data for associated +// Concepts (go/concept-roofshot). +type KnowledgeAnswersIntentQueryConceptSignals struct { + // DataEpochId: Concepts data epoch used to annotate the queries. + DataEpochId int64 `json:"dataEpochId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataEpochId") 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. "DataEpochId") 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 *KnowledgeAnswersIntentQueryConceptSignals) MarshalJSON() ([]byte, error) { + type NoMethod KnowledgeAnswersIntentQueryConceptSignals + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // KnowledgeAnswersIntentQueryCoreference: A message representing a // coreferenced value defined elsewhere in the meaning struct. type KnowledgeAnswersIntentQueryCoreference struct { @@ -83595,7 +83625,7 @@ func (s *KnowledgeAnswersIntentQueryFunctionCall) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// KnowledgeAnswersIntentQueryFunctionCallSignals: Next ID: 38 +// KnowledgeAnswersIntentQueryFunctionCallSignals: Next ID: 39 type KnowledgeAnswersIntentQueryFunctionCallSignals struct { // ArgumentComposingMid: The argument mid that was used to compose the // entity for a concept interpretation, along with the @@ -83612,6 +83642,10 @@ type KnowledgeAnswersIntentQueryFunctionCallSignals struct { // and the argument MID. ConceptEntityMid string `json:"conceptEntityMid,omitempty"` + // ConceptSignals: Information about the corresponding Concept attached + // to the FunctionCall. go/concept-roofshot. + ConceptSignals *KnowledgeAnswersIntentQueryConceptSignals `json:"conceptSignals,omitempty"` + // Possible values: // "UNKNOWN" // "LOW" @@ -106494,6 +106528,8 @@ type PeoplestackFlexorgsProtoInternalExternal struct { // omnilab-lmp@google.com // "LOOKER_STUDIO_PRO" - Looker Studio Pro Team contact: // da-cloudbi-india-ls-adminexp@google.com + // "SUPPORT_CLASSIFICATION_UI" - Support Classification Ui Team + // contact: support-classification-eng@google.com // "DEPRECATED_QUICKSTART_FLUME" // "DUO_CLIENT" - Duo Client Team contact: duo-eng@google.com // "ALBERT" - Project albert (go/albert-frontend) Team contact: @@ -115620,6 +115656,10 @@ func (s *QualityOrbitAsteroidBeltDocumentIntentScores) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// QualityOrbitAsteroidBeltImageIntentScores: These scores are for image +// scores *in the context of a landing page*, which is now a discouraged +// path of building image classifications. See go/orbit-for-images-v2 +// for an alternative. type QualityOrbitAsteroidBeltImageIntentScores struct { // Intents: The unique identifier for an Asteroid Belt document intent // is being reused here @@ -116039,7 +116079,7 @@ func (s *QualityPreviewRanklabSnippet) UnmarshalJSON(data []byte) error { // signals to score and select titles in production - an input for // training title models NOTE: When adding a floating point value for // Ranklab purposes, use float32 instead of float64, because some of the -// Ranklab library still does not fully support float64. Next ID: 67 +// Ranklab library still does not fully support float64. Next ID: 68 type QualityPreviewRanklabTitle struct { // BaseGoldmineFinalScore: `goldmine_final_score` value in base. BaseGoldmineFinalScore float64 `json:"baseGoldmineFinalScore,omitempty"` @@ -116429,6 +116469,8 @@ type QualityPreviewRanklabTitle struct { // QueryRelevance: Deprecated experimental features. QueryRelevance float64 `json:"queryRelevance,omitempty"` + SourceGeneratedTitle bool `json:"sourceGeneratedTitle,omitempty"` + SourceGeometry bool `json:"sourceGeometry,omitempty"` SourceHeadingTag bool `json:"sourceHeadingTag,omitempty"` @@ -124569,25 +124611,6 @@ func (s *RepositoryWebrefForwardingUrls) MarshalJSON() ([]byte, error) { // ---------------------------------------------------------------------- // ----- Enums defining the available modifier options. type RepositoryWebrefFprintModifierProto struct { - // Possible values: - // "CAPITALIZATION_ANY" - Unspecified capitalization. - // "CAPITALIZATION_FIRST_ONLY" - Only the first character of the first - // token is capitalized. - // "CAPITALIZATION_SOME" - At least one character other than the first - // character of the first token is capitalized. - // "CAPITALIZATION_ALL" - All characters are capitalized. - Capitalization string `json:"capitalization,omitempty"` - - // Possible values: - // "ENCLOSING_ANY" - Unspecified enclosing characters. - // "ENCLOSING_QUOTES" - The name is enclosed in quotes (single or - // double) - // "ENCLOSING_PARENTHESIS" - The name is enclosed in some kind of - // parenthesis. - // "ENCLOSING_OTHER" - The name is enclosed in other characters such - // as "|" or "*". - Enclosing string `json:"enclosing,omitempty"` - // Language: i18.languages.Language enum defined in // i18n/languages/proto/languages.proto UNKNOWN_LANGUAGE Language int64 `json:"language,omitempty"` @@ -124599,115 +124622,7 @@ type RepositoryWebrefFprintModifierProto struct { // data. NamespaceType string `json:"namespaceType,omitempty"` - // Possible values: - // "PUNCTUATION_ANY" - Unspecified punctuation. - // "PUNCTUATION_INNER" - The name contains punctuation characters. - Punctuation string `json:"punctuation,omitempty"` - - // Possible values: - // "SENTENCE_ANY" - Unspecified position of the name with respect to - // the sentence. - // "SENTENCE_BEGINNING" - The name occurs at the beginning of a - // sentence (i.e., after certain punctuation characters like "." or - // "!"). - Sentence string `json:"sentence,omitempty"` - - // Possible values: - // "SOURCE_ANY" - Unspecified source type. - // "SOURCE_NEWS" - The source is a news page. - // "SOURCE_YOUTUBE" - The source is a youtube page. - SourceType string `json:"sourceType,omitempty"` - - // Possible values: - // "STEMMING_ANY" - Unspecified stemming. - // "STEMMING_YES" - The name results from stemming. - Stemming string `json:"stemming,omitempty"` - - // Possible values: - // "STYLE_ANY" - Unspecified formatting. - // "STYLE_DISTINCT" - The name has a different format than the - // surrounding tokens. - Style string `json:"style,omitempty"` - - // Possible values: - // "INVALID" - To be used to mark an invalid token type. This proto - // enum does not follow the good practices, which suggest that such a - // value should be with tag 0: - // go/protodosdonts#do-include-an-unspecified-value-in-an-enum. Because - // this is a legacy situation and it is not safe to just change the - // tags, the enum contains an invalid type at this tag and can be used - // to specify the default value wherever this is needed. - // "CONTENT" - The main html content of a document. - // "URL" - The urls of a document/ - // "ANCHOR" - The anchors pointing to a document. - // "QUERY" - The navboost queries of a document - // "INSTANT_QUERY" - The instant navboost queries of a document - // "A_HREF_TAG" - The href-value of the tags in the document's content - // "LINK_HREF_TAG" - The href-value of the tags in the document's - // content - // "IMG_ALT_TAG" - The alt-value of the tags in the document's content - // "IMG_SRC_TAG" - The src-value of the tags in the document's content - // "META_CONTENT_TAG" - The content-value of the tags "description" - // and "keyword" - // "TITLE" - The document - // "ANY" - Special value used to represent any other tokentype. - // "IMAGE_QUERY" - The Image Search navboost queries. - // "PASSAGE_QUERY" - Radish Passage Queries, specifically, rankembed - // and generated queries. For offline use only. In offline Q2I runs we - // can instruct Webref to parse and annotate passge queries using the - // annoatate_passage_queries option in AnnotateDocjoinTuningOptions. - // Note that in Goldmine runs these are added to the docjoin *after* - // Webref has run. However, - // "CONTEXT_ENTITY" - Entities added from annotation context. - // "RESULT_ENTITY" - Represents an entity found in the results for - // Qref. - // "CONTEXT_QUERY" - A query used as additional context for Qref - // annotations. - // "SIMILAR_QUERIES" - Similar Queries. They are only used to retrieve - // entities that might be able to explain original query. As in Q2@2018 - // we don't want them to be scored or provide context for scoring - // because of their overall big CPU impact on qrewrite (+50%). - // "SPORE_GRAPH" - A freetext dump + metadata from Spore - // GraphAnnotations. - // "OFFDOMAIN_ANCHOR" - Offdomain anchors pointing to a document. - // "ONSITE_ANCHOR" - Onsite anchors pointing to a document. - // "NAME_CANDIDATE" - Name candidate extracted from the topic or - // generated from trusted source. - // "TOPIC_LINK" - A link extracted directly from the topic: - // "QUERY_NAME_CANDIDATE" - Queries to reference pages which are - // potential names of the entity: - // "ANCHOR_NAME_CANDIDATE" - Anchor texts to reference pages which are - // potential names of the entity: Tokenized potential reference page - // URLs of the entity. Token matching is none because lookups are - // external annotations only. - // "REFERENCE_PAGE_URL" - // "REFERENCE_PAGE_LINK" - URLs that are linked to the reference page - // of the entity. Token matching is none because lookups are external - // annotations only. - // "STRONG_IDENTIFIER" - Tokenized potential strong id of the entity, - // like phone number, ISBN. Token matching is none because lookups are - // external annotations only. - // "REFERENCE_PAGE_URL_INLINK" - A special position used for lookup of - // inlinks to reference page urls. - // "REFERENCE_PAGE_LINK_INLINK" - A special position used for lookup - // of inlink scores for reference page outlinks. - // "GEO_LINK" - // "VIDEO_TRANSCRIPT" - // "VIDEO_OCR" - // "IMAGE_OCR" - // "LENS" - // "VIDEO_DESCRIPTION" - // "ONLY_LOOKUP_METADATA" - Entries which are created in order to - // instruct the fprint-loader to load metadata for the contained ngrams. - // "DEPRECATED_ENTITY_METADATA" - Unused. - // "DEPRECATED_PRINCIPAL_NAME" - // "DEPRECATED_NAME_BLACKLIST" - // "DEPRECATED_ENTITY_CONTEXT_TOKENS" - // "DEPRECATED_INJECTED_NAME_CANDIDATE" - // "DEPRECATED_EMBEDDED_CONTENT" - TokenType string `json:"tokenType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Capitalization") to + // ForceSendFields is a list of field names (e.g. "Language") 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 @@ -124715,13 +124630,12 @@ type RepositoryWebrefFprintModifierProto struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Capitalization") 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. "Language") 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:"-"` } @@ -147211,6 +147125,9 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // filtered >=1 apps due to tq failure. // "EDITORIAL_CONTENT_CLUSTER_FHR_SERP_EVENT_LEVEL" - Event level test // code for Editorial Content/Articles in SERP (FHR) + // "HAVE_LOCALIZATION_QUALITY_DIFF_AT_FILTER" - Event level test code + // for apps with different quality score in different language at + // filter. // "PGSS_DETAILS_PAGE_TQUALITY_UNKNOWN_EVENT_LEVEL" - The following // are used by the server side. // "PGSS_DETAILS_PAGE_TQUALITY_FAILED_EVENT_LEVEL" @@ -147446,6 +147363,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // phone calls is enabled. // "CUSTOMER_UPDATE_CHALLENGE_EVENT_LEVEL" - Event-level test code for // the presence of customer update challenge. + // "EXPERIMENTAL_TG_QUERY_EVENT_LEVEL" - Event-level test code for + // experimental tg query. // "EVENT_LEVEL_TEST_CODE_LIMIT" // "ENTERTAINMENT_CLUSTER_TRIGGERING_AT_SESSION_LEVEL" // "BEST_SELLER_CART_TAG_AT_SESSION_LEVEL" @@ -147647,6 +147566,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "IN_APP_OFFER_BATTLESTAR_APP_WAR_PLANET_AT_SESSION_LEVEL" // "IN_APP_OFFER_BATTLESTAR_APP_ESKYFUN_LEGENDS_AT_SESSION_LEVEL" // "IN_APP_OFFER_BATTLESTAR_APP_MAHJONG_VILLAGE_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_ONE_PUNCH_MAN_KR_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_ONE_PUNCH_MAN_TW_AT_SESSION_LEVEL" // "IN_APP_OFFER_ELIGIBLE_AT_SESSION_LEVEL" // "IN_APP_OFFER_ELIGIBLE_APP_1_AT_SESSION_LEVEL" // "IN_APP_OFFER_ELIGIBLE_APP_2_AT_SESSION_LEVEL" @@ -147674,6 +147595,12 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_MAHJONG_VILLAGE_AT_SESSION_LEVEL // " + // + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ONE_PUNCH_MAN_KR_AT_SESSION_LEVE + // L" + // + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ONE_PUNCH_MAN_TW_AT_SESSION_LEVE + // L" // "IN_APP_OFFER_SAVED_AT_SESSION_LEVEL" // "IN_APP_OFFER_SAVED_APP_1_AT_SESSION_LEVEL" // "IN_APP_OFFER_SAVED_APP_2_AT_SESSION_LEVEL" @@ -147952,6 +147879,13 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // when we filtered >=1 apps due to tq failure. // "EDITORIAL_CONTENT_CLUSTER_FHR_SERP_SESSION_LEVEL" - Session level // test code for Editorial Content/Articles in SERP (FHR) + // "HAVE_LOCALIZATION_QUALITY_DIFF_AT_FILTER_SESSION_LEVEL" - Session + // level test code for apps with different quality score in different + // language at filter. + // "EXPERIMENTAL_TG_QUERY_SESSION_LEVEL" - Session level test code for + // Experimental TG Query. + // "NAV_CARD_HIGH_QUALITY_MDP_SESSION_LEVEL" - Session level test code + // for nav card with high quality canonical mdp app. // "HAS_DECLINE_REASON_IN_PAYMENT_DECLINE_EMAIL_SESSION_LEVEL" - // Session level test code that indicates the decline reason is // populated to payment decline email. @@ -148624,6 +148558,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // test code for Because You Played experiments. // "BECAUSE_YOU_INSTALLED_FIRST_3_ROWS_SESSION_LEVEL" - Session-level // test code for Because You Played experiments. + // "LOYALTY_WEEKLY_REWARDS_ICC_FORMAT_NOW_HOME_SESSION_LEVEL" - + // Session-level test code for loyalty weekly rewards in Now! home. // "SESSION_LEVEL_TEST_CODE_LIMIT" // "CART_ABANDONMENT_USER_LEVEL" - Cart abandonment flow for purchase // flow. @@ -148725,6 +148661,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "IN_APP_OFFER_BATTLESTAR_APP_WAR_PLANET_AT_USER_LEVEL" // "IN_APP_OFFER_BATTLESTAR_APP_ESKYFUN_LEGENDS_AT_USER_LEVEL" // "IN_APP_OFFER_BATTLESTAR_APP_MAHJONG_VILLAGE_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_ONE_PUNCH_MAN_KR_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_ONE_PUNCH_MAN_TW_AT_USER_LEVEL" // "IN_APP_OFFER_ELIGIBLE_AT_USER_LEVEL" // "IN_APP_OFFER_ELIGIBLE_APP_1_AT_USER_LEVEL" // "IN_APP_OFFER_ELIGIBLE_APP_2_AT_USER_LEVEL" @@ -148745,6 +148683,10 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ESKYFUN_LEGENDS_AT_USER_LEVEL" // // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_MAHJONG_VILLAGE_AT_USER_LEVEL" + // + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ONE_PUNCH_MAN_KR_AT_USER_LEVEL" + // + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ONE_PUNCH_MAN_TW_AT_USER_LEVEL" // "IN_APP_OFFER_SAVED_AT_USER_LEVEL" // "IN_APP_OFFER_SAVED_APP_1_AT_USER_LEVEL" // "IN_APP_OFFER_SAVED_APP_2_AT_USER_LEVEL" @@ -149110,6 +149052,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // is_app_with_historical_oop_purchase restriction is turned on. // "HAS_PAST_OOP_SPEND_ON_GAME_USER_LEVEL" - User-level test code for // tagging users with previous OOP spend on games. + // "HAS_PAST_OOP_SPEND_ON_APPLICATION_USER_LEVEL" - User-level test + // code for tagging users with previous OOP spend on applications. // "NOTIFICATION_PREDICTED_REV_GAIN_FILTERING_USER_LEVEL" - User level // test code for notification campaign gain filtering experiments. If GE // decision changed after applying predicted revenue gain filtering on @@ -149247,6 +149191,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // // "HAS_INSUFFICIENT_STORED_VALUE_BALANCE_BEFORE_RENEWAL_V2_USER_LEVEL" // - User level test code for stored value top-up email reminder (V2). + // "LOYALTY_WEEKLY_REWARDS_ICC_FORMAT_NOW_HOME_USER_LEVEL" - User + // level test code for loyalty weekly rewards in Now! home. // "USER_LEVEL_TEST_CODE_LIMIT" TestCode []string `json:"testCode,omitempty"` @@ -151788,6 +151734,10 @@ type VideoContentSearchFrameStarburstData struct { // "ADSBURST_V2_128D" // "ADSBURST_V2_64D" // "ADSBURST_V2_32D" + // "ADSBURST_V2_1" + // "ADSBURST_V2_1_128D" + // "ADSBURST_V2_1_64D" + // "ADSBURST_V2_1_32D" // "SHOPPING_IMAGE_TRANSFORMATION_UNCROP" - Shopping image // transformation versions. // "SHOPPING_IMAGE_TRANSFORMATION_V2" diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index cd848e66c2d..e503c5ab97c 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -24,6 +24,13 @@ "description": "Manages Google Cloud Dataflow projects on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/dataflow", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://dataflow.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -2214,7 +2221,7 @@ } } }, - "revision": "20230902", + "revision": "20230929", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { diff --git a/gmail/v1/gmail-api.json b/gmail/v1/gmail-api.json index 215eb8120cf..a09e8a2f4a1 100644 --- a/gmail/v1/gmail-api.json +++ b/gmail/v1/gmail-api.json @@ -3077,7 +3077,7 @@ } } }, - "revision": "20230925", + "revision": "20231002", "rootUrl": "https://gmail.googleapis.com/", "schemas": { "AutoForwarding": { @@ -3233,10 +3233,6 @@ "description": "Metadata for a private key instance.", "id": "CsePrivateKeyMetadata", "properties": { - "hardwareKeyMetadata": { - "$ref": "HardwareKeyMetadata", - "description": "Metadata for hardware keys." - }, "kaclsKeyMetadata": { "$ref": "KaclsKeyMetadata", "description": "Metadata for a private key instance managed by an external key access control list service." @@ -3433,17 +3429,6 @@ }, "type": "object" }, - "HardwareKeyMetadata": { - "description": "Metadata for hardware keys.", - "id": "HardwareKeyMetadata", - "properties": { - "description": { - "description": "Description about the hardware key.", - "type": "string" - } - }, - "type": "object" - }, "History": { "description": "A record of a change to the user's mailbox. Each history change may affect multiple messages in multiple ways.", "id": "History", diff --git a/gmail/v1/gmail-gen.go b/gmail/v1/gmail-gen.go index d4b49b269c2..10bd7d58a66 100644 --- a/gmail/v1/gmail-gen.go +++ b/gmail/v1/gmail-gen.go @@ -629,9 +629,6 @@ func (s *CseKeyPair) MarshalJSON() ([]byte, error) { // CsePrivateKeyMetadata: Metadata for a private key instance. type CsePrivateKeyMetadata struct { - // HardwareKeyMetadata: Metadata for hardware keys. - HardwareKeyMetadata *HardwareKeyMetadata `json:"hardwareKeyMetadata,omitempty"` - // KaclsKeyMetadata: Metadata for a private key instance managed by an // external key access control list service. KaclsKeyMetadata *KaclsKeyMetadata `json:"kaclsKeyMetadata,omitempty"` @@ -640,15 +637,15 @@ type CsePrivateKeyMetadata struct { // key metadata instance. PrivateKeyMetadataId string `json:"privateKeyMetadataId,omitempty"` - // ForceSendFields is a list of field names (e.g. "HardwareKeyMetadata") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "KaclsKeyMetadata") 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. "HardwareKeyMetadata") to + // NullFields is a list of field names (e.g. "KaclsKeyMetadata") 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 @@ -942,34 +939,6 @@ func (s *ForwardingAddress) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HardwareKeyMetadata: Metadata for hardware keys. -type HardwareKeyMetadata struct { - // Description: Description about the hardware key. - Description string `json:"description,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 *HardwareKeyMetadata) MarshalJSON() ([]byte, error) { - type NoMethod HardwareKeyMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // History: A record of a change to the user's mailbox. Each history // change may affect multiple messages in multiple ways. type History struct { diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index 3ebd6322622..4d1709dc4df 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -682,7 +682,7 @@ } } }, - "revision": "20230901", + "revision": "20230929", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -1183,6 +1183,14 @@ "Resource": { "id": "Resource", "properties": { + "expectedNextState": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The proto or JSON formatted expected next state of the resource, wrapped in a google.protobuf.Any proto, against which the policy rules are evaluated. Services not integrated with custom org policy can omit this field. Services integrated with custom org policy must populate this field for all requests where the API call changes the state of the resource. Custom org policy backend uses these attributes to enforce custom org policies. When a proto is wrapped, it is generally the One Platform API proto. When a JSON string is wrapped, use `google.protobuf.StringValue` for the inner value. It is sufficient to pass just the max set of attributes that are allowed for use in custom constraints; other attributes can be omitted. See go/custom-constraints-org-policy-integration-guide for additional details.", + "type": "object" + }, "labels": { "additionalProperties": { "type": "string" diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index 8a458ee754d..ef2eddb68d6 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -1313,6 +1313,21 @@ type ResetIdentityAwareProxyClientSecretRequest struct { } type Resource struct { + // ExpectedNextState: The proto or JSON formatted expected next state of + // the resource, wrapped in a google.protobuf.Any proto, against which + // the policy rules are evaluated. Services not integrated with custom + // org policy can omit this field. Services integrated with custom org + // policy must populate this field for all requests where the API call + // changes the state of the resource. Custom org policy backend uses + // these attributes to enforce custom org policies. When a proto is + // wrapped, it is generally the One Platform API proto. When a JSON + // string is wrapped, use `google.protobuf.StringValue` for the inner + // value. It is sufficient to pass just the max set of attributes that + // are allowed for use in custom constraints; other attributes can be + // omitted. See go/custom-constraints-org-policy-integration-guide for + // additional details. + ExpectedNextState googleapi.RawMessage `json:"expectedNextState,omitempty"` + // Labels: The service defined labels of the resource on which the // conditions will be evaluated. The semantics - including the key names // - are vague to IAM. If the effective condition has a reference to a @@ -1356,20 +1371,21 @@ type Resource struct { // For details see go/iam-conditions-integration-guide. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Labels") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExpectedNextState") + // 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. "Labels") 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. "ExpectedNextState") 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:"-"` }