// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * SaaS Runtime API Client for Deno * ================================ * * Model, deploy, and operate your SaaS at scale. * * Docs: https://cloud.google.com/saas-runtime/docs * Source: https://googleapis.deno.dev/v1/saasservicemgmt:v1beta1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * Model, deploy, and operate your SaaS at scale. */ export class SaaSservicemgmt { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://saasservicemgmt.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Gets information about a location. * * @param name Resource name for the location. */ async projectsLocationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudLocationLocation; } /** * Lists information about the supported locations for this service. This * method can be called in two ways: * **List all public locations:** Use the * path `GET /v1/locations`. * **List project-visible locations:** Use the * path `GET /v1/projects/{project_id}/locations`. This may include public * locations as well as private or other locations specifically visible to the * project. * * @param name The resource that owns the locations collection, if applicable. */ async projectsLocationsList(name: string, opts: ProjectsLocationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }/locations`); if (opts.extraLocationTypes !== undefined) { url.searchParams.append("extraLocationTypes", String(opts.extraLocationTypes)); } 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; } /** * Create a new release. * * @param parent Required. The parent of the release. */ async projectsLocationsReleasesCreate(parent: string, req: Release, opts: ProjectsLocationsReleasesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/releases`); if (opts.releaseId !== undefined) { url.searchParams.append("releaseId", String(opts.releaseId)); } 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 Release; } /** * Delete a single release. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsReleasesDelete(name: string, opts: ProjectsLocationsReleasesDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } 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 Empty; } /** * Retrieve a single release. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsReleasesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Release; } /** * Retrieve a collection of releases. * * @param parent Required. The parent of the release. */ async projectsLocationsReleasesList(parent: string, opts: ProjectsLocationsReleasesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/releases`); 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 ListReleasesResponse; } /** * Update a single release. * * @param name Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/releases/{release}" */ async projectsLocationsReleasesPatch(name: string, req: Release, opts: ProjectsLocationsReleasesPatchOptions = {}): Promise { opts = serializeProjectsLocationsReleasesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); 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 Release; } /** * Create a new rollout kind. * * @param parent Required. The parent of the rollout kind. */ async projectsLocationsRolloutKindsCreate(parent: string, req: RolloutKind, opts: ProjectsLocationsRolloutKindsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/rolloutKinds`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.rolloutKindId !== undefined) { url.searchParams.append("rolloutKindId", String(opts.rolloutKindId)); } 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 RolloutKind; } /** * Delete a single rollout kind. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsRolloutKindsDelete(name: string, opts: ProjectsLocationsRolloutKindsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } 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 Empty; } /** * Retrieve a single rollout kind. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsRolloutKindsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as RolloutKind; } /** * Retrieve a collection of rollout kinds. * * @param parent Required. The parent of the rollout kind. */ async projectsLocationsRolloutKindsList(parent: string, opts: ProjectsLocationsRolloutKindsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/rolloutKinds`); 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 ListRolloutKindsResponse; } /** * Update a single rollout kind. * * @param name Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}" */ async projectsLocationsRolloutKindsPatch(name: string, req: RolloutKind, opts: ProjectsLocationsRolloutKindsPatchOptions = {}): Promise { opts = serializeProjectsLocationsRolloutKindsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); 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 RolloutKind; } /** * Create a new rollout. * * @param parent Required. The parent of the rollout. */ async projectsLocationsRolloutsCreate(parent: string, req: Rollout, opts: ProjectsLocationsRolloutsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/rollouts`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.rolloutId !== undefined) { url.searchParams.append("rolloutId", String(opts.rolloutId)); } 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 Rollout; } /** * Delete a single rollout. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsRolloutsDelete(name: string, opts: ProjectsLocationsRolloutsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } 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 Empty; } /** * Retrieve a single rollout. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsRolloutsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Rollout; } /** * Retrieve a collection of rollouts. * * @param parent Required. The parent of the rollout. */ async projectsLocationsRolloutsList(parent: string, opts: ProjectsLocationsRolloutsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/rollouts`); 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 ListRolloutsResponse; } /** * Update a single rollout. * * @param name Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/rollout/{rollout_id}" */ async projectsLocationsRolloutsPatch(name: string, req: Rollout, opts: ProjectsLocationsRolloutsPatchOptions = {}): Promise { opts = serializeProjectsLocationsRolloutsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); 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 Rollout; } /** * Create a new saas. * * @param parent Required. The parent of the saas. */ async projectsLocationsSaasCreate(parent: string, req: Saas, opts: ProjectsLocationsSaasCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/saas`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.saasId !== undefined) { url.searchParams.append("saasId", String(opts.saasId)); } 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 Saas; } /** * Delete a single saas. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsSaasDelete(name: string, opts: ProjectsLocationsSaasDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } 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 Empty; } /** * Retrieve a single saas. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsSaasGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Saas; } /** * Retrieve a collection of saas. * * @param parent Required. The parent of the saas. */ async projectsLocationsSaasList(parent: string, opts: ProjectsLocationsSaasListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/saas`); 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 ListSaasResponse; } /** * Update a single saas. * * @param name Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/saas/{saas}" */ async projectsLocationsSaasPatch(name: string, req: Saas, opts: ProjectsLocationsSaasPatchOptions = {}): Promise { opts = serializeProjectsLocationsSaasPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); 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 Saas; } /** * Create a new tenant. * * @param parent Required. The parent of the tenant. */ async projectsLocationsTenantsCreate(parent: string, req: Tenant, opts: ProjectsLocationsTenantsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/tenants`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.tenantId !== undefined) { url.searchParams.append("tenantId", String(opts.tenantId)); } 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 Tenant; } /** * Delete a single tenant. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsTenantsDelete(name: string, opts: ProjectsLocationsTenantsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } 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 Empty; } /** * Retrieve a single tenant. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsTenantsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Tenant; } /** * Retrieve a collection of tenants. * * @param parent Required. The parent of the tenant. */ async projectsLocationsTenantsList(parent: string, opts: ProjectsLocationsTenantsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/tenants`); 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 ListTenantsResponse; } /** * Update a single tenant. * * @param name Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/tenants/{tenant}" */ async projectsLocationsTenantsPatch(name: string, req: Tenant, opts: ProjectsLocationsTenantsPatchOptions = {}): Promise { opts = serializeProjectsLocationsTenantsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); 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 Tenant; } /** * Create a new unit kind. * * @param parent Required. The parent of the unit kind. */ async projectsLocationsUnitKindsCreate(parent: string, req: UnitKind, opts: ProjectsLocationsUnitKindsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/unitKinds`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.unitKindId !== undefined) { url.searchParams.append("unitKindId", String(opts.unitKindId)); } 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 UnitKind; } /** * Delete a single unit kind. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsUnitKindsDelete(name: string, opts: ProjectsLocationsUnitKindsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } 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 Empty; } /** * Retrieve a single unit kind. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsUnitKindsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as UnitKind; } /** * Retrieve a collection of unit kinds. * * @param parent Required. The parent of the unit kind. */ async projectsLocationsUnitKindsList(parent: string, opts: ProjectsLocationsUnitKindsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/unitKinds`); 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 ListUnitKindsResponse; } /** * Update a single unit kind. * * @param name Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/unitKinds/{unitKind}" */ async projectsLocationsUnitKindsPatch(name: string, req: UnitKind, opts: ProjectsLocationsUnitKindsPatchOptions = {}): Promise { opts = serializeProjectsLocationsUnitKindsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); 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 UnitKind; } /** * Create a new unit operation. * * @param parent Required. The parent of the unit operation. */ async projectsLocationsUnitOperationsCreate(parent: string, req: UnitOperation, opts: ProjectsLocationsUnitOperationsCreateOptions = {}): Promise { req = serializeUnitOperation(req); const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/unitOperations`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.unitOperationId !== undefined) { url.searchParams.append("unitOperationId", String(opts.unitOperationId)); } 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 deserializeUnitOperation(data); } /** * Delete a single unit operation. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsUnitOperationsDelete(name: string, opts: ProjectsLocationsUnitOperationsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } 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 Empty; } /** * Retrieve a single unit operation. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsUnitOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeUnitOperation(data); } /** * Retrieve a collection of unit operations. * * @param parent Required. The parent of the unit operation. */ async projectsLocationsUnitOperationsList(parent: string, opts: ProjectsLocationsUnitOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/unitOperations`); 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 deserializeListUnitOperationsResponse(data); } /** * Update a single unit operation. * * @param name Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/unitOperations/{unitOperation}" */ async projectsLocationsUnitOperationsPatch(name: string, req: UnitOperation, opts: ProjectsLocationsUnitOperationsPatchOptions = {}): Promise { req = serializeUnitOperation(req); opts = serializeProjectsLocationsUnitOperationsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); 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 deserializeUnitOperation(data); } /** * Create a new unit. * * @param parent Required. The parent of the unit. */ async projectsLocationsUnitsCreate(parent: string, req: Unit, opts: ProjectsLocationsUnitsCreateOptions = {}): Promise { req = serializeUnit(req); const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/units`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.unitId !== undefined) { url.searchParams.append("unitId", String(opts.unitId)); } 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 deserializeUnit(data); } /** * Delete a single unit. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsUnitsDelete(name: string, opts: ProjectsLocationsUnitsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } 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 Empty; } /** * Retrieve a single unit. * * @param name Required. The resource name of the resource within a service. */ async projectsLocationsUnitsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeUnit(data); } /** * Retrieve a collection of units. * * @param parent Required. The parent of the unit. */ async projectsLocationsUnitsList(parent: string, opts: ProjectsLocationsUnitsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1beta1/${ parent }/units`); 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 deserializeListUnitsResponse(data); } /** * Update a single unit. * * @param name Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/units/{unit}" */ async projectsLocationsUnitsPatch(name: string, req: Unit, opts: ProjectsLocationsUnitsPatchOptions = {}): Promise { req = serializeUnit(req); opts = serializeProjectsLocationsUnitsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1beta1/${ name }`); 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 deserializeUnit(data); } } /** * Represents the aggregation of a set of population of like records by a * certain group. For example, a collection of unit counts can be aggregated and * grouped by their state. */ export interface Aggregate { /** * Required. Number of records in the group. */ count?: number; /** * Required. Group by which to aggregate. */ group?: string; } /** * Blueprints are OCI Images that contain all of the artifacts needed to * provision a unit. Metadata such as, type of the engine used to actuate the * blueprint (e.g. terraform, helm etc) and version will come from the image * manifest. If the hostname is omitted, it will be assumed to be the regional * path to Artifact Registry (eg. us-east1-docker.pkg.dev). */ export interface Blueprint { /** * Output only. Type of the engine used to actuate the blueprint. e.g. * terraform, helm etc. */ readonly engine?: string; /** * Optional. Immutable. URI to a blueprint used by the Unit (required unless * unitKind or release is set). */ package?: string; /** * Output only. Version metadata if present on the blueprint. */ readonly version?: string; } /** * Dependency represent a single dependency with another unit kind by alias. */ export interface Dependency { /** * Required. An alias for the dependency. Used for input variable mapping. */ alias?: string; /** * Required. Immutable. The unit kind of the dependency. */ unitKind?: string; } /** * Deprovision is the unit operation that deprovision the underlying resources * represented by a Unit. Can only execute if the Unit is currently provisioned. */ export interface Deprovision { } /** * 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 { } /** * The configuration for error budget. If the number of failed units exceeds * max(allowed_count, allowed_ratio * total_units), the rollout will be paused. */ export interface ErrorBudget { /** * Optional. The maximum number of failed units allowed in a location without * pausing the rollout. */ allowedCount?: number; /** * Optional. The maximum percentage of units allowed to fail (0, 100] within * a location without pausing the rollout. */ allowedPercentage?: number; } /** * Output variables whose values will be passed on to dependencies */ export interface FromMapping { /** * Required. Alias of the dependency that the outputVariable will pass its * value to */ dependency?: string; /** * Required. Name of the outputVariable on the dependency */ outputVariable?: string; } /** * A resource that represents a Google Cloud location. */ export interface GoogleCloudLocationLocation { /** * 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; } /** * The response message for Locations.ListLocations. */ export interface ListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: GoogleCloudLocationLocation[]; /** * The standard List next-page token. */ nextPageToken?: string; } /** * The response structure for the ListReleases method. */ export interface ListReleasesResponse { /** * If present, the next page token can be provided to a subsequent * ListReleases call to list the next page. If empty, there are no more pages. */ nextPageToken?: string; /** * The resulting releases. */ releases?: Release[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response structure for the ListRolloutKinds method. */ export interface ListRolloutKindsResponse { /** * If present, the next page token can be provided to a subsequent * ListRolloutKinds call to list the next page. If empty, there are no more * pages. */ nextPageToken?: string; /** * The resulting rollout kinds. */ rolloutKinds?: RolloutKind[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response structure for the ListRollouts method. */ export interface ListRolloutsResponse { /** * If present, the next page token can be provided to a subsequent * ListRollouts call to list the next page. If empty, there are no more pages. */ nextPageToken?: string; /** * The resulting rollouts. */ rollouts?: Rollout[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response structure for the ListSaas method. */ export interface ListSaasResponse { /** * If present, the next page token can be provided to a subsequent ListSaas * call to list the next page. If empty, there are no more pages. */ nextPageToken?: string; /** * The resulting saas. */ saas?: Saas[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response structure for the ListTenants method. */ export interface ListTenantsResponse { /** * If present, the next page token can be provided to a subsequent * ListTenants call to list the next page. If empty, there are no more pages. */ nextPageToken?: string; /** * The resulting tenants. */ tenants?: Tenant[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response structure for the ListUnitKinds method. */ export interface ListUnitKindsResponse { /** * If present, the next page token can be provided to a subsequent * ListUnitKinds call to list the next page. If empty, there are no more * pages. */ nextPageToken?: string; /** * The resulting unit kinds. */ unitKinds?: UnitKind[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response structure for the ListUnitOperations method. */ export interface ListUnitOperationsResponse { /** * If present, the next page token can be provided to a subsequent * ListUnitOperations call to list the next page. If empty, there are no more * pages. */ nextPageToken?: string; /** * The resulting unit operations. */ unitOperations?: UnitOperation[]; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListUnitOperationsResponse(data: any): ListUnitOperationsResponse { return { ...data, unitOperations: data["unitOperations"] !== undefined ? data["unitOperations"].map((item: any) => (serializeUnitOperation(item))) : undefined, }; } function deserializeListUnitOperationsResponse(data: any): ListUnitOperationsResponse { return { ...data, unitOperations: data["unitOperations"] !== undefined ? data["unitOperations"].map((item: any) => (deserializeUnitOperation(item))) : undefined, }; } /** * The response structure for the ListUnits method. */ export interface ListUnitsResponse { /** * If present, the next page token can be provided to a subsequent ListUnits * call to list the next page. If empty, there are no more pages. */ nextPageToken?: string; /** * The resulting units. */ units?: Unit[]; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListUnitsResponse(data: any): ListUnitsResponse { return { ...data, units: data["units"] !== undefined ? data["units"].map((item: any) => (serializeUnit(item))) : undefined, }; } function deserializeListUnitsResponse(data: any): ListUnitsResponse { return { ...data, units: data["units"] !== undefined ? data["units"].map((item: any) => (deserializeUnit(item))) : undefined, }; } /** * Location information that the service is available in. */ export interface Location { /** * Optional. Name of location. */ name?: string; } /** * Captures requested directives for performing future maintenance on the unit. * This includes a request for the unit to skip maintenance for a period of time * and remain pinned to its current release as well as controls for postponing * maintenance scheduled in future. */ export interface MaintenanceSettings { /** * Optional. If present, it fixes the release on the unit until the given * time; i.e. changes to the release field will be rejected. Rollouts should * and will also respect this by not requesting an upgrade in the first place. */ pinnedUntilTime?: Date; } function serializeMaintenanceSettings(data: any): MaintenanceSettings { return { ...data, pinnedUntilTime: data["pinnedUntilTime"] !== undefined ? data["pinnedUntilTime"].toISOString() : undefined, }; } function deserializeMaintenanceSettings(data: any): MaintenanceSettings { return { ...data, pinnedUntilTime: data["pinnedUntilTime"] !== undefined ? new Date(data["pinnedUntilTime"]) : undefined, }; } /** * Additional options for SaaSservicemgmt#projectsLocationsList. */ export interface ProjectsLocationsListOptions { /** * Optional. Do not use this field. It is unsupported and is ignored unless * explicitly documented otherwise. This is primarily for internal usage. */ extraLocationTypes?: string; /** * 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 SaaSservicemgmt#projectsLocationsReleasesCreate. */ export interface ProjectsLocationsReleasesCreateOptions { /** * Required. The ID value for the new release. */ releaseId?: string; /** * 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; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsReleasesDelete. */ export interface ProjectsLocationsReleasesDeleteOptions { /** * The etag known to the client for the expected state of the release. This * is used with state-changing methods to prevent accidental overwrites when * multiple user agents might be acting in parallel on the same resource. An * etag wildcard provide optimistic concurrency based on the expected * existence of the release. The Any wildcard (`*`) requires that the resource * must already exists, and the Not Any wildcard (`!*`) requires that it must * not. */ etag?: string; /** * 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; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsReleasesList. */ export interface ProjectsLocationsReleasesListOptions { /** * Filter the list as specified in https://google.aip.dev/160. */ filter?: string; /** * Order results as specified in https://google.aip.dev/132. */ orderBy?: string; /** * The maximum number of releases to send per page. */ pageSize?: number; /** * The page token: If the next_page_token from a previous response is * provided, this request will send the subsequent page. */ pageToken?: string; } /** * Additional options for SaaSservicemgmt#projectsLocationsReleasesPatch. */ export interface ProjectsLocationsReleasesPatchOptions { /** * 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; /** * Field mask is used to specify the fields to be overwritten in the Release * 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 all fields * in the Release will be overwritten. */ updateMask?: string /* FieldMask */; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } function serializeProjectsLocationsReleasesPatchOptions(data: any): ProjectsLocationsReleasesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsReleasesPatchOptions(data: any): ProjectsLocationsReleasesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SaaSservicemgmt#projectsLocationsRolloutKindsCreate. */ export interface ProjectsLocationsRolloutKindsCreateOptions { /** * 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. The ID value for the new rollout kind. */ rolloutKindId?: string; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsRolloutKindsDelete. */ export interface ProjectsLocationsRolloutKindsDeleteOptions { /** * The etag known to the client for the expected state of the rollout kind. * This is used with state-changing methods to prevent accidental overwrites * when multiple user agents might be acting in parallel on the same resource. * An etag wildcard provide optimistic concurrency based on the expected * existence of the rollout kind. The Any wildcard (`*`) requires that the * resource must already exists, and the Not Any wildcard (`!*`) requires that * it must not. */ etag?: string; /** * 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; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsRolloutKindsList. */ export interface ProjectsLocationsRolloutKindsListOptions { /** * Filter the list as specified in https://google.aip.dev/160. */ filter?: string; /** * Order results as specified in https://google.aip.dev/132. */ orderBy?: string; /** * The maximum number of rollout kinds to send per page. */ pageSize?: number; /** * The page token: If the next_page_token from a previous response is * provided, this request will send the subsequent page. */ pageToken?: string; } /** * Additional options for SaaSservicemgmt#projectsLocationsRolloutKindsPatch. */ export interface ProjectsLocationsRolloutKindsPatchOptions { /** * 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; /** * Field mask is used to specify the fields to be overwritten in the * RolloutKind 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 * all fields in the RolloutKind will be overwritten. */ updateMask?: string /* FieldMask */; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } function serializeProjectsLocationsRolloutKindsPatchOptions(data: any): ProjectsLocationsRolloutKindsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsRolloutKindsPatchOptions(data: any): ProjectsLocationsRolloutKindsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SaaSservicemgmt#projectsLocationsRolloutsCreate. */ export interface ProjectsLocationsRolloutsCreateOptions { /** * 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. The ID value for the new rollout. */ rolloutId?: string; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsRolloutsDelete. */ export interface ProjectsLocationsRolloutsDeleteOptions { /** * The etag known to the client for the expected state of the rollout. This * is used with state-changing methods to prevent accidental overwrites when * multiple user agents might be acting in parallel on the same resource. An * etag wildcard provide optimistic concurrency based on the expected * existence of the rollout. The Any wildcard (`*`) requires that the resource * must already exists, and the Not Any wildcard (`!*`) requires that it must * not. */ etag?: string; /** * 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; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsRolloutsList. */ export interface ProjectsLocationsRolloutsListOptions { /** * Filter the list as specified in https://google.aip.dev/160. */ filter?: string; /** * Order results as specified in https://google.aip.dev/132. */ orderBy?: string; /** * The maximum number of rollouts to send per page. */ pageSize?: number; /** * The page token: If the next_page_token from a previous response is * provided, this request will send the subsequent page. */ pageToken?: string; } /** * Additional options for SaaSservicemgmt#projectsLocationsRolloutsPatch. */ export interface ProjectsLocationsRolloutsPatchOptions { /** * 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; /** * Field mask is used to specify the fields to be overwritten in the Rollout * 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 all fields * in the Rollout will be overwritten. */ updateMask?: string /* FieldMask */; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } function serializeProjectsLocationsRolloutsPatchOptions(data: any): ProjectsLocationsRolloutsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsRolloutsPatchOptions(data: any): ProjectsLocationsRolloutsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SaaSservicemgmt#projectsLocationsSaasCreate. */ export interface ProjectsLocationsSaasCreateOptions { /** * 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. The ID value for the new saas. */ saasId?: string; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsSaasDelete. */ export interface ProjectsLocationsSaasDeleteOptions { /** * The etag known to the client for the expected state of the saas. This is * used with state-changing methods to prevent accidental overwrites when * multiple user agents might be acting in parallel on the same resource. An * etag wildcard provide optimistic concurrency based on the expected * existence of the saas. The Any wildcard (`*`) requires that the resource * must already exists, and the Not Any wildcard (`!*`) requires that it must * not. */ etag?: string; /** * 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; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsSaasList. */ export interface ProjectsLocationsSaasListOptions { /** * Filter the list as specified in https://google.aip.dev/160. */ filter?: string; /** * Order results as specified in https://google.aip.dev/132. */ orderBy?: string; /** * The maximum number of saas to send per page. */ pageSize?: number; /** * The page token: If the next_page_token from a previous response is * provided, this request will send the subsequent page. */ pageToken?: string; } /** * Additional options for SaaSservicemgmt#projectsLocationsSaasPatch. */ export interface ProjectsLocationsSaasPatchOptions { /** * 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; /** * Field mask is used to specify the fields to be overwritten in the Saas * 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 all fields * in the Saas will be overwritten. */ updateMask?: string /* FieldMask */; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } function serializeProjectsLocationsSaasPatchOptions(data: any): ProjectsLocationsSaasPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsSaasPatchOptions(data: any): ProjectsLocationsSaasPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SaaSservicemgmt#projectsLocationsTenantsCreate. */ export interface ProjectsLocationsTenantsCreateOptions { /** * 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. The ID value for the new tenant. */ tenantId?: string; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsTenantsDelete. */ export interface ProjectsLocationsTenantsDeleteOptions { /** * The etag known to the client for the expected state of the tenant. This is * used with state-changing methods to prevent accidental overwrites when * multiple user agents might be acting in parallel on the same resource. An * etag wildcard provide optimistic concurrency based on the expected * existence of the tenant. The Any wildcard (`*`) requires that the resource * must already exists, and the Not Any wildcard (`!*`) requires that it must * not. */ etag?: string; /** * 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; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsTenantsList. */ export interface ProjectsLocationsTenantsListOptions { /** * Filter the list as specified in https://google.aip.dev/160. */ filter?: string; /** * Order results as specified in https://google.aip.dev/132. */ orderBy?: string; /** * The maximum number of tenants to send per page. */ pageSize?: number; /** * The page token: If the next_page_token from a previous response is * provided, this request will send the subsequent page. */ pageToken?: string; } /** * Additional options for SaaSservicemgmt#projectsLocationsTenantsPatch. */ export interface ProjectsLocationsTenantsPatchOptions { /** * 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; /** * Field mask is used to specify the fields to be overwritten in the Tenant * 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 all fields * in the Tenant will be overwritten. */ updateMask?: string /* FieldMask */; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } function serializeProjectsLocationsTenantsPatchOptions(data: any): ProjectsLocationsTenantsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsTenantsPatchOptions(data: any): ProjectsLocationsTenantsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitKindsCreate. */ export interface ProjectsLocationsUnitKindsCreateOptions { /** * 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. The ID value for the new unit kind. */ unitKindId?: string; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitKindsDelete. */ export interface ProjectsLocationsUnitKindsDeleteOptions { /** * The etag known to the client for the expected state of the unit kind. This * is used with state-changing methods to prevent accidental overwrites when * multiple user agents might be acting in parallel on the same resource. An * etag wildcard provide optimistic concurrency based on the expected * existence of the unit kind. The Any wildcard (`*`) requires that the * resource must already exists, and the Not Any wildcard (`!*`) requires that * it must not. */ etag?: string; /** * 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; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitKindsList. */ export interface ProjectsLocationsUnitKindsListOptions { /** * Filter the list as specified in https://google.aip.dev/160. */ filter?: string; /** * Order results as specified in https://google.aip.dev/132. */ orderBy?: string; /** * The maximum number of unit kinds to send per page. */ pageSize?: number; /** * The page token: If the next_page_token from a previous response is * provided, this request will send the subsequent page. */ pageToken?: string; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitKindsPatch. */ export interface ProjectsLocationsUnitKindsPatchOptions { /** * 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; /** * Field mask is used to specify the fields to be overwritten in the UnitKind * 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 all fields * in the UnitKind will be overwritten. */ updateMask?: string /* FieldMask */; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } function serializeProjectsLocationsUnitKindsPatchOptions(data: any): ProjectsLocationsUnitKindsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsUnitKindsPatchOptions(data: any): ProjectsLocationsUnitKindsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * SaaSservicemgmt#projectsLocationsUnitOperationsCreate. */ export interface ProjectsLocationsUnitOperationsCreateOptions { /** * 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. The ID value for the new unit operation. */ unitOperationId?: string; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for * SaaSservicemgmt#projectsLocationsUnitOperationsDelete. */ export interface ProjectsLocationsUnitOperationsDeleteOptions { /** * The etag known to the client for the expected state of the unit operation. * This is used with state-changing methods to prevent accidental overwrites * when multiple user agents might be acting in parallel on the same resource. * An etag wildcard provide optimistic concurrency based on the expected * existence of the unit operation. The Any wildcard (`*`) requires that the * resource must already exists, and the Not Any wildcard (`!*`) requires that * it must not. */ etag?: string; /** * 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; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitOperationsList. */ export interface ProjectsLocationsUnitOperationsListOptions { /** * Filter the list as specified in https://google.aip.dev/160. */ filter?: string; /** * Order results as specified in https://google.aip.dev/132. */ orderBy?: string; /** * The maximum number of unit operations to send per page. */ pageSize?: number; /** * The page token: If the next_page_token from a previous response is * provided, this request will send the subsequent page. */ pageToken?: string; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitOperationsPatch. */ export interface ProjectsLocationsUnitOperationsPatchOptions { /** * 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; /** * Field mask is used to specify the fields to be overwritten in the * UnitOperation 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 all fields in the UnitOperation will be overwritten. */ updateMask?: string /* FieldMask */; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } function serializeProjectsLocationsUnitOperationsPatchOptions(data: any): ProjectsLocationsUnitOperationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsUnitOperationsPatchOptions(data: any): ProjectsLocationsUnitOperationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitsCreate. */ export interface ProjectsLocationsUnitsCreateOptions { /** * 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. The ID value for the new unit. */ unitId?: string; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitsDelete. */ export interface ProjectsLocationsUnitsDeleteOptions { /** * The etag known to the client for the expected state of the unit. This is * used with state-changing methods to prevent accidental overwrites when * multiple user agents might be acting in parallel on the same resource. An * etag wildcard provide optimistic concurrency based on the expected * existence of the unit. The Any wildcard (`*`) requires that the resource * must already exists, and the Not Any wildcard (`!*`) requires that it must * not. */ etag?: string; /** * 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; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitsList. */ export interface ProjectsLocationsUnitsListOptions { /** * Filter the list as specified in https://google.aip.dev/160. */ filter?: string; /** * Order results as specified in https://google.aip.dev/132. */ orderBy?: string; /** * The maximum number of units to send per page. */ pageSize?: number; /** * The page token: If the next_page_token from a previous response is * provided, this request will send the subsequent page. */ pageToken?: string; } /** * Additional options for SaaSservicemgmt#projectsLocationsUnitsPatch. */ export interface ProjectsLocationsUnitsPatchOptions { /** * 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; /** * Field mask is used to specify the fields to be overwritten in the Unit * 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 all fields * in the Unit will be overwritten. */ updateMask?: string /* FieldMask */; /** * If "validate_only" is set to true, the service will try to validate that * this request would succeed, but will not actually make changes. */ validateOnly?: boolean; } function serializeProjectsLocationsUnitsPatchOptions(data: any): ProjectsLocationsUnitsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsUnitsPatchOptions(data: any): ProjectsLocationsUnitsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Provision is the unit operation that provision the underlying resources * represented by a Unit. Can only execute if the Unit is not currently * provisioned. */ export interface Provision { /** * Optional. Set of input variables. Maximum 100. (optional) */ inputVariables?: UnitVariable[]; /** * Optional. Reference to the Release object to use for the Unit. (optional). */ release?: string; } /** * A new version to be propagated and deployed to units. This includes pointers * to packaged blueprints for actuation (e.g Helm or Terraform configuration * packages) via artifact registry. */ export interface Release { /** * Optional. Annotations is an unstructured key-value map stored with a * resource that may be set by external tools to store and retrieve arbitrary * metadata. They are not queryable and should be preserved when modifying * objects. More info: https://kubernetes.io/docs/user-guide/annotations */ annotations?: { [key: string]: string }; /** * Optional. Blueprints are OCI Images that contain all of the artifacts * needed to provision a unit. */ blueprint?: Blueprint; /** * Output only. The timestamp when the resource was created. */ readonly createTime?: Date; /** * Output only. An opaque value that uniquely identifies a version or * generation of a resource. It can be used to confirm that the client and * server agree on the ordering of a resource being written. */ readonly etag?: string; /** * Optional. Mapping of input variables to default values. Maximum 100 */ inputVariableDefaults?: UnitVariable[]; /** * Optional. Output only. List of input variables declared on the blueprint * and can be present with their values on the unit spec */ readonly inputVariables?: UnitVariable[]; /** * Optional. The labels on the resource, which can be used for * categorization. similar to Kubernetes resource labels. */ labels?: { [key: string]: string }; /** * Identifier. The resource name (full URI of the resource) following the * standard naming scheme: * "projects/{project}/locations/{location}/releases/{release}" */ name?: string; /** * Optional. Output only. List of output variables declared on the blueprint * and can be present with their values on the unit status */ readonly outputVariables?: UnitVariable[]; /** * Optional. Set of requirements to be fulfilled on the Unit when using this * Release. */ releaseRequirements?: ReleaseRequirements; /** * Output only. The unique identifier of the resource. UID is unique in the * time and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource and * must not be changed. UID is used to uniquely identify resources with * resource name reuses. This should be a UUID4. */ readonly uid?: string; /** * Required. Immutable. Reference to the UnitKind this Release corresponds to * (required and immutable once created). */ unitKind?: string; /** * Output only. The timestamp when the resource was last updated. Any change * to the resource made by users must refresh this value. Changes to a * resource made by the service should refresh this value. */ readonly updateTime?: Date; } /** * Set of requirements to be fulfilled on the Unit when using this Release. */ export interface ReleaseRequirements { /** * Optional. A list of releases from which a unit can be upgraded to this one * (optional). If left empty no constraints will be applied. When provided, * unit upgrade requests to this release will check and enforce this * constraint. */ upgradeableFromReleases?: string[]; } /** * Represents a single rollout execution and its results */ export interface Rollout { /** * Optional. Annotations is an unstructured key-value map stored with a * resource that may be set by external tools to store and retrieve arbitrary * metadata. They are not queryable and should be preserved when modifying * objects. More info: https://kubernetes.io/docs/user-guide/annotations */ annotations?: { [key: string]: string }; /** * Optional. Requested change to the execution of this rollout. Default * RolloutControl.action is ROLLOUT_ACTION_RUN meaning the rollout will be * executed to completion while progressing through all natural Rollout States * (such as RUNNING -> SUCCEEDED or RUNNING -> FAILED). Requests can only be * made when the Rollout is in a non-terminal state. */ control?: RolloutControl; /** * Output only. The timestamp when the resource was created. */ readonly createTime?: Date; /** * Output only. The timestamp when the resource was marked for deletion * (deletion is an asynchronous operation). */ readonly deleteTime?: Date; /** * Optional. Output only. Output only snapshot of the effective unit filter * at Rollout start time. Contains a CEL(https://github.com/google/cel-spec) * expression consisting of a conjunction of Rollout.unit_filter and * RolloutKind.unit_filter. This field captures the filter applied by the * Rollout to determine the Unit population. If the associated RolloutKind's * unit_filter is modified after the rollout is started, it will not be * updated here. */ readonly effectiveUnitFilter?: string; /** * Optional. Output only. The time when the rollout finished execution * (regardless of success, failure, or cancellation). Will be empty if the * rollout hasn't finished yet. Once set, the rollout is in terminal state and * all the results are final. */ readonly endTime?: Date; /** * Output only. An opaque value that uniquely identifies a version or * generation of a resource. It can be used to confirm that the client and * server agree on the ordering of a resource being written. */ readonly etag?: string; /** * Optional. The labels on the resource, which can be used for * categorization. similar to Kubernetes resource labels. */ labels?: { [key: string]: string }; /** * Identifier. The resource name (full URI of the resource) following the * standard naming scheme: * "projects/{project}/locations/{location}/rollout/{rollout_id}" */ name?: string; /** * Optional. Output only. The direct parent rollout that this rollout is * stemming from. The resource name (full URI of the resource) following the * standard naming scheme: * "projects/{project}/locations/{location}/rollouts/{rollout_id}" */ readonly parentRollout?: string; /** * Optional. Immutable. Name of the Release that gets rolled out to target * Units. Required if no other type of release is specified. */ release?: string; /** * Optional. Immutable. Name of the RolloutKind this rollout is stemming from * and adhering to. */ rolloutKind?: string; /** * Optional. The strategy used for executing this Rollout. This strategy will * override whatever strategy is specified in the RolloutKind. If not * specified on creation, the strategy from RolloutKind will be used. There * are two supported values strategies which are used to control - * "Google.Cloud.Simple.AllAtOnce" - "Google.Cloud.Simple.OneLocationAtATime" * A rollout with one of these simple strategies will rollout across all * locations defined in the targeted UnitKind's Saas Locations. */ rolloutOrchestrationStrategy?: string; /** * Optional. Output only. The root rollout that this rollout is stemming * from. The resource name (full URI of the resource) following the standard * naming scheme: * "projects/{project}/locations/{location}/rollouts/{rollout_id}" */ readonly rootRollout?: string; /** * Optional. Output only. The time when the rollout started executing. Will * be empty if the rollout hasn't started yet. */ readonly startTime?: Date; /** * Output only. Current state of the rollout. */ readonly state?: | "ROLLOUT_STATE_UNSPECIFIED" | "ROLLOUT_STATE_RUNNING" | "ROLLOUT_STATE_PAUSED" | "ROLLOUT_STATE_SUCCEEDED" | "ROLLOUT_STATE_FAILED" | "ROLLOUT_STATE_CANCELLED" | "ROLLOUT_STATE_WAITING" | "ROLLOUT_STATE_CANCELLING" | "ROLLOUT_STATE_RESUMING" | "ROLLOUT_STATE_PAUSING"; /** * Output only. Human readable message indicating details about the last * state transition. */ readonly stateMessage?: string; /** * Optional. Output only. The time when the rollout transitioned into its * current state. */ readonly stateTransitionTime?: Date; /** * Optional. Output only. Details about the progress of the rollout. */ readonly stats?: RolloutStats; /** * Output only. The unique identifier of the resource. UID is unique in the * time and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource and * must not be changed. UID is used to uniquely identify resources with * resource name reuses. This should be a UUID4. */ readonly uid?: string; /** * Optional. CEL(https://github.com/google/cel-spec) formatted filter string * against Unit. The filter will be applied to determine the eligible unit * population. This filter can only reduce, but not expand the scope of the * rollout. If not provided, the unit_filter from the RolloutKind will be * used. */ unitFilter?: string; /** * Output only. The timestamp when the resource was last updated. Any change * to the resource made by users must refresh this value. Changes to a * resource made by the service should refresh this value. */ readonly updateTime?: Date; } /** * RolloutControl provides a way to request a change to the execution of a * Rollout by pausing or canceling it. */ export interface RolloutControl { /** * Required. Action to be performed on the Rollout. The default behavior is * to run the rollout until it naturally reaches a terminal state. */ action?: | "ROLLOUT_ACTION_UNSPECIFIED" | "ROLLOUT_ACTION_RUN" | "ROLLOUT_ACTION_PAUSE" | "ROLLOUT_ACTION_CANCEL"; /** * Optional. Parameters for the RUN action. It is an error to specify this if * the RolloutAction is not set to RUN. By default, the rollout will retry * failed operations when resumed. */ runParams?: RunRolloutActionParams; } /** * An object that describes various settings of Rollout execution. Includes * built-in policies across GCP and GDC, and customizable policies. */ export interface RolloutKind { /** * Optional. Annotations is an unstructured key-value map stored with a * resource that may be set by external tools to store and retrieve arbitrary * metadata. They are not queryable and should be preserved when modifying * objects. More info: https://kubernetes.io/docs/user-guide/annotations */ annotations?: { [key: string]: string }; /** * Output only. The timestamp when the resource was created. */ readonly createTime?: Date; /** * Optional. The configuration for error budget. If the number of failed * units exceeds max(allowed_count, allowed_ratio * total_units), the rollout * will be paused. If not set, all units will be attempted to be updated * regardless of the number of failures encountered. */ errorBudget?: ErrorBudget; /** * Output only. An opaque value that uniquely identifies a version or * generation of a resource. It can be used to confirm that the client and * server agree on the ordering of a resource being written. */ readonly etag?: string; /** * Optional. The labels on the resource, which can be used for * categorization. similar to Kubernetes resource labels. */ labels?: { [key: string]: string }; /** * Optional. Value among strict (enforcing maintenance policy and only * looking at Units with maintenance policy), ignore (ignoring maintenance * policy) and skip (skipping Units with maintenance policy) */ maintenancePolicyEnforcement?: | "MAINTENANCE_POLICY_ENFORCEMENT_UNSPECIFIED" | "MAINTENANCE_POLICY_ENFORCEMENT_STRICT" | "MAINTENANCE_POLICY_ENFORCEMENT_IGNORED" | "MAINTENANCE_POLICY_ENFORCEMENT_SKIPPED"; /** * Identifier. The resource name (full URI of the resource) following the * standard naming scheme: * "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}" */ name?: string; /** * Optional. The strategy used for executing a Rollout. This is a required * field. There are two supported values strategies which are used to control * - "Google.Cloud.Simple.AllAtOnce" - * "Google.Cloud.Simple.OneLocationAtATime" A rollout with one of these simple * strategies will rollout across all locations defined in the associated * UnitKind's Saas Locations. */ rolloutOrchestrationStrategy?: string; /** * Output only. The unique identifier of the resource. UID is unique in the * time and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource and * must not be changed. UID is used to uniquely identify resources with * resource name reuses. This should be a UUID4. */ readonly uid?: string; /** * Optional. CEL(https://github.com/google/cel-spec) formatted filter string * against Unit. The filter will be applied to determine the eligible unit * population. This filter can only reduce, but not expand the scope of the * rollout. */ unitFilter?: string; /** * Required. Immutable. UnitKind that this rollout kind corresponds to. * Rollouts stemming from this rollout kind will target the units of this unit * kind. In other words, this defines the population of target units to be * upgraded by rollouts. */ unitKind?: string; /** * Output only. The timestamp when the resource was last updated. Any change * to the resource made by users must refresh this value. Changes to a * resource made by the service should refresh this value. */ readonly updateTime?: Date; /** * Optional. The config for updating the unit kind. By default, the unit kind * will be updated on the rollout start. */ updateUnitKindStrategy?: | "UPDATE_UNIT_KIND_STRATEGY_UNSPECIFIED" | "UPDATE_UNIT_KIND_STRATEGY_ON_START" | "UPDATE_UNIT_KIND_STRATEGY_NEVER"; } /** * RolloutStats contains information about the progress of a rollout. */ export interface RolloutStats { /** * Optional. Output only. Unordered list. A breakdown of the progress of * operations triggered by the rollout. Provides a count of Operations by * their state. This can be used to determine the number of units which have * been updated, or are scheduled to be updated. There will be at most one * entry per group. Possible values for operation groups are: - "SCHEDULED" - * "PENDING" - "RUNNING" - "SUCCEEDED" - "FAILED" - "CANCELLED" */ readonly operationsByState?: Aggregate[]; } /** * Parameters for the RUN action controlling the behavior of the rollout when * it is resumed from a PAUSED state. */ export interface RunRolloutActionParams { /** * Required. If true, the rollout will retry failed operations when resumed. * This is applicable only the current state of the Rollout is PAUSED and the * requested action is RUN. */ retryFailedOperations?: boolean; } /** * Saas is a representation of a SaaS service managed by the Producer. */ export interface Saas { /** * Optional. Annotations is an unstructured key-value map stored with a * resource that may be set by external tools to store and retrieve arbitrary * metadata. They are not queryable and should be preserved when modifying * objects. More info: https://kubernetes.io/docs/user-guide/annotations */ annotations?: { [key: string]: string }; /** * Output only. The timestamp when the resource was created. */ readonly createTime?: Date; /** * Output only. An opaque value that uniquely identifies a version or * generation of a resource. It can be used to confirm that the client and * server agree on the ordering of a resource being written. */ readonly etag?: string; /** * Optional. The labels on the resource, which can be used for * categorization. similar to Kubernetes resource labels. */ labels?: { [key: string]: string }; /** * Optional. List of locations that the service is available in. Rollout * refers to the list to generate a rollout plan. */ locations?: Location[]; /** * Identifier. The resource name (full URI of the resource) following the * standard naming scheme: * "projects/{project}/locations/{location}/saas/{saas}" */ name?: string; /** * Output only. The unique identifier of the resource. UID is unique in the * time and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource and * must not be changed. UID is used to uniquely identify resources with * resource name reuses. This should be a UUID4. */ readonly uid?: string; /** * Output only. The timestamp when the resource was last updated. Any change * to the resource made by users must refresh this value. Changes to a * resource made by the service should refresh this value. */ readonly updateTime?: Date; } /** * A time specification to schedule the maintenance. */ export interface Schedule { /** * Optional. Start of operation. If not set, will be set to the start of the * next window. (optional) */ startTime?: Date; } function serializeSchedule(data: any): Schedule { return { ...data, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeSchedule(data: any): Schedule { return { ...data, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Tenant represents the service producer side of an instance of the service * created based on a request from a consumer. In a typical scenario a Tenant * has a one-to-one mapping with a resource given out to a service consumer. * Example: tenant: name: "projects/svc1/locations/loc/tenants/inst-068afff8" * consumer_resource: "projects/gshoe/locations/loc/shoes/black-shoe" */ export interface Tenant { /** * Optional. Annotations is an unstructured key-value map stored with a * resource that may be set by external tools to store and retrieve arbitrary * metadata. They are not queryable and should be preserved when modifying * objects. More info: https://kubernetes.io/docs/user-guide/annotations */ annotations?: { [key: string]: string }; /** * Optional. Immutable. A reference to the consumer resource this SaaS Tenant * is representing. The relationship with a consumer resource can be used by * SaaS Runtime for retrieving consumer-defined settings and policies such as * maintenance policies (using Unified Maintenance Policy API). */ consumerResource?: string; /** * Output only. The timestamp when the resource was created. */ readonly createTime?: Date; /** * Output only. An opaque value that uniquely identifies a version or * generation of a resource. It can be used to confirm that the client and * server agree on the ordering of a resource being written. */ readonly etag?: string; /** * Optional. The labels on the resource, which can be used for * categorization. similar to Kubernetes resource labels. */ labels?: { [key: string]: string }; /** * Identifier. The resource name (full URI of the resource) following the * standard naming scheme: * "projects/{project}/locations/{location}/tenants/{tenant}" */ name?: string; /** * Required. Immutable. A reference to the Saas that defines the product * (managed service) that the producer wants to manage with SaaS Runtime. Part * of the SaaS Runtime common data model. */ saas?: string; /** * Output only. The unique identifier of the resource. UID is unique in the * time and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource and * must not be changed. UID is used to uniquely identify resources with * resource name reuses. This should be a UUID4. */ readonly uid?: string; /** * Output only. The timestamp when the resource was last updated. Any change * to the resource made by users must refresh this value. Changes to a * resource made by the service should refresh this value. */ readonly updateTime?: Date; } /** * Input variables whose values will be passed on to dependencies */ export interface ToMapping { /** * Required. Alias of the dependency that the inputVariable will pass its * value to */ dependency?: string; /** * Optional. Tells SaaS Runtime if this mapping should be used during lookup * or not */ ignoreForLookup?: boolean; /** * Required. Name of the inputVariable on the dependency */ inputVariable?: string; } /** * A unit of deployment that has its lifecycle via a CRUD API using an * actuation engine under the hood (e.g. based on Terraform, Helm or a custom * implementation provided by a service producer). A building block of a SaaS * Tenant. */ export interface Unit { /** * Optional. Annotations is an unstructured key-value map stored with a * resource that may be set by external tools to store and retrieve arbitrary * metadata. They are not queryable and should be preserved when modifying * objects. More info: https://kubernetes.io/docs/user-guide/annotations */ annotations?: { [key: string]: string }; /** * Optional. Output only. A set of conditions which indicate the various * conditions this resource can have. */ readonly conditions?: UnitCondition[]; /** * Output only. The timestamp when the resource was created. */ readonly createTime?: Date; /** * Optional. Output only. Set of dependencies for this unit. Maximum 10. */ readonly dependencies?: UnitDependency[]; /** * Optional. Output only. List of Units that depend on this unit. Unit can * only be deprovisioned if this list is empty. Maximum 1000. */ readonly dependents?: UnitDependency[]; /** * Output only. An opaque value that uniquely identifies a version or * generation of a resource. It can be used to confirm that the client and * server agree on the ordering of a resource being written. */ readonly etag?: string; /** * Optional. Output only. Indicates the current input variables deployed by * the unit */ readonly inputVariables?: UnitVariable[]; /** * Optional. The labels on the resource, which can be used for * categorization. similar to Kubernetes resource labels. */ labels?: { [key: string]: string }; /** * Optional. Captures requested directives for performing future maintenance * on the unit. This includes a request for the unit to skip maintenance for a * period of time and remain pinned to its current release as well as controls * for postponing maintenance scheduled in future. */ maintenance?: MaintenanceSettings; /** * Optional. Immutable. Indicates whether the Unit life cycle is controlled * by the user or by the system. Immutable once created. */ managementMode?: | "MANAGEMENT_MODE_UNSPECIFIED" | "MANAGEMENT_MODE_USER" | "MANAGEMENT_MODE_SYSTEM"; /** * Identifier. The resource name (full URI of the resource) following the * standard naming scheme: * "projects/{project}/locations/{location}/units/{unit}" */ name?: string; /** * Optional. Output only. List of concurrent UnitOperations that are * operating on this Unit. */ readonly ongoingOperations?: string[]; /** * Optional. Output only. Set of key/value pairs corresponding to output * variables from execution of actuation templates. The variables are declared * in actuation configs (e.g in helm chart or terraform) and the values are * fetched and returned by the actuation engine upon completion of execution. */ readonly outputVariables?: UnitVariable[]; /** * Optional. Output only. List of pending (wait to be executed) * UnitOperations for this unit. */ readonly pendingOperations?: string[]; /** * Optional. Output only. The current Release object for this Unit. */ readonly release?: string; /** * Optional. Output only. List of scheduled UnitOperations for this unit. */ readonly scheduledOperations?: string[]; /** * Optional. Output only. Current lifecycle state of the resource (e.g. if * it's being created or ready to use). */ readonly state?: | "UNIT_STATE_UNSPECIFIED" | "UNIT_STATE_NOT_PROVISIONED" | "UNIT_STATE_PROVISIONING" | "UNIT_STATE_UPDATING" | "UNIT_STATE_DEPROVISIONING" | "UNIT_STATE_READY" | "UNIT_STATE_ERROR"; /** * Optional. Output only. If set, indicates the time when the system will * start removing the unit. */ readonly systemCleanupAt?: Date; /** * Optional. Output only. Indicates the system managed state of the unit. */ readonly systemManagedState?: | "SYSTEM_MANAGED_STATE_UNSPECIFIED" | "SYSTEM_MANAGED_STATE_ACTIVE" | "SYSTEM_MANAGED_STATE_INACTIVE" | "SYSTEM_MANAGED_STATE_DECOMMISSIONED"; /** * Optional. Reference to the Saas Tenant resource this unit belongs to. This * for example informs the maintenance policies to use for scheduling future * updates on a unit. (optional and immutable once created) */ tenant?: string; /** * Output only. The unique identifier of the resource. UID is unique in the * time and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource and * must not be changed. UID is used to uniquely identify resources with * resource name reuses. This should be a UUID4. */ readonly uid?: string; /** * Optional. Reference to the UnitKind this Unit belongs to. Immutable once * set. */ unitKind?: string; /** * Output only. The timestamp when the resource was last updated. Any change * to the resource made by users must refresh this value. Changes to a * resource made by the service should refresh this value. */ readonly updateTime?: Date; } function serializeUnit(data: any): Unit { return { ...data, maintenance: data["maintenance"] !== undefined ? serializeMaintenanceSettings(data["maintenance"]) : undefined, }; } function deserializeUnit(data: any): Unit { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (deserializeUnitCondition(item))) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, maintenance: data["maintenance"] !== undefined ? deserializeMaintenanceSettings(data["maintenance"]) : undefined, systemCleanupAt: data["systemCleanupAt"] !== undefined ? new Date(data["systemCleanupAt"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * UnitCondition describes the status of an Unit. UnitCondition is individual * components that contribute to an overall state. */ export interface UnitCondition { /** * Required. Last time the condition transited from one status to another. */ lastTransitionTime?: Date; /** * Required. Human readable message indicating details about the last * transition. */ message?: string; /** * Required. Brief reason for the condition's last transition. */ reason?: string; /** * Required. Status of the condition. */ status?: | "STATUS_UNSPECIFIED" | "STATUS_UNKNOWN" | "STATUS_TRUE" | "STATUS_FALSE"; /** * Required. Type of the condition. */ type?: | "TYPE_UNSPECIFIED" | "TYPE_READY" | "TYPE_UPDATING" | "TYPE_PROVISIONED" | "TYPE_OPERATION_ERROR"; } function serializeUnitCondition(data: any): UnitCondition { return { ...data, lastTransitionTime: data["lastTransitionTime"] !== undefined ? data["lastTransitionTime"].toISOString() : undefined, }; } function deserializeUnitCondition(data: any): UnitCondition { return { ...data, lastTransitionTime: data["lastTransitionTime"] !== undefined ? new Date(data["lastTransitionTime"]) : undefined, }; } /** * Set of dependencies for this unit. Maximum 10. */ export interface UnitDependency { /** * Output only. Alias for the name of the dependency. */ readonly alias?: string; /** * Output only. A reference to the Unit object. */ readonly unit?: string; } /** * Definition of a Unit. Units belonging to the same UnitKind are managed * together; for example they follow the same release model (blueprints, * versions etc.) and are typically rolled out together. */ export interface UnitKind { /** * Optional. Annotations is an unstructured key-value map stored with a * resource that may be set by external tools to store and retrieve arbitrary * metadata. They are not queryable and should be preserved when modifying * objects. More info: https://kubernetes.io/docs/user-guide/annotations */ annotations?: { [key: string]: string }; /** * Output only. The timestamp when the resource was created. */ readonly createTime?: Date; /** * Optional. A reference to the Release object to use as default for creating * new units of this UnitKind (optional). If not specified, a new unit must * explicitly reference which release to use for its creation. */ defaultRelease?: string; /** * Optional. Immutable. List of other unit kinds that this release will * depend on. Dependencies will be automatically provisioned if not found. * Maximum 10. */ dependencies?: Dependency[]; /** * Output only. An opaque value that uniquely identifies a version or * generation of a resource. It can be used to confirm that the client and * server agree on the ordering of a resource being written. */ readonly etag?: string; /** * Optional. List of inputVariables for this release that will either be * retrieved from a dependency’s outputVariables, or will be passed on to a * dependency’s inputVariables. Maximum 100. */ inputVariableMappings?: VariableMapping[]; /** * Optional. The labels on the resource, which can be used for * categorization. similar to Kubernetes resource labels. */ labels?: { [key: string]: string }; /** * Identifier. The resource name (full URI of the resource) following the * standard naming scheme: * "projects/{project}/locations/{location}/unitKinds/{unitKind}" */ name?: string; /** * Optional. List of outputVariables for this unit kind will be passed to * this unit's outputVariables. Maximum 100. */ outputVariableMappings?: VariableMapping[]; /** * Required. Immutable. A reference to the Saas that defines the product * (managed service) that the producer wants to manage with SaaS Runtime. Part * of the SaaS Runtime common data model. Immutable once set. */ saas?: string; /** * Output only. The unique identifier of the resource. UID is unique in the * time and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource and * must not be changed. UID is used to uniquely identify resources with * resource name reuses. This should be a UUID4. */ readonly uid?: string; /** * Output only. The timestamp when the resource was last updated. Any change * to the resource made by users must refresh this value. Changes to a * resource made by the service should refresh this value. */ readonly updateTime?: Date; } /** * UnitOperation encapsulates the intent of changing/interacting with the * service component represented by the specific Unit. Multiple UnitOperations * can be created (requested) and scheduled in the future, however only one will * be allowed to execute at a time (that can change in the future for * non-mutating operations). UnitOperations allow different actors interacting * with the same unit to focus only on the change they have requested. This is a * base object that contains the common fields in all unit operations. Next: 19 */ export interface UnitOperation { /** * Optional. Annotations is an unstructured key-value map stored with a * resource that may be set by external tools to store and retrieve arbitrary * metadata. They are not queryable and should be preserved when modifying * objects. More info: https://kubernetes.io/docs/user-guide/annotations */ annotations?: { [key: string]: string }; /** * Optional. When true, attempt to cancel the operation. Cancellation may * fail if the operation is already executing. (Optional) */ cancel?: boolean; /** * Optional. Output only. A set of conditions which indicate the various * conditions this resource can have. */ readonly conditions?: UnitOperationCondition[]; /** * Output only. The timestamp when the resource was created. */ readonly createTime?: Date; /** * Output only. The timestamp when the resource was marked for deletion * (deletion is an asynchronous operation). */ readonly deleteTime?: Date; deprovision?: Deprovision; /** * Optional. Output only. The engine state for on-going deployment engine * operation(s). This field is opaque for external usage. */ readonly engineState?: string; /** * Optional. Output only. UnitOperationErrorCategory describe the error * category. */ readonly errorCategory?: | "UNIT_OPERATION_ERROR_CATEGORY_UNSPECIFIED" | "NOT_APPLICABLE" | "FATAL" | "RETRIABLE" | "IGNORABLE" | "STANDARD"; /** * Output only. An opaque value that uniquely identifies a version or * generation of a resource. It can be used to confirm that the client and * server agree on the ordering of a resource being written. */ readonly etag?: string; /** * Optional. The labels on the resource, which can be used for * categorization. similar to Kubernetes resource labels. */ labels?: { [key: string]: string }; /** * Identifier. The resource name (full URI of the resource) following the * standard naming scheme: * "projects/{project}/locations/{location}/unitOperations/{unitOperation}" */ name?: string; /** * Optional. Reference to parent resource: UnitOperation. If an operation * needs to create other operations as part of its workflow, each of the child * operations should have this field set to the parent. This can be used for * tracing. (Optional) */ parentUnitOperation?: string; provision?: Provision; /** * Optional. Specifies which rollout created this Unit Operation. This cannot * be modified and is used for filtering purposes only. If a dependent unit * and unit operation are created as part of another unit operation, they will * use the same rolloutId. */ rollout?: string; /** * Optional. When to schedule this operation. */ schedule?: Schedule; /** * Optional. Output only. UnitOperationState describes the current state of * the unit operation. */ readonly state?: | "UNIT_OPERATION_STATE_UNKNOWN" | "UNIT_OPERATION_STATE_PENDING" | "UNIT_OPERATION_STATE_SCHEDULED" | "UNIT_OPERATION_STATE_RUNNING" | "UNIT_OPERATION_STATE_SUCCEEDED" | "UNIT_OPERATION_STATE_FAILED" | "UNIT_OPERATION_STATE_CANCELLED"; /** * Output only. The unique identifier of the resource. UID is unique in the * time and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource and * must not be changed. UID is used to uniquely identify resources with * resource name reuses. This should be a UUID4. */ readonly uid?: string; /** * Required. Immutable. The Unit a given UnitOperation will act upon. */ unit?: string; /** * Output only. The timestamp when the resource was last updated. Any change * to the resource made by users must refresh this value. Changes to a * resource made by the service should refresh this value. */ readonly updateTime?: Date; upgrade?: Upgrade; } function serializeUnitOperation(data: any): UnitOperation { return { ...data, schedule: data["schedule"] !== undefined ? serializeSchedule(data["schedule"]) : undefined, }; } function deserializeUnitOperation(data: any): UnitOperation { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (deserializeUnitOperationCondition(item))) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, deleteTime: data["deleteTime"] !== undefined ? new Date(data["deleteTime"]) : undefined, schedule: data["schedule"] !== undefined ? deserializeSchedule(data["schedule"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * UnitOperationCondition describes the status of an Unit Operation. * UnitOperationCondition is individual components that contribute to an overall * state. */ export interface UnitOperationCondition { /** * Required. Last time the condition transited from one status to another. */ lastTransitionTime?: Date; /** * Required. Human readable message indicating details about the last * transition. */ message?: string; /** * Required. Brief reason for the condition's last transition. */ reason?: string; /** * Required. Status of the condition. */ status?: | "STATUS_UNSPECIFIED" | "STATUS_UNKNOWN" | "STATUS_TRUE" | "STATUS_FALSE"; /** * Required. Type of the condition. */ type?: | "TYPE_UNSPECIFIED" | "TYPE_SCHEDULED" | "TYPE_RUNNING" | "TYPE_SUCCEEDED" | "TYPE_CANCELLED"; } function serializeUnitOperationCondition(data: any): UnitOperationCondition { return { ...data, lastTransitionTime: data["lastTransitionTime"] !== undefined ? data["lastTransitionTime"].toISOString() : undefined, }; } function deserializeUnitOperationCondition(data: any): UnitOperationCondition { return { ...data, lastTransitionTime: data["lastTransitionTime"] !== undefined ? new Date(data["lastTransitionTime"]) : undefined, }; } /** * UnitVariable describes a parameter for a Unit. */ export interface UnitVariable { /** * Optional. Immutable. Name of a supported variable type. Supported types * are string, int, bool. */ type?: | "TYPE_UNSPECIFIED" | "STRING" | "INT" | "BOOL"; /** * Optional. String encoded value for the variable. */ value?: string; /** * Required. Immutable. Name of the variable from actuation configs. */ variable?: string; } /** * Upgrade is the unit operation that upgrades a provisioned unit, which may * also include the underlying resources represented by a Unit. Can only execute * if the Unit is currently provisioned. */ export interface Upgrade { /** * Optional. Set of input variables. Maximum 100. (optional) */ inputVariables?: UnitVariable[]; /** * Optional. Reference to the Release object to use for the Unit. (optional). */ release?: string; } /** * Mapping of input variables to their respective output variable for * depedenencies */ export interface VariableMapping { /** * Optional. Output variables which will get their values from dependencies */ from?: FromMapping; /** * Optional. Input variables whose values will be passed on to dependencies. */ to?: ToMapping; /** * Required. name of the variable */ variable?: string; }