From c36263ff48c41964269c667100f29b4872921712 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 5 Oct 2020 13:15:05 -0700 Subject: [PATCH] feat(firebasehosting): update the API #### firebasehosting:v1beta1 The following keys were added: - resources.projects.resources.sites.resources.channels.methods.create.description - resources.projects.resources.sites.resources.channels.methods.create.flatPath - resources.projects.resources.sites.resources.channels.methods.create.httpMethod - resources.projects.resources.sites.resources.channels.methods.create.id - resources.projects.resources.sites.resources.channels.methods.create.parameterOrder - resources.projects.resources.sites.resources.channels.methods.create.parameters.channelId.description - resources.projects.resources.sites.resources.channels.methods.create.parameters.channelId.location - resources.projects.resources.sites.resources.channels.methods.create.parameters.channelId.type - resources.projects.resources.sites.resources.channels.methods.create.parameters.parent.description - resources.projects.resources.sites.resources.channels.methods.create.parameters.parent.location - resources.projects.resources.sites.resources.channels.methods.create.parameters.parent.pattern - resources.projects.resources.sites.resources.channels.methods.create.parameters.parent.required - resources.projects.resources.sites.resources.channels.methods.create.parameters.parent.type - resources.projects.resources.sites.resources.channels.methods.create.path - resources.projects.resources.sites.resources.channels.methods.create.request.$ref - resources.projects.resources.sites.resources.channels.methods.create.response.$ref - resources.projects.resources.sites.resources.channels.methods.create.scopes - resources.projects.resources.sites.resources.channels.methods.delete.description - resources.projects.resources.sites.resources.channels.methods.delete.flatPath - resources.projects.resources.sites.resources.channels.methods.delete.httpMethod - resources.projects.resources.sites.resources.channels.methods.delete.id - resources.projects.resources.sites.resources.channels.methods.delete.parameterOrder - resources.projects.resources.sites.resources.channels.methods.delete.parameters.name.description - resources.projects.resources.sites.resources.channels.methods.delete.parameters.name.location - resources.projects.resources.sites.resources.channels.methods.delete.parameters.name.pattern - resources.projects.resources.sites.resources.channels.methods.delete.parameters.name.required - resources.projects.resources.sites.resources.channels.methods.delete.parameters.name.type - resources.projects.resources.sites.resources.channels.methods.delete.path - resources.projects.resources.sites.resources.channels.methods.delete.response.$ref - resources.projects.resources.sites.resources.channels.methods.delete.scopes - resources.projects.resources.sites.resources.channels.methods.get.description - resources.projects.resources.sites.resources.channels.methods.get.flatPath - resources.projects.resources.sites.resources.channels.methods.get.httpMethod - resources.projects.resources.sites.resources.channels.methods.get.id - resources.projects.resources.sites.resources.channels.methods.get.parameterOrder - resources.projects.resources.sites.resources.channels.methods.get.parameters.name.description - resources.projects.resources.sites.resources.channels.methods.get.parameters.name.location - resources.projects.resources.sites.resources.channels.methods.get.parameters.name.pattern - resources.projects.resources.sites.resources.channels.methods.get.parameters.name.required - resources.projects.resources.sites.resources.channels.methods.get.parameters.name.type - resources.projects.resources.sites.resources.channels.methods.get.path - resources.projects.resources.sites.resources.channels.methods.get.response.$ref - resources.projects.resources.sites.resources.channels.methods.get.scopes - resources.projects.resources.sites.resources.channels.methods.list.description - resources.projects.resources.sites.resources.channels.methods.list.flatPath - resources.projects.resources.sites.resources.channels.methods.list.httpMethod - resources.projects.resources.sites.resources.channels.methods.list.id - resources.projects.resources.sites.resources.channels.methods.list.parameterOrder - resources.projects.resources.sites.resources.channels.methods.list.parameters.pageSize.description - resources.projects.resources.sites.resources.channels.methods.list.parameters.pageSize.format - resources.projects.resources.sites.resources.channels.methods.list.parameters.pageSize.location - resources.projects.resources.sites.resources.channels.methods.list.parameters.pageSize.type - resources.projects.resources.sites.resources.channels.methods.list.parameters.pageToken.description - resources.projects.resources.sites.resources.channels.methods.list.parameters.pageToken.location - resources.projects.resources.sites.resources.channels.methods.list.parameters.pageToken.type - resources.projects.resources.sites.resources.channels.methods.list.parameters.parent.description - resources.projects.resources.sites.resources.channels.methods.list.parameters.parent.location - resources.projects.resources.sites.resources.channels.methods.list.parameters.parent.pattern - resources.projects.resources.sites.resources.channels.methods.list.parameters.parent.required - resources.projects.resources.sites.resources.channels.methods.list.parameters.parent.type - resources.projects.resources.sites.resources.channels.methods.list.path - resources.projects.resources.sites.resources.channels.methods.list.response.$ref - resources.projects.resources.sites.resources.channels.methods.list.scopes - resources.projects.resources.sites.resources.channels.methods.patch.description - resources.projects.resources.sites.resources.channels.methods.patch.flatPath - resources.projects.resources.sites.resources.channels.methods.patch.httpMethod - resources.projects.resources.sites.resources.channels.methods.patch.id - resources.projects.resources.sites.resources.channels.methods.patch.parameterOrder - resources.projects.resources.sites.resources.channels.methods.patch.parameters.name.description - resources.projects.resources.sites.resources.channels.methods.patch.parameters.name.location - resources.projects.resources.sites.resources.channels.methods.patch.parameters.name.pattern - resources.projects.resources.sites.resources.channels.methods.patch.parameters.name.required - resources.projects.resources.sites.resources.channels.methods.patch.parameters.name.type - resources.projects.resources.sites.resources.channels.methods.patch.parameters.updateMask.description - resources.projects.resources.sites.resources.channels.methods.patch.parameters.updateMask.format - resources.projects.resources.sites.resources.channels.methods.patch.parameters.updateMask.location - resources.projects.resources.sites.resources.channels.methods.patch.parameters.updateMask.type - resources.projects.resources.sites.resources.channels.methods.patch.path - resources.projects.resources.sites.resources.channels.methods.patch.request.$ref - resources.projects.resources.sites.resources.channels.methods.patch.response.$ref - resources.projects.resources.sites.resources.channels.methods.patch.scopes - resources.projects.resources.sites.resources.versions.methods.clone.description - resources.projects.resources.sites.resources.versions.methods.clone.flatPath - resources.projects.resources.sites.resources.versions.methods.clone.httpMethod - resources.projects.resources.sites.resources.versions.methods.clone.id - resources.projects.resources.sites.resources.versions.methods.clone.parameterOrder - resources.projects.resources.sites.resources.versions.methods.clone.parameters.parent.description - resources.projects.resources.sites.resources.versions.methods.clone.parameters.parent.location - resources.projects.resources.sites.resources.versions.methods.clone.parameters.parent.pattern - resources.projects.resources.sites.resources.versions.methods.clone.parameters.parent.required - resources.projects.resources.sites.resources.versions.methods.clone.parameters.parent.type - resources.projects.resources.sites.resources.versions.methods.clone.path - resources.projects.resources.sites.resources.versions.methods.clone.request.$ref - resources.projects.resources.sites.resources.versions.methods.clone.response.$ref - resources.projects.resources.sites.resources.versions.methods.clone.scopes - resources.sites.resources.channels.methods.create.description - resources.sites.resources.channels.methods.create.flatPath - resources.sites.resources.channels.methods.create.httpMethod - resources.sites.resources.channels.methods.create.id - resources.sites.resources.channels.methods.create.parameterOrder - resources.sites.resources.channels.methods.create.parameters.channelId.description - resources.sites.resources.channels.methods.create.parameters.channelId.location - resources.sites.resources.channels.methods.create.parameters.channelId.type - resources.sites.resources.channels.methods.create.parameters.parent.description - resources.sites.resources.channels.methods.create.parameters.parent.location - resources.sites.resources.channels.methods.create.parameters.parent.pattern - resources.sites.resources.channels.methods.create.parameters.parent.required - resources.sites.resources.channels.methods.create.parameters.parent.type - resources.sites.resources.channels.methods.create.path - resources.sites.resources.channels.methods.create.request.$ref - resources.sites.resources.channels.methods.create.response.$ref - resources.sites.resources.channels.methods.create.scopes - resources.sites.resources.channels.methods.delete.description - resources.sites.resources.channels.methods.delete.flatPath - resources.sites.resources.channels.methods.delete.httpMethod - resources.sites.resources.channels.methods.delete.id - resources.sites.resources.channels.methods.delete.parameterOrder - resources.sites.resources.channels.methods.delete.parameters.name.description - resources.sites.resources.channels.methods.delete.parameters.name.location - resources.sites.resources.channels.methods.delete.parameters.name.pattern - resources.sites.resources.channels.methods.delete.parameters.name.required - resources.sites.resources.channels.methods.delete.parameters.name.type - resources.sites.resources.channels.methods.delete.path - resources.sites.resources.channels.methods.delete.response.$ref - resources.sites.resources.channels.methods.delete.scopes - resources.sites.resources.channels.methods.get.description - resources.sites.resources.channels.methods.get.flatPath - resources.sites.resources.channels.methods.get.httpMethod - resources.sites.resources.channels.methods.get.id - resources.sites.resources.channels.methods.get.parameterOrder - resources.sites.resources.channels.methods.get.parameters.name.description - resources.sites.resources.channels.methods.get.parameters.name.location - resources.sites.resources.channels.methods.get.parameters.name.pattern - resources.sites.resources.channels.methods.get.parameters.name.required - resources.sites.resources.channels.methods.get.parameters.name.type - resources.sites.resources.channels.methods.get.path - resources.sites.resources.channels.methods.get.response.$ref - resources.sites.resources.channels.methods.get.scopes - resources.sites.resources.channels.methods.list.description - resources.sites.resources.channels.methods.list.flatPath - resources.sites.resources.channels.methods.list.httpMethod - resources.sites.resources.channels.methods.list.id - resources.sites.resources.channels.methods.list.parameterOrder - resources.sites.resources.channels.methods.list.parameters.pageSize.description - resources.sites.resources.channels.methods.list.parameters.pageSize.format - resources.sites.resources.channels.methods.list.parameters.pageSize.location - resources.sites.resources.channels.methods.list.parameters.pageSize.type - resources.sites.resources.channels.methods.list.parameters.pageToken.description - resources.sites.resources.channels.methods.list.parameters.pageToken.location - resources.sites.resources.channels.methods.list.parameters.pageToken.type - resources.sites.resources.channels.methods.list.parameters.parent.description - resources.sites.resources.channels.methods.list.parameters.parent.location - resources.sites.resources.channels.methods.list.parameters.parent.pattern - resources.sites.resources.channels.methods.list.parameters.parent.required - resources.sites.resources.channels.methods.list.parameters.parent.type - resources.sites.resources.channels.methods.list.path - resources.sites.resources.channels.methods.list.response.$ref - resources.sites.resources.channels.methods.list.scopes - resources.sites.resources.channels.methods.patch.description - resources.sites.resources.channels.methods.patch.flatPath - resources.sites.resources.channels.methods.patch.httpMethod - resources.sites.resources.channels.methods.patch.id - resources.sites.resources.channels.methods.patch.parameterOrder - resources.sites.resources.channels.methods.patch.parameters.name.description - resources.sites.resources.channels.methods.patch.parameters.name.location - resources.sites.resources.channels.methods.patch.parameters.name.pattern - resources.sites.resources.channels.methods.patch.parameters.name.required - resources.sites.resources.channels.methods.patch.parameters.name.type - resources.sites.resources.channels.methods.patch.parameters.updateMask.description - resources.sites.resources.channels.methods.patch.parameters.updateMask.format - resources.sites.resources.channels.methods.patch.parameters.updateMask.location - resources.sites.resources.channels.methods.patch.parameters.updateMask.type - resources.sites.resources.channels.methods.patch.path - resources.sites.resources.channels.methods.patch.request.$ref - resources.sites.resources.channels.methods.patch.response.$ref - resources.sites.resources.channels.methods.patch.scopes - resources.sites.resources.versions.methods.clone.description - resources.sites.resources.versions.methods.clone.flatPath - resources.sites.resources.versions.methods.clone.httpMethod - resources.sites.resources.versions.methods.clone.id - resources.sites.resources.versions.methods.clone.parameterOrder - resources.sites.resources.versions.methods.clone.parameters.parent.description - resources.sites.resources.versions.methods.clone.parameters.parent.location - resources.sites.resources.versions.methods.clone.parameters.parent.pattern - resources.sites.resources.versions.methods.clone.parameters.parent.required - resources.sites.resources.versions.methods.clone.parameters.parent.type - resources.sites.resources.versions.methods.clone.path - resources.sites.resources.versions.methods.clone.request.$ref - resources.sites.resources.versions.methods.clone.response.$ref - resources.sites.resources.versions.methods.clone.scopes - schemas.Channel.description - schemas.Channel.id - schemas.Channel.properties.createTime.description - schemas.Channel.properties.createTime.format - schemas.Channel.properties.createTime.readOnly - schemas.Channel.properties.createTime.type - schemas.Channel.properties.expireTime.description - schemas.Channel.properties.expireTime.format - schemas.Channel.properties.expireTime.type - schemas.Channel.properties.labels.additionalProperties.type - schemas.Channel.properties.labels.description - schemas.Channel.properties.labels.type - schemas.Channel.properties.name.description - schemas.Channel.properties.name.type - schemas.Channel.properties.release.$ref - schemas.Channel.properties.release.description - schemas.Channel.properties.release.readOnly - schemas.Channel.properties.retainedReleaseCount.description - schemas.Channel.properties.retainedReleaseCount.format - schemas.Channel.properties.retainedReleaseCount.type - schemas.Channel.properties.ttl.description - schemas.Channel.properties.ttl.format - schemas.Channel.properties.ttl.type - schemas.Channel.properties.updateTime.description - schemas.Channel.properties.updateTime.format - schemas.Channel.properties.updateTime.readOnly - schemas.Channel.properties.updateTime.type - schemas.Channel.properties.url.description - schemas.Channel.properties.url.readOnly - schemas.Channel.properties.url.type - schemas.Channel.type - schemas.CloneVersionRequest.description - schemas.CloneVersionRequest.id - schemas.CloneVersionRequest.properties.exclude.$ref - schemas.CloneVersionRequest.properties.exclude.description - schemas.CloneVersionRequest.properties.finalize.description - schemas.CloneVersionRequest.properties.finalize.type - schemas.CloneVersionRequest.properties.include.$ref - schemas.CloneVersionRequest.properties.include.description - schemas.CloneVersionRequest.properties.sourceVersion.description - schemas.CloneVersionRequest.properties.sourceVersion.type - schemas.CloneVersionRequest.type - schemas.ListChannelsResponse.description - schemas.ListChannelsResponse.id - schemas.ListChannelsResponse.properties.channels.description - schemas.ListChannelsResponse.properties.channels.items.$ref - schemas.ListChannelsResponse.properties.channels.type - schemas.ListChannelsResponse.properties.nextPageToken.description - schemas.ListChannelsResponse.properties.nextPageToken.type - schemas.ListChannelsResponse.type - schemas.PathFilter.description - schemas.PathFilter.id - schemas.PathFilter.properties.regexes.description - schemas.PathFilter.properties.regexes.items.type - schemas.PathFilter.properties.regexes.type - schemas.PathFilter.type The following keys were changed: - resources.projects.resources.sites.resources.versions.methods.create.parameters.versionId.description - resources.sites.resources.versions.methods.create.parameters.versionId.description - schemas.Version.properties.status.enum - schemas.Version.properties.status.enumDescriptions --- discovery/firebasehosting-v1beta1.json | 508 ++- src/apis/firebasehosting/v1beta1.ts | 4256 +++++++++++++++++------- 2 files changed, 3642 insertions(+), 1122 deletions(-) diff --git a/discovery/firebasehosting-v1beta1.json b/discovery/firebasehosting-v1beta1.json index f504303c787..844222d39a0 100644 --- a/discovery/firebasehosting-v1beta1.json +++ b/discovery/firebasehosting-v1beta1.json @@ -216,6 +216,170 @@ }, "resources": { "channels": { + "methods": { + "create": { + "description": "Creates a new channel in the specified site.", + "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}/channels", + "httpMethod": "POST", + "id": "firebasehosting.projects.sites.channels.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "channelId": { + "description": "Required. Immutable. A unique id within the site to identify the channel.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The site in which this channel should be created.", + "location": "path", + "pattern": "^projects/[^/]+/sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/channels", + "request": { + "$ref": "Channel" + }, + "response": { + "$ref": "Channel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "delete": { + "description": "Deletes a channel of a site. The `live` channel cannot be deleted.", + "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}/channels/{channelsId}", + "httpMethod": "DELETE", + "id": "firebasehosting.projects.sites.channels.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The fully-qualified identifier for the site.", + "location": "path", + "pattern": "^projects/[^/]+/sites/[^/]+/channels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "get": { + "description": "Retrieves information for the specified channel of a site.", + "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}/channels/{channelsId}", + "httpMethod": "GET", + "id": "firebasehosting.projects.sites.channels.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The fully-qualified identifier for the channel.", + "location": "path", + "pattern": "^projects/[^/]+/sites/[^/]+/channels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Channel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ] + }, + "list": { + "description": "Lists the channels for the specified site. All sites have a default \"live\" channel.", + "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}/channels", + "httpMethod": "GET", + "id": "firebasehosting.projects.sites.channels.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 channels will be returned. The maximum value is 100; valuupdateses above 100 will be coerced to 100", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token from a previous request, if provided.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The site from which to list channels.", + "location": "path", + "pattern": "^projects/[^/]+/sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/channels", + "response": { + "$ref": "ListChannelsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ] + }, + "patch": { + "description": "Updates information for the specified channel of a site. This method will implicitly create a channel if it doesn't exist.", + "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}/channels/{channelsId}", + "httpMethod": "PATCH", + "id": "firebasehosting.projects.sites.channels.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The fully-qualified identifier of the Channel.", + "location": "path", + "pattern": "^projects/[^/]+/sites/[^/]+/channels/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "A comma-separated list of fields to be updated in this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Channel" + }, + "response": { + "$ref": "Channel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + } + }, "resources": { "releases": { "methods": { @@ -530,6 +694,35 @@ }, "versions": { "methods": { + "clone": { + "description": "Creates a new version on the target site using the content of the specified version.", + "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}/versions:clone", + "httpMethod": "POST", + "id": "firebasehosting.projects.sites.versions.clone", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The target site where the cloned version will reside, in the format: `sites/{site}`", + "location": "path", + "pattern": "^projects/[^/]+/sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/versions:clone", + "request": { + "$ref": "CloneVersionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, "create": { "description": "Creates a new version for a site.", "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}/versions", @@ -553,7 +746,7 @@ "type": "string" }, "versionId": { - "description": "A unique id for the new version. This is only specified for legacy version creations.", + "description": "A unique id for the new version. This is was only specified for legacy version creations, and should be blank.", "location": "query", "type": "string" } @@ -838,6 +1031,170 @@ }, "resources": { "channels": { + "methods": { + "create": { + "description": "Creates a new channel in the specified site.", + "flatPath": "v1beta1/sites/{sitesId}/channels", + "httpMethod": "POST", + "id": "firebasehosting.sites.channels.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "channelId": { + "description": "Required. Immutable. A unique id within the site to identify the channel.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The site in which this channel should be created.", + "location": "path", + "pattern": "^sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/channels", + "request": { + "$ref": "Channel" + }, + "response": { + "$ref": "Channel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "delete": { + "description": "Deletes a channel of a site. The `live` channel cannot be deleted.", + "flatPath": "v1beta1/sites/{sitesId}/channels/{channelsId}", + "httpMethod": "DELETE", + "id": "firebasehosting.sites.channels.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The fully-qualified identifier for the site.", + "location": "path", + "pattern": "^sites/[^/]+/channels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "get": { + "description": "Retrieves information for the specified channel of a site.", + "flatPath": "v1beta1/sites/{sitesId}/channels/{channelsId}", + "httpMethod": "GET", + "id": "firebasehosting.sites.channels.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The fully-qualified identifier for the channel.", + "location": "path", + "pattern": "^sites/[^/]+/channels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Channel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ] + }, + "list": { + "description": "Lists the channels for the specified site. All sites have a default \"live\" channel.", + "flatPath": "v1beta1/sites/{sitesId}/channels", + "httpMethod": "GET", + "id": "firebasehosting.sites.channels.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 channels will be returned. The maximum value is 100; valuupdateses above 100 will be coerced to 100", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token from a previous request, if provided.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The site from which to list channels.", + "location": "path", + "pattern": "^sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/channels", + "response": { + "$ref": "ListChannelsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ] + }, + "patch": { + "description": "Updates information for the specified channel of a site. This method will implicitly create a channel if it doesn't exist.", + "flatPath": "v1beta1/sites/{sitesId}/channels/{channelsId}", + "httpMethod": "PATCH", + "id": "firebasehosting.sites.channels.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The fully-qualified identifier of the Channel.", + "location": "path", + "pattern": "^sites/[^/]+/channels/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "A comma-separated list of fields to be updated in this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Channel" + }, + "response": { + "$ref": "Channel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + } + }, "resources": { "releases": { "methods": { @@ -1152,6 +1509,35 @@ }, "versions": { "methods": { + "clone": { + "description": "Creates a new version on the target site using the content of the specified version.", + "flatPath": "v1beta1/sites/{sitesId}/versions:clone", + "httpMethod": "POST", + "id": "firebasehosting.sites.versions.clone", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The target site where the cloned version will reside, in the format: `sites/{site}`", + "location": "path", + "pattern": "^sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/versions:clone", + "request": { + "$ref": "CloneVersionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, "create": { "description": "Creates a new version for a site.", "flatPath": "v1beta1/sites/{sitesId}/versions", @@ -1175,7 +1561,7 @@ "type": "string" }, "versionId": { - "description": "A unique id for the new version. This is only specified for legacy version creations.", + "description": "A unique id for the new version. This is was only specified for legacy version creations, and should be blank.", "location": "query", "type": "string" } @@ -1391,7 +1777,7 @@ } } }, - "revision": "20200811", + "revision": "20200920", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "ActingUser": { @@ -1439,6 +1825,84 @@ }, "type": "object" }, + "Channel": { + "description": "A `Channel` represents a stream of releases for a site. All sites have a default `live` channel that serves content to the live Firebase-provided domains and any connected custom domains.", + "id": "Channel", + "properties": { + "createTime": { + "description": "Output only. The time at which the channel was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "expireTime": { + "description": "The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in output whether set directly or via the `ttl` field.", + "format": "google-datetime", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Text labels used for extra metadata and/or filtering.", + "type": "object" + }, + "name": { + "description": "The fully-qualified identifier of the Channel.", + "type": "string" + }, + "release": { + "$ref": "Release", + "description": "Output only. The current release for the channel, if any.", + "readOnly": true + }, + "retainedReleaseCount": { + "description": "The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.", + "format": "int32", + "type": "integer" + }, + "ttl": { + "description": "Input only. A time-to-live for this channel. Sets `expire_time` to the provided duration past the time of the request.", + "format": "google-duration", + "type": "string" + }, + "updateTime": { + "description": "Output only. The time at which the channel was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "url": { + "description": "Output only. The URL at which the channel can be viewed. For the `live` channel, the content of the current release may also be visible at other URLs.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CloneVersionRequest": { + "description": "The request sent to CloneVersion.", + "id": "CloneVersionRequest", + "properties": { + "exclude": { + "$ref": "PathFilter", + "description": "If provided, only paths that do not match any of the regexes in this list will be included in the new version." + }, + "finalize": { + "description": "If true, immediately finalize the version after cloning is complete.", + "type": "boolean" + }, + "include": { + "$ref": "PathFilter", + "description": "If provided, only paths that match one or more regexes in this list will be included in the new version." + }, + "sourceVersion": { + "description": "Required. The name of the version to be cloned, in the format: `sites/{site}/versions/{version}`", + "type": "string" + } + }, + "type": "object" + }, "CloudRunRewrite": { "description": "A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error).", "id": "CloudRunRewrite", @@ -1645,6 +2109,24 @@ }, "type": "object" }, + "ListChannelsResponse": { + "description": "The response returned by ListChannels.", + "id": "ListChannelsResponse", + "properties": { + "channels": { + "description": "The list of channels.", + "items": { + "$ref": "Channel" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If there are additional releases remaining beyond the ones in this response, then supply this token in the next [`list`](../sites.channels/list) call to continue with the next set of releases.", + "type": "string" + } + }, + "type": "object" + }, "ListDomainsResponse": { "description": "The response to listing Domains.", "id": "ListDomainsResponse", @@ -1749,6 +2231,20 @@ }, "type": "object" }, + "PathFilter": { + "description": "A representation of filter path.", + "id": "PathFilter", + "properties": { + "regexes": { + "description": "An array of regexes to filter by.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "PopulateVersionFilesRequest": { "description": "The request to populate a Version's Files.", "id": "PopulateVersionFilesRequest", @@ -2063,7 +2559,8 @@ "FINALIZED", "DELETED", "ABANDONED", - "EXPIRED" + "EXPIRED", + "CLONING" ], "enumDescriptions": [ "The default status; should not be intentionally used.", @@ -2071,7 +2568,8 @@ "All content has been added to the version, and the version can no longer be changed.", "The version has been deleted.", "The version was not updated to `FINALIZED` within 12 hours and was automatically deleted.", - "The version is outside the site-configured limit for the number of retained versions, so the version's content is scheduled for deletion." + "The version is outside the site-configured limit for the number of retained versions, so the version's content is scheduled for deletion.", + "The version is being cloned from another version. All content is still being copied over." ], "type": "string" }, diff --git a/src/apis/firebasehosting/v1beta1.ts b/src/apis/firebasehosting/v1beta1.ts index bb88e27ed30..e9796560508 100644 --- a/src/apis/firebasehosting/v1beta1.ts +++ b/src/apis/firebasehosting/v1beta1.ts @@ -168,6 +168,68 @@ export namespace firebasehosting_v1beta1 { */ token?: string | null; } + /** + * A `Channel` represents a stream of releases for a site. All sites have a default `live` channel that serves content to the live Firebase-provided domains and any connected custom domains. + */ + export interface Schema$Channel { + /** + * Output only. The time at which the channel was created. + */ + createTime?: string | null; + /** + * The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in output whether set directly or via the `ttl` field. + */ + expireTime?: string | null; + /** + * Text labels used for extra metadata and/or filtering. + */ + labels?: {[key: string]: string} | null; + /** + * The fully-qualified identifier of the Channel. + */ + name?: string | null; + /** + * Output only. The current release for the channel, if any. + */ + release?: Schema$Release; + /** + * The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels. + */ + retainedReleaseCount?: number | null; + /** + * Input only. A time-to-live for this channel. Sets `expire_time` to the provided duration past the time of the request. + */ + ttl?: string | null; + /** + * Output only. The time at which the channel was last updated. + */ + updateTime?: string | null; + /** + * Output only. The URL at which the channel can be viewed. For the `live` channel, the content of the current release may also be visible at other URLs. + */ + url?: string | null; + } + /** + * The request sent to CloneVersion. + */ + export interface Schema$CloneVersionRequest { + /** + * If provided, only paths that do not match any of the regexes in this list will be included in the new version. + */ + exclude?: Schema$PathFilter; + /** + * If true, immediately finalize the version after cloning is complete. + */ + finalize?: boolean | null; + /** + * If provided, only paths that match one or more regexes in this list will be included in the new version. + */ + include?: Schema$PathFilter; + /** + * Required. The name of the version to be cloned, in the format: `sites/{site}/versions/{version}` + */ + sourceVersion?: string | null; + } /** * A configured rewrite that directs requests to a Cloud Run service. If the Cloud Run service does not exist when setting or updating your Firebase Hosting configuration, then the request fails. Any errors from the Cloud Run service are passed to the end user (for example, if you delete a service, any requests directed to that service receive a `404` error). */ @@ -290,6 +352,19 @@ export namespace firebasehosting_v1beta1 { */ root?: string | null; } + /** + * The response returned by ListChannels. + */ + export interface Schema$ListChannelsResponse { + /** + * The list of channels. + */ + channels?: Schema$Channel[]; + /** + * If there are additional releases remaining beyond the ones in this response, then supply this token in the next [`list`](../sites.channels/list) call to continue with the next set of releases. + */ + nextPageToken?: string | null; + } /** * The response to listing Domains. */ @@ -358,6 +433,15 @@ export namespace firebasehosting_v1beta1 { */ response?: {[key: string]: any} | null; } + /** + * A representation of filter path. + */ + export interface Schema$PathFilter { + /** + * An array of regexes to filter by. + */ + regexes?: string[] | null; + } /** * The request to populate a Version's Files. */ @@ -1100,17 +1184,10 @@ export namespace firebasehosting_v1beta1 { this.context ); } - } - - export class Resource$Projects$Sites$Channels$Releases { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * firebasehosting.projects.sites.channels.releases.create - * @desc Creates a new release which makes the content of the specified version actively display on the appropriate URL(s). + * firebasehosting.projects.sites.channels.create + * @desc Creates a new channel in the specified site. * @example * // Before running the sample: * // - Enable the API at: @@ -1137,22 +1214,25 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.channels.releases.create({ - * // Required. The site that the release belongs to, in the format: sites/ site-name - * parent: 'projects/my-project/sites/my-site/channels/my-channel', - * // The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. - * versionName: 'placeholder-value', + * const res = await firebasehosting.projects.sites.channels.create({ + * // Required. Immutable. A unique id within the site to identify the channel. + * channelId: 'placeholder-value', + * // Required. The site in which this channel should be created. + * parent: 'projects/my-project/sites/my-site', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "message": "my_message", + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, * // "name": "my_name", - * // "releaseTime": "my_releaseTime", - * // "releaseUser": {}, - * // "type": "my_type", - * // "version": {} + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" * // } * }, * }); @@ -1160,12 +1240,15 @@ export namespace firebasehosting_v1beta1 { * * // Example response * // { - * // "message": "my_message", + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, * // "name": "my_name", - * // "releaseTime": "my_releaseTime", - * // "releaseUser": {}, - * // "type": "my_type", - * // "version": {} + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" * // } * } * @@ -1174,61 +1257,61 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.channels.releases.create + * @alias firebasehosting.projects.sites.channels.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The site that the release belongs to, in the format: sites/ site-name - * @param {string=} params.versionName The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. - * @param {().Release} params.requestBody Request body data + * @param {string=} params.channelId Required. Immutable. A unique id within the site to identify the channel. + * @param {string} params.parent Required. The site in which this channel should be created. + * @param {().Channel} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ create( - params: Params$Resource$Projects$Sites$Channels$Releases$Create, + params: Params$Resource$Projects$Sites$Channels$Create, options: StreamMethodOptions ): GaxiosPromise; create( - params?: Params$Resource$Projects$Sites$Channels$Releases$Create, + params?: Params$Resource$Projects$Sites$Channels$Create, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; create( - params: Params$Resource$Projects$Sites$Channels$Releases$Create, + params: Params$Resource$Projects$Sites$Channels$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; create( - params: Params$Resource$Projects$Sites$Channels$Releases$Create, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Projects$Sites$Channels$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; create( - params: Params$Resource$Projects$Sites$Channels$Releases$Create, - callback: BodyResponseCallback + params: Params$Resource$Projects$Sites$Channels$Create, + callback: BodyResponseCallback ): void; - create(callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; create( paramsOrCallback?: - | Params$Resource$Projects$Sites$Channels$Releases$Create - | BodyResponseCallback + | Params$Resource$Projects$Sites$Channels$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Channels$Releases$Create; + {}) as Params$Resource$Projects$Sites$Channels$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Channels$Releases$Create; + params = {} as Params$Resource$Projects$Sites$Channels$Create; options = {}; } @@ -1242,7 +1325,7 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/releases').replace( + url: (rootUrl + '/v1beta1/{+parent}/channels').replace( /([^:]\/)\/+/g, '$1' ), @@ -1256,18 +1339,18 @@ export namespace firebasehosting_v1beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * firebasehosting.projects.sites.channels.releases.list - * @desc Lists the releases that have been created on the specified site. + * firebasehosting.projects.sites.channels.delete + * @desc Deletes a channel of a site. The `live` channel cannot be deleted. * @example * // Before running the sample: * // - Enable the API at: @@ -1285,9 +1368,7 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', - * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -1296,21 +1377,14 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.channels.releases.list({ - * // The page size to return. Defaults to 100. - * pageSize: 'placeholder-value', - * // The next_page_token from a previous request, if provided. - * pageToken: 'placeholder-value', - * // Required. The parent for which to list files, in the format: sites/site-name - * parent: 'projects/my-project/sites/my-site/channels/my-channel', + * const res = await firebasehosting.projects.sites.channels.delete({ + * // Required. The fully-qualified identifier for the site. + * name: 'projects/my-project/sites/my-site/channels/my-channel', * }); * console.log(res.data); * * // Example response - * // { - * // "nextPageToken": "my_nextPageToken", - * // "releases": [] - * // } + * // {} * } * * main().catch(e => { @@ -1318,66 +1392,59 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.channels.releases.list + * @alias firebasehosting.projects.sites.channels.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {integer=} params.pageSize The page size to return. Defaults to 100. - * @param {string=} params.pageToken The next_page_token from a previous request, if provided. - * @param {string} params.parent Required. The parent for which to list files, in the format: sites/site-name + * @param {string} params.name Required. The fully-qualified identifier for the site. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list( - params: Params$Resource$Projects$Sites$Channels$Releases$List, + delete( + params: Params$Resource$Projects$Sites$Channels$Delete, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Sites$Channels$Releases$List, + delete( + params?: Params$Resource$Projects$Sites$Channels$Delete, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Sites$Channels$Releases$List, + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Sites$Channels$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Channels$Releases$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Sites$Channels$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Channels$Releases$List, - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Sites$Channels$Delete, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Sites$Channels$Releases$List - | BodyResponseCallback + | Params$Resource$Projects$Sites$Channels$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Channels$Releases$List; + {}) as Params$Resource$Projects$Sites$Channels$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Channels$Releases$List; + params = {} as Params$Resource$Projects$Sites$Channels$Delete; options = {}; } @@ -1391,71 +1458,29 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/releases').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Sites$Channels$Releases$Create - extends StandardParameters { - /** - * Required. The site that the release belongs to, in the format: sites/ site-name - */ - parent?: string; - /** - * The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. - */ - versionName?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Release; - } - export interface Params$Resource$Projects$Sites$Channels$Releases$List - extends StandardParameters { - /** - * The page size to return. Defaults to 100. - */ - pageSize?: number; - /** - * The next_page_token from a previous request, if provided. - */ - pageToken?: string; - /** - * Required. The parent for which to list files, in the format: sites/site-name - */ - parent?: string; - } - - export class Resource$Projects$Sites$Domains { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * firebasehosting.projects.sites.domains.create - * @desc Creates a domain mapping on the specified site. + * firebasehosting.projects.sites.channels.get + * @desc Retrieves information for the specified channel of a site. * @example * // Before running the sample: * // - Enable the API at: @@ -1473,7 +1498,9 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -1482,33 +1509,23 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.domains.create({ - * // Required. The parent to create the domain association for, in the format: sites/site-name - * parent: 'projects/my-project/sites/my-site', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "domainName": "my_domainName", - * // "domainRedirect": {}, - * // "provisioning": {}, - * // "site": "my_site", - * // "status": "my_status", - * // "updateTime": "my_updateTime" - * // } - * }, + * const res = await firebasehosting.projects.sites.channels.get({ + * // Required. The fully-qualified identifier for the channel. + * name: 'projects/my-project/sites/my-site/channels/my-channel', * }); * console.log(res.data); * * // Example response * // { - * // "domainName": "my_domainName", - * // "domainRedirect": {}, - * // "provisioning": {}, - * // "site": "my_site", - * // "status": "my_status", - * // "updateTime": "my_updateTime" + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, + * // "name": "my_name", + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" * // } * } * @@ -1517,60 +1534,59 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.domains.create + * @alias firebasehosting.projects.sites.channels.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The parent to create the domain association for, in the format: sites/site-name - * @param {().Domain} params.requestBody Request body data + * @param {string} params.name Required. The fully-qualified identifier for the channel. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create( - params: Params$Resource$Projects$Sites$Domains$Create, + get( + params: Params$Resource$Projects$Sites$Channels$Get, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Sites$Domains$Create, + get( + params?: Params$Resource$Projects$Sites$Channels$Get, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Sites$Domains$Create, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Sites$Channels$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Sites$Domains$Create, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Sites$Channels$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Sites$Domains$Create, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Sites$Channels$Get, + callback: BodyResponseCallback ): void; - create(callback: BodyResponseCallback): void; - create( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Projects$Sites$Domains$Create - | BodyResponseCallback + | Params$Resource$Projects$Sites$Channels$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Domains$Create; + {}) as Params$Resource$Projects$Sites$Channels$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Domains$Create; + params = {} as Params$Resource$Projects$Sites$Channels$Get; options = {}; } @@ -1584,32 +1600,29 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/domains').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * firebasehosting.projects.sites.domains.delete - * @desc Deletes the existing domain mapping on the specified site. + * firebasehosting.projects.sites.channels.list + * @desc Lists the channels for the specified site. All sites have a default "live" channel. * @example * // Before running the sample: * // - Enable the API at: @@ -1627,7 +1640,9 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -1636,14 +1651,21 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.domains.delete({ - * // Required. The name of the domain association to delete. - * name: 'projects/my-project/sites/my-site/domains/my-domain', + * const res = await firebasehosting.projects.sites.channels.list({ + * // The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 channels will be returned. The maximum value is 100; valuupdateses above 100 will be coerced to 100 + * pageSize: 'placeholder-value', + * // The next_page_token from a previous request, if provided. + * pageToken: 'placeholder-value', + * // Required. The site from which to list channels. + * parent: 'projects/my-project/sites/my-site', * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "channels": [], + * // "nextPageToken": "my_nextPageToken" + * // } * } * * main().catch(e => { @@ -1651,59 +1673,66 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.domains.delete + * @alias firebasehosting.projects.sites.channels.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the domain association to delete. + * @param {integer=} params.pageSize The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 channels will be returned. The maximum value is 100; valuupdateses above 100 will be coerced to 100 + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. + * @param {string} params.parent Required. The site from which to list channels. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete( - params: Params$Resource$Projects$Sites$Domains$Delete, + list( + params: Params$Resource$Projects$Sites$Channels$List, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Sites$Domains$Delete, + list( + params?: Params$Resource$Projects$Sites$Channels$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Sites$Domains$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Sites$Channels$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Sites$Domains$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Sites$Channels$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Sites$Domains$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Sites$Channels$List, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Sites$Domains$Delete - | BodyResponseCallback + | Params$Resource$Projects$Sites$Channels$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Domains$Delete; + {}) as Params$Resource$Projects$Sites$Channels$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Domains$Delete; + params = {} as Params$Resource$Projects$Sites$Channels$List; options = {}; } @@ -1717,29 +1746,32 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v1beta1/{+parent}/channels').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * firebasehosting.projects.sites.domains.get - * @desc Gets a domain mapping on the specified site. + * firebasehosting.projects.sites.channels.patch + * @desc Updates information for the specified channel of a site. This method will implicitly create a channel if it doesn't exist. * @example * // Before running the sample: * // - Enable the API at: @@ -1757,9 +1789,7 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', - * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -1768,20 +1798,41 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.domains.get({ - * // Required. The name of the domain configuration to get. - * name: 'projects/my-project/sites/my-site/domains/my-domain', + * const res = await firebasehosting.projects.sites.channels.patch({ + * // The fully-qualified identifier of the Channel. + * name: 'projects/my-project/sites/my-site/channels/my-channel', + * // A comma-separated list of fields to be updated in this request. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, + * // "name": "my_name", + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "domainName": "my_domainName", - * // "domainRedirect": {}, - * // "provisioning": {}, - * // "site": "my_site", - * // "status": "my_status", - * // "updateTime": "my_updateTime" + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, + * // "name": "my_name", + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" * // } * } * @@ -1790,59 +1841,61 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.domains.get + * @alias firebasehosting.projects.sites.channels.patch * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the domain configuration to get. + * @param {string} params.name The fully-qualified identifier of the Channel. + * @param {string=} params.updateMask A comma-separated list of fields to be updated in this request. + * @param {().Channel} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get( - params: Params$Resource$Projects$Sites$Domains$Get, + patch( + params: Params$Resource$Projects$Sites$Channels$Patch, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Sites$Domains$Get, + patch( + params?: Params$Resource$Projects$Sites$Channels$Patch, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Sites$Domains$Get, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Sites$Channels$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Sites$Domains$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Sites$Channels$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Sites$Domains$Get, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Sites$Channels$Patch, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Projects$Sites$Domains$Get - | BodyResponseCallback + | Params$Resource$Projects$Sites$Channels$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Domains$Get; + {}) as Params$Resource$Projects$Sites$Channels$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Domains$Get; + params = {} as Params$Resource$Projects$Sites$Channels$Patch; options = {}; } @@ -1857,7 +1910,7 @@ export namespace firebasehosting_v1beta1 { options: Object.assign( { url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -1867,18 +1920,87 @@ export namespace firebasehosting_v1beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Projects$Sites$Channels$Create + extends StandardParameters { /** - * firebasehosting.projects.sites.domains.list - * @desc Lists the domains for the specified site. + * Required. Immutable. A unique id within the site to identify the channel. + */ + channelId?: string; + /** + * Required. The site in which this channel should be created. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Channel; + } + export interface Params$Resource$Projects$Sites$Channels$Delete + extends StandardParameters { + /** + * Required. The fully-qualified identifier for the site. + */ + name?: string; + } + export interface Params$Resource$Projects$Sites$Channels$Get + extends StandardParameters { + /** + * Required. The fully-qualified identifier for the channel. + */ + name?: string; + } + export interface Params$Resource$Projects$Sites$Channels$List + extends StandardParameters { + /** + * The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 channels will be returned. The maximum value is 100; valuupdateses above 100 will be coerced to 100 + */ + pageSize?: number; + /** + * The next_page_token from a previous request, if provided. + */ + pageToken?: string; + /** + * Required. The site from which to list channels. + */ + parent?: string; + } + export interface Params$Resource$Projects$Sites$Channels$Patch + extends StandardParameters { + /** + * The fully-qualified identifier of the Channel. + */ + name?: string; + /** + * A comma-separated list of fields to be updated in this request. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Channel; + } + + export class Resource$Projects$Sites$Channels$Releases { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * firebasehosting.projects.sites.channels.releases.create + * @desc Creates a new release which makes the content of the specified version actively display on the appropriate URL(s). * @example * // Before running the sample: * // - Enable the API at: @@ -1896,9 +2018,7 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', - * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -1907,20 +2027,35 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.domains.list({ - * // The page size to return. Defaults to 50. - * pageSize: 'placeholder-value', - * // The next_page_token from a previous request, if provided. - * pageToken: 'placeholder-value', - * // Required. The parent for which to list domains, in the format: sites/ site-name - * parent: 'projects/my-project/sites/my-site', + * const res = await firebasehosting.projects.sites.channels.releases.create({ + * // Required. The site that the release belongs to, in the format: sites/ site-name + * parent: 'projects/my-project/sites/my-site/channels/my-channel', + * // The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * versionName: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "message": "my_message", + * // "name": "my_name", + * // "releaseTime": "my_releaseTime", + * // "releaseUser": {}, + * // "type": "my_type", + * // "version": {} + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "domains": [], - * // "nextPageToken": "my_nextPageToken" + * // "message": "my_message", + * // "name": "my_name", + * // "releaseTime": "my_releaseTime", + * // "releaseUser": {}, + * // "type": "my_type", + * // "version": {} * // } * } * @@ -1929,64 +2064,61 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.domains.list + * @alias firebasehosting.projects.sites.channels.releases.create * @memberOf! () * * @param {object} params Parameters for request - * @param {integer=} params.pageSize The page size to return. Defaults to 50. - * @param {string=} params.pageToken The next_page_token from a previous request, if provided. - * @param {string} params.parent Required. The parent for which to list domains, in the format: sites/ site-name + * @param {string} params.parent Required. The site that the release belongs to, in the format: sites/ site-name + * @param {string=} params.versionName The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * @param {().Release} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list( - params: Params$Resource$Projects$Sites$Domains$List, + create( + params: Params$Resource$Projects$Sites$Channels$Releases$Create, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Sites$Domains$List, + create( + params?: Params$Resource$Projects$Sites$Channels$Releases$Create, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Sites$Domains$List, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Sites$Channels$Releases$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Domains$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Sites$Channels$Releases$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Domains$List, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Sites$Channels$Releases$Create, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + create(callback: BodyResponseCallback): void; + create( paramsOrCallback?: - | Params$Resource$Projects$Sites$Domains$List - | BodyResponseCallback + | Params$Resource$Projects$Sites$Channels$Releases$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Domains$List; + {}) as Params$Resource$Projects$Sites$Channels$Releases$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Domains$List; + params = {} as Params$Resource$Projects$Sites$Channels$Releases$Create; options = {}; } @@ -2000,11 +2132,11 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/domains').replace( + url: (rootUrl + '/v1beta1/{+parent}/releases').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -2014,18 +2146,18 @@ export namespace firebasehosting_v1beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * firebasehosting.projects.sites.domains.update - * @desc Updates the specified domain mapping, creating the mapping as if it does not exist. + * firebasehosting.projects.sites.channels.releases.list + * @desc Lists the releases that have been created on the specified site. * @example * // Before running the sample: * // - Enable the API at: @@ -2043,7 +2175,9 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -2052,33 +2186,20 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.domains.update({ - * // Required. The name of the domain association to update or create, if an association doesn't already exist. - * name: 'projects/my-project/sites/my-site/domains/my-domain', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "domainName": "my_domainName", - * // "domainRedirect": {}, - * // "provisioning": {}, - * // "site": "my_site", - * // "status": "my_status", - * // "updateTime": "my_updateTime" - * // } - * }, + * const res = await firebasehosting.projects.sites.channels.releases.list({ + * // The page size to return. Defaults to 100. + * pageSize: 'placeholder-value', + * // The next_page_token from a previous request, if provided. + * pageToken: 'placeholder-value', + * // Required. The parent for which to list files, in the format: sites/site-name + * parent: 'projects/my-project/sites/my-site/channels/my-channel', * }); * console.log(res.data); * * // Example response * // { - * // "domainName": "my_domainName", - * // "domainRedirect": {}, - * // "provisioning": {}, - * // "site": "my_site", - * // "status": "my_status", - * // "updateTime": "my_updateTime" + * // "nextPageToken": "my_nextPageToken", + * // "releases": [] * // } * } * @@ -2087,60 +2208,66 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.domains.update + * @alias firebasehosting.projects.sites.channels.releases.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the domain association to update or create, if an association doesn't already exist. - * @param {().Domain} params.requestBody Request body data + * @param {integer=} params.pageSize The page size to return. Defaults to 100. + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. + * @param {string} params.parent Required. The parent for which to list files, in the format: sites/site-name * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - update( - params: Params$Resource$Projects$Sites$Domains$Update, + list( + params: Params$Resource$Projects$Sites$Channels$Releases$List, options: StreamMethodOptions ): GaxiosPromise; - update( - params?: Params$Resource$Projects$Sites$Domains$Update, + list( + params?: Params$Resource$Projects$Sites$Channels$Releases$List, options?: MethodOptions - ): GaxiosPromise; - update( - params: Params$Resource$Projects$Sites$Domains$Update, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Sites$Channels$Releases$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - update( - params: Params$Resource$Projects$Sites$Domains$Update, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Sites$Channels$Releases$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - update( - params: Params$Resource$Projects$Sites$Domains$Update, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Sites$Channels$Releases$List, + callback: BodyResponseCallback ): void; - update(callback: BodyResponseCallback): void; - update( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Sites$Domains$Update - | BodyResponseCallback + | Params$Resource$Projects$Sites$Channels$Releases$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Domains$Update; + {}) as Params$Resource$Projects$Sites$Channels$Releases$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Domains$Update; + params = {} as Params$Resource$Projects$Sites$Channels$Releases$List; options = {}; } @@ -2154,57 +2281,50 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PUT', + url: (rootUrl + '/v1beta1/{+parent}/releases').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Projects$Sites$Domains$Create + export interface Params$Resource$Projects$Sites$Channels$Releases$Create extends StandardParameters { /** - * Required. The parent to create the domain association for, in the format: sites/site-name + * Required. The site that the release belongs to, in the format: sites/ site-name */ parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Domain; - } - export interface Params$Resource$Projects$Sites$Domains$Delete - extends StandardParameters { /** - * Required. The name of the domain association to delete. + * The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. */ - name?: string; - } - export interface Params$Resource$Projects$Sites$Domains$Get - extends StandardParameters { + versionName?: string; + /** - * Required. The name of the domain configuration to get. + * Request body metadata */ - name?: string; + requestBody?: Schema$Release; } - export interface Params$Resource$Projects$Sites$Domains$List + export interface Params$Resource$Projects$Sites$Channels$Releases$List extends StandardParameters { /** - * The page size to return. Defaults to 50. + * The page size to return. Defaults to 100. */ pageSize?: number; /** @@ -2212,32 +2332,20 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The parent for which to list domains, in the format: sites/ site-name + * Required. The parent for which to list files, in the format: sites/site-name */ parent?: string; } - export interface Params$Resource$Projects$Sites$Domains$Update - extends StandardParameters { - /** - * Required. The name of the domain association to update or create, if an association doesn't already exist. - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Domain; - } - export class Resource$Projects$Sites$Releases { + export class Resource$Projects$Sites$Domains { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * firebasehosting.projects.sites.releases.create - * @desc Creates a new release which makes the content of the specified version actively display on the appropriate URL(s). + * firebasehosting.projects.sites.domains.create + * @desc Creates a domain mapping on the specified site. * @example * // Before running the sample: * // - Enable the API at: @@ -2264,22 +2372,20 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.releases.create({ - * // Required. The site that the release belongs to, in the format: sites/ site-name + * const res = await firebasehosting.projects.sites.domains.create({ + * // Required. The parent to create the domain association for, in the format: sites/site-name * parent: 'projects/my-project/sites/my-site', - * // The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. - * versionName: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "message": "my_message", - * // "name": "my_name", - * // "releaseTime": "my_releaseTime", - * // "releaseUser": {}, - * // "type": "my_type", - * // "version": {} + * // "domainName": "my_domainName", + * // "domainRedirect": {}, + * // "provisioning": {}, + * // "site": "my_site", + * // "status": "my_status", + * // "updateTime": "my_updateTime" * // } * }, * }); @@ -2287,12 +2393,12 @@ export namespace firebasehosting_v1beta1 { * * // Example response * // { - * // "message": "my_message", - * // "name": "my_name", - * // "releaseTime": "my_releaseTime", - * // "releaseUser": {}, - * // "type": "my_type", - * // "version": {} + * // "domainName": "my_domainName", + * // "domainRedirect": {}, + * // "provisioning": {}, + * // "site": "my_site", + * // "status": "my_status", + * // "updateTime": "my_updateTime" * // } * } * @@ -2301,61 +2407,60 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.releases.create + * @alias firebasehosting.projects.sites.domains.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The site that the release belongs to, in the format: sites/ site-name - * @param {string=} params.versionName The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. - * @param {().Release} params.requestBody Request body data + * @param {string} params.parent Required. The parent to create the domain association for, in the format: sites/site-name + * @param {().Domain} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ create( - params: Params$Resource$Projects$Sites$Releases$Create, + params: Params$Resource$Projects$Sites$Domains$Create, options: StreamMethodOptions ): GaxiosPromise; create( - params?: Params$Resource$Projects$Sites$Releases$Create, + params?: Params$Resource$Projects$Sites$Domains$Create, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; create( - params: Params$Resource$Projects$Sites$Releases$Create, + params: Params$Resource$Projects$Sites$Domains$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; create( - params: Params$Resource$Projects$Sites$Releases$Create, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Projects$Sites$Domains$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; create( - params: Params$Resource$Projects$Sites$Releases$Create, - callback: BodyResponseCallback + params: Params$Resource$Projects$Sites$Domains$Create, + callback: BodyResponseCallback ): void; - create(callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; create( paramsOrCallback?: - | Params$Resource$Projects$Sites$Releases$Create - | BodyResponseCallback + | Params$Resource$Projects$Sites$Domains$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Releases$Create; + {}) as Params$Resource$Projects$Sites$Domains$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Releases$Create; + params = {} as Params$Resource$Projects$Sites$Domains$Create; options = {}; } @@ -2369,7 +2474,7 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/releases').replace( + url: (rootUrl + '/v1beta1/{+parent}/domains').replace( /([^:]\/)\/+/g, '$1' ), @@ -2383,18 +2488,18 @@ export namespace firebasehosting_v1beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * firebasehosting.projects.sites.releases.list - * @desc Lists the releases that have been created on the specified site. + * firebasehosting.projects.sites.domains.delete + * @desc Deletes the existing domain mapping on the specified site. * @example * // Before running the sample: * // - Enable the API at: @@ -2412,9 +2517,7 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', - * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -2423,21 +2526,14 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.releases.list({ - * // The page size to return. Defaults to 100. - * pageSize: 'placeholder-value', - * // The next_page_token from a previous request, if provided. - * pageToken: 'placeholder-value', - * // Required. The parent for which to list files, in the format: sites/site-name - * parent: 'projects/my-project/sites/my-site', + * const res = await firebasehosting.projects.sites.domains.delete({ + * // Required. The name of the domain association to delete. + * name: 'projects/my-project/sites/my-site/domains/my-domain', * }); * console.log(res.data); * * // Example response - * // { - * // "nextPageToken": "my_nextPageToken", - * // "releases": [] - * // } + * // {} * } * * main().catch(e => { @@ -2445,66 +2541,59 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.releases.list + * @alias firebasehosting.projects.sites.domains.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {integer=} params.pageSize The page size to return. Defaults to 100. - * @param {string=} params.pageToken The next_page_token from a previous request, if provided. - * @param {string} params.parent Required. The parent for which to list files, in the format: sites/site-name + * @param {string} params.name Required. The name of the domain association to delete. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list( - params: Params$Resource$Projects$Sites$Releases$List, + delete( + params: Params$Resource$Projects$Sites$Domains$Delete, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Sites$Releases$List, + delete( + params?: Params$Resource$Projects$Sites$Domains$Delete, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Sites$Releases$List, + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Sites$Domains$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Releases$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Sites$Domains$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Releases$List, - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Sites$Domains$Delete, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Sites$Releases$List - | BodyResponseCallback + | Params$Resource$Projects$Sites$Domains$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Releases$List; + {}) as Params$Resource$Projects$Sites$Domains$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Releases$List; + params = {} as Params$Resource$Projects$Sites$Domains$Delete; options = {}; } @@ -2518,73 +2607,29 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/releases').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Sites$Releases$Create - extends StandardParameters { - /** - * Required. The site that the release belongs to, in the format: sites/ site-name - */ - parent?: string; - /** - * The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. - */ - versionName?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Release; - } - export interface Params$Resource$Projects$Sites$Releases$List - extends StandardParameters { - /** - * The page size to return. Defaults to 100. - */ - pageSize?: number; - /** - * The next_page_token from a previous request, if provided. - */ - pageToken?: string; - /** - * Required. The parent for which to list files, in the format: sites/site-name - */ - parent?: string; - } - - export class Resource$Projects$Sites$Versions { - context: APIRequestContext; - files: Resource$Projects$Sites$Versions$Files; - constructor(context: APIRequestContext) { - this.context = context; - this.files = new Resource$Projects$Sites$Versions$Files(this.context); - } /** - * firebasehosting.projects.sites.versions.create - * @desc Creates a new version for a site. + * firebasehosting.projects.sites.domains.get + * @desc Gets a domain mapping on the specified site. * @example * // Before running the sample: * // - Enable the API at: @@ -2602,7 +2647,9 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -2611,51 +2658,20 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.versions.create({ - * // Required. The parent to create the version for, in the format: sites/ site-name - * parent: 'projects/my-project/sites/my-site', - * // The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. - * sizeBytes: 'placeholder-value', - * // A unique id for the new version. This is only specified for legacy version creations. - * versionId: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "config": {}, - * // "createTime": "my_createTime", - * // "createUser": {}, - * // "deleteTime": "my_deleteTime", - * // "deleteUser": {}, - * // "fileCount": "my_fileCount", - * // "finalizeTime": "my_finalizeTime", - * // "finalizeUser": {}, - * // "labels": {}, - * // "name": "my_name", - * // "preview": {}, - * // "status": "my_status", - * // "versionBytes": "my_versionBytes" - * // } - * }, + * const res = await firebasehosting.projects.sites.domains.get({ + * // Required. The name of the domain configuration to get. + * name: 'projects/my-project/sites/my-site/domains/my-domain', * }); * console.log(res.data); * * // Example response * // { - * // "config": {}, - * // "createTime": "my_createTime", - * // "createUser": {}, - * // "deleteTime": "my_deleteTime", - * // "deleteUser": {}, - * // "fileCount": "my_fileCount", - * // "finalizeTime": "my_finalizeTime", - * // "finalizeUser": {}, - * // "labels": {}, - * // "name": "my_name", - * // "preview": {}, + * // "domainName": "my_domainName", + * // "domainRedirect": {}, + * // "provisioning": {}, + * // "site": "my_site", * // "status": "my_status", - * // "versionBytes": "my_versionBytes" + * // "updateTime": "my_updateTime" * // } * } * @@ -2664,62 +2680,59 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.versions.create + * @alias firebasehosting.projects.sites.domains.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The parent to create the version for, in the format: sites/ site-name - * @param {string=} params.sizeBytes The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. - * @param {string=} params.versionId A unique id for the new version. This is only specified for legacy version creations. - * @param {().Version} params.requestBody Request body data + * @param {string} params.name Required. The name of the domain configuration to get. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create( - params: Params$Resource$Projects$Sites$Versions$Create, + get( + params: Params$Resource$Projects$Sites$Domains$Get, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Sites$Versions$Create, + get( + params?: Params$Resource$Projects$Sites$Domains$Get, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Sites$Versions$Create, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Sites$Domains$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Sites$Versions$Create, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - create( - params: Params$Resource$Projects$Sites$Versions$Create, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Sites$Domains$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create(callback: BodyResponseCallback): void; - create( + get( + params: Params$Resource$Projects$Sites$Domains$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Projects$Sites$Versions$Create - | BodyResponseCallback + | Params$Resource$Projects$Sites$Domains$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Versions$Create; + {}) as Params$Resource$Projects$Sites$Domains$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Versions$Create; + params = {} as Params$Resource$Projects$Sites$Domains$Get; options = {}; } @@ -2733,32 +2746,29 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/versions').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * firebasehosting.projects.sites.versions.delete - * @desc Deletes the specified version. + * firebasehosting.projects.sites.domains.list + * @desc Lists the domains for the specified site. * @example * // Before running the sample: * // - Enable the API at: @@ -2776,7 +2786,9 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -2785,14 +2797,21 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.versions.delete({ - * // Required. The name of the version to be deleted, in the format: sites/ site-name/versions/versionID - * name: 'projects/my-project/sites/my-site/versions/my-version', + * const res = await firebasehosting.projects.sites.domains.list({ + * // The page size to return. Defaults to 50. + * pageSize: 'placeholder-value', + * // The next_page_token from a previous request, if provided. + * pageToken: 'placeholder-value', + * // Required. The parent for which to list domains, in the format: sites/ site-name + * parent: 'projects/my-project/sites/my-site', * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "domains": [], + * // "nextPageToken": "my_nextPageToken" + * // } * } * * main().catch(e => { @@ -2800,59 +2819,64 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.versions.delete + * @alias firebasehosting.projects.sites.domains.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the version to be deleted, in the format: sites/ site-name/versions/versionID + * @param {integer=} params.pageSize The page size to return. Defaults to 50. + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. + * @param {string} params.parent Required. The parent for which to list domains, in the format: sites/ site-name * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete( - params: Params$Resource$Projects$Sites$Versions$Delete, + list( + params: Params$Resource$Projects$Sites$Domains$List, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Sites$Versions$Delete, + list( + params?: Params$Resource$Projects$Sites$Domains$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Sites$Versions$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Sites$Domains$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Sites$Versions$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Sites$Domains$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Sites$Versions$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Sites$Domains$List, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Sites$Versions$Delete - | BodyResponseCallback + | Params$Resource$Projects$Sites$Domains$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Versions$Delete; + {}) as Params$Resource$Projects$Sites$Domains$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Versions$Delete; + params = {} as Params$Resource$Projects$Sites$Domains$List; options = {}; } @@ -2866,29 +2890,32 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v1beta1/{+parent}/domains').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * firebasehosting.projects.sites.versions.list - * @desc Lists the versions that have been created on the specified site. Will include filtering in the future. + * firebasehosting.projects.sites.domains.update + * @desc Updates the specified domain mapping, creating the mapping as if it does not exist. * @example * // Before running the sample: * // - Enable the API at: @@ -2906,9 +2933,7 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', - * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -2917,22 +2942,33 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.versions.list({ - * // The filter string used to return a subset of versions in the response. Currently supported fields for filtering are: name, status, and create_time. Filter processing will be implemented in accordance with go/filtering. - * filter: 'placeholder-value', - * // The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 versions will be returned. The maximum value is 100; values above 100 will be coerced to 100 - * pageSize: 'placeholder-value', - * // The next_page_token from a previous request, if provided. - * pageToken: 'placeholder-value', - * // Required. The parent for which to list files, in the format: sites/site-name - * parent: 'projects/my-project/sites/my-site', + * const res = await firebasehosting.projects.sites.domains.update({ + * // Required. The name of the domain association to update or create, if an association doesn't already exist. + * name: 'projects/my-project/sites/my-site/domains/my-domain', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "domainName": "my_domainName", + * // "domainRedirect": {}, + * // "provisioning": {}, + * // "site": "my_site", + * // "status": "my_status", + * // "updateTime": "my_updateTime" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "nextPageToken": "my_nextPageToken", - * // "versions": [] + * // "domainName": "my_domainName", + * // "domainRedirect": {}, + * // "provisioning": {}, + * // "site": "my_site", + * // "status": "my_status", + * // "updateTime": "my_updateTime" * // } * } * @@ -2941,67 +2977,60 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.versions.list + * @alias firebasehosting.projects.sites.domains.update * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.filter The filter string used to return a subset of versions in the response. Currently supported fields for filtering are: name, status, and create_time. Filter processing will be implemented in accordance with go/filtering. - * @param {integer=} params.pageSize The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 versions will be returned. The maximum value is 100; values above 100 will be coerced to 100 - * @param {string=} params.pageToken The next_page_token from a previous request, if provided. - * @param {string} params.parent Required. The parent for which to list files, in the format: sites/site-name + * @param {string} params.name Required. The name of the domain association to update or create, if an association doesn't already exist. + * @param {().Domain} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list( - params: Params$Resource$Projects$Sites$Versions$List, + update( + params: Params$Resource$Projects$Sites$Domains$Update, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Sites$Versions$List, + update( + params?: Params$Resource$Projects$Sites$Domains$Update, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Sites$Versions$List, + ): GaxiosPromise; + update( + params: Params$Resource$Projects$Sites$Domains$Update, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Versions$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + update( + params: Params$Resource$Projects$Sites$Domains$Update, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Versions$List, - callback: BodyResponseCallback + update( + params: Params$Resource$Projects$Sites$Domains$Update, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + update(callback: BodyResponseCallback): void; + update( paramsOrCallback?: - | Params$Resource$Projects$Sites$Versions$List - | BodyResponseCallback + | Params$Resource$Projects$Sites$Domains$Update + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Versions$List; + {}) as Params$Resource$Projects$Sites$Domains$Update; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Versions$List; + params = {} as Params$Resource$Projects$Sites$Domains$Update; options = {}; } @@ -3015,36 +3044,94 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/versions').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Projects$Sites$Domains$Create + extends StandardParameters { /** - * firebasehosting.projects.sites.versions.patch - * @desc Updates the specified metadata for a version. Note that this method will fail with `FAILED_PRECONDITION` in the event of an invalid state transition. The only valid transition for a version is currently from a `CREATED` status to a `FINALIZED` status. Use [`DeleteVersion`](../sites.versions/delete) to set the status of a version to `DELETED`. - * @example - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * Required. The parent to create the domain association for, in the format: sites/site-name + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + export interface Params$Resource$Projects$Sites$Domains$Delete + extends StandardParameters { + /** + * Required. The name of the domain association to delete. + */ + name?: string; + } + export interface Params$Resource$Projects$Sites$Domains$Get + extends StandardParameters { + /** + * Required. The name of the domain configuration to get. + */ + name?: string; + } + export interface Params$Resource$Projects$Sites$Domains$List + extends StandardParameters { + /** + * The page size to return. Defaults to 50. + */ + pageSize?: number; + /** + * The next_page_token from a previous request, if provided. + */ + pageToken?: string; + /** + * Required. The parent for which to list domains, in the format: sites/ site-name + */ + parent?: string; + } + export interface Params$Resource$Projects$Sites$Domains$Update + extends StandardParameters { + /** + * Required. The name of the domain association to update or create, if an association doesn't already exist. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + + export class Resource$Projects$Sites$Releases { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * firebasehosting.projects.sites.releases.create + * @desc Creates a new release which makes the content of the specified version actively display on the appropriate URL(s). + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: @@ -3067,29 +3154,22 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.versions.patch({ - * // The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. - * name: 'projects/my-project/sites/my-site/versions/my-version', - * // A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. - * updateMask: 'placeholder-value', + * const res = await firebasehosting.projects.sites.releases.create({ + * // Required. The site that the release belongs to, in the format: sites/ site-name + * parent: 'projects/my-project/sites/my-site', + * // The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * versionName: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "config": {}, - * // "createTime": "my_createTime", - * // "createUser": {}, - * // "deleteTime": "my_deleteTime", - * // "deleteUser": {}, - * // "fileCount": "my_fileCount", - * // "finalizeTime": "my_finalizeTime", - * // "finalizeUser": {}, - * // "labels": {}, + * // "message": "my_message", * // "name": "my_name", - * // "preview": {}, - * // "status": "my_status", - * // "versionBytes": "my_versionBytes" + * // "releaseTime": "my_releaseTime", + * // "releaseUser": {}, + * // "type": "my_type", + * // "version": {} * // } * }, * }); @@ -3097,19 +3177,12 @@ export namespace firebasehosting_v1beta1 { * * // Example response * // { - * // "config": {}, - * // "createTime": "my_createTime", - * // "createUser": {}, - * // "deleteTime": "my_deleteTime", - * // "deleteUser": {}, - * // "fileCount": "my_fileCount", - * // "finalizeTime": "my_finalizeTime", - * // "finalizeUser": {}, - * // "labels": {}, + * // "message": "my_message", * // "name": "my_name", - * // "preview": {}, - * // "status": "my_status", - * // "versionBytes": "my_versionBytes" + * // "releaseTime": "my_releaseTime", + * // "releaseUser": {}, + * // "type": "my_type", + * // "version": {} * // } * } * @@ -3118,61 +3191,61 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.versions.patch + * @alias firebasehosting.projects.sites.releases.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. - * @param {string=} params.updateMask A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. - * @param {().Version} params.requestBody Request body data + * @param {string} params.parent Required. The site that the release belongs to, in the format: sites/ site-name + * @param {string=} params.versionName The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * @param {().Release} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - patch( - params: Params$Resource$Projects$Sites$Versions$Patch, + create( + params: Params$Resource$Projects$Sites$Releases$Create, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Projects$Sites$Versions$Patch, + create( + params?: Params$Resource$Projects$Sites$Releases$Create, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Sites$Versions$Patch, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Sites$Releases$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Sites$Versions$Patch, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Sites$Releases$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Sites$Versions$Patch, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Sites$Releases$Create, + callback: BodyResponseCallback ): void; - patch(callback: BodyResponseCallback): void; - patch( + create(callback: BodyResponseCallback): void; + create( paramsOrCallback?: - | Params$Resource$Projects$Sites$Versions$Patch - | BodyResponseCallback + | Params$Resource$Projects$Sites$Releases$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Versions$Patch; + {}) as Params$Resource$Projects$Sites$Releases$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Versions$Patch; + params = {} as Params$Resource$Projects$Sites$Releases$Create; options = {}; } @@ -3186,29 +3259,32 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: (rootUrl + '/v1beta1/{+parent}/releases').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * firebasehosting.projects.sites.versions.populateFiles - * @desc Adds content files to a version. Each file must be under 2 GB. + * firebasehosting.projects.sites.releases.list + * @desc Lists the releases that have been created on the specified site. * @example * // Before running the sample: * // - Enable the API at: @@ -3226,7 +3302,9 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -3235,24 +3313,20 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.versions.populateFiles({ - * // Required. The version to add files to, in the format: sites/site-name /versions/versionID - * parent: 'projects/my-project/sites/my-site/versions/my-version', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "files": {} - * // } - * }, + * const res = await firebasehosting.projects.sites.releases.list({ + * // The page size to return. Defaults to 100. + * pageSize: 'placeholder-value', + * // The next_page_token from a previous request, if provided. + * pageToken: 'placeholder-value', + * // Required. The parent for which to list files, in the format: sites/site-name + * parent: 'projects/my-project/sites/my-site', * }); * console.log(res.data); * * // Example response * // { - * // "uploadRequiredHashes": [], - * // "uploadUrl": "my_uploadUrl" + * // "nextPageToken": "my_nextPageToken", + * // "releases": [] * // } * } * @@ -3261,67 +3335,1925 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.versions.populateFiles + * @alias firebasehosting.projects.sites.releases.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The version to add files to, in the format: sites/site-name /versions/versionID - * @param {().PopulateVersionFilesRequest} params.requestBody Request body data + * @param {integer=} params.pageSize The page size to return. Defaults to 100. + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. + * @param {string} params.parent Required. The parent for which to list files, in the format: sites/site-name * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - populateFiles( - params: Params$Resource$Projects$Sites$Versions$Populatefiles, + list( + params: Params$Resource$Projects$Sites$Releases$List, options: StreamMethodOptions ): GaxiosPromise; - populateFiles( - params?: Params$Resource$Projects$Sites$Versions$Populatefiles, + list( + params?: Params$Resource$Projects$Sites$Releases$List, options?: MethodOptions - ): GaxiosPromise; - populateFiles( - params: Params$Resource$Projects$Sites$Versions$Populatefiles, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Sites$Releases$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - populateFiles( - params: Params$Resource$Projects$Sites$Versions$Populatefiles, + list( + params: Params$Resource$Projects$Sites$Releases$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - populateFiles( - params: Params$Resource$Projects$Sites$Versions$Populatefiles, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Sites$Releases$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Releases$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Releases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Releases$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/releases').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Sites$Releases$Create + extends StandardParameters { + /** + * Required. The site that the release belongs to, in the format: sites/ site-name + */ + parent?: string; + /** + * The unique identifier for a version, in the format: /sites/site-name /versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + */ + versionName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Release; + } + export interface Params$Resource$Projects$Sites$Releases$List + extends StandardParameters { + /** + * The page size to return. Defaults to 100. + */ + pageSize?: number; + /** + * The next_page_token from a previous request, if provided. + */ + pageToken?: string; + /** + * Required. The parent for which to list files, in the format: sites/site-name + */ + parent?: string; + } + + export class Resource$Projects$Sites$Versions { + context: APIRequestContext; + files: Resource$Projects$Sites$Versions$Files; + constructor(context: APIRequestContext) { + this.context = context; + this.files = new Resource$Projects$Sites$Versions$Files(this.context); + } + + /** + * firebasehosting.projects.sites.versions.clone + * @desc Creates a new version on the target site using the content of the specified version. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.versions.clone({ + * // Required. The target site where the cloned version will reside, in the format: `sites/{site}` + * parent: 'projects/my-project/sites/my-site', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "exclude": {}, + * // "finalize": false, + * // "include": {}, + * // "sourceVersion": "my_sourceVersion" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.projects.sites.versions.clone + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The target site where the cloned version will reside, in the format: `sites/{site}` + * @param {().CloneVersionRequest} params.requestBody Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + clone( + params: Params$Resource$Projects$Sites$Versions$Clone, + options: StreamMethodOptions + ): GaxiosPromise; + clone( + params?: Params$Resource$Projects$Sites$Versions$Clone, + options?: MethodOptions + ): GaxiosPromise; + clone( + params: Params$Resource$Projects$Sites$Versions$Clone, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + clone( + params: Params$Resource$Projects$Sites$Versions$Clone, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + clone( + params: Params$Resource$Projects$Sites$Versions$Clone, + callback: BodyResponseCallback + ): void; + clone(callback: BodyResponseCallback): void; + clone( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Versions$Clone + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Versions$Clone; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Versions$Clone; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/versions:clone').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.projects.sites.versions.create + * @desc Creates a new version for a site. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.versions.create({ + * // Required. The parent to create the version for, in the format: sites/ site-name + * parent: 'projects/my-project/sites/my-site', + * // The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. + * sizeBytes: 'placeholder-value', + * // A unique id for the new version. This is was only specified for legacy version creations, and should be blank. + * versionId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "config": {}, + * // "createTime": "my_createTime", + * // "createUser": {}, + * // "deleteTime": "my_deleteTime", + * // "deleteUser": {}, + * // "fileCount": "my_fileCount", + * // "finalizeTime": "my_finalizeTime", + * // "finalizeUser": {}, + * // "labels": {}, + * // "name": "my_name", + * // "preview": {}, + * // "status": "my_status", + * // "versionBytes": "my_versionBytes" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "config": {}, + * // "createTime": "my_createTime", + * // "createUser": {}, + * // "deleteTime": "my_deleteTime", + * // "deleteUser": {}, + * // "fileCount": "my_fileCount", + * // "finalizeTime": "my_finalizeTime", + * // "finalizeUser": {}, + * // "labels": {}, + * // "name": "my_name", + * // "preview": {}, + * // "status": "my_status", + * // "versionBytes": "my_versionBytes" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.projects.sites.versions.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The parent to create the version for, in the format: sites/ site-name + * @param {string=} params.sizeBytes The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. + * @param {string=} params.versionId A unique id for the new version. This is was only specified for legacy version creations, and should be blank. + * @param {().Version} params.requestBody Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params: Params$Resource$Projects$Sites$Versions$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Sites$Versions$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Sites$Versions$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Sites$Versions$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Sites$Versions$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Versions$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Versions$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Versions$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/versions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.projects.sites.versions.delete + * @desc Deletes the specified version. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.versions.delete({ + * // Required. The name of the version to be deleted, in the format: sites/ site-name/versions/versionID + * name: 'projects/my-project/sites/my-site/versions/my-version', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.projects.sites.versions.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the version to be deleted, in the format: sites/ site-name/versions/versionID + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params: Params$Resource$Projects$Sites$Versions$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Sites$Versions$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Sites$Versions$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Sites$Versions$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Sites$Versions$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Versions$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Versions$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Versions$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.projects.sites.versions.list + * @desc Lists the versions that have been created on the specified site. Will include filtering in the future. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.versions.list({ + * // The filter string used to return a subset of versions in the response. Currently supported fields for filtering are: name, status, and create_time. Filter processing will be implemented in accordance with go/filtering. + * filter: 'placeholder-value', + * // The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 versions will be returned. The maximum value is 100; values above 100 will be coerced to 100 + * pageSize: 'placeholder-value', + * // The next_page_token from a previous request, if provided. + * pageToken: 'placeholder-value', + * // Required. The parent for which to list files, in the format: sites/site-name + * parent: 'projects/my-project/sites/my-site', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "versions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.projects.sites.versions.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter string used to return a subset of versions in the response. Currently supported fields for filtering are: name, status, and create_time. Filter processing will be implemented in accordance with go/filtering. + * @param {integer=} params.pageSize The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 versions will be returned. The maximum value is 100; values above 100 will be coerced to 100 + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. + * @param {string} params.parent Required. The parent for which to list files, in the format: sites/site-name + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params: Params$Resource$Projects$Sites$Versions$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Sites$Versions$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Sites$Versions$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Sites$Versions$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Sites$Versions$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Versions$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Versions$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Versions$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/versions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.projects.sites.versions.patch + * @desc Updates the specified metadata for a version. Note that this method will fail with `FAILED_PRECONDITION` in the event of an invalid state transition. The only valid transition for a version is currently from a `CREATED` status to a `FINALIZED` status. Use [`DeleteVersion`](../sites.versions/delete) to set the status of a version to `DELETED`. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.versions.patch({ + * // The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. + * name: 'projects/my-project/sites/my-site/versions/my-version', + * // A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "config": {}, + * // "createTime": "my_createTime", + * // "createUser": {}, + * // "deleteTime": "my_deleteTime", + * // "deleteUser": {}, + * // "fileCount": "my_fileCount", + * // "finalizeTime": "my_finalizeTime", + * // "finalizeUser": {}, + * // "labels": {}, + * // "name": "my_name", + * // "preview": {}, + * // "status": "my_status", + * // "versionBytes": "my_versionBytes" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "config": {}, + * // "createTime": "my_createTime", + * // "createUser": {}, + * // "deleteTime": "my_deleteTime", + * // "deleteUser": {}, + * // "fileCount": "my_fileCount", + * // "finalizeTime": "my_finalizeTime", + * // "finalizeUser": {}, + * // "labels": {}, + * // "name": "my_name", + * // "preview": {}, + * // "status": "my_status", + * // "versionBytes": "my_versionBytes" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.projects.sites.versions.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. + * @param {string=} params.updateMask A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. + * @param {().Version} params.requestBody Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params: Params$Resource$Projects$Sites$Versions$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Sites$Versions$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Sites$Versions$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Sites$Versions$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Sites$Versions$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Versions$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Versions$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Versions$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.projects.sites.versions.populateFiles + * @desc Adds content files to a version. Each file must be under 2 GB. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.versions.populateFiles({ + * // Required. The version to add files to, in the format: sites/site-name /versions/versionID + * parent: 'projects/my-project/sites/my-site/versions/my-version', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "files": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "uploadRequiredHashes": [], + * // "uploadUrl": "my_uploadUrl" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.projects.sites.versions.populateFiles + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The version to add files to, in the format: sites/site-name /versions/versionID + * @param {().PopulateVersionFilesRequest} params.requestBody Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + populateFiles( + params: Params$Resource$Projects$Sites$Versions$Populatefiles, + options: StreamMethodOptions + ): GaxiosPromise; + populateFiles( + params?: Params$Resource$Projects$Sites$Versions$Populatefiles, + options?: MethodOptions + ): GaxiosPromise; + populateFiles( + params: Params$Resource$Projects$Sites$Versions$Populatefiles, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + populateFiles( + params: Params$Resource$Projects$Sites$Versions$Populatefiles, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + populateFiles( + params: Params$Resource$Projects$Sites$Versions$Populatefiles, + callback: BodyResponseCallback + ): void; + populateFiles( + callback: BodyResponseCallback + ): void; + populateFiles( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Versions$Populatefiles + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Versions$Populatefiles; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Versions$Populatefiles; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}:populateFiles').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Sites$Versions$Clone + extends StandardParameters { + /** + * Required. The target site where the cloned version will reside, in the format: `sites/{site}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CloneVersionRequest; + } + export interface Params$Resource$Projects$Sites$Versions$Create + extends StandardParameters { + /** + * Required. The parent to create the version for, in the format: sites/ site-name + */ + parent?: string; + /** + * The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. + */ + sizeBytes?: string; + /** + * A unique id for the new version. This is was only specified for legacy version creations, and should be blank. + */ + versionId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Version; + } + export interface Params$Resource$Projects$Sites$Versions$Delete + extends StandardParameters { + /** + * Required. The name of the version to be deleted, in the format: sites/ site-name/versions/versionID + */ + name?: string; + } + export interface Params$Resource$Projects$Sites$Versions$List + extends StandardParameters { + /** + * The filter string used to return a subset of versions in the response. Currently supported fields for filtering are: name, status, and create_time. Filter processing will be implemented in accordance with go/filtering. + */ + filter?: string; + /** + * The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 versions will be returned. The maximum value is 100; values above 100 will be coerced to 100 + */ + pageSize?: number; + /** + * The next_page_token from a previous request, if provided. + */ + pageToken?: string; + /** + * Required. The parent for which to list files, in the format: sites/site-name + */ + parent?: string; + } + export interface Params$Resource$Projects$Sites$Versions$Patch + extends StandardParameters { + /** + * The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. + */ + name?: string; + /** + * A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Version; + } + export interface Params$Resource$Projects$Sites$Versions$Populatefiles + extends StandardParameters { + /** + * Required. The version to add files to, in the format: sites/site-name /versions/versionID + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$PopulateVersionFilesRequest; + } + + export class Resource$Projects$Sites$Versions$Files { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * firebasehosting.projects.sites.versions.files.list + * @desc Lists the remaining files to be uploaded for the specified version. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.versions.files.list({ + * // The page size to return. Defaults to 1000. + * pageSize: 'placeholder-value', + * // The next_page_token from a previous request, if provided. This will be the encoded version of a firebase.hosting.proto.metadata.ListFilesPageToken. + * pageToken: 'placeholder-value', + * // Required. The parent to list files for, in the format: sites/site-name /versions/versionID + * parent: 'projects/my-project/sites/my-site/versions/my-version', + * // The type of files in the version that should be listed. + * status: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "files": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.projects.sites.versions.files.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize The page size to return. Defaults to 1000. + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. This will be the encoded version of a firebase.hosting.proto.metadata.ListFilesPageToken. + * @param {string} params.parent Required. The parent to list files for, in the format: sites/site-name /versions/versionID + * @param {string=} params.status The type of files in the version that should be listed. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params: Params$Resource$Projects$Sites$Versions$Files$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Sites$Versions$Files$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Sites$Versions$Files$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Sites$Versions$Files$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Sites$Versions$Files$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Versions$Files$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Versions$Files$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Versions$Files$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/files').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Sites$Versions$Files$List + extends StandardParameters { + /** + * The page size to return. Defaults to 1000. + */ + pageSize?: number; + /** + * The next_page_token from a previous request, if provided. This will be the encoded version of a firebase.hosting.proto.metadata.ListFilesPageToken. + */ + pageToken?: string; + /** + * Required. The parent to list files for, in the format: sites/site-name /versions/versionID + */ + parent?: string; + /** + * The type of files in the version that should be listed. + */ + status?: string; + } + + export class Resource$Sites { + context: APIRequestContext; + channels: Resource$Sites$Channels; + domains: Resource$Sites$Domains; + releases: Resource$Sites$Releases; + versions: Resource$Sites$Versions; + constructor(context: APIRequestContext) { + this.context = context; + this.channels = new Resource$Sites$Channels(this.context); + this.domains = new Resource$Sites$Domains(this.context); + this.releases = new Resource$Sites$Releases(this.context); + this.versions = new Resource$Sites$Versions(this.context); + } + + /** + * firebasehosting.sites.getConfig + * @desc Gets the Hosting metadata for a specific site. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.sites.getConfig({ + * // Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config + * name: 'sites/my-site/config', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "cloudLoggingEnabled": false, + * // "maxVersions": "my_maxVersions" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.sites.getConfig + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getConfig( + params: Params$Resource$Sites$Getconfig, + options: StreamMethodOptions + ): GaxiosPromise; + getConfig( + params?: Params$Resource$Sites$Getconfig, + options?: MethodOptions + ): GaxiosPromise; + getConfig( + params: Params$Resource$Sites$Getconfig, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getConfig( + params: Params$Resource$Sites$Getconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getConfig( + params: Params$Resource$Sites$Getconfig, + callback: BodyResponseCallback + ): void; + getConfig(callback: BodyResponseCallback): void; + getConfig( + paramsOrCallback?: + | Params$Resource$Sites$Getconfig + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Sites$Getconfig; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Getconfig; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.sites.updateConfig + * @desc Sets the Hosting metadata for a specific site. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.sites.updateConfig({ + * // Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config + * name: 'sites/my-site/config', + * // A set of field names from your [site configuration](../sites.SiteConfig) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`max_versions`](../sites.SiteConfig.max_versions) will be used. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "cloudLoggingEnabled": false, + * // "maxVersions": "my_maxVersions" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "cloudLoggingEnabled": false, + * // "maxVersions": "my_maxVersions" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.sites.updateConfig + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config + * @param {string=} params.updateMask A set of field names from your [site configuration](../sites.SiteConfig) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`max_versions`](../sites.SiteConfig.max_versions) will be used. + * @param {().SiteConfig} params.requestBody Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + updateConfig( + params: Params$Resource$Sites$Updateconfig, + options: StreamMethodOptions + ): GaxiosPromise; + updateConfig( + params?: Params$Resource$Sites$Updateconfig, + options?: MethodOptions + ): GaxiosPromise; + updateConfig( + params: Params$Resource$Sites$Updateconfig, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateConfig( + params: Params$Resource$Sites$Updateconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateConfig( + params: Params$Resource$Sites$Updateconfig, + callback: BodyResponseCallback + ): void; + updateConfig(callback: BodyResponseCallback): void; + updateConfig( + paramsOrCallback?: + | Params$Resource$Sites$Updateconfig + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Sites$Updateconfig; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Updateconfig; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Sites$Getconfig extends StandardParameters { + /** + * Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config + */ + name?: string; + } + export interface Params$Resource$Sites$Updateconfig + extends StandardParameters { + /** + * Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config + */ + name?: string; + /** + * A set of field names from your [site configuration](../sites.SiteConfig) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`max_versions`](../sites.SiteConfig.max_versions) will be used. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SiteConfig; + } + + export class Resource$Sites$Channels { + context: APIRequestContext; + releases: Resource$Sites$Channels$Releases; + constructor(context: APIRequestContext) { + this.context = context; + this.releases = new Resource$Sites$Channels$Releases(this.context); + } + + /** + * firebasehosting.sites.channels.create + * @desc Creates a new channel in the specified site. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.sites.channels.create({ + * // Required. Immutable. A unique id within the site to identify the channel. + * channelId: 'placeholder-value', + * // Required. The site in which this channel should be created. + * parent: 'sites/my-site', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, + * // "name": "my_name", + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, + * // "name": "my_name", + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.sites.channels.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.channelId Required. Immutable. A unique id within the site to identify the channel. + * @param {string} params.parent Required. The site in which this channel should be created. + * @param {().Channel} params.requestBody Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params: Params$Resource$Sites$Channels$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Sites$Channels$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Sites$Channels$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Sites$Channels$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Sites$Channels$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Sites$Channels$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Sites$Channels$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Channels$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/channels').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.sites.channels.delete + * @desc Deletes a channel of a site. The `live` channel cannot be deleted. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.sites.channels.delete({ + * // Required. The fully-qualified identifier for the site. + * name: 'sites/my-site/channels/my-channel', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.sites.channels.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The fully-qualified identifier for the site. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params: Params$Resource$Sites$Channels$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Sites$Channels$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Sites$Channels$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - populateFiles( - callback: BodyResponseCallback + delete( + params: Params$Resource$Sites$Channels$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - populateFiles( + delete( + params: Params$Resource$Sites$Channels$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Sites$Versions$Populatefiles - | BodyResponseCallback + | Params$Resource$Sites$Channels$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Versions$Populatefiles; + {}) as Params$Resource$Sites$Channels$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Versions$Populatefiles; + params = {} as Params$Resource$Sites$Channels$Delete; options = {}; } @@ -3335,116 +5267,29 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}:populateFiles').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Sites$Versions$Create - extends StandardParameters { - /** - * Required. The parent to create the version for, in the format: sites/ site-name - */ - parent?: string; - /** - * The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. - */ - sizeBytes?: string; - /** - * A unique id for the new version. This is only specified for legacy version creations. - */ - versionId?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Version; - } - export interface Params$Resource$Projects$Sites$Versions$Delete - extends StandardParameters { - /** - * Required. The name of the version to be deleted, in the format: sites/ site-name/versions/versionID - */ - name?: string; - } - export interface Params$Resource$Projects$Sites$Versions$List - extends StandardParameters { - /** - * The filter string used to return a subset of versions in the response. Currently supported fields for filtering are: name, status, and create_time. Filter processing will be implemented in accordance with go/filtering. - */ - filter?: string; - /** - * The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 versions will be returned. The maximum value is 100; values above 100 will be coerced to 100 - */ - pageSize?: number; - /** - * The next_page_token from a previous request, if provided. - */ - pageToken?: string; - /** - * Required. The parent for which to list files, in the format: sites/site-name - */ - parent?: string; - } - export interface Params$Resource$Projects$Sites$Versions$Patch - extends StandardParameters { - /** - * The unique identifier for a version, in the format: sites/site-name /versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. - */ - name?: string; - /** - * A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Version; - } - export interface Params$Resource$Projects$Sites$Versions$Populatefiles - extends StandardParameters { - /** - * Required. The version to add files to, in the format: sites/site-name /versions/versionID - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$PopulateVersionFilesRequest; - } - - export class Resource$Projects$Sites$Versions$Files { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * firebasehosting.projects.sites.versions.files.list - * @desc Lists the remaining files to be uploaded for the specified version. + * firebasehosting.sites.channels.get + * @desc Retrieves information for the specified channel of a site. * @example * // Before running the sample: * // - Enable the API at: @@ -3473,22 +5318,23 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.versions.files.list({ - * // The page size to return. Defaults to 1000. - * pageSize: 'placeholder-value', - * // The next_page_token from a previous request, if provided. This will be the encoded version of a firebase.hosting.proto.metadata.ListFilesPageToken. - * pageToken: 'placeholder-value', - * // Required. The parent to list files for, in the format: sites/site-name /versions/versionID - * parent: 'projects/my-project/sites/my-site/versions/my-version', - * // The type of files in the version that should be listed. - * status: 'placeholder-value', + * const res = await firebasehosting.sites.channels.get({ + * // Required. The fully-qualified identifier for the channel. + * name: 'sites/my-site/channels/my-channel', * }); * console.log(res.data); * * // Example response * // { - * // "files": [], - * // "nextPageToken": "my_nextPageToken" + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, + * // "name": "my_name", + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" * // } * } * @@ -3497,67 +5343,59 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.projects.sites.versions.files.list + * @alias firebasehosting.sites.channels.get * @memberOf! () * * @param {object} params Parameters for request - * @param {integer=} params.pageSize The page size to return. Defaults to 1000. - * @param {string=} params.pageToken The next_page_token from a previous request, if provided. This will be the encoded version of a firebase.hosting.proto.metadata.ListFilesPageToken. - * @param {string} params.parent Required. The parent to list files for, in the format: sites/site-name /versions/versionID - * @param {string=} params.status The type of files in the version that should be listed. + * @param {string} params.name Required. The fully-qualified identifier for the channel. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list( - params: Params$Resource$Projects$Sites$Versions$Files$List, + get( + params: Params$Resource$Sites$Channels$Get, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Sites$Versions$Files$List, + get( + params?: Params$Resource$Sites$Channels$Get, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Sites$Versions$Files$List, + ): GaxiosPromise; + get( + params: Params$Resource$Sites$Channels$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Versions$Files$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Sites$Channels$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Sites$Versions$Files$List, - callback: BodyResponseCallback + get( + params: Params$Resource$Sites$Channels$Get, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Projects$Sites$Versions$Files$List - | BodyResponseCallback + | Params$Resource$Sites$Channels$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Versions$Files$List; + {}) as Params$Resource$Sites$Channels$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Versions$Files$List; + params = {} as Params$Resource$Sites$Channels$Get; options = {}; } @@ -3571,67 +5409,29 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/files').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Sites$Versions$Files$List - extends StandardParameters { - /** - * The page size to return. Defaults to 1000. - */ - pageSize?: number; - /** - * The next_page_token from a previous request, if provided. This will be the encoded version of a firebase.hosting.proto.metadata.ListFilesPageToken. - */ - pageToken?: string; - /** - * Required. The parent to list files for, in the format: sites/site-name /versions/versionID - */ - parent?: string; - /** - * The type of files in the version that should be listed. - */ - status?: string; - } - - export class Resource$Sites { - context: APIRequestContext; - channels: Resource$Sites$Channels; - domains: Resource$Sites$Domains; - releases: Resource$Sites$Releases; - versions: Resource$Sites$Versions; - constructor(context: APIRequestContext) { - this.context = context; - this.channels = new Resource$Sites$Channels(this.context); - this.domains = new Resource$Sites$Domains(this.context); - this.releases = new Resource$Sites$Releases(this.context); - this.versions = new Resource$Sites$Versions(this.context); - } /** - * firebasehosting.sites.getConfig - * @desc Gets the Hosting metadata for a specific site. + * firebasehosting.sites.channels.list + * @desc Lists the channels for the specified site. All sites have a default "live" channel. * @example * // Before running the sample: * // - Enable the API at: @@ -3660,16 +5460,20 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.sites.getConfig({ - * // Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config - * name: 'sites/my-site/config', + * const res = await firebasehosting.sites.channels.list({ + * // The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 channels will be returned. The maximum value is 100; valuupdateses above 100 will be coerced to 100 + * pageSize: 'placeholder-value', + * // The next_page_token from a previous request, if provided. + * pageToken: 'placeholder-value', + * // Required. The site from which to list channels. + * parent: 'sites/my-site', * }); * console.log(res.data); * * // Example response * // { - * // "cloudLoggingEnabled": false, - * // "maxVersions": "my_maxVersions" + * // "channels": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -3678,58 +5482,66 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.sites.getConfig + * @alias firebasehosting.sites.channels.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config + * @param {integer=} params.pageSize The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 channels will be returned. The maximum value is 100; valuupdateses above 100 will be coerced to 100 + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. + * @param {string} params.parent Required. The site from which to list channels. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - getConfig( - params: Params$Resource$Sites$Getconfig, + list( + params: Params$Resource$Sites$Channels$List, options: StreamMethodOptions ): GaxiosPromise; - getConfig( - params?: Params$Resource$Sites$Getconfig, + list( + params?: Params$Resource$Sites$Channels$List, options?: MethodOptions - ): GaxiosPromise; - getConfig( - params: Params$Resource$Sites$Getconfig, + ): GaxiosPromise; + list( + params: Params$Resource$Sites$Channels$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getConfig( - params: Params$Resource$Sites$Getconfig, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Sites$Channels$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getConfig( - params: Params$Resource$Sites$Getconfig, - callback: BodyResponseCallback + list( + params: Params$Resource$Sites$Channels$List, + callback: BodyResponseCallback ): void; - getConfig(callback: BodyResponseCallback): void; - getConfig( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Sites$Getconfig - | BodyResponseCallback + | Params$Resource$Sites$Channels$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Sites$Getconfig; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Sites$Channels$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Sites$Getconfig; + params = {} as Params$Resource$Sites$Channels$List; options = {}; } @@ -3743,29 +5555,32 @@ export namespace firebasehosting_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/v1beta1/{+parent}/channels').replace( + /([^:]\/)\/+/g, + '$1' + ), method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * firebasehosting.sites.updateConfig - * @desc Sets the Hosting metadata for a specific site. + * firebasehosting.sites.channels.patch + * @desc Updates information for the specified channel of a site. This method will implicitly create a channel if it doesn't exist. * @example * // Before running the sample: * // - Enable the API at: @@ -3792,18 +5607,25 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.sites.updateConfig({ - * // Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config - * name: 'sites/my-site/config', - * // A set of field names from your [site configuration](../sites.SiteConfig) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`max_versions`](../sites.SiteConfig.max_versions) will be used. + * const res = await firebasehosting.sites.channels.patch({ + * // The fully-qualified identifier of the Channel. + * name: 'sites/my-site/channels/my-channel', + * // A comma-separated list of fields to be updated in this request. * updateMask: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "cloudLoggingEnabled": false, - * // "maxVersions": "my_maxVersions" + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, + * // "name": "my_name", + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" * // } * }, * }); @@ -3811,8 +5633,15 @@ export namespace firebasehosting_v1beta1 { * * // Example response * // { - * // "cloudLoggingEnabled": false, - * // "maxVersions": "my_maxVersions" + * // "createTime": "my_createTime", + * // "expireTime": "my_expireTime", + * // "labels": {}, + * // "name": "my_name", + * // "release": {}, + * // "retainedReleaseCount": 0, + * // "ttl": "my_ttl", + * // "updateTime": "my_updateTime", + * // "url": "my_url" * // } * } * @@ -3821,61 +5650,61 @@ export namespace firebasehosting_v1beta1 { * throw e; * }); * - * @alias firebasehosting.sites.updateConfig + * @alias firebasehosting.sites.channels.patch * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config - * @param {string=} params.updateMask A set of field names from your [site configuration](../sites.SiteConfig) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`max_versions`](../sites.SiteConfig.max_versions) will be used. - * @param {().SiteConfig} params.requestBody Request body data + * @param {string} params.name The fully-qualified identifier of the Channel. + * @param {string=} params.updateMask A comma-separated list of fields to be updated in this request. + * @param {().Channel} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - updateConfig( - params: Params$Resource$Sites$Updateconfig, + patch( + params: Params$Resource$Sites$Channels$Patch, options: StreamMethodOptions ): GaxiosPromise; - updateConfig( - params?: Params$Resource$Sites$Updateconfig, + patch( + params?: Params$Resource$Sites$Channels$Patch, options?: MethodOptions - ): GaxiosPromise; - updateConfig( - params: Params$Resource$Sites$Updateconfig, + ): GaxiosPromise; + patch( + params: Params$Resource$Sites$Channels$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updateConfig( - params: Params$Resource$Sites$Updateconfig, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + patch( + params: Params$Resource$Sites$Channels$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - updateConfig( - params: Params$Resource$Sites$Updateconfig, - callback: BodyResponseCallback + patch( + params: Params$Resource$Sites$Channels$Patch, + callback: BodyResponseCallback ): void; - updateConfig(callback: BodyResponseCallback): void; - updateConfig( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Sites$Updateconfig - | BodyResponseCallback + | Params$Resource$Sites$Channels$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Sites$Updateconfig; + {}) as Params$Resource$Sites$Channels$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Sites$Updateconfig; + params = {} as Params$Resource$Sites$Channels$Patch; options = {}; } @@ -3900,46 +5729,76 @@ export namespace firebasehosting_v1beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback<{} | void> ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Sites$Getconfig extends StandardParameters { + export interface Params$Resource$Sites$Channels$Create + extends StandardParameters { /** - * Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config + * Required. Immutable. A unique id within the site to identify the channel. + */ + channelId?: string; + /** + * Required. The site in which this channel should be created. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Channel; + } + export interface Params$Resource$Sites$Channels$Delete + extends StandardParameters { + /** + * Required. The fully-qualified identifier for the site. */ name?: string; } - export interface Params$Resource$Sites$Updateconfig + export interface Params$Resource$Sites$Channels$Get extends StandardParameters { /** - * Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config + * Required. The fully-qualified identifier for the channel. + */ + name?: string; + } + export interface Params$Resource$Sites$Channels$List + extends StandardParameters { + /** + * The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 25 channels will be returned. The maximum value is 100; valuupdateses above 100 will be coerced to 100 + */ + pageSize?: number; + /** + * The next_page_token from a previous request, if provided. + */ + pageToken?: string; + /** + * Required. The site from which to list channels. + */ + parent?: string; + } + export interface Params$Resource$Sites$Channels$Patch + extends StandardParameters { + /** + * The fully-qualified identifier of the Channel. */ name?: string; /** - * A set of field names from your [site configuration](../sites.SiteConfig) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`max_versions`](../sites.SiteConfig.max_versions) will be used. + * A comma-separated list of fields to be updated in this request. */ updateMask?: string; /** * Request body metadata */ - requestBody?: Schema$SiteConfig; - } - - export class Resource$Sites$Channels { - context: APIRequestContext; - releases: Resource$Sites$Channels$Releases; - constructor(context: APIRequestContext) { - this.context = context; - this.releases = new Resource$Sites$Channels$Releases(this.context); - } + requestBody?: Schema$Channel; } export class Resource$Sites$Channels$Releases { @@ -5422,6 +7281,157 @@ export namespace firebasehosting_v1beta1 { this.files = new Resource$Sites$Versions$Files(this.context); } + /** + * firebasehosting.sites.versions.clone + * @desc Creates a new version on the target site using the content of the specified version. + * @example + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.sites.versions.clone({ + * // Required. The target site where the cloned version will reside, in the format: `sites/{site}` + * parent: 'sites/my-site', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "exclude": {}, + * // "finalize": false, + * // "include": {}, + * // "sourceVersion": "my_sourceVersion" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * @alias firebasehosting.sites.versions.clone + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The target site where the cloned version will reside, in the format: `sites/{site}` + * @param {().CloneVersionRequest} params.requestBody Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + clone( + params: Params$Resource$Sites$Versions$Clone, + options: StreamMethodOptions + ): GaxiosPromise; + clone( + params?: Params$Resource$Sites$Versions$Clone, + options?: MethodOptions + ): GaxiosPromise; + clone( + params: Params$Resource$Sites$Versions$Clone, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + clone( + params: Params$Resource$Sites$Versions$Clone, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + clone( + params: Params$Resource$Sites$Versions$Clone, + callback: BodyResponseCallback + ): void; + clone(callback: BodyResponseCallback): void; + clone( + paramsOrCallback?: + | Params$Resource$Sites$Versions$Clone + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Sites$Versions$Clone; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Versions$Clone; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/versions:clone').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback<{} | void> + ); + } else { + return createAPIRequest(parameters); + } + } + /** * firebasehosting.sites.versions.create * @desc Creates a new version for a site. @@ -5456,7 +7466,7 @@ export namespace firebasehosting_v1beta1 { * parent: 'sites/my-site', * // The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. * sizeBytes: 'placeholder-value', - * // A unique id for the new version. This is only specified for legacy version creations. + * // A unique id for the new version. This is was only specified for legacy version creations, and should be blank. * versionId: 'placeholder-value', * * // Request body metadata @@ -5510,7 +7520,7 @@ export namespace firebasehosting_v1beta1 { * @param {object} params Parameters for request * @param {string} params.parent Required. The parent to create the version for, in the format: sites/ site-name * @param {string=} params.sizeBytes The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. - * @param {string=} params.versionId A unique id for the new version. This is only specified for legacy version creations. + * @param {string=} params.versionId A unique id for the new version. This is was only specified for legacy version creations, and should be blank. * @param {().Version} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -6201,6 +8211,18 @@ export namespace firebasehosting_v1beta1 { } } + export interface Params$Resource$Sites$Versions$Clone + extends StandardParameters { + /** + * Required. The target site where the cloned version will reside, in the format: `sites/{site}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CloneVersionRequest; + } export interface Params$Resource$Sites$Versions$Create extends StandardParameters { /** @@ -6212,7 +8234,7 @@ export namespace firebasehosting_v1beta1 { */ sizeBytes?: string; /** - * A unique id for the new version. This is only specified for legacy version creations. + * A unique id for the new version. This is was only specified for legacy version creations, and should be blank. */ versionId?: string;