// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Backup and DR Service API Client for Deno * ========================================= * * * * Docs: https://cloud.google.com/backup-disaster-recovery * Source: https://googleapis.deno.dev/v1/backupdr:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; export class BackupDR { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://backupdr.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Create a BackupPlanAssociation * * @param parent Required. The backup plan association project and location in the format `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations map to GCP regions, for example **us-central1**. */ async projectsLocationsBackupPlanAssociationsCreate(parent: string, req: BackupPlanAssociation, opts: ProjectsLocationsBackupPlanAssociationsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupPlanAssociations`); if (opts.backupPlanAssociationId !== undefined) { url.searchParams.append("backupPlanAssociationId", String(opts.backupPlanAssociationId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single BackupPlanAssociation. * * @param name Required. Name of the backup plan association resource, in the format `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` */ async projectsLocationsBackupPlanAssociationsDelete(name: string, opts: ProjectsLocationsBackupPlanAssociationsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single BackupPlanAssociation. * * @param name Required. Name of the backup plan association resource, in the format `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` */ async projectsLocationsBackupPlanAssociationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as BackupPlanAssociation; } /** * Lists BackupPlanAssociations in a given project and location. * * @param parent Required. The project and location for which to retrieve backup Plan Associations information, in the format `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations map to GCP regions, for example **us-central1**. To retrieve backup plan associations for all locations, use "-" for the `{location}` value. */ async projectsLocationsBackupPlanAssociationsList(parent: string, opts: ProjectsLocationsBackupPlanAssociationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupPlanAssociations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBackupPlanAssociationsResponse; } /** * Triggers a new Backup. * * @param name Required. Name of the backup plan association resource, in the format `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` */ async projectsLocationsBackupPlanAssociationsTriggerBackup(name: string, req: TriggerBackupRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:triggerBackup`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Create a BackupPlan * * @param parent Required. The `BackupPlan` project and location in the format `projects/{project}/locations/{location}`. In Cloud BackupDR locations map to GCP regions, for example **us-central1**. */ async projectsLocationsBackupPlansCreate(parent: string, req: BackupPlan, opts: ProjectsLocationsBackupPlansCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupPlans`); if (opts.backupPlanId !== undefined) { url.searchParams.append("backupPlanId", String(opts.backupPlanId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single BackupPlan. * * @param name Required. The resource name of the `BackupPlan` to delete. Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` */ async projectsLocationsBackupPlansDelete(name: string, opts: ProjectsLocationsBackupPlansDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single BackupPlan. * * @param name Required. The resource name of the `BackupPlan` to retrieve. Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` */ async projectsLocationsBackupPlansGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as BackupPlan; } /** * Lists BackupPlans in a given project and location. * * @param parent Required. The project and location for which to retrieve `BackupPlans` information. Format: `projects/{project}/locations/{location}`. In Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. To retrieve backup plans for all locations, use "-" for the `{location}` value. */ async projectsLocationsBackupPlansList(parent: string, opts: ProjectsLocationsBackupPlansListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupPlans`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBackupPlansResponse; } /** * Creates a new BackupVault in a given project and location. * * @param parent Required. Value for parent. */ async projectsLocationsBackupVaultsCreate(parent: string, req: BackupVault, opts: ProjectsLocationsBackupVaultsCreateOptions = {}): Promise { req = serializeBackupVault(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/backupVaults`); if (opts.backupVaultId !== undefined) { url.searchParams.append("backupVaultId", String(opts.backupVaultId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Internal only. Abandons a backup. * * @param dataSource Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. */ async projectsLocationsBackupVaultsDataSourcesAbandonBackup(dataSource: string, req: AbandonBackupRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ dataSource }:abandonBackup`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a Backup. * * @param name Required. Name of the resource. */ async projectsLocationsBackupVaultsDataSourcesBackupsDelete(name: string, opts: ProjectsLocationsBackupVaultsDataSourcesBackupsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a Backup. * * @param name Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' */ async projectsLocationsBackupVaultsDataSourcesBackupsGet(name: string, opts: ProjectsLocationsBackupVaultsDataSourcesBackupsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeBackup(data); } /** * Lists Backups in a given project and location. * * @param parent Required. The project and location for which to retrieve backup information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. To retrieve data sources for all locations, use "-" for the '{location}' value. */ async projectsLocationsBackupVaultsDataSourcesBackupsList(parent: string, opts: ProjectsLocationsBackupVaultsDataSourcesBackupsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backups`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListBackupsResponse(data); } /** * Updates the settings of a Backup. * * @param name Output only. Identifier. Name of the backup to create. It must have the format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. `{backup}` cannot be changed after creation. It must be between 3-63 characters long and must be unique within the datasource. */ async projectsLocationsBackupVaultsDataSourcesBackupsPatch(name: string, req: Backup, opts: ProjectsLocationsBackupVaultsDataSourcesBackupsPatchOptions = {}): Promise { req = serializeBackup(req); opts = serializeProjectsLocationsBackupVaultsDataSourcesBackupsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Restore from a Backup * * @param name Required. The resource name of the Backup instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. */ async projectsLocationsBackupVaultsDataSourcesBackupsRestore(name: string, req: RestoreBackupRequest): Promise { req = serializeRestoreBackupRequest(req); const url = new URL(`${this.#baseUrl}v1/${ name }:restore`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Internal only. Fetch access token for a given data source. * * @param name Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects/*/locations/*/backupVaults/*/dataSources'. */ async projectsLocationsBackupVaultsDataSourcesFetchAccessToken(name: string, req: FetchAccessTokenRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:fetchAccessToken`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeFetchAccessTokenResponse(data); } /** * Internal only. Finalize a backup that was started by a call to * InitiateBackup. * * @param dataSource Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. */ async projectsLocationsBackupVaultsDataSourcesFinalizeBackup(dataSource: string, req: FinalizeBackupRequest): Promise { req = serializeFinalizeBackupRequest(req); const url = new URL(`${this.#baseUrl}v1/${ dataSource }:finalizeBackup`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets details of a DataSource. * * @param name Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' */ async projectsLocationsBackupVaultsDataSourcesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeDataSource(data); } /** * Internal only. Initiates a backup. * * @param dataSource Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. */ async projectsLocationsBackupVaultsDataSourcesInitiateBackup(dataSource: string, req: InitiateBackupRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ dataSource }:initiateBackup`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as InitiateBackupResponse; } /** * Lists DataSources in a given project and location. * * @param parent Required. The project and location for which to retrieve data sources information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. To retrieve data sources for all locations, use "-" for the '{location}' value. */ async projectsLocationsBackupVaultsDataSourcesList(parent: string, opts: ProjectsLocationsBackupVaultsDataSourcesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/dataSources`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListDataSourcesResponse(data); } /** * Updates the settings of a DataSource. * * @param name Output only. Identifier. Name of the datasource to create. It must have the format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. `{datasource}` cannot be changed after creation. It must be between 3-63 characters long and must be unique within the backup vault. */ async projectsLocationsBackupVaultsDataSourcesPatch(name: string, req: DataSource, opts: ProjectsLocationsBackupVaultsDataSourcesPatchOptions = {}): Promise { req = serializeDataSource(req); opts = serializeProjectsLocationsBackupVaultsDataSourcesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Deletes a DataSource. This is a custom method instead of a standard delete * method because external clients will not delete DataSources except for * BackupDR backup appliances. * * @param name Required. Name of the resource. */ async projectsLocationsBackupVaultsDataSourcesRemove(name: string, req: RemoveDataSourceRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:remove`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Sets the internal status of a DataSource. * * @param dataSource Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. */ async projectsLocationsBackupVaultsDataSourcesSetInternalStatus(dataSource: string, req: SetInternalStatusRequest): Promise { req = serializeSetInternalStatusRequest(req); const url = new URL(`${this.#baseUrl}v1/${ dataSource }:setInternalStatus`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a BackupVault. * * @param name Required. Name of the resource. */ async projectsLocationsBackupVaultsDelete(name: string, opts: ProjectsLocationsBackupVaultsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.ignoreBackupPlanReferences !== undefined) { url.searchParams.append("ignoreBackupPlanReferences", String(opts.ignoreBackupPlanReferences)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * FetchUsableBackupVaults lists usable BackupVaults in a given project and * location. Usable BackupVault are the ones that user has * backupdr.backupVaults.get permission. * * @param parent Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. To retrieve backupvault stores for all locations, use "-" for the '{location}' value. */ async projectsLocationsBackupVaultsFetchUsable(parent: string, opts: ProjectsLocationsBackupVaultsFetchUsableOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupVaults:fetchUsable`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeFetchUsableBackupVaultsResponse(data); } /** * Gets details of a BackupVault. * * @param name Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' */ async projectsLocationsBackupVaultsGet(name: string, opts: ProjectsLocationsBackupVaultsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeBackupVault(data); } /** * Lists BackupVaults in a given project and location. * * @param parent Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. To retrieve backupvault stores for all locations, use "-" for the '{location}' value. */ async projectsLocationsBackupVaultsList(parent: string, opts: ProjectsLocationsBackupVaultsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupVaults`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListBackupVaultsResponse(data); } /** * Updates the settings of a BackupVault. * * @param name Output only. Identifier. Name of the backup vault to create. It must have the format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. `{backupvault}` cannot be changed after creation. It must be between 3-63 characters long and must be unique within the project and location. */ async projectsLocationsBackupVaultsPatch(name: string, req: BackupVault, opts: ProjectsLocationsBackupVaultsPatchOptions = {}): Promise { req = serializeBackupVault(req); opts = serializeProjectsLocationsBackupVaultsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Returns the caller's permissions on a BackupVault resource. A caller is * not required to have Google IAM permission to make this request. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBackupVaultsTestIamPermissions(resource: string, req: TestIamPermissionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:testIamPermissions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TestIamPermissionsResponse; } /** * Gets information about a location. * * @param name Resource name for the location. */ async projectsLocationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Location; } /** * Lists information about the supported locations for this service. * * @param name The resource that owns the locations collection, if applicable. */ async projectsLocationsList(name: string, opts: ProjectsLocationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/locations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListLocationsResponse; } /** * Creates a new ManagementServer in a given project and location. * * @param parent Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR locations map to Google Cloud regions, for example **us-central1**. */ async projectsLocationsManagementServersCreate(parent: string, req: ManagementServer, opts: ProjectsLocationsManagementServersCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/managementServers`); if (opts.managementServerId !== undefined) { url.searchParams.append("managementServerId", String(opts.managementServerId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single ManagementServer. * * @param name Required. Name of the resource */ async projectsLocationsManagementServersDelete(name: string, opts: ProjectsLocationsManagementServersDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single ManagementServer. * * @param name Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' */ async projectsLocationsManagementServersGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ManagementServer; } /** * Gets the access control policy for a resource. Returns an empty policy if * the resource exists and does not have a policy set. * * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsManagementServersGetIamPolicy(resource: string, opts: ProjectsLocationsManagementServersGetIamPolicyOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:getIamPolicy`); if (opts["options.requestedPolicyVersion"] !== undefined) { url.searchParams.append("options.requestedPolicyVersion", String(opts["options.requestedPolicyVersion"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializePolicy(data); } /** * Lists ManagementServers in a given project and location. * * @param parent Required. The project and location for which to retrieve management servers information, in the format 'projects/{project_id}/locations/{location}'. In Cloud BackupDR, locations map to Google Cloud regions, for example **us-central1**. To retrieve management servers for all locations, use "-" for the '{location}' value. */ async projectsLocationsManagementServersList(parent: string, opts: ProjectsLocationsManagementServersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/managementServers`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListManagementServersResponse; } /** * Sets the access control policy on the specified resource. Replaces any * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and * `PERMISSION_DENIED` errors. * * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsManagementServersSetIamPolicy(resource: string, req: SetIamPolicyRequest): Promise { req = serializeSetIamPolicyRequest(req); const url = new URL(`${this.#baseUrl}v1/${ resource }:setIamPolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePolicy(data); } /** * Returns permissions that a caller has on the specified resource. If the * resource does not exist, this will return an empty set of permissions, not * a `NOT_FOUND` error. Note: This operation is designed to be used for * building permission-aware UIs and command-line tools, not for authorization * checking. This operation may "fail open" without warning. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsManagementServersTestIamPermissions(resource: string, req: TestIamPermissionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:testIamPermissions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TestIamPermissionsResponse; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsLocationsOperationsCancel(name: string, req: CancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Empty; } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param name The name of the operation resource to be deleted. */ async projectsLocationsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } } /** * request message for AbandonBackup. */ export interface AbandonBackupRequest { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * A specification of the type and number of accelerator cards attached to the * instance. */ export interface AcceleratorConfig { /** * Optional. The number of the guest accelerator cards exposed to this * instance. */ acceleratorCount?: number; /** * Optional. Full or partial URL of the accelerator type resource to attach * to this instance. */ acceleratorType?: string; } /** * An access configuration attached to an instance's network interface. Only * one access config per instance is supported. */ export interface AccessConfig { /** * Optional. The external IPv6 address of this access configuration. */ externalIpv6?: string; /** * Optional. The prefix length of the external IPv6 range. */ externalIpv6PrefixLength?: number; /** * Optional. The name of this access configuration. */ name?: string; /** * Optional. The external IP address of this access configuration. */ natIP?: string; /** * Optional. This signifies the networking tier used for configuring this * access */ networkTier?: | "NETWORK_TIER_UNSPECIFIED" | "PREMIUM" | "STANDARD"; /** * Optional. The DNS domain name for the public PTR record. */ publicPtrDomainName?: string; /** * Optional. Specifies whether a public DNS 'PTR' record should be created to * map the external IP address of the instance to a DNS domain name. */ setPublicPtr?: boolean; /** * Optional. In accessConfigs (IPv4), the default and only option is * ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and only option is * DIRECT_IPV6. */ type?: | "ACCESS_TYPE_UNSPECIFIED" | "ONE_TO_ONE_NAT" | "DIRECT_IPV6"; } /** * Specifies options for controlling advanced machine features. */ export interface AdvancedMachineFeatures { /** * Optional. Whether to enable nested virtualization or not (default is * false). */ enableNestedVirtualization?: boolean; /** * Optional. Whether to enable UEFI networking for instance creation. */ enableUefiNetworking?: boolean; /** * Optional. The number of threads per physical core. To disable simultaneous * multithreading (SMT) set this to 1. If unset, the maximum number of threads * supported per core by the underlying processor is assumed. */ threadsPerCore?: number; /** * Optional. The number of physical cores to expose to an instance. Multiply * by the number of threads per core to compute the total number of virtual * CPUs to expose to the instance. If unset, the number of cores is inferred * from the instance's nominal CPU count and the underlying platform's SMT * width. */ visibleCoreCount?: number; } /** * An alias IP range attached to an instance's network interface. */ export interface AliasIpRange { /** * Optional. The IP alias ranges to allocate for this interface. */ ipCidrRange?: string; /** * Optional. The name of a subnetwork secondary IP range from which to * allocate an IP alias range. If not specified, the primary range of the * subnetwork is used. */ subnetworkRangeName?: string; } /** * Specifies the reservations that this instance can consume from. */ export interface AllocationAffinity { /** * Optional. Specifies the type of reservation from which this instance can * consume */ consumeReservationType?: | "TYPE_UNSPECIFIED" | "NO_RESERVATION" | "ANY_RESERVATION" | "SPECIFIC_RESERVATION"; /** * Optional. Corresponds to the label key of a reservation resource. */ key?: string; /** * Optional. Corresponds to the label values of a reservation resource. */ values?: string[]; } /** * An instance-attached disk resource. */ export interface AttachedDisk { /** * Optional. Specifies whether the disk will be auto-deleted when the * instance is deleted (but not when the disk is detached from the instance). */ autoDelete?: boolean; /** * Optional. Indicates that this is a boot disk. The virtual machine will use * the first partition of the disk for its root filesystem. */ boot?: boolean; /** * Optional. This is used as an identifier for the disks. This is the unique * name has to provided to modify disk parameters like disk_name and * replica_zones (in case of RePDs) */ deviceName?: string; /** * Optional. Encrypts or decrypts a disk using a customer-supplied encryption * key. */ diskEncryptionKey?: CustomerEncryptionKey; /** * Optional. Specifies the disk interface to use for attaching this disk. */ diskInterface?: | "DISK_INTERFACE_UNSPECIFIED" | "SCSI" | "NVME" | "NVDIMM" | "ISCSI"; /** * Optional. The size of the disk in GB. */ diskSizeGb?: bigint; /** * Optional. Output only. The URI of the disk type resource. For example: * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd */ readonly diskType?: string; /** * Specifies the type of the disk. */ diskTypeDeprecated?: | "DISK_TYPE_UNSPECIFIED" | "SCRATCH" | "PERSISTENT"; /** * Optional. A list of features to enable on the guest operating system. * Applicable only for bootable images. */ guestOsFeature?: GuestOsFeature[]; /** * Optional. A zero-based index to this disk, where 0 is reserved for the * boot disk. */ index?: bigint; /** * Optional. Specifies the parameters to initialize this disk. */ initializeParams?: InitializeParams; /** * Optional. Type of the resource. */ kind?: string; /** * Optional. Any valid publicly visible licenses. */ license?: string[]; /** * Optional. The mode in which to attach this disk. */ mode?: | "DISK_MODE_UNSPECIFIED" | "READ_WRITE" | "READ_ONLY" | "LOCKED"; /** * Optional. Output only. The state of the disk. */ readonly savedState?: | "DISK_SAVED_STATE_UNSPECIFIED" | "PRESERVED"; /** * Optional. Specifies a valid partial or full URL to an existing Persistent * Disk resource. */ source?: string; /** * Optional. Specifies the type of the disk. */ type?: | "DISK_TYPE_UNSPECIFIED" | "SCRATCH" | "PERSISTENT"; } function serializeAttachedDisk(data: any): AttachedDisk { return { ...data, diskSizeGb: data["diskSizeGb"] !== undefined ? String(data["diskSizeGb"]) : undefined, index: data["index"] !== undefined ? String(data["index"]) : undefined, }; } function deserializeAttachedDisk(data: any): AttachedDisk { return { ...data, diskSizeGb: data["diskSizeGb"] !== undefined ? BigInt(data["diskSizeGb"]) : undefined, index: data["index"] !== undefined ? BigInt(data["index"]) : undefined, }; } /** * Specifies the audit configuration for a service. The configuration * determines which permission types are logged, and what identities, if any, * are exempted from logging. An AuditConfig must have one or more * AuditLogConfigs. If there are AuditConfigs for both `allServices` and a * specific service, the union of the two AuditConfigs is used for that service: * the log_types specified in each AuditConfig are enabled, and the * exempted_members in each AuditLogConfig are exempted. Example Policy with * multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", * "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ * "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": * "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", * "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": * "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For * sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ * logging. It also exempts `jose@example.com` from DATA_READ logging, and * `aliya@example.com` from DATA_WRITE logging. */ export interface AuditConfig { /** * The configuration for logging of each type of permission. */ auditLogConfigs?: AuditLogConfig[]; /** * Specifies a service that will be enabled for audit logging. For example, * `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a * special value that covers all services. */ service?: string; } /** * Provides the configuration for logging a type of permissions. Example: { * "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ * "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables * 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from * DATA_READ logging. */ export interface AuditLogConfig { /** * Specifies the identities that do not cause logging for this type of * permission. Follows the same format of Binding.members. */ exemptedMembers?: string[]; /** * The log type that this config enables. */ logType?: | "LOG_TYPE_UNSPECIFIED" | "ADMIN_READ" | "DATA_WRITE" | "DATA_READ"; } /** * Message describing a Backup object. */ export interface Backup { /** * Output only. Backup Appliance specific backup properties. */ readonly backupApplianceBackupProperties?: BackupApplianceBackupProperties; /** * Optional. The list of BackupLocks taken by the accessor Backup Appliance. */ backupApplianceLocks?: BackupLock[]; /** * Output only. Type of the backup, unspecified, scheduled or ondemand. */ readonly backupType?: | "BACKUP_TYPE_UNSPECIFIED" | "SCHEDULED" | "ON_DEMAND"; /** * Output only. Compute Engine specific backup properties. */ readonly computeInstanceBackupProperties?: ComputeInstanceBackupProperties; /** * Output only. The point in time when this backup was captured from the * source. */ readonly consistencyTime?: Date; /** * Output only. The time when the instance was created. */ readonly createTime?: Date; /** * Output only. The description of the Backup instance (2048 characters or * less). */ readonly description?: string; /** * Optional. The backup can not be deleted before this time. */ enforcedRetentionEndTime?: Date; /** * Optional. Server specified ETag to prevent updates from overwriting each * other. */ etag?: string; /** * Optional. When this backup is automatically expired. */ expireTime?: Date; /** * Output only. Configuration for a Google Cloud resource. */ readonly gcpBackupPlanInfo?: GCPBackupPlanInfo; /** * Optional. Resource labels to represent user provided metadata. No labels * currently defined. */ labels?: { [key: string]: string }; /** * Output only. Identifier. Name of the backup to create. It must have the * format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. * `{backup}` cannot be changed after creation. It must be between 3-63 * characters long and must be unique within the datasource. */ readonly name?: string; /** * Output only. source resource size in bytes at the time of the backup. */ readonly resourceSizeBytes?: bigint; /** * Output only. The list of BackupLocks taken by the service to prevent the * deletion of the backup. */ readonly serviceLocks?: BackupLock[]; /** * Output only. The Backup resource instance state. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "DELETING" | "ERROR"; /** * Output only. The time when the instance was updated. */ readonly updateTime?: Date; } function serializeBackup(data: any): Backup { return { ...data, backupApplianceLocks: data["backupApplianceLocks"] !== undefined ? data["backupApplianceLocks"].map((item: any) => (serializeBackupLock(item))) : undefined, enforcedRetentionEndTime: data["enforcedRetentionEndTime"] !== undefined ? data["enforcedRetentionEndTime"].toISOString() : undefined, expireTime: data["expireTime"] !== undefined ? data["expireTime"].toISOString() : undefined, }; } function deserializeBackup(data: any): Backup { return { ...data, backupApplianceBackupProperties: data["backupApplianceBackupProperties"] !== undefined ? deserializeBackupApplianceBackupProperties(data["backupApplianceBackupProperties"]) : undefined, backupApplianceLocks: data["backupApplianceLocks"] !== undefined ? data["backupApplianceLocks"].map((item: any) => (deserializeBackupLock(item))) : undefined, computeInstanceBackupProperties: data["computeInstanceBackupProperties"] !== undefined ? deserializeComputeInstanceBackupProperties(data["computeInstanceBackupProperties"]) : undefined, consistencyTime: data["consistencyTime"] !== undefined ? new Date(data["consistencyTime"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, enforcedRetentionEndTime: data["enforcedRetentionEndTime"] !== undefined ? new Date(data["enforcedRetentionEndTime"]) : undefined, expireTime: data["expireTime"] !== undefined ? new Date(data["expireTime"]) : undefined, resourceSizeBytes: data["resourceSizeBytes"] !== undefined ? BigInt(data["resourceSizeBytes"]) : undefined, serviceLocks: data["serviceLocks"] !== undefined ? data["serviceLocks"].map((item: any) => (deserializeBackupLock(item))) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * BackupApplianceBackupConfig captures the backup configuration for * applications that are protected by Backup Appliances. */ export interface BackupApplianceBackupConfig { /** * The name of the application. */ applicationName?: string; /** * The ID of the backup appliance. */ backupApplianceId?: bigint; /** * The name of the backup appliance. */ backupApplianceName?: string; /** * The name of the host where the application is running. */ hostName?: string; /** * The ID of the SLA of this application. */ slaId?: bigint; /** * The name of the SLP associated with the application. */ slpName?: string; /** * The name of the SLT associated with the application. */ sltName?: string; } function serializeBackupApplianceBackupConfig(data: any): BackupApplianceBackupConfig { return { ...data, backupApplianceId: data["backupApplianceId"] !== undefined ? String(data["backupApplianceId"]) : undefined, slaId: data["slaId"] !== undefined ? String(data["slaId"]) : undefined, }; } function deserializeBackupApplianceBackupConfig(data: any): BackupApplianceBackupConfig { return { ...data, backupApplianceId: data["backupApplianceId"] !== undefined ? BigInt(data["backupApplianceId"]) : undefined, slaId: data["slaId"] !== undefined ? BigInt(data["slaId"]) : undefined, }; } /** * BackupApplianceBackupProperties represents BackupDR backup appliance's * properties. */ export interface BackupApplianceBackupProperties { /** * Output only. The time when this backup object was finalized (if none, * backup is not finalized). */ readonly finalizeTime?: Date; /** * Output only. The numeric generation ID of the backup (monotonically * increasing). */ readonly generationId?: number; /** * Optional. The latest timestamp of data available in this Backup. */ recoveryRangeEndTime?: Date; /** * Optional. The earliest timestamp of data available in this Backup. */ recoveryRangeStartTime?: Date; } function serializeBackupApplianceBackupProperties(data: any): BackupApplianceBackupProperties { return { ...data, recoveryRangeEndTime: data["recoveryRangeEndTime"] !== undefined ? data["recoveryRangeEndTime"].toISOString() : undefined, recoveryRangeStartTime: data["recoveryRangeStartTime"] !== undefined ? data["recoveryRangeStartTime"].toISOString() : undefined, }; } function deserializeBackupApplianceBackupProperties(data: any): BackupApplianceBackupProperties { return { ...data, finalizeTime: data["finalizeTime"] !== undefined ? new Date(data["finalizeTime"]) : undefined, recoveryRangeEndTime: data["recoveryRangeEndTime"] !== undefined ? new Date(data["recoveryRangeEndTime"]) : undefined, recoveryRangeStartTime: data["recoveryRangeStartTime"] !== undefined ? new Date(data["recoveryRangeStartTime"]) : undefined, }; } /** * BackupApplianceLockInfo contains metadata about the backupappliance that * created the lock. */ export interface BackupApplianceLockInfo { /** * Required. The ID of the backup/recovery appliance that created this lock. */ backupApplianceId?: bigint; /** * Required. The name of the backup/recovery appliance that created this * lock. */ backupApplianceName?: string; /** * The image name that depends on this Backup. */ backupImage?: string; /** * The job name on the backup/recovery appliance that created this lock. */ jobName?: string; /** * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The * value of this string is only meaningful to the client and it is not * interpreted by the BackupVault service. */ lockReason?: string; /** * The SLA on the backup/recovery appliance that owns the lock. */ slaId?: bigint; } function serializeBackupApplianceLockInfo(data: any): BackupApplianceLockInfo { return { ...data, backupApplianceId: data["backupApplianceId"] !== undefined ? String(data["backupApplianceId"]) : undefined, slaId: data["slaId"] !== undefined ? String(data["slaId"]) : undefined, }; } function deserializeBackupApplianceLockInfo(data: any): BackupApplianceLockInfo { return { ...data, backupApplianceId: data["backupApplianceId"] !== undefined ? BigInt(data["backupApplianceId"]) : undefined, slaId: data["slaId"] !== undefined ? BigInt(data["slaId"]) : undefined, }; } /** * BackupConfigInfo has information about how the resource is configured for * Backup and about the most recent backup to this vault. */ export interface BackupConfigInfo { /** * Configuration for an application backed up by a Backup Appliance. */ backupApplianceBackupConfig?: BackupApplianceBackupConfig; /** * Configuration for a Google Cloud resource. */ gcpBackupConfig?: GcpBackupConfig; /** * Output only. If the last backup failed, this field has the error message. */ readonly lastBackupError?: Status; /** * Output only. The status of the last backup to this BackupVault */ readonly lastBackupState?: | "LAST_BACKUP_STATE_UNSPECIFIED" | "FIRST_BACKUP_PENDING" | "SUCCEEDED" | "FAILED" | "PERMISSION_DENIED"; /** * Output only. If the last backup were successful, this field has the * consistency date. */ readonly lastSuccessfulBackupConsistencyTime?: Date; } function serializeBackupConfigInfo(data: any): BackupConfigInfo { return { ...data, backupApplianceBackupConfig: data["backupApplianceBackupConfig"] !== undefined ? serializeBackupApplianceBackupConfig(data["backupApplianceBackupConfig"]) : undefined, }; } function deserializeBackupConfigInfo(data: any): BackupConfigInfo { return { ...data, backupApplianceBackupConfig: data["backupApplianceBackupConfig"] !== undefined ? deserializeBackupApplianceBackupConfig(data["backupApplianceBackupConfig"]) : undefined, lastSuccessfulBackupConsistencyTime: data["lastSuccessfulBackupConsistencyTime"] !== undefined ? new Date(data["lastSuccessfulBackupConsistencyTime"]) : undefined, }; } /** * BackupLock represents a single lock on a Backup resource. An unexpired lock * on a Backup prevents the Backup from being deleted. */ export interface BackupLock { /** * If the client is a backup and recovery appliance, this contains metadata * about why the lock exists. */ backupApplianceLockInfo?: BackupApplianceLockInfo; /** * Required. The time after which this lock is not considered valid and will * no longer protect the Backup from deletion. */ lockUntilTime?: Date; /** * Output only. Contains metadata about the lock exist for Google Cloud * native backups. */ readonly serviceLockInfo?: ServiceLockInfo; } function serializeBackupLock(data: any): BackupLock { return { ...data, backupApplianceLockInfo: data["backupApplianceLockInfo"] !== undefined ? serializeBackupApplianceLockInfo(data["backupApplianceLockInfo"]) : undefined, lockUntilTime: data["lockUntilTime"] !== undefined ? data["lockUntilTime"].toISOString() : undefined, }; } function deserializeBackupLock(data: any): BackupLock { return { ...data, backupApplianceLockInfo: data["backupApplianceLockInfo"] !== undefined ? deserializeBackupApplianceLockInfo(data["backupApplianceLockInfo"]) : undefined, lockUntilTime: data["lockUntilTime"] !== undefined ? new Date(data["lockUntilTime"]) : undefined, }; } /** * A `BackupPlan` specifies some common fields, such as `description` as well * as one or more `BackupRule` messages. Each `BackupRule` has a retention * policy and defines a schedule by which the system is to perform backup * workloads. */ export interface BackupPlan { /** * Required. The backup rules for this `BackupPlan`. There must be at least * one `BackupRule` message. */ backupRules?: BackupRule[]; /** * Required. Resource name of backup vault which will be used as storage * location for backups. Format: * projects/{project}/locations/{location}/backupVaults/{backupvault} */ backupVault?: string; /** * Output only. The Google Cloud Platform Service Account to be used by the * BackupVault for taking backups. Specify the email address of the Backup * Vault Service Account. */ readonly backupVaultServiceAccount?: string; /** * Output only. When the `BackupPlan` was created. */ readonly createTime?: Date; /** * Optional. The description of the `BackupPlan` resource. The description * allows for additional details about `BackupPlan` and its use cases to be * provided. An example description is the following: "This is a backup plan * that performs a daily backup at 6pm and retains data for 3 months". The * description must be at most 2048 characters. */ description?: string; /** * Optional. `etag` is returned from the service in the response. As a user * of the service, you may provide an etag value in this field to prevent * stale resources. */ etag?: string; /** * Optional. This collection of key/value pairs allows for custom labels to * be supplied by the user. Example, {"tag": "Weekly"}. */ labels?: { [key: string]: string }; /** * Output only. Identifier. The resource name of the `BackupPlan`. Format: * `projects/{project}/locations/{location}/backupPlans/{backup_plan}` */ readonly name?: string; /** * Required. The resource type to which the `BackupPlan` will be applied. * Examples include, "compute.googleapis.com/Instance", * "sqladmin.googleapis.com/Instance" and "storage.googleapis.com/Bucket". */ resourceType?: string; /** * Output only. The `State` for the `BackupPlan`. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "DELETING" | "INACTIVE"; /** * Output only. When the `BackupPlan` was last updated. */ readonly updateTime?: Date; } /** * A BackupPlanAssociation represents a single BackupPlanAssociation which * contains details like workload, backup plan etc */ export interface BackupPlanAssociation { /** * Required. Resource name of backup plan which needs to be applied on * workload. Format: * projects/{project}/locations/{location}/backupPlans/{backupPlanId} */ backupPlan?: string; /** * Output only. The time when the instance was created. */ readonly createTime?: Date; /** * Output only. Output Only. Resource name of data source which will be used * as storage location for backups taken. Format : * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource} */ readonly dataSource?: string; /** * Output only. Identifier. The resource name of BackupPlanAssociation in * below format Format : * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} */ readonly name?: string; /** * Required. Immutable. Resource name of workload on which backupplan is * applied */ resource?: string; /** * Optional. Required. Resource type of workload on which backupplan is * applied */ resourceType?: string; /** * Output only. The config info related to backup rules. */ readonly rulesConfigInfo?: RuleConfigInfo[]; /** * Output only. The BackupPlanAssociation resource state. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "DELETING" | "INACTIVE" | "UPDATING"; /** * Output only. The time when the instance was updated. */ readonly updateTime?: Date; } /** * `BackupRule` binds the backup schedule to a retention policy. */ export interface BackupRule { /** * Required. Configures the duration for which backup data will be kept. It * is defined in “days”. The value should be greater than or equal to minimum * enforced retention of the backup vault. Minimum value is 1 and maximum * value is 90 for hourly backups. Minimum value is 1 and maximum value is 90 * for daily backups. Minimum value is 7 and maximum value is 186 for weekly * backups. Minimum value is 30 and maximum value is 732 for monthly backups. * Minimum value is 30 and maximum value is 36159 for yearly backups. */ backupRetentionDays?: number; /** * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, * /a-z{,62}/. */ ruleId?: string; /** * Required. Defines a schedule that runs within the confines of a defined * window of time. */ standardSchedule?: StandardSchedule; } /** * Message describing a BackupVault object. */ export interface BackupVault { /** * Optional. Note: This field is added for future use case and will not be * supported in the current release. Optional. Access restriction for the * backup vault. Default value is WITHIN_ORGANIZATION if not provided during * creation. */ accessRestriction?: | "ACCESS_RESTRICTION_UNSPECIFIED" | "WITHIN_PROJECT" | "WITHIN_ORGANIZATION" | "UNRESTRICTED" | "WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA"; /** * Optional. User annotations. See https://google.aip.dev/128#annotations * Stores small amounts of arbitrary data. */ annotations?: { [key: string]: string }; /** * Output only. The number of backups in this backup vault. */ readonly backupCount?: bigint; /** * Required. The default and minimum enforced retention for each backup * within the backup vault. The enforced retention for each backup can be * extended. */ backupMinimumEnforcedRetentionDuration?: number /* Duration */; /** * Output only. The time when the instance was created. */ readonly createTime?: Date; /** * Output only. Set to true when there are no backups nested under this * resource. */ readonly deletable?: boolean; /** * Optional. The description of the BackupVault instance (2048 characters or * less). */ description?: string; /** * Optional. Time after which the BackupVault resource is locked. */ effectiveTime?: Date; /** * Optional. Server specified ETag for the backup vault resource to prevent * simultaneous updates from overwiting each other. */ etag?: string; /** * Optional. Resource labels to represent user provided metadata. No labels * currently defined: */ labels?: { [key: string]: string }; /** * Output only. Identifier. Name of the backup vault to create. It must have * the * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. * `{backupvault}` cannot be changed after creation. It must be between 3-63 * characters long and must be unique within the project and location. */ readonly name?: string; /** * Output only. Service account used by the BackupVault Service for this * BackupVault. The user should grant this account permissions in their * workload project to enable the service to run backups and restores there. */ readonly serviceAccount?: string; /** * Output only. The BackupVault resource instance state. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "DELETING" | "ERROR"; /** * Output only. Total size of the storage used by all backup resources. */ readonly totalStoredBytes?: bigint; /** * Output only. Output only Immutable after resource creation until resource * deletion. */ readonly uid?: string; /** * Output only. The time when the instance was updated. */ readonly updateTime?: Date; } function serializeBackupVault(data: any): BackupVault { return { ...data, backupMinimumEnforcedRetentionDuration: data["backupMinimumEnforcedRetentionDuration"] !== undefined ? data["backupMinimumEnforcedRetentionDuration"] : undefined, effectiveTime: data["effectiveTime"] !== undefined ? data["effectiveTime"].toISOString() : undefined, }; } function deserializeBackupVault(data: any): BackupVault { return { ...data, backupCount: data["backupCount"] !== undefined ? BigInt(data["backupCount"]) : undefined, backupMinimumEnforcedRetentionDuration: data["backupMinimumEnforcedRetentionDuration"] !== undefined ? data["backupMinimumEnforcedRetentionDuration"] : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, effectiveTime: data["effectiveTime"] !== undefined ? new Date(data["effectiveTime"]) : undefined, totalStoredBytes: data["totalStoredBytes"] !== undefined ? BigInt(data["totalStoredBytes"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * `BackupWindow` defines a window of the day during which backup jobs will * run. */ export interface BackupWindow { /** * Required. The hour of day (1-24) when the window end for e.g. if value of * end hour of day is 10 that mean backup window end time is 10:00. End hour * of day should be greater than start hour of day. 0 <= start_hour_of_day < * end_hour_of_day <= 24 End hour of day is not include in backup window that * mean if end_hour_of_day= 10 jobs should start before 10:00. */ endHourOfDay?: number; /** * Required. The hour of day (0-23) when the window starts for e.g. if value * of start hour of day is 6 that mean backup window start at 6:00. */ startHourOfDay?: number; } /** * Associates `members`, or principals, with a `role`. */ export interface Binding { /** * The condition that is associated with this binding. If the condition * evaluates to `true`, then this binding applies to the current request. If * the condition evaluates to `false`, then this binding does not apply to the * current request. However, a different role binding might grant the same * role to one or more of the principals in this binding. To learn which * resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ condition?: Expr; /** * Specifies the principals requesting access for a Google Cloud resource. * `members` can have the following values: * `allUsers`: A special identifier * that represents anyone who is on the internet; with or without a Google * account. * `allAuthenticatedUsers`: A special identifier that represents * anyone who is authenticated with a Google account or a service account. * Does not include identities that come from external identity providers * (IdPs) through identity federation. * `user:{emailid}`: An email address * that represents a specific Google account. For example, `alice@example.com` * . * `serviceAccount:{emailid}`: An email address that represents a Google * service account. For example, `my-other-app@appspot.gserviceaccount.com`. * * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An * identifier for a [Kubernetes service * account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). * For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * * `group:{emailid}`: An email address that represents a Google group. For * example, `admins@example.com`. * `domain:{domain}`: The G Suite domain * (primary) that represents all the users of that domain. For example, * `google.com` or `example.com`. * * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: * A single identity in a workforce identity pool. * * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: * All workforce identities in a group. * * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: * All workforce identities with a specific attribute value. * * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: * All identities in a workforce identity pool. * * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: * A single identity in a workload identity pool. * * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: * A workload identity pool group. * * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: * All identities in a workload identity pool with a certain attribute. * * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: * All identities in a workload identity pool. * * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique * identifier) representing a user that has been recently deleted. For * example, `alice@example.com?uid=123456789012345678901`. If the user is * recovered, this value reverts to `user:{emailid}` and the recovered user * retains the role in the binding. * * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus * unique identifier) representing a service account that has been recently * deleted. For example, * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If * the service account is undeleted, this value reverts to * `serviceAccount:{emailid}` and the undeleted service account retains the * role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email * address (plus unique identifier) representing a Google group that has been * recently deleted. For example, * `admins@example.com?uid=123456789012345678901`. If the group is recovered, * this value reverts to `group:{emailid}` and the recovered group retains the * role in the binding. * * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: * Deleted single identity in a workforce identity pool. For example, * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. */ members?: string[]; /** * Role that is assigned to the list of `members`, or principals. For * example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview * of the IAM roles and permissions, see the [IAM * documentation](https://cloud.google.com/iam/docs/roles-overview). For a * list of the available pre-defined roles, see * [here](https://cloud.google.com/iam/docs/understanding-roles). */ role?: string; } /** * The request message for Operations.CancelOperation. */ export interface CancelOperationRequest { } /** * ComputeInstanceBackupProperties represents Compute Engine instance backup * properties. */ export interface ComputeInstanceBackupProperties { /** * Enables instances created based on these properties to send packets with * source IP addresses other than their own and receive packets with * destination IP addresses other than their own. If these instances will be * used as an IP gateway or it will be set as the next-hop in a Route * resource, specify `true`. If unsure, leave this set to `false`. See the * https://cloud.google.com/vpc/docs/using-routes#canipforward documentation * for more information. */ canIpForward?: boolean; /** * An optional text description for the instances that are created from these * properties. */ description?: string; /** * An array of disks that are associated with the instances that are created * from these properties. */ disk?: AttachedDisk[]; /** * A list of guest accelerator cards' type and count to use for instances * created from these properties. */ guestAccelerator?: AcceleratorConfig[]; /** * KeyRevocationActionType of the instance. Supported options are "STOP" and * "NONE". The default value is "NONE" if it is not specified. */ keyRevocationActionType?: | "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" | "NONE" | "STOP"; /** * Labels to apply to instances that are created from these properties. */ labels?: { [key: string]: string }; /** * The machine type to use for instances that are created from these * properties. */ machineType?: string; /** * The metadata key/value pairs to assign to instances that are created from * these properties. These pairs can consist of custom metadata or predefined * keys. See https://cloud.google.com/compute/docs/metadata/overview for more * information. */ metadata?: Metadata; /** * Minimum cpu/platform to be used by instances. The instance may be * scheduled on the specified or newer cpu/platform. Applicable values are the * friendly names of CPU platforms, such as `minCpuPlatform: Intel Haswell` or * `minCpuPlatform: Intel Sandy Bridge`. For more information, read * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. */ minCpuPlatform?: string; /** * An array of network access configurations for this interface. */ networkInterface?: NetworkInterface[]; /** * Specifies the scheduling options for the instances that are created from * these properties. */ scheduling?: Scheduling; /** * A list of service accounts with specified scopes. Access tokens for these * service accounts are available to the instances that are created from these * properties. Use metadata queries to obtain the access tokens for these * instances. */ serviceAccount?: ServiceAccount[]; /** * The source instance used to create this backup. This can be a partial or * full URL to the resource. For example, the following are valid values: * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance * -projects/project/zones/zone/instances/instance */ sourceInstance?: string; /** * A list of tags to apply to the instances that are created from these * properties. The tags identify valid sources or targets for network * firewalls. The setTags method can modify this list of tags. Each tag within * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). */ tags?: Tags; } function serializeComputeInstanceBackupProperties(data: any): ComputeInstanceBackupProperties { return { ...data, disk: data["disk"] !== undefined ? data["disk"].map((item: any) => (serializeAttachedDisk(item))) : undefined, scheduling: data["scheduling"] !== undefined ? serializeScheduling(data["scheduling"]) : undefined, }; } function deserializeComputeInstanceBackupProperties(data: any): ComputeInstanceBackupProperties { return { ...data, disk: data["disk"] !== undefined ? data["disk"].map((item: any) => (deserializeAttachedDisk(item))) : undefined, scheduling: data["scheduling"] !== undefined ? deserializeScheduling(data["scheduling"]) : undefined, }; } /** * ComputeInstanceDataSourceProperties represents the properties of a * ComputeEngine resource that are stored in the DataSource. */ export interface ComputeInstanceDataSourceProperties { /** * The description of the Compute Engine instance. */ description?: string; /** * The machine type of the instance. */ machineType?: string; /** * Name of the compute instance backed up by the datasource. */ name?: string; /** * The total number of disks attached to the Instance. */ totalDiskCount?: bigint; /** * The sum of all the disk sizes. */ totalDiskSizeGb?: bigint; } function serializeComputeInstanceDataSourceProperties(data: any): ComputeInstanceDataSourceProperties { return { ...data, totalDiskCount: data["totalDiskCount"] !== undefined ? String(data["totalDiskCount"]) : undefined, totalDiskSizeGb: data["totalDiskSizeGb"] !== undefined ? String(data["totalDiskSizeGb"]) : undefined, }; } function deserializeComputeInstanceDataSourceProperties(data: any): ComputeInstanceDataSourceProperties { return { ...data, totalDiskCount: data["totalDiskCount"] !== undefined ? BigInt(data["totalDiskCount"]) : undefined, totalDiskSizeGb: data["totalDiskSizeGb"] !== undefined ? BigInt(data["totalDiskSizeGb"]) : undefined, }; } /** * ComputeInstanceRestoreProperties represents Compute Engine instance * properties to be overridden during restore. */ export interface ComputeInstanceRestoreProperties { /** * Optional. Controls for advanced machine-related behavior features. */ advancedMachineFeatures?: AdvancedMachineFeatures; /** * Optional. Allows this instance to send and receive packets with * non-matching destination or source IPs. */ canIpForward?: boolean; /** * Optional. Controls Confidential compute options on the instance */ confidentialInstanceConfig?: ConfidentialInstanceConfig; /** * Optional. Whether the resource should be protected against deletion. */ deletionProtection?: boolean; /** * Optional. An optional description of this resource. Provide this property * when you create the resource. */ description?: string; /** * Optional. Array of disks associated with this instance. Persistent disks * must be created before you can assign them. */ disks?: AttachedDisk[]; /** * Optional. Enables display device for the instance. */ displayDevice?: DisplayDevice; /** * Optional. A list of the type and count of accelerator cards attached to * the instance. */ guestAccelerators?: AcceleratorConfig[]; /** * Optional. Specifies the hostname of the instance. The specified hostname * must be RFC1035 compliant. If hostname is not specified, the default * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal * DNS. */ hostname?: string; /** * Optional. Encrypts suspended data for an instance with a customer-managed * encryption key. */ instanceEncryptionKey?: CustomerEncryptionKey; /** * Optional. KeyRevocationActionType of the instance. */ keyRevocationActionType?: | "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" | "NONE" | "STOP"; /** * Optional. Labels to apply to this instance. */ labels?: { [key: string]: string }; /** * Optional. Full or partial URL of the machine type resource to use for this * instance. */ machineType?: string; /** * Optional. This includes custom metadata and predefined keys. */ metadata?: Metadata; /** * Optional. Minimum CPU platform to use for this instance. */ minCpuPlatform?: string; /** * Required. Name of the compute instance. */ name?: string; /** * Optional. An array of network configurations for this instance. These * specify how interfaces are configured to interact with other network * services, such as connecting to the internet. Multiple interfaces are * supported per instance. */ networkInterfaces?: NetworkInterface[]; /** * Optional. Configure network performance such as egress bandwidth tier. */ networkPerformanceConfig?: NetworkPerformanceConfig; /** * Input only. Additional params passed with the request, but not persisted * as part of resource payload. */ params?: InstanceParams; /** * Optional. The private IPv6 google access type for the VM. If not * specified, use INHERIT_FROM_SUBNETWORK as default. */ privateIpv6GoogleAccess?: | "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" | "INHERIT_FROM_SUBNETWORK" | "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" | "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"; /** * Optional. Specifies the reservations that this instance can consume from. */ reservationAffinity?: AllocationAffinity; /** * Optional. Resource policies applied to this instance. */ resourcePolicies?: string[]; /** * Optional. Sets the scheduling options for this instance. */ scheduling?: Scheduling; /** * Optional. A list of service accounts, with their specified scopes, * authorized for this instance. Only one service account per VM instance is * supported. */ serviceAccounts?: ServiceAccount[]; /** * Optional. Tags to apply to this instance. Tags are used to identify valid * sources or targets for network firewalls and are specified by the client * during instance creation. */ tags?: Tags; } function serializeComputeInstanceRestoreProperties(data: any): ComputeInstanceRestoreProperties { return { ...data, disks: data["disks"] !== undefined ? data["disks"].map((item: any) => (serializeAttachedDisk(item))) : undefined, scheduling: data["scheduling"] !== undefined ? serializeScheduling(data["scheduling"]) : undefined, }; } function deserializeComputeInstanceRestoreProperties(data: any): ComputeInstanceRestoreProperties { return { ...data, disks: data["disks"] !== undefined ? data["disks"].map((item: any) => (deserializeAttachedDisk(item))) : undefined, scheduling: data["scheduling"] !== undefined ? deserializeScheduling(data["scheduling"]) : undefined, }; } /** * ComputeInstanceTargetEnvironment represents Compute Engine target * environment to be used during restore. */ export interface ComputeInstanceTargetEnvironment { /** * Required. Target project for the Compute Engine instance. */ project?: string; /** * Required. The zone of the Compute Engine instance. */ zone?: string; } /** * A set of Confidential Instance options. */ export interface ConfidentialInstanceConfig { /** * Optional. Defines whether the instance should have confidential compute * enabled. */ enableConfidentialCompute?: boolean; } /** * A customer-supplied encryption key. */ export interface CustomerEncryptionKey { /** * Optional. The name of the encryption key that is stored in Google Cloud * KMS. */ kmsKeyName?: string; /** * Optional. The service account being used for the encryption request for * the given KMS key. If absent, the Compute Engine default service account is * used. */ kmsKeyServiceAccount?: string; /** * Optional. Specifies a 256-bit customer-supplied encryption key. */ rawKey?: string; /** * Optional. RSA-wrapped 2048-bit customer-supplied encryption key to either * encrypt or decrypt this resource. */ rsaEncryptedKey?: string; } /** * Message describing a DataSource object. Datasource object used to represent * Datasource details for both admin and basic view. */ export interface DataSource { /** * Output only. Details of how the resource is configured for backup. */ readonly backupConfigInfo?: BackupConfigInfo; /** * Number of backups in the data source. */ backupCount?: bigint; /** * Output only. The backup configuration state. */ readonly configState?: | "BACKUP_CONFIG_STATE_UNSPECIFIED" | "ACTIVE" | "PASSIVE"; /** * Output only. The time when the instance was created. */ readonly createTime?: Date; /** * The backed up resource is a backup appliance application. */ dataSourceBackupApplianceApplication?: DataSourceBackupApplianceApplication; /** * The backed up resource is a Google Cloud resource. The word 'DataSource' * was included in the names to indicate that this is the representation of * the Google Cloud resource used within the DataSource object. */ dataSourceGcpResource?: DataSourceGcpResource; /** * Server specified ETag for the ManagementServer resource to prevent * simultaneous updates from overwiting each other. */ etag?: string; /** * Optional. Resource labels to represent user provided metadata. No labels * currently defined: */ labels?: { [key: string]: string }; /** * Output only. Identifier. Name of the datasource to create. It must have * the * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. * `{datasource}` cannot be changed after creation. It must be between 3-63 * characters long and must be unique within the backup vault. */ readonly name?: string; /** * Output only. The DataSource resource instance state. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "DELETING" | "ERROR"; /** * The number of bytes (metadata and data) stored in this datasource. */ totalStoredBytes?: bigint; /** * Output only. The time when the instance was updated. */ readonly updateTime?: Date; } function serializeDataSource(data: any): DataSource { return { ...data, backupCount: data["backupCount"] !== undefined ? String(data["backupCount"]) : undefined, dataSourceBackupApplianceApplication: data["dataSourceBackupApplianceApplication"] !== undefined ? serializeDataSourceBackupApplianceApplication(data["dataSourceBackupApplianceApplication"]) : undefined, dataSourceGcpResource: data["dataSourceGcpResource"] !== undefined ? serializeDataSourceGcpResource(data["dataSourceGcpResource"]) : undefined, totalStoredBytes: data["totalStoredBytes"] !== undefined ? String(data["totalStoredBytes"]) : undefined, }; } function deserializeDataSource(data: any): DataSource { return { ...data, backupConfigInfo: data["backupConfigInfo"] !== undefined ? deserializeBackupConfigInfo(data["backupConfigInfo"]) : undefined, backupCount: data["backupCount"] !== undefined ? BigInt(data["backupCount"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, dataSourceBackupApplianceApplication: data["dataSourceBackupApplianceApplication"] !== undefined ? deserializeDataSourceBackupApplianceApplication(data["dataSourceBackupApplianceApplication"]) : undefined, dataSourceGcpResource: data["dataSourceGcpResource"] !== undefined ? deserializeDataSourceGcpResource(data["dataSourceGcpResource"]) : undefined, totalStoredBytes: data["totalStoredBytes"] !== undefined ? BigInt(data["totalStoredBytes"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * BackupApplianceApplication describes a Source Resource when it is an * application backed up by a BackupAppliance. */ export interface DataSourceBackupApplianceApplication { /** * Appliance Id of the Backup Appliance. */ applianceId?: bigint; /** * The appid field of the application within the Backup Appliance. */ applicationId?: bigint; /** * The name of the Application as known to the Backup Appliance. */ applicationName?: string; /** * Appliance name. */ backupAppliance?: string; /** * Hostid of the application host. */ hostId?: bigint; /** * Hostname of the host where the application is running. */ hostname?: string; /** * The type of the application. e.g. VMBackup */ type?: string; } function serializeDataSourceBackupApplianceApplication(data: any): DataSourceBackupApplianceApplication { return { ...data, applianceId: data["applianceId"] !== undefined ? String(data["applianceId"]) : undefined, applicationId: data["applicationId"] !== undefined ? String(data["applicationId"]) : undefined, hostId: data["hostId"] !== undefined ? String(data["hostId"]) : undefined, }; } function deserializeDataSourceBackupApplianceApplication(data: any): DataSourceBackupApplianceApplication { return { ...data, applianceId: data["applianceId"] !== undefined ? BigInt(data["applianceId"]) : undefined, applicationId: data["applicationId"] !== undefined ? BigInt(data["applicationId"]) : undefined, hostId: data["hostId"] !== undefined ? BigInt(data["hostId"]) : undefined, }; } /** * DataSourceGcpResource is used for protected resources that are Google Cloud * Resources. This name is easeier to understand than GcpResourceDataSource or * GcpDataSourceResource */ export interface DataSourceGcpResource { /** * ComputeInstanceDataSourceProperties has a subset of Compute Instance * properties that are useful at the Datasource level. */ computeInstanceDatasourceProperties?: ComputeInstanceDataSourceProperties; /** * Output only. Full resource pathname URL of the source Google Cloud * resource. */ readonly gcpResourcename?: string; /** * Location of the resource: //"global"/"unspecified". */ location?: string; /** * The type of the Google Cloud resource. Use the Unified Resource Type, eg. * compute.googleapis.com/Instance. */ type?: string; } function serializeDataSourceGcpResource(data: any): DataSourceGcpResource { return { ...data, computeInstanceDatasourceProperties: data["computeInstanceDatasourceProperties"] !== undefined ? serializeComputeInstanceDataSourceProperties(data["computeInstanceDatasourceProperties"]) : undefined, }; } function deserializeDataSourceGcpResource(data: any): DataSourceGcpResource { return { ...data, computeInstanceDatasourceProperties: data["computeInstanceDatasourceProperties"] !== undefined ? deserializeComputeInstanceDataSourceProperties(data["computeInstanceDatasourceProperties"]) : undefined, }; } /** * A set of Display Device options */ export interface DisplayDevice { /** * Optional. Enables display for the Compute Engine VM */ enableDisplay?: boolean; } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request or * the response type of an API method. For instance: service Foo { rpc * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } */ export interface Empty { } /** * A key/value pair to be used for storing metadata. */ export interface Entry { /** * Optional. Key for the metadata entry. */ key?: string; /** * Optional. Value for the metadata entry. These are free-form strings, and * only have meaning as interpreted by the image running in the instance. The * only restriction placed on values is that their size must be less than or * equal to 262144 bytes (256 KiB). */ value?: string; } /** * Represents a textual expression in the Common Expression Language (CEL) * syntax. CEL is a C-like expression language. The syntax and semantics of CEL * are documented at https://github.com/google/cel-spec. Example (Comparison): * title: "Summary size limit" description: "Determines if a summary is less * than 100 chars" expression: "document.summary.size() < 100" Example * (Equality): title: "Requestor is owner" description: "Determines if requestor * is the document owner" expression: "document.owner == * request.auth.claims.email" Example (Logic): title: "Public documents" * description: "Determine whether the document should be publicly visible" * expression: "document.type != 'private' && document.type != 'internal'" * Example (Data Manipulation): title: "Notification string" description: * "Create a notification string with a timestamp." expression: "'New message * received at ' + string(document.create_time)" The exact variables and * functions that may be referenced within an expression are determined by the * service that evaluates it. See the service documentation for additional * information. */ export interface Expr { /** * Optional. Description of the expression. This is a longer text which * describes the expression, e.g. when hovered over it in a UI. */ description?: string; /** * Textual representation of an expression in Common Expression Language * syntax. */ expression?: string; /** * Optional. String indicating the location of the expression for error * reporting, e.g. a file name and a position in the file. */ location?: string; /** * Optional. Title for the expression, i.e. a short string describing its * purpose. This can be used e.g. in UIs which allow to enter the expression. */ title?: string; } /** * Request message for FetchAccessToken. */ export interface FetchAccessTokenRequest { /** * Required. The generation of the backup to update. */ generationId?: number; } /** * Response message for FetchAccessToken. */ export interface FetchAccessTokenResponse { /** * The token is valid until this time. */ expireTime?: Date; /** * The location in bucket that can be used for reading. */ readLocation?: string; /** * The downscoped token that was created. */ token?: string; /** * The location in bucket that can be used for writing. */ writeLocation?: string; } function serializeFetchAccessTokenResponse(data: any): FetchAccessTokenResponse { return { ...data, expireTime: data["expireTime"] !== undefined ? data["expireTime"].toISOString() : undefined, }; } function deserializeFetchAccessTokenResponse(data: any): FetchAccessTokenResponse { return { ...data, expireTime: data["expireTime"] !== undefined ? new Date(data["expireTime"]) : undefined, }; } /** * Response message for fetching usable BackupVaults. */ export interface FetchUsableBackupVaultsResponse { /** * The list of BackupVault instances in the project for the specified * location. If the '{location}' value in the request is "-", the response * contains a list of instances from all locations. In case any location is * unreachable, the response will only return backup vaults in reachable * locations and the 'unreachable' field will be populated with a list of * unreachable locations. */ backupVaults?: BackupVault[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeFetchUsableBackupVaultsResponse(data: any): FetchUsableBackupVaultsResponse { return { ...data, backupVaults: data["backupVaults"] !== undefined ? data["backupVaults"].map((item: any) => (serializeBackupVault(item))) : undefined, }; } function deserializeFetchUsableBackupVaultsResponse(data: any): FetchUsableBackupVaultsResponse { return { ...data, backupVaults: data["backupVaults"] !== undefined ? data["backupVaults"].map((item: any) => (deserializeBackupVault(item))) : undefined, }; } /** * Message for finalizing a Backup. */ export interface FinalizeBackupRequest { /** * Required. Resource ID of the Backup resource to be finalized. This must be * the same backup_id that was used in the InitiateBackupRequest. */ backupId?: string; /** * The point in time when this backup was captured from the source. This will * be assigned to the consistency_time field of the newly created Backup. */ consistencyTime?: Date; /** * This will be assigned to the description field of the newly created * Backup. */ description?: string; /** * The latest timestamp of data available in this Backup. This will be set on * the newly created Backup. */ recoveryRangeEndTime?: Date; /** * The earliest timestamp of data available in this Backup. This will set on * the newly created Backup. */ recoveryRangeStartTime?: Date; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * The ExpireTime on the backup will be set to FinalizeTime plus this * duration. If the resulting ExpireTime is less than * EnforcedRetentionEndTime, then ExpireTime is set to * EnforcedRetentionEndTime. */ retentionDuration?: number /* Duration */; } function serializeFinalizeBackupRequest(data: any): FinalizeBackupRequest { return { ...data, consistencyTime: data["consistencyTime"] !== undefined ? data["consistencyTime"].toISOString() : undefined, recoveryRangeEndTime: data["recoveryRangeEndTime"] !== undefined ? data["recoveryRangeEndTime"].toISOString() : undefined, recoveryRangeStartTime: data["recoveryRangeStartTime"] !== undefined ? data["recoveryRangeStartTime"].toISOString() : undefined, retentionDuration: data["retentionDuration"] !== undefined ? data["retentionDuration"] : undefined, }; } function deserializeFinalizeBackupRequest(data: any): FinalizeBackupRequest { return { ...data, consistencyTime: data["consistencyTime"] !== undefined ? new Date(data["consistencyTime"]) : undefined, recoveryRangeEndTime: data["recoveryRangeEndTime"] !== undefined ? new Date(data["recoveryRangeEndTime"]) : undefined, recoveryRangeStartTime: data["recoveryRangeStartTime"] !== undefined ? new Date(data["recoveryRangeStartTime"]) : undefined, retentionDuration: data["retentionDuration"] !== undefined ? data["retentionDuration"] : undefined, }; } /** * GcpBackupConfig captures the Backup configuration details for Google Cloud * resources. All Google Cloud resources regardless of type are protected with * backup plan associations. */ export interface GcpBackupConfig { /** * The name of the backup plan. */ backupPlan?: string; /** * The name of the backup plan association. */ backupPlanAssociation?: string; /** * The description of the backup plan. */ backupPlanDescription?: string; /** * The names of the backup plan rules which point to this backupvault */ backupPlanRules?: string[]; } /** * GCPBackupPlanInfo captures the plan configuration details of Google Cloud * resources at the time of backup. */ export interface GCPBackupPlanInfo { /** * Resource name of backup plan by which workload is protected at the time of * the backup. Format: * projects/{project}/locations/{location}/backupPlans/{backupPlanId} */ backupPlan?: string; /** * The rule id of the backup plan which triggered this backup in case of * scheduled backup or used for */ backupPlanRuleId?: string; } /** * Minimum details to identify a Google Cloud resource */ export interface GcpResource { /** * Name of the Google Cloud resource. */ gcpResourcename?: string; /** * Location of the resource: //"global"/"unspecified". */ location?: string; /** * Type of the resource. Use the Unified Resource Type, eg. * compute.googleapis.com/Instance. */ type?: string; } /** * Feature type of the Guest OS. */ export interface GuestOsFeature { /** * The ID of a supported feature. */ type?: | "FEATURE_TYPE_UNSPECIFIED" | "VIRTIO_SCSI_MULTIQUEUE" | "WINDOWS" | "MULTI_IP_SUBNET" | "UEFI_COMPATIBLE" | "SECURE_BOOT" | "GVNIC" | "SEV_CAPABLE" | "BARE_METAL_LINUX_COMPATIBLE" | "SUSPEND_RESUME_COMPATIBLE" | "SEV_LIVE_MIGRATABLE" | "SEV_SNP_CAPABLE" | "TDX_CAPABLE" | "IDPF" | "SEV_LIVE_MIGRATABLE_V2"; } /** * Specifies the parameters to initialize this disk. */ export interface InitializeParams { /** * Optional. Specifies the disk name. If not specified, the default is to use * the name of the instance. */ diskName?: string; /** * Optional. URL of the zone where the disk should be created. Required for * each regional disk associated with the instance. */ replicaZones?: string[]; } /** * request message for InitiateBackup. */ export interface InitiateBackupRequest { /** * Required. Resource ID of the Backup resource. */ backupId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Response message for InitiateBackup. */ export interface InitiateBackupResponse { /** * The name of the backup that was created. */ backup?: string; /** * The generation id of the base backup. It is needed for the incremental * backups. */ baseBackupGenerationId?: number; /** * The generation id of the new backup. */ newBackupGenerationId?: number; } /** * Additional instance params. */ export interface InstanceParams { /** * Optional. Resource manager tags to be bound to the instance. */ resourceManagerTags?: { [key: string]: string }; } /** * Response message for List BackupPlanAssociation */ export interface ListBackupPlanAssociationsResponse { /** * The list of Backup Plan Associations in the project for the specified * location. If the `{location}` value in the request is "-", the response * contains a list of instances from all locations. In case any location is * unreachable, the response will only return backup plan associations in * reachable locations and the 'unreachable' field will be populated with a * list of unreachable locations. */ backupPlanAssociations?: BackupPlanAssociation[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response message for getting a list of `BackupPlan`. */ export interface ListBackupPlansResponse { /** * The list of `BackupPlans` in the project for the specified location. If * the `{location}` value in the request is "-", the response contains a list * of resources from all locations. In case any location is unreachable, the * response will only return backup plans in reachable locations and the * 'unreachable' field will be populated with a list of unreachable locations. * BackupPlan */ backupPlans?: BackupPlan[]; /** * A token which may be sent as page_token in a subsequent `ListBackupPlans` * call to retrieve the next page of results. If this field is omitted or * empty, then there are no more results to return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * Response message for listing Backups. */ export interface ListBackupsResponse { /** * The list of Backup instances in the project for the specified location. If * the '{location}' value in the request is "-", the response contains a list * of instances from all locations. In case any location is unreachable, the * response will only return data sources in reachable locations and the * 'unreachable' field will be populated with a list of unreachable locations. */ backups?: Backup[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListBackupsResponse(data: any): ListBackupsResponse { return { ...data, backups: data["backups"] !== undefined ? data["backups"].map((item: any) => (serializeBackup(item))) : undefined, }; } function deserializeListBackupsResponse(data: any): ListBackupsResponse { return { ...data, backups: data["backups"] !== undefined ? data["backups"].map((item: any) => (deserializeBackup(item))) : undefined, }; } /** * Response message for listing BackupVaults. */ export interface ListBackupVaultsResponse { /** * The list of BackupVault instances in the project for the specified * location. If the '{location}' value in the request is "-", the response * contains a list of instances from all locations. In case any location is * unreachable, the response will only return backup vaults in reachable * locations and the 'unreachable' field will be populated with a list of * unreachable locations. */ backupVaults?: BackupVault[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListBackupVaultsResponse(data: any): ListBackupVaultsResponse { return { ...data, backupVaults: data["backupVaults"] !== undefined ? data["backupVaults"].map((item: any) => (serializeBackupVault(item))) : undefined, }; } function deserializeListBackupVaultsResponse(data: any): ListBackupVaultsResponse { return { ...data, backupVaults: data["backupVaults"] !== undefined ? data["backupVaults"].map((item: any) => (deserializeBackupVault(item))) : undefined, }; } /** * Response message for listing DataSources. */ export interface ListDataSourcesResponse { /** * The list of DataSource instances in the project for the specified * location. If the '{location}' value in the request is "-", the response * contains a list of instances from all locations. In case any location is * unreachable, the response will only return data sources in reachable * locations and the 'unreachable' field will be populated with a list of * unreachable locations. */ dataSources?: DataSource[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListDataSourcesResponse(data: any): ListDataSourcesResponse { return { ...data, dataSources: data["dataSources"] !== undefined ? data["dataSources"].map((item: any) => (serializeDataSource(item))) : undefined, }; } function deserializeListDataSourcesResponse(data: any): ListDataSourcesResponse { return { ...data, dataSources: data["dataSources"] !== undefined ? data["dataSources"].map((item: any) => (deserializeDataSource(item))) : undefined, }; } /** * The response message for Locations.ListLocations. */ export interface ListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: Location[]; /** * The standard List next-page token. */ nextPageToken?: string; } /** * Response message for listing management servers. */ export interface ListManagementServersResponse { /** * The list of ManagementServer instances in the project for the specified * location. If the '{location}' value in the request is "-", the response * contains a list of instances from all locations. In case any location is * unreachable, the response will only return management servers in reachable * locations and the 'unreachable' field will be populated with a list of * unreachable locations. */ managementServers?: ManagementServer[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response message for Operations.ListOperations. */ export interface ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: Operation[]; } /** * A resource that represents a Google Cloud location. */ export interface Location { /** * The friendly name for this location, typically a nearby city name. For * example, "Tokyo". */ displayName?: string; /** * Cross-service attributes for the location. For example * {"cloud.googleapis.com/region": "us-east1"} */ labels?: { [key: string]: string }; /** * The canonical id for this location. For example: `"us-east1"`. */ locationId?: string; /** * Service-specific metadata. For example the available capacity at the given * location. */ metadata?: { [key: string]: any }; /** * Resource name for the location, which may vary between implementations. * For example: `"projects/example-project/locations/us-east1"` */ name?: string; } /** * ManagementServer describes a single BackupDR ManagementServer instance. */ export interface ManagementServer { /** * Output only. The hostname or ip address of the exposed AGM endpoints, used * by BAs to connect to BA proxy. */ readonly baProxyUri?: string[]; /** * Output only. The time when the instance was created. */ readonly createTime?: Date; /** * Optional. The description of the ManagementServer instance (2048 * characters or less). */ description?: string; /** * Optional. Server specified ETag for the ManagementServer resource to * prevent simultaneous updates from overwiting each other. */ etag?: string; /** * Optional. Resource labels to represent user provided metadata. Labels * currently defined: 1. migrate_from_go= If set to true, the MS is created in * migration ready mode. */ labels?: { [key: string]: string }; /** * Output only. The hostname or ip address of the exposed AGM endpoints, used * by clients to connect to AGM/RD graphical user interface and APIs. */ readonly managementUri?: ManagementURI; /** * Output only. Identifier. The resource name. */ readonly name?: string; /** * Optional. VPC networks to which the ManagementServer instance is * connected. For this version, only a single network is supported. This field * is optional if MS is created without PSA */ networks?: NetworkConfig[]; /** * Output only. The OAuth 2.0 client id is required to make API calls to the * BackupDR instance API of this ManagementServer. This is the value that * should be provided in the 'aud' field of the OIDC ID Token (see openid * specification * https://openid.net/specs/openid-connect-core-1_0.html#IDToken). */ readonly oauth2ClientId?: string; /** * Output only. Reserved for future use. */ readonly satisfiesPzi?: boolean; /** * Output only. Reserved for future use. */ readonly satisfiesPzs?: boolean; /** * Output only. The ManagementServer state. */ readonly state?: | "INSTANCE_STATE_UNSPECIFIED" | "CREATING" | "READY" | "UPDATING" | "DELETING" | "REPAIRING" | "MAINTENANCE" | "ERROR"; /** * Optional. The type of the ManagementServer resource. */ type?: | "INSTANCE_TYPE_UNSPECIFIED" | "BACKUP_RESTORE"; /** * Output only. The time when the instance was updated. */ readonly updateTime?: Date; /** * Output only. The hostnames of the exposed AGM endpoints for both types of * user i.e. 1p and 3p, used to connect AGM/RM UI. */ readonly workforceIdentityBasedManagementUri?: WorkforceIdentityBasedManagementURI; /** * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. */ readonly workforceIdentityBasedOauth2ClientId?: WorkforceIdentityBasedOAuth2ClientID; } /** * ManagementURI for the Management Server resource. */ export interface ManagementURI { /** * Output only. The ManagementServer AGM/RD API URL. */ readonly api?: string; /** * Output only. The ManagementServer AGM/RD WebUI URL. */ readonly webUi?: string; } /** * A metadata key/value entry. */ export interface Metadata { /** * Optional. Array of key/value pairs. The total size of all keys and values * must be less than 512 KB. */ items?: Entry[]; } /** * Network configuration for ManagementServer instance. */ export interface NetworkConfig { /** * Optional. The resource name of the Google Compute Engine VPC network to * which the ManagementServer instance is connected. */ network?: string; /** * Optional. The network connect mode of the ManagementServer instance. For * this version, only PRIVATE_SERVICE_ACCESS is supported. */ peeringMode?: | "PEERING_MODE_UNSPECIFIED" | "PRIVATE_SERVICE_ACCESS"; } /** * A network interface resource attached to an instance. s */ export interface NetworkInterface { /** * Optional. An array of configurations for this interface. Currently, only * one access config,ONE_TO_ONE_NAT is supported. If there are no * accessConfigs specified, then this instance will have no external internet * access. */ accessConfigs?: AccessConfig[]; /** * Optional. An array of alias IP ranges for this network interface. You can * only specify this field for network interfaces in VPC networks. */ aliasIpRanges?: AliasIpRange[]; /** * Optional. The prefix length of the primary internal IPv6 range. */ internalIpv6PrefixLength?: number; /** * Optional. An array of IPv6 access configurations for this interface. * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there * is no ipv6AccessConfig specified, then this instance will have no external * IPv6 Internet access. */ ipv6AccessConfigs?: AccessConfig[]; /** * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the * IP can be accessed from the Internet. This field is always inherited from * its subnetwork. */ ipv6AccessType?: | "UNSPECIFIED_IPV6_ACCESS_TYPE" | "INTERNAL" | "EXTERNAL"; /** * Optional. An IPv6 internal network address for this network interface. To * use a static internal IP address, it must be unused and in the same region * as the instance's zone. If not specified, Google Cloud will automatically * assign an internal IPv6 address from the instance's subnetwork. */ ipv6Address?: string; /** * Output only. [Output Only] The name of the network interface, which is * generated by the server. */ readonly name?: string; /** * Optional. URL of the VPC network resource for this instance. */ network?: string; /** * Optional. The URL of the network attachment that this interface should * connect to in the following format: * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}. */ networkAttachment?: string; /** * Optional. An IPv4 internal IP address to assign to the instance for this * network interface. If not specified by the user, an unused internal IP is * assigned by the system. */ networkIP?: string; /** * Optional. The type of vNIC to be used on this interface. This may be gVNIC * or VirtioNet. */ nicType?: | "NIC_TYPE_UNSPECIFIED" | "VIRTIO_NET" | "GVNIC"; /** * Optional. The networking queue count that's specified by users for the * network interface. Both Rx and Tx queues will be set to this number. It'll * be empty if not specified by the users. */ queueCount?: number; /** * The stack type for this network interface. */ stackType?: | "STACK_TYPE_UNSPECIFIED" | "IPV4_ONLY" | "IPV4_IPV6"; /** * Optional. The URL of the Subnetwork resource for this instance. */ subnetwork?: string; } /** * Network performance configuration. */ export interface NetworkPerformanceConfig { /** * Optional. The tier of the total egress bandwidth. */ totalEgressBandwidthTier?: | "TIER_UNSPECIFIED" | "DEFAULT" | "TIER_1"; } /** * Node Affinity: the configuration of desired nodes onto which this Instance * could be scheduled. */ export interface NodeAffinity { /** * Optional. Corresponds to the label key of Node resource. */ key?: string; /** * Optional. Defines the operation of node selection. */ operator?: | "OPERATOR_UNSPECIFIED" | "IN" | "NOT_IN"; /** * Optional. Corresponds to the label values of Node resource. */ values?: string[]; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface Operation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: Status; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * Represents the metadata of the long-running operation. */ export interface OperationMetadata { /** * Output only. AdditionalInfo contains additional Info related to backup * plan association resource. */ readonly additionalInfo?: { [key: string]: string }; /** * Output only. API version used to start the operation. */ readonly apiVersion?: string; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have successfully been cancelled have * Operation.error value with a google.rpc.Status.code of 1, corresponding to * 'Code.CANCELLED'. */ readonly requestedCancellation?: boolean; /** * Output only. Human-readable status of the operation, if any. */ readonly statusMessage?: string; /** * Output only. Server-defined resource path for the target of the operation. */ readonly target?: string; /** * Output only. Name of the verb executed by the operation. */ readonly verb?: string; } /** * An Identity and Access Management (IAM) policy, which specifies access * controls for Google Cloud resources. A `Policy` is a collection of * `bindings`. A `binding` binds one or more `members`, or principals, to a * single `role`. Principals can be user accounts, service accounts, Google * groups, and domains (such as G Suite). A `role` is a named list of * permissions; each `role` can be an IAM predefined role or a user-created * custom role. For some types of Google Cloud resources, a `binding` can also * specify a `condition`, which is a logical expression that allows access to a * resource only if the expression evaluates to `true`. A condition can add * constraints based on attributes of the request, the resource, or both. To * learn which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). * **JSON example:** ``` { "bindings": [ { "role": * "roles/resourcemanager.organizationAdmin", "members": [ * "user:mike@example.com", "group:admins@example.com", "domain:google.com", * "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": * "roles/resourcemanager.organizationViewer", "members": [ * "user:eve@example.com" ], "condition": { "title": "expirable access", * "description": "Does not grant access after Sep 2020", "expression": * "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": * "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: * - user:mike@example.com - group:admins@example.com - domain:google.com - * serviceAccount:my-project-id@appspot.gserviceaccount.com role: * roles/resourcemanager.organizationAdmin - members: - user:eve@example.com * role: roles/resourcemanager.organizationViewer condition: title: expirable * access description: Does not grant access after Sep 2020 expression: * request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= * version: 3 ``` For a description of IAM and its features, see the [IAM * documentation](https://cloud.google.com/iam/docs/). */ export interface Policy { /** * Specifies cloud audit logging configuration for this policy. */ auditConfigs?: AuditConfig[]; /** * Associates a list of `members`, or principals, with a `role`. Optionally, * may specify a `condition` that determines how and when the `bindings` are * applied. Each of the `bindings` must contain at least one principal. The * `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of * these principals can be Google groups. Each occurrence of a principal * counts towards these limits. For example, if the `bindings` grant 50 * different roles to `user:alice@example.com`, and not to any other * principal, then you can add another 1,450 principals to the `bindings` in * the `Policy`. */ bindings?: Binding[]; /** * `etag` is used for optimistic concurrency control as a way to help prevent * simultaneous updates of a policy from overwriting each other. It is * strongly suggested that systems make use of the `etag` in the * read-modify-write cycle to perform policy updates in order to avoid race * conditions: An `etag` is returned in the response to `getIamPolicy`, and * systems are expected to put that etag in the request to `setIamPolicy` to * ensure that their change will be applied to the same version of the policy. * **Important:** If you use IAM Conditions, you must include the `etag` field * whenever you call `setIamPolicy`. If you omit this field, then IAM allows * you to overwrite a version `3` policy with a version `1` policy, and all of * the conditions in the version `3` policy are lost. */ etag?: Uint8Array; /** * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. * Requests that specify an invalid value are rejected. Any operation that * affects conditional role bindings must specify version `3`. This * requirement applies to the following operations: * Getting a policy that * includes a conditional role binding * Adding a conditional role binding to * a policy * Changing a conditional role binding in a policy * Removing any * role binding, with or without a condition, from a policy that includes * conditions **Important:** If you use IAM Conditions, you must include the * `etag` field whenever you call `setIamPolicy`. If you omit this field, then * IAM allows you to overwrite a version `3` policy with a version `1` policy, * and all of the conditions in the version `3` policy are lost. If a policy * does not include any conditions, operations on that policy may specify any * valid version or leave the field unset. To learn which resources support * conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ version?: number; } function serializePolicy(data: any): Policy { return { ...data, etag: data["etag"] !== undefined ? encodeBase64(data["etag"]) : undefined, }; } function deserializePolicy(data: any): Policy { return { ...data, etag: data["etag"] !== undefined ? decodeBase64(data["etag"] as string) : undefined, }; } /** * Additional options for * BackupDR#projectsLocationsBackupPlanAssociationsCreate. */ export interface ProjectsLocationsBackupPlanAssociationsCreateOptions { /** * Required. The name of the backup plan association to create. The name must * be unique for the specified project and location. */ backupPlanAssociationId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and t he * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * BackupDR#projectsLocationsBackupPlanAssociationsDelete. */ export interface ProjectsLocationsBackupPlanAssociationsDeleteOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for BackupDR#projectsLocationsBackupPlanAssociationsList. */ export interface ProjectsLocationsBackupPlanAssociationsListOptions { /** * Optional. Filtering results */ filter?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for BackupDR#projectsLocationsBackupPlansCreate. */ export interface ProjectsLocationsBackupPlansCreateOptions { /** * Required. The name of the `BackupPlan` to create. The name must be unique * for the specified project and location.The name must start with a lowercase * letter followed by up to 62 lowercase letters, numbers, or hyphens. * Pattern, /a-z{,62}/. */ backupPlanId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and t he * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for BackupDR#projectsLocationsBackupPlansDelete. */ export interface ProjectsLocationsBackupPlansDeleteOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for BackupDR#projectsLocationsBackupPlansList. */ export interface ProjectsLocationsBackupPlansListOptions { /** * Optional. Field match expression used to filter the results. */ filter?: string; /** * Optional. Field by which to sort the results. */ orderBy?: string; /** * Optional. The maximum number of `BackupPlans` to return in a single * response. If not specified, a default value will be chosen by the service. * Note that the response may include a partial list and a caller should only * rely on the response's next_page_token to determine if there are more * instances left to be queried. */ pageSize?: number; /** * Optional. The value of next_page_token received from a previous * `ListBackupPlans` call. Provide this to retrieve the subsequent page in a * multi-page list of results. When paginating, all other parameters provided * to `ListBackupPlans` must match the call that provided the page token. */ pageToken?: string; } /** * Additional options for BackupDR#projectsLocationsBackupVaultsCreate. */ export interface ProjectsLocationsBackupVaultsCreateOptions { /** * Required. ID of the requesting object If auto-generating ID server-side, * remove this field and backup_vault_id from the method_signature of Create * RPC */ backupVaultId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. Only validate the request, but do not perform mutations. The * default is 'false'. */ validateOnly?: boolean; } /** * Additional options for * BackupDR#projectsLocationsBackupVaultsDataSourcesBackupsDelete. */ export interface ProjectsLocationsBackupVaultsDataSourcesBackupsDeleteOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * BackupDR#projectsLocationsBackupVaultsDataSourcesBackupsGet. */ export interface ProjectsLocationsBackupVaultsDataSourcesBackupsGetOptions { /** * Optional. Reserved for future use to provide a BASIC & FULL view of Backup * resource. */ view?: | "BACKUP_VIEW_UNSPECIFIED" | "BACKUP_VIEW_BASIC" | "BACKUP_VIEW_FULL"; } /** * Additional options for * BackupDR#projectsLocationsBackupVaultsDataSourcesBackupsList. */ export interface ProjectsLocationsBackupVaultsDataSourcesBackupsListOptions { /** * Optional. Filtering results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; /** * Optional. Reserved for future use to provide a BASIC & FULL view of Backup * resource. */ view?: | "BACKUP_VIEW_UNSPECIFIED" | "BACKUP_VIEW_BASIC" | "BACKUP_VIEW_FULL"; } /** * Additional options for * BackupDR#projectsLocationsBackupVaultsDataSourcesBackupsPatch. */ export interface ProjectsLocationsBackupVaultsDataSourcesBackupsPatchOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Required. Field mask is used to specify the fields to be overwritten in * the Backup resource by the update. The fields specified in the update_mask * are relative to the resource, not the full request. A field will be * overwritten if it is in the mask. If the user does not provide a mask then * the request will fail. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsBackupVaultsDataSourcesBackupsPatchOptions(data: any): ProjectsLocationsBackupVaultsDataSourcesBackupsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBackupVaultsDataSourcesBackupsPatchOptions(data: any): ProjectsLocationsBackupVaultsDataSourcesBackupsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * BackupDR#projectsLocationsBackupVaultsDataSourcesList. */ export interface ProjectsLocationsBackupVaultsDataSourcesListOptions { /** * Optional. Filtering results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for * BackupDR#projectsLocationsBackupVaultsDataSourcesPatch. */ export interface ProjectsLocationsBackupVaultsDataSourcesPatchOptions { /** * Optional. Enable upsert. */ allowMissing?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Required. Field mask is used to specify the fields to be overwritten in * the DataSource resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then the request will fail. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsBackupVaultsDataSourcesPatchOptions(data: any): ProjectsLocationsBackupVaultsDataSourcesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBackupVaultsDataSourcesPatchOptions(data: any): ProjectsLocationsBackupVaultsDataSourcesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for BackupDR#projectsLocationsBackupVaultsDelete. */ export interface ProjectsLocationsBackupVaultsDeleteOptions { /** * Optional. If true and the BackupVault is not found, the request will * succeed but no action will be taken. */ allowMissing?: boolean; /** * The current etag of the backup vault. If an etag is provided and does not * match the current etag of the connection, deletion will be blocked. */ etag?: string; /** * Optional. If set to true, any data source from this backup vault will also * be deleted. */ force?: boolean; /** * Optional. If set to true, backupvault deletion will proceed even if there * are backup plans referencing the backupvault. The default is 'false'. */ ignoreBackupPlanReferences?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. Only validate the request, but do not perform mutations. The * default is 'false'. */ validateOnly?: boolean; } /** * Additional options for BackupDR#projectsLocationsBackupVaultsFetchUsable. */ export interface ProjectsLocationsBackupVaultsFetchUsableOptions { /** * Optional. Filtering results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for BackupDR#projectsLocationsBackupVaultsGet. */ export interface ProjectsLocationsBackupVaultsGetOptions { /** * Optional. Reserved for future use to provide a BASIC & FULL view of Backup * Vault */ view?: | "BACKUP_VAULT_VIEW_UNSPECIFIED" | "BACKUP_VAULT_VIEW_BASIC" | "BACKUP_VAULT_VIEW_FULL"; } /** * Additional options for BackupDR#projectsLocationsBackupVaultsList. */ export interface ProjectsLocationsBackupVaultsListOptions { /** * Optional. Filtering results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; /** * Optional. Reserved for future use to provide a BASIC & FULL view of Backup * Vault. */ view?: | "BACKUP_VAULT_VIEW_UNSPECIFIED" | "BACKUP_VAULT_VIEW_BASIC" | "BACKUP_VAULT_VIEW_FULL"; } /** * Additional options for BackupDR#projectsLocationsBackupVaultsPatch. */ export interface ProjectsLocationsBackupVaultsPatchOptions { /** * Optional. If set to true, will not check plan duration against backup * vault enforcement duration. */ force?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Required. Field mask is used to specify the fields to be overwritten in * the BackupVault resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then the request will fail. */ updateMask?: string /* FieldMask */; /** * Optional. Only validate the request, but do not perform mutations. The * default is 'false'. */ validateOnly?: boolean; } function serializeProjectsLocationsBackupVaultsPatchOptions(data: any): ProjectsLocationsBackupVaultsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBackupVaultsPatchOptions(data: any): ProjectsLocationsBackupVaultsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for BackupDR#projectsLocationsList. */ export interface ProjectsLocationsListOptions { /** * A filter to narrow down results to a preferred subset. The filtering * language accepts strings like `"displayName=tokyo"`, and is documented in * more detail in [AIP-160](https://google.aip.dev/160). */ filter?: string; /** * The maximum number of results to return. If not set, the service selects a * default. */ pageSize?: number; /** * A page token received from the `next_page_token` field in the response. * Send that page token to receive the subsequent page. */ pageToken?: string; } /** * Additional options for BackupDR#projectsLocationsManagementServersCreate. */ export interface ProjectsLocationsManagementServersCreateOptions { /** * Required. The name of the management server to create. The name must be * unique for the specified project and location. */ managementServerId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for BackupDR#projectsLocationsManagementServersDelete. */ export interface ProjectsLocationsManagementServersDeleteOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * BackupDR#projectsLocationsManagementServersGetIamPolicy. */ export interface ProjectsLocationsManagementServersGetIamPolicyOptions { /** * Optional. The maximum policy version that will be used to format the * policy. Valid values are 0, 1, and 3. Requests specifying an invalid value * will be rejected. Requests for policies with any conditional role bindings * must specify version 3. Policies with no conditional role bindings may * specify any valid value or leave the field unset. The policy in the * response might use the policy version that you specified, or it might use a * lower policy version. For example, if you specify version 3, but the policy * has no conditional role bindings, the response uses version 1. To learn * which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ ["options.requestedPolicyVersion"]?: number; } /** * Additional options for BackupDR#projectsLocationsManagementServersList. */ export interface ProjectsLocationsManagementServersListOptions { /** * Optional. Filtering results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for BackupDR#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Message for deleting a DataSource. */ export interface RemoveDataSourceRequest { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Request message for restoring from a Backup. */ export interface RestoreBackupRequest { /** * Compute Engine instance properties to be overridden during restore. */ computeInstanceRestoreProperties?: ComputeInstanceRestoreProperties; /** * Compute Engine target environment to be used during restore. */ computeInstanceTargetEnvironment?: ComputeInstanceTargetEnvironment; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } function serializeRestoreBackupRequest(data: any): RestoreBackupRequest { return { ...data, computeInstanceRestoreProperties: data["computeInstanceRestoreProperties"] !== undefined ? serializeComputeInstanceRestoreProperties(data["computeInstanceRestoreProperties"]) : undefined, }; } function deserializeRestoreBackupRequest(data: any): RestoreBackupRequest { return { ...data, computeInstanceRestoreProperties: data["computeInstanceRestoreProperties"] !== undefined ? deserializeComputeInstanceRestoreProperties(data["computeInstanceRestoreProperties"]) : undefined, }; } /** * Response message for restoring from a Backup. */ export interface RestoreBackupResponse { /** * Details of the target resource created/modified as part of restore. */ targetResource?: TargetResource; } /** * Message for rules config info. */ export interface RuleConfigInfo { /** * Output only. Output Only. google.rpc.Status object to store the last * backup error. */ readonly lastBackupError?: Status; /** * Output only. The last backup state for rule. */ readonly lastBackupState?: | "LAST_BACKUP_STATE_UNSPECIFIED" | "FIRST_BACKUP_PENDING" | "PERMISSION_DENIED" | "SUCCEEDED" | "FAILED"; /** * Output only. The point in time when the last successful backup was * captured from the source. */ readonly lastSuccessfulBackupConsistencyTime?: Date; /** * Output only. Output Only. Backup Rule id fetched from backup plan. */ readonly ruleId?: string; } /** * Sets the scheduling options for an Instance. */ export interface Scheduling { /** * Optional. Specifies whether the instance should be automatically restarted * if it is terminated by Compute Engine (not terminated by a user). */ automaticRestart?: boolean; /** * Optional. Specifies the termination action for the instance. */ instanceTerminationAction?: | "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" | "DELETE" | "STOP"; /** * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait * while recovery of the Local Ssd state is attempted. Its value should be in * between 0 and 168 hours with hour granularity and the default value being 1 * hour. */ localSsdRecoveryTimeout?: SchedulingDuration; /** * Optional. The minimum number of virtual CPUs this instance will consume * when running on a sole-tenant node. */ minNodeCpus?: number; /** * Optional. A set of node affinity and anti-affinity configurations. * Overrides reservationAffinity. */ nodeAffinities?: NodeAffinity[]; /** * Optional. Defines the maintenance behavior for this instance. */ onHostMaintenance?: | "ON_HOST_MAINTENANCE_UNSPECIFIED" | "TERMINATE" | "MIGRATE"; /** * Optional. Defines whether the instance is preemptible. */ preemptible?: boolean; /** * Optional. Specifies the provisioning model of the instance. */ provisioningModel?: | "PROVISIONING_MODEL_UNSPECIFIED" | "STANDARD" | "SPOT"; } function serializeScheduling(data: any): Scheduling { return { ...data, localSsdRecoveryTimeout: data["localSsdRecoveryTimeout"] !== undefined ? serializeSchedulingDuration(data["localSsdRecoveryTimeout"]) : undefined, }; } function deserializeScheduling(data: any): Scheduling { return { ...data, localSsdRecoveryTimeout: data["localSsdRecoveryTimeout"] !== undefined ? deserializeSchedulingDuration(data["localSsdRecoveryTimeout"]) : undefined, }; } /** * A SchedulingDuration represents a fixed-length span of time represented as a * count of seconds and fractions of seconds at nanosecond resolution. It is * independent of any calendar and concepts like "day" or "month". Range is * approximately 10,000 years. */ export interface SchedulingDuration { /** * Optional. Span of time that's a fraction of a second at nanosecond * resolution. */ nanos?: number; /** * Optional. Span of time at a resolution of a second. */ seconds?: bigint; } function serializeSchedulingDuration(data: any): SchedulingDuration { return { ...data, seconds: data["seconds"] !== undefined ? String(data["seconds"]) : undefined, }; } function deserializeSchedulingDuration(data: any): SchedulingDuration { return { ...data, seconds: data["seconds"] !== undefined ? BigInt(data["seconds"]) : undefined, }; } /** * A service account. */ export interface ServiceAccount { /** * Optional. Email address of the service account. */ email?: string; /** * Optional. The list of scopes to be made available for this service * account. */ scopes?: string[]; } /** * ServiceLockInfo represents the details of a lock taken by the service on a * Backup resource. */ export interface ServiceLockInfo { /** * Output only. The name of the operation that created this lock. The lock * will automatically be released when the operation completes. */ readonly operation?: string; } /** * Request message for `SetIamPolicy` method. */ export interface SetIamPolicyRequest { /** * REQUIRED: The complete policy to be applied to the `resource`. The size of * the policy is limited to a few 10s of KB. An empty policy is a valid policy * but certain Google Cloud services (such as Projects) might reject them. */ policy?: Policy; /** * OPTIONAL: A FieldMask specifying which fields of the policy to modify. * Only the fields in the mask will be modified. If no mask is provided, the * following default mask is used: `paths: "bindings, etag"` */ updateMask?: string /* FieldMask */; } function serializeSetIamPolicyRequest(data: any): SetIamPolicyRequest { return { ...data, policy: data["policy"] !== undefined ? serializePolicy(data["policy"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeSetIamPolicyRequest(data: any): SetIamPolicyRequest { return { ...data, policy: data["policy"] !== undefined ? deserializePolicy(data["policy"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Request message for SetStatusInternal method. */ export interface SetInternalStatusRequest { /** * Required. Output only. The new BackupConfigState to set for the * DataSource. */ readonly backupConfigState?: | "BACKUP_CONFIG_STATE_UNSPECIFIED" | "ACTIVE" | "PASSIVE"; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. The request * ID must be a valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Required. The value required for this method to work. This field must be * the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is * only the final piece of the fully qualified resource path for this * DataSource (i.e. the part after '.../dataSources/'). This field exists to * make this method difficult to call since it is intended for use only by * Backup Appliances. */ value?: Uint8Array; } function serializeSetInternalStatusRequest(data: any): SetInternalStatusRequest { return { ...data, value: data["value"] !== undefined ? encodeBase64(data["value"]) : undefined, }; } function deserializeSetInternalStatusRequest(data: any): SetInternalStatusRequest { return { ...data, value: data["value"] !== undefined ? decodeBase64(data["value"] as string) : undefined, }; } /** * Response message from SetStatusInternal method. */ export interface SetInternalStatusResponse { } /** * `StandardSchedule` defines a schedule that run within the confines of a * defined window of days. We can define recurrence type for schedule as HOURLY, * DAILY, WEEKLY, MONTHLY or YEARLY. */ export interface StandardSchedule { /** * Required. A BackupWindow defines the window of day during which backup * jobs will run. Jobs are queued at the beginning of the window and will be * marked as `NOT_RUN` if they do not start by the end of the window. Note: * running jobs will not be cancelled at the end of the window. */ backupWindow?: BackupWindow; /** * Optional. Specifies days of months like 1, 5, or 14 on which jobs will * run. Values for `days_of_month` are only applicable for `recurrence_type`, * `MONTHLY` and `YEARLY`. A validation error will occur if other values are * supplied. */ daysOfMonth?: number[]; /** * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs * will run. This is required for `recurrence_type`, `WEEKLY` and is not * applicable otherwise. A validation error will occur if a value is supplied * and `recurrence_type` is not `WEEKLY`. */ daysOfWeek?: | "DAY_OF_WEEK_UNSPECIFIED" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY"[]; /** * Optional. Specifies frequency for hourly backups. A hourly frequency of 2 * means jobs will run every 2 hours from start time till end time defined. * This is required for `recurrence_type`, `HOURLY` and is not applicable * otherwise. A validation error will occur if a value is supplied and * `recurrence_type` is not `HOURLY`. Value of hourly frequency should be * between 6 and 23. Reason for limit : We found that there is bandwidth * limitation of 3GB/S for GMI while taking a backup and 5GB/S while doing a * restore. Given the amount of parallel backups and restore we are targeting, * this will potentially take the backup time to mins and hours (in worst case * scenario). */ hourlyFrequency?: number; /** * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on * which jobs will run. This field is only applicable when `recurrence_type` * is `YEARLY`. A validation error will occur if other values are supplied. */ months?: | "MONTH_UNSPECIFIED" | "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"[]; /** * Required. Specifies the `RecurrenceType` for the schedule. */ recurrenceType?: | "RECURRENCE_TYPE_UNSPECIFIED" | "HOURLY" | "DAILY" | "WEEKLY" | "MONTHLY" | "YEARLY"; /** * Required. The time zone to be used when interpreting the schedule. The * value of this field must be a time zone name from the IANA tz database. See * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the list * of valid timezone names. For e.g., Europe/Paris. */ timeZone?: string; /** * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST * MONDAY, on which jobs will run. This will be specified by two fields in * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, * e.g. `LAST`. This field is only applicable for `recurrence_type`, `MONTHLY` * and `YEARLY`. A validation error will occur if other values are supplied. */ weekDayOfMonth?: WeekDayOfMonth; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * A set of instance tags. */ export interface Tags { /** * Optional. An array of tags. Each tag must be 1-63 characters long, and * comply with RFC1035. */ items?: string[]; } /** * Details of the target resource created/modified as part of restore. */ export interface TargetResource { /** * Details of the native Google Cloud resource created as part of restore. */ gcpResource?: GcpResource; } /** * Request message for `TestIamPermissions` method. */ export interface TestIamPermissionsRequest { /** * The set of permissions to check for the `resource`. Permissions with * wildcards (such as `*` or `storage.*`) are not allowed. For more * information see [IAM * Overview](https://cloud.google.com/iam/docs/overview#permissions). */ permissions?: string[]; } /** * Response message for `TestIamPermissions` method. */ export interface TestIamPermissionsResponse { /** * A subset of `TestPermissionsRequest.permissions` that the caller is * allowed. */ permissions?: string[]; } /** * Request message for triggering a backup. */ export interface TriggerBackupRequest { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Required. backup rule_id for which a backup needs to be triggered. */ ruleId?: string; } /** * `WeekDayOfMonth` defines the week day of the month on which the backups will * run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values * like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. */ export interface WeekDayOfMonth { /** * Required. Specifies the day of the week. */ dayOfWeek?: | "DAY_OF_WEEK_UNSPECIFIED" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY"; /** * Required. Specifies the week of the month. */ weekOfMonth?: | "WEEK_OF_MONTH_UNSPECIFIED" | "FIRST" | "SECOND" | "THIRD" | "FOURTH" | "LAST"; } /** * ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. */ export interface WorkforceIdentityBasedManagementURI { /** * Output only. First party Management URI for Google Identities. */ readonly firstPartyManagementUri?: string; /** * Output only. Third party Management URI for External Identity Providers. */ readonly thirdPartyManagementUri?: string; } /** * OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, */ export interface WorkforceIdentityBasedOAuth2ClientID { /** * Output only. First party OAuth Client ID for Google Identities. */ readonly firstPartyOauth2ClientId?: string; /** * Output only. Third party OAuth Client ID for External Identity Providers. */ readonly thirdPartyOauth2ClientId?: string; } function decodeBase64(b64: string): Uint8Array { const binString = atob(b64); const size = binString.length; const bytes = new Uint8Array(size); for (let i = 0; i < size; i++) { bytes[i] = binString.charCodeAt(i); } return bytes; } const base64abc = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"]; /** * CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 * Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation * @param data */ function encodeBase64(uint8: Uint8Array): string { let result = "", i; const l = uint8.length; for (i = 2; i < l; i += 3) { result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[((uint8[i - 1] & 0x0f) << 2) | (uint8[i] >> 6)]; result += base64abc[uint8[i] & 0x3f]; } if (i === l + 1) { // 1 octet yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[(uint8[i - 2] & 0x03) << 4]; result += "=="; } if (i === l) { // 2 octets yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[(uint8[i - 1] & 0x0f) << 2]; result += "="; } return result; }