// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Cloud Number Registry API Client for Deno * ========================================= * * * * Docs: https://docs.cloud.google.com/number-registry/reference/rest * Source: https://googleapis.deno.dev/v1/cloudnumberregistry:v1alpha.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; export class CloudNumberRegistry { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://cloudnumberregistry.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Creates a new CustomRange in a given project and location. * * @param parent Required. The parent resource name where the CustomRange will be created. */ async projectsLocationsCustomRangesCreate(parent: string, req: CustomRange, opts: ProjectsLocationsCustomRangesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/customRanges`); if (opts.customRangeId !== undefined) { url.searchParams.append("customRangeId", String(opts.customRangeId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single CustomRange. * * @param name Required. The resource name of the CustomRange to delete. */ async projectsLocationsCustomRangesDelete(name: string, opts: ProjectsLocationsCustomRangesDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Finds free IP ranges in a single CustomRange. * * @param name Required. The resource name of the CustomRange to search within. */ async projectsLocationsCustomRangesFindFreeIpRanges(name: string, opts: ProjectsLocationsCustomRangesFindFreeIpRangesOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }:findFreeIpRanges`); if (opts.cidrPrefixLength !== undefined) { url.searchParams.append("cidrPrefixLength", String(opts.cidrPrefixLength)); } if (opts.rangeCount !== undefined) { url.searchParams.append("rangeCount", String(opts.rangeCount)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as FindCustomRangeFreeIpRangesResponse; } /** * Gets details of a single CustomRange. * * @param name Required. The resource name of the CustomRange to retrieve. */ async projectsLocationsCustomRangesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as CustomRange; } /** * Lists CustomRanges in a given project and location. * * @param parent Required. The parent resource name, for example `projects/*/locations/*`. */ async projectsLocationsCustomRangesList(parent: string, opts: ProjectsLocationsCustomRangesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/customRanges`); 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 ListCustomRangesResponse; } /** * Updates the parameters of a single CustomRange. * * @param name Required. Identifier. The resource name of the CustomRange, in the format `projects/{project}/locations/{location}/customRanges/{custom_range}`. */ async projectsLocationsCustomRangesPatch(name: string, req: CustomRange, opts: ProjectsLocationsCustomRangesPatchOptions = {}): Promise { opts = serializeProjectsLocationsCustomRangesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Gets the details of a single CustomRange and its utilization. * * @param name Required. The resource name of the CustomRange. */ async projectsLocationsCustomRangesShowUtilization(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }:showUtilization`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ShowCustomRangeUtilizationResponse; } /** * Finds free IP ranges in a single DiscoveredRange. * * @param name Required. The resource name of the DiscoveredRange to search within. */ async projectsLocationsDiscoveredRangesFindFreeIpRanges(name: string, opts: ProjectsLocationsDiscoveredRangesFindFreeIpRangesOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }:findFreeIpRanges`); if (opts.cidrPrefixLength !== undefined) { url.searchParams.append("cidrPrefixLength", String(opts.cidrPrefixLength)); } if (opts.rangeCount !== undefined) { url.searchParams.append("rangeCount", String(opts.rangeCount)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as FindDiscoveredRangeFreeIpRangesResponse; } /** * Gets details of a single DiscoveredRange. * * @param name Required. The resource name of the DiscoveredRange to retrieve. */ async projectsLocationsDiscoveredRangesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as DiscoveredRange; } /** * Lists DiscoveredRanges in a given project and location. * * @param parent Required. The parent resource name, for example `projects/*/locations/*`. */ async projectsLocationsDiscoveredRangesList(parent: string, opts: ProjectsLocationsDiscoveredRangesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/discoveredRanges`); 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 ListDiscoveredRangesResponse; } /** * Gets the details of a single DiscoveredRange and its utilization. * * @param name Required. The resource name of the DiscoveredRange. */ async projectsLocationsDiscoveredRangesShowUtilization(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }:showUtilization`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ShowDiscoveredRangeUtilizationResponse; } /** * Gets information about a location. * * @param name Resource name for the location. */ async projectsLocationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Location; } /** * Checks the availability of IpamAdminScopes in a given project and * location. * * @param parent Required. The parent resource name, for example `projects/*/locations/*`. */ async projectsLocationsIpamAdminScopesCheckAvailability(parent: string, opts: ProjectsLocationsIpamAdminScopesCheckAvailabilityOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/ipamAdminScopes:checkAvailability`); if (opts.scopes !== undefined) { url.searchParams.append("scopes", String(opts.scopes)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeCheckAvailabilityIpamAdminScopesResponse(data); } /** * Cleans up a single IpamAdminScope. * * @param name Required. The resource name of the IpamAdminScope to clean up. */ async projectsLocationsIpamAdminScopesCleanup(name: string, req: CleanupIpamAdminScopeRequest): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }:cleanup`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Creates a new IpamAdminScope in a given project and location. * * @param parent Required. The parent resource name where the IpamAdminScope will be created. */ async projectsLocationsIpamAdminScopesCreate(parent: string, req: IpamAdminScope, opts: ProjectsLocationsIpamAdminScopesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/ipamAdminScopes`); if (opts.ipamAdminScopeId !== undefined) { url.searchParams.append("ipamAdminScopeId", String(opts.ipamAdminScopeId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single IpamAdminScope. * * @param name Required. The resource name of the IpamAdminScope to delete. */ async projectsLocationsIpamAdminScopesDelete(name: string, opts: ProjectsLocationsIpamAdminScopesDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Disables a single IpamAdminScope. * * @param name Required. The resource name of the IpamAdminScope to disable. */ async projectsLocationsIpamAdminScopesDisable(name: string, req: DisableIpamAdminScopeRequest): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }:disable`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets details of a single IpamAdminScope. * * @param name Required. The resource name of the IpamAdminScope to retrieve. */ async projectsLocationsIpamAdminScopesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as IpamAdminScope; } /** * Lists IpamAdminScopes in a given project and location. * * @param parent Required. The parent resource name, for example `projects/*/locations/*`. */ async projectsLocationsIpamAdminScopesList(parent: string, opts: ProjectsLocationsIpamAdminScopesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/ipamAdminScopes`); 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 ListIpamAdminScopesResponse; } /** * Updates the parameters of a single IpamAdminScope. * * @param name Required. Identifier. The resource name of the IpamAdminScope. */ async projectsLocationsIpamAdminScopesPatch(name: string, req: IpamAdminScope, opts: ProjectsLocationsIpamAdminScopesPatchOptions = {}): Promise { opts = serializeProjectsLocationsIpamAdminScopesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Lists information about the supported locations for this service. This * method lists locations based on the resource scope provided in the * ListLocationsRequest.name field: * **Global locations**: If `name` is * empty, the method lists the public locations available to all projects. * * **Project-specific locations**: If `name` follows the format * `projects/{project}`, the method lists locations visible to that specific * project. This includes public, private, or other project-specific locations * enabled for the project. For gRPC and client library implementations, the * resource name is passed as the `name` field. For direct service calls, the * resource name is incorporated into the request path based on the specific * service implementation and version. * * @param name The resource that owns the locations collection, if applicable. */ async projectsLocationsList(name: string, opts: ProjectsLocationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ 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; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of `1`, corresponding * to `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsLocationsOperationsCancel(name: string, req: CancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Empty; } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param name The name of the operation resource to be deleted. */ async projectsLocationsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Creates a new Realm in a given project and location. * * @param parent Required. The parent resource name where the Realm will be created. */ async projectsLocationsRealmsCreate(parent: string, req: Realm, opts: ProjectsLocationsRealmsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/realms`); if (opts.realmId !== undefined) { url.searchParams.append("realmId", String(opts.realmId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single Realm. * * @param name Required. The resource name of the Realm to delete. */ async projectsLocationsRealmsDelete(name: string, opts: ProjectsLocationsRealmsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single Realm. * * @param name Required. The resource name of the Realm to retrieve. */ async projectsLocationsRealmsGet(name: string, opts: ProjectsLocationsRealmsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Realm; } /** * Lists Realms in a given project and location. * * @param parent Required. The parent resource name, for example `projects/*/locations/*`. */ async projectsLocationsRealmsList(parent: string, opts: ProjectsLocationsRealmsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/realms`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListRealmsResponse; } /** * Updates the parameters of a single Realm. * * @param name Required. Identifier. The resource name of the Realm. */ async projectsLocationsRealmsPatch(name: string, req: Realm, opts: ProjectsLocationsRealmsPatchOptions = {}): Promise { opts = serializeProjectsLocationsRealmsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Creates a new RegistryBook in a given project and location. * * @param parent Required. The parent resource name where the RegistryBook will be created. */ async projectsLocationsRegistryBooksCreate(parent: string, req: RegistryBook, opts: ProjectsLocationsRegistryBooksCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/registryBooks`); if (opts.registryBookId !== undefined) { url.searchParams.append("registryBookId", String(opts.registryBookId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single RegistryBook. * * @param name Required. The resource name of the RegistryBook to delete. */ async projectsLocationsRegistryBooksDelete(name: string, opts: ProjectsLocationsRegistryBooksDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single RegistryBook. * * @param name Required. The resource name of the RegistryBook to retrieve. */ async projectsLocationsRegistryBooksGet(name: string, opts: ProjectsLocationsRegistryBooksGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as RegistryBook; } /** * Lists RegistryBooks in a given project and location. * * @param parent Required. The parent resource name, for example `projects/*/locations/*`. */ async projectsLocationsRegistryBooksList(parent: string, opts: ProjectsLocationsRegistryBooksListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/registryBooks`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListRegistryBooksResponse; } /** * Updates the parameters of a single RegistryBook. * * @param name Required. Identifier. The resource name of the RegistryBook. */ async projectsLocationsRegistryBooksPatch(name: string, req: RegistryBook, opts: ProjectsLocationsRegistryBooksPatchOptions = {}): Promise { opts = serializeProjectsLocationsRegistryBooksPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Searches IP resources in a given RegistryBook. * * @param name Required. The resource name of the RegistryBook to search in. */ async projectsLocationsRegistryBooksSearchIpResources(name: string, req: SearchIpResourcesRequest): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }:searchIpResources`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as SearchIpResourcesResponse; } } /** * Aggregated data for the RegistryBook. */ export interface AggregatedData { /** * Output only. Number of CustomRanges in the RegistryBook. */ readonly customRangesCount?: number; /** * Output only. Number of custom Realms in the RegistryBook. */ readonly customRealmsCount?: number; /** * Output only. Number of DiscoveredRanges in the RegistryBook. */ readonly discoveredRangesCount?: number; /** * Output only. Number of discovered Realms in the RegistryBook. */ readonly discoveredRealmsCount?: number; /** * Output only. Number of scopes unique to the RegistryBook. */ readonly uniqueScopesCount?: number; } /** * A key-value pair representing a custom attribute associated with a resource. */ export interface Attribute { /** * Required. The key of the attribute. */ key?: string; /** * Required. The value of the attribute. */ value?: string; } /** * The request message for Operations.CancelOperation. */ export interface CancelOperationRequest { } /** * Response message for the * CloudNumberRegistry.CheckAvailabilityIpamAdminScopes method. */ export interface CheckAvailabilityIpamAdminScopesResponse { /** * The details of the requested scopes. */ scopeAvailabilities?: IpamAdminScopeAvailability[]; } function serializeCheckAvailabilityIpamAdminScopesResponse(data: any): CheckAvailabilityIpamAdminScopesResponse { return { ...data, scopeAvailabilities: data["scopeAvailabilities"] !== undefined ? data["scopeAvailabilities"].map((item: any) => (serializeIpamAdminScopeAvailability(item))) : undefined, }; } function deserializeCheckAvailabilityIpamAdminScopesResponse(data: any): CheckAvailabilityIpamAdminScopesResponse { return { ...data, scopeAvailabilities: data["scopeAvailabilities"] !== undefined ? data["scopeAvailabilities"].map((item: any) => (deserializeIpamAdminScopeAvailability(item))) : undefined, }; } /** * Request message for the CloudNumberRegistry.CleanupIpamAdminScope method. */ export interface CleanupIpamAdminScopeRequest { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * A CustomRange represents a user-defined IP address range. */ export interface CustomRange { /** * Optional. The attributes of the CustomRange. */ attributes?: Attribute[]; /** * Optional. The description of the CustomRange. */ description?: string; /** * Optional. The IPv4 CIDR range of the CustomRange. */ ipv4CidrRange?: string; /** * Optional. The IPv6 CIDR range of the CustomRange. */ ipv6CidrRange?: string; /** * Optional. User-defined labels. */ labels?: { [key: string]: string }; /** * Required. Identifier. The resource name of the CustomRange, in the format * `projects/{project}/locations/{location}/customRanges/{custom_range}`. */ name?: string; /** * Optional. The resource name of the parent CustomRange, in the format * `projects/{project}/locations/{location}/customRanges/{custom_range}`. If * specified, the parent CustomRange must be in the same RegistryBook. This * field is mutually exclusive with the `realm` field, as the Realm is * inherited from the parent CustomRange. */ parentRange?: string; /** * Optional. The resource name of the Realm associated with the CustomRange, * in the format `projects/{project}/locations/{location}/realms/{realm}`. The * Realm must be in the same project as the CustomRange. This field must not * be set if the `parent_range` field is set, as the Realm will be inherited * from the parent CustomRange. */ realm?: string; /** * Output only. The RegistryBook of the CustomRange. This field is inherited * from the Realm or parent CustomRange depending on which one is specified. */ readonly registryBook?: string; } /** * Request message for the CloudNumberRegistry.DisableIpamAdminScope method. */ export interface DisableIpamAdminScopeRequest { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * A DiscoveredRange represents an IP address range automatically detected by * the discovery pipeline. */ export interface DiscoveredRange { /** * Optional. The attributes of the DiscoveredRange. */ attributes?: Attribute[]; /** * Output only. If true, allows child DiscoveredRanges of this * DiscoveredRange to overlap with each other. */ readonly childCidrOverlapAllowed?: boolean; /** * Output only. The time at which the DiscoveredRange was created. */ readonly createTime?: Date; /** * Optional. Description of the DiscoveredRange. */ description?: string; /** * Output only. Owner metadata for this DiscoveredRange. A unique set of * metadata is associated with each DiscoveredRange. If an IP range is shared * by multiple resources (e.g., an Address resource and an Instance resource, * or multiple ForwardingRules),separate DiscoveredRanges are created, each * with a distinct owner. This ensures each DiscoveredRange has its own unique * set of attributes, labels, create time and update time. */ readonly discoveryMetadata?: DiscoveryMetadata; /** * Optional. The IPv4 CIDR range of the DiscoveredRange. */ ipv4CidrRange?: string; /** * Optional. The IPv6 CIDR range of the DiscoveredRange. */ ipv6CidrRange?: string; /** * Optional. User-defined labels. */ labels?: { [key: string]: string }; /** * Required. Identifier. The resource name of the DiscoveredRange, in the * format * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`. */ name?: string; /** * Optional. The resource name of the parent DiscoveredRange, in the format * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`. */ parentRange?: string; /** * Optional. The Realm of the DiscoveredRange. */ realm?: string; /** * Output only. The RegistryBook of the DiscoveredRange. */ readonly registryBook?: string; /** * Output only. The time at which the DiscoveredRange was last updated. */ readonly updateTime?: Date; } /** * Metadata about a discovered resource, tracking event times, state, and * source information. */ export interface DiscoveryMetadata { /** * Output only. The time when the resource was created. */ readonly createTime?: Date; /** * Output only. The time when the event happened. */ readonly eventTime?: Date; /** * Output only. The resource name of the discovered resource, should be * API-agnostic. Example: "projects/{project_number}/networks/{network_id}". */ readonly resource?: string; /** * Output only. The resource uri of the discovered resource. */ readonly resourceUri?: string; /** * Output only. The canonical google.aip.dev/122 name of the source resource. */ readonly sourceId?: string; /** * Output only. A single source resource can be the source of multiple CNR * resources. This sub_id is used to distinguish between the different CNR * resources derived from the same upstream resource. For example, a single * subnetwork can be the source of multiple Ranges, one for each protocol. In * this case, the sub_id could be "private-ipv4" or "private-ipv6". */ readonly sourceSubId?: string; /** * Output only. The state of the resource. */ readonly state?: | "RESOURCE_STATE_UNSPECIFIED" | "INVALID" | "EXISTS" | "DOES_NOT_EXIST" | "ERROR"; /** * Output only. The time when the resource was last modified. */ readonly updateTime?: Date; } /** * 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 { } /** * Response message for the CloudNumberRegistry.FindCustomRangeFreeIpRanges * method. */ export interface FindCustomRangeFreeIpRangesResponse { /** * Output only. The free IP CIDR ranges found. */ readonly freeIpCidrRanges?: string[]; } /** * Response message for the CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges * method. */ export interface FindDiscoveredRangeFreeIpRangesResponse { /** * Output only. The free IP CIDR ranges found. */ readonly freeIpCidrRanges?: string[]; } /** * An IpamAdminScope defines the administrative boundary for IP address * discovery and management. It configures which platforms and organizational * scopes are enabled for IP tracking. */ export interface IpamAdminScope { /** * Output only. The time at which the IpamAdminScope was created. */ readonly createTime?: Date; /** * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud * Number Registry only discovers the IP addresses from the enabled platforms. */ enabledAddonPlatforms?: | "ADD_ON_PLATFORM_UNSPECIFIED" | "COMPUTE_ENGINE" | "GCE"[]; /** * Optional. User-defined labels. */ labels?: { [key: string]: string }; /** * Required. Identifier. The resource name of the IpamAdminScope. */ name?: string; /** * Required. Administrative scopes enabled for IP address discovery and * management. For example, "organizations/1234567890". Minimum of 1 scope is * required. In preview, only one organization scope is allowed. */ scopes?: string[]; /** * Output only. State of resource discovery pipeline. */ readonly state?: | "DISCOVERY_PIPELINE_STATE_UNSPECIFIED" | "INTERNAL_FAILURE" | "FAILED" | "SETUP_IN_PROGRESS" | "READY_FOR_USE" | "DELETING_IN_PROGRESS" | "UPDATING" | "RECOVERING" | "DISABLED" | "DELETION_COMPLETED" | "CLEANUP_IN_PROGRESS" | "READY_FOR_DELETION"; /** * Output only. The time at which the IpamAdminScope was last updated. */ readonly updateTime?: Date; } /** * Availability details for a specific IpamAdminScope. */ export interface IpamAdminScopeAvailability { /** * The admin project of the IpamAdminScope if it exists. */ adminProject?: bigint; /** * The availability of the scope. */ availability?: | "AVAILABILITY_UNSPECIFIED" | "AVAILABLE" | "UNAVAILABLE"; /** * The scope of the IpamAdminScope. */ scope?: string; } function serializeIpamAdminScopeAvailability(data: any): IpamAdminScopeAvailability { return { ...data, adminProject: data["adminProject"] !== undefined ? String(data["adminProject"]) : undefined, }; } function deserializeIpamAdminScopeAvailability(data: any): IpamAdminScopeAvailability { return { ...data, adminProject: data["adminProject"] !== undefined ? BigInt(data["adminProject"]) : undefined, }; } /** * Response message for the CloudNumberRegistry.ListCustomRanges method. */ export interface ListCustomRangesResponse { /** * The list of CustomRanges. */ customRanges?: CustomRange[]; /** * A token to retrieve the next page of results, or empty if there are no * more results in the list. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * Response message for the CloudNumberRegistry.ListDiscoveredRanges method. */ export interface ListDiscoveredRangesResponse { /** * The list of DiscoveredRanges. */ discoveredRanges?: DiscoveredRange[]; /** * A token to retrieve the next page of results, or empty if there are no * more results in the list. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * Response message for the CloudNumberRegistry.ListIpamAdminScopes method. */ export interface ListIpamAdminScopesResponse { /** * The list of IpamAdminScopes. */ ipamAdminScopes?: IpamAdminScope[]; /** * A token to retrieve the next page of results, or empty if there are no * more results in the list. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response message for Locations.ListLocations. */ export interface ListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: Location[]; /** * The standard List next-page token. */ nextPageToken?: string; } /** * The response message for Operations.ListOperations. */ export interface ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: Operation[]; /** * Unordered list. Unreachable resources. Populated when the request sets * `ListOperationsRequest.return_partial_success` and reads across * collections. For example, when attempting to list all resources across all * supported locations. */ unreachable?: string[]; } /** * Response message for the CloudNumberRegistry.ListRealms method. */ export interface ListRealmsResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * The list of Realms. */ realms?: Realm[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * Response message for the CloudNumberRegistry.ListRegistryBooks method. */ export interface ListRegistryBooksResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * The list of RegistryBook */ registryBooks?: RegistryBook[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * A resource that represents a Google Cloud location. */ export interface Location { /** * The friendly name for this location, typically a nearby city name. For * example, "Tokyo". */ displayName?: string; /** * Cross-service attributes for the location. For example * {"cloud.googleapis.com/region": "us-east1"} */ labels?: { [key: string]: string }; /** * The canonical id for this location. For example: `"us-east1"`. */ locationId?: string; /** * Service-specific metadata. For example the available capacity at the given * location. */ metadata?: { [key: string]: any }; /** * Resource name for the location, which may vary between implementations. * For example: `"projects/example-project/locations/us-east1"` */ name?: string; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface Operation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: Status; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * Represents the metadata of the long-running operation. */ export interface OperationMetadata { /** * Output only. API version used to start the operation. */ readonly apiVersion?: string; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have been cancelled successfully have * Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. */ readonly requestedCancellation?: boolean; /** * Output only. Human-readable status of the operation, if any. */ readonly statusMessage?: string; /** * Output only. Server-defined resource path for the target of the operation. */ readonly target?: string; /** * Output only. Name of the verb executed by the operation. */ readonly verb?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsCustomRangesCreate. */ export interface ProjectsLocationsCustomRangesCreateOptions { /** * Required. The ID to use for the CustomRange, which will become the final * segment of the resource name. */ customRangeId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsCustomRangesDelete. */ export interface ProjectsLocationsCustomRangesDeleteOptions { /** * Optional. If set to true, all associated resources will be deleted. */ force?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsCustomRangesFindFreeIpRanges. */ export interface ProjectsLocationsCustomRangesFindFreeIpRangesOptions { /** * Required. The prefix length of the free IP ranges to find. */ cidrPrefixLength?: number; /** * Optional. The number of free IP ranges to find. */ rangeCount?: number; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsCustomRangesList. */ export interface ProjectsLocationsCustomRangesListOptions { /** * Optional. Filter expression to filter the results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsCustomRangesPatch. */ export interface ProjectsLocationsCustomRangesPatchOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. Field mask is used to specify the fields to be overwritten in * the CustomRange 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 will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCustomRangesPatchOptions(data: any): ProjectsLocationsCustomRangesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCustomRangesPatchOptions(data: any): ProjectsLocationsCustomRangesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * CloudNumberRegistry#projectsLocationsDiscoveredRangesFindFreeIpRanges. */ export interface ProjectsLocationsDiscoveredRangesFindFreeIpRangesOptions { /** * Required. The prefix length of the free IP ranges to find. */ cidrPrefixLength?: number; /** * Optional. The number of free IP ranges to find. */ rangeCount?: number; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsDiscoveredRangesList. */ export interface ProjectsLocationsDiscoveredRangesListOptions { /** * Optional. Filter expression to filter the results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsIpamAdminScopesCheckAvailability. */ export interface ProjectsLocationsIpamAdminScopesCheckAvailabilityOptions { /** * Required. The administrative scopes to check for availability. */ scopes?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsIpamAdminScopesCreate. */ export interface ProjectsLocationsIpamAdminScopesCreateOptions { /** * Required. The ID to use for the IpamAdminScope, which will become the * final segment of the resource name. */ ipamAdminScopeId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsIpamAdminScopesDelete. */ export interface ProjectsLocationsIpamAdminScopesDeleteOptions { /** * Optional. If set to true, all associated resources will be deleted. */ force?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsIpamAdminScopesList. */ export interface ProjectsLocationsIpamAdminScopesListOptions { /** * Optional. Filter expression to filter the results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsIpamAdminScopesPatch. */ export interface ProjectsLocationsIpamAdminScopesPatchOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. Field mask is used to specify the fields to be overwritten in * the IpamAdminScope 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 will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsIpamAdminScopesPatchOptions(data: any): ProjectsLocationsIpamAdminScopesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsIpamAdminScopesPatchOptions(data: any): ProjectsLocationsIpamAdminScopesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for CloudNumberRegistry#projectsLocationsList. */ export interface ProjectsLocationsListOptions { /** * Optional. Do not use this field 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 CloudNumberRegistry#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * ListOperationsResponse.unreachable field. This can only be `true` when * reading across collections. For example, when `parent` is set to * `"projects/example/locations/-"`. This field is not supported by default * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for CloudNumberRegistry#projectsLocationsRealmsCreate. */ export interface ProjectsLocationsRealmsCreateOptions { /** * Required. The ID to use for the Realm, which will become the final segment * of the resource name. */ realmId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. */ requestId?: string; } /** * Additional options for CloudNumberRegistry#projectsLocationsRealmsDelete. */ export interface ProjectsLocationsRealmsDeleteOptions { /** * Optional. If set to true, all associated resources will be deleted. */ force?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. */ requestId?: string; } /** * Additional options for CloudNumberRegistry#projectsLocationsRealmsGet. */ export interface ProjectsLocationsRealmsGetOptions { /** * Optional. The view of the Realm to retrieve. */ view?: | "REALM_VIEW_UNSPECIFIED" | "BASIC" | "FULL" | "AGGREGATE"; } /** * Additional options for CloudNumberRegistry#projectsLocationsRealmsList. */ export interface ProjectsLocationsRealmsListOptions { /** * Optional. Filter expression to filter the results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; /** * Optional. The view of the Realm to retrieve. */ view?: | "REALM_VIEW_UNSPECIFIED" | "BASIC" | "FULL" | "AGGREGATE"; } /** * Additional options for CloudNumberRegistry#projectsLocationsRealmsPatch. */ export interface ProjectsLocationsRealmsPatchOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. */ requestId?: string; /** * Optional. Field mask is used to specify the fields to be overwritten in * the Realm resource by the update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsRealmsPatchOptions(data: any): ProjectsLocationsRealmsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsRealmsPatchOptions(data: any): ProjectsLocationsRealmsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * CloudNumberRegistry#projectsLocationsRegistryBooksCreate. */ export interface ProjectsLocationsRegistryBooksCreateOptions { /** * Required. The ID to use for the RegistryBook, which will become the final * segment of the resource name. */ registryBookId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsRegistryBooksDelete. */ export interface ProjectsLocationsRegistryBooksDeleteOptions { /** * Optional. If set to true, all associated resources will be deleted. */ force?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * CloudNumberRegistry#projectsLocationsRegistryBooksGet. */ export interface ProjectsLocationsRegistryBooksGetOptions { /** * Optional. The view of the RegistryBook to retrieve. */ view?: | "REGISTRY_BOOK_VIEW_UNSPECIFIED" | "BASIC" | "FULL" | "AGGREGATE"; } /** * Additional options for * CloudNumberRegistry#projectsLocationsRegistryBooksList. */ export interface ProjectsLocationsRegistryBooksListOptions { /** * Optional. Filter expression to filter the results. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; /** * Optional. The view of the RegistryBook to retrieve. */ view?: | "REGISTRY_BOOK_VIEW_UNSPECIFIED" | "BASIC" | "FULL" | "AGGREGATE"; } /** * Additional options for * CloudNumberRegistry#projectsLocationsRegistryBooksPatch. */ export interface ProjectsLocationsRegistryBooksPatchOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. Field mask is used to specify the fields to be overwritten in * the RegistryBook 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 will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsRegistryBooksPatchOptions(data: any): ProjectsLocationsRegistryBooksPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsRegistryBooksPatchOptions(data: any): ProjectsLocationsRegistryBooksPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Represents either a CustomRange or a DiscoveredRange. */ export interface Range { /** * A CustomRange. */ customRange?: CustomRange; /** * A DiscoveredRange. */ discoveredRange?: DiscoveredRange; /** * The utilization of the Range. */ utilization?: RangeUtilization; } /** * Utilization metrics for an IP Range, including consumed and produced address * counts. */ export interface RangeUtilization { /** * Output only. The total number of IP addresses consumed in the Range. */ readonly totalConsumed?: string; /** * Output only. The total number of IP addresses produced in the Range. */ readonly totalProduced?: string; /** * Output only. The usage of the Range as a percentage. This is marked as * optional so that we have presence tracking and API responses show 0.0 * instead of NULL. */ readonly usage?: number; } /** * A Realm represents a distinct network domain or security zone. It groups * Ranges that share the same traffic and management characteristics. All the * ranges in a Realm are routable to each other, meaning that they cannot * overlap. */ export interface Realm { /** * Output only. Aggregated data for the Realm. Populated only when the view * is AGGREGATE. */ readonly aggregatedData?: RealmAggregatedData; /** * Output only. The time at which the Realm was created. */ readonly createTime?: Date; /** * Output only. Discovery metadata of the Realm. */ readonly discoveryMetadata?: DiscoveryMetadata; /** * Optional. IP version of the Realm. */ ipVersion?: | "IP_VERSION_UNSPECIFIED" | "IPV4" | "IPV6"; /** * Optional. User-defined labels. */ labels?: { [key: string]: string }; /** * Required. Management type of the Realm. */ managementType?: | "MANAGEMENT_TYPE_UNSPECIFIED" | "CNR" | "USER"; /** * Required. Identifier. The resource name of the Realm. */ name?: string; /** * Required. Name of the RegistryBook that claims the Realm. */ registryBook?: string; /** * Required. Traffic type of the Realm. */ trafficType?: | "TRAFFIC_TYPE_UNSPECIFIED" | "UNSET" | "INTERNET" | "PRIVATE" | "LINKLOCAL"; /** * Output only. The time at which the Realm was last updated. */ readonly updateTime?: Date; } /** * Aggregated data for the Realm. */ export interface RealmAggregatedData { /** * Output only. Number of CustomRanges in the Realm. */ readonly customRangesCount?: number; /** * Output only. Number of DiscoveredRanges in the Realm. */ readonly discoveredRangesCount?: number; } /** * A RegistryBook organizes and manages IP address space. It claims specific * scopes (such as projects) and groups related Realms and Ranges. */ export interface RegistryBook { /** * Output only. Aggregated data for the RegistryBook. Populated only when the * view is AGGREGATE. */ readonly aggregatedData?: AggregatedData; /** * Optional. List of scopes claimed by the RegistryBook. In Preview, Only * project scope is supported. Each scope is in the format of * projects/{project}. Each scope can only be claimed once. */ claimedScopes?: string[]; /** * Output only. The time at which the RegistryBook was created. */ readonly createTime?: Date; /** * Output only. Whether the RegistryBook is the default one. */ readonly isDefault?: boolean; /** * Optional. User-defined labels. */ labels?: { [key: string]: string }; /** * Required. Identifier. The resource name of the RegistryBook. */ name?: string; /** * Output only. The time at which the RegistryBook was last updated. */ readonly updateTime?: Date; } /** * Request message for the CloudNumberRegistry.SearchIpResources method. */ export interface SearchIpResourcesRequest { /** * Optional. Hint for how to order the results. Supported sort fields are: - * `name`: Sort alphabetically by the resource name. - `create_time`: Sort by * the creation timestamp of the resource. - `update_time`: Sort by the last * update timestamp of the resource. Supported directions are `asc` * (ascending) and `desc` (descending). If unspecified, direction defaults to * `asc`. Only sorting by a single field is supported. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; /** * Optional. Search query. This string filters resources in an AIP-160-like * format. It has some limitations. You can only specify top level * conjunctions or attribute level negations. Each restriction can only be * used once except the attribute restriction. The available restrictions for * Ranges are: - `realm`: The Realm name to search in. - `ip_address`: The IP * address to search for within Ranges. - `ip_version`: The IP version to * filter by (e.g., "IPV4", "IPV6"). - `parent_range`: The parent Range of the * Range to search for. - `attribute_text`: The attribute text to search for * within Ranges. - `attribute`: The attribute key and value to filter by. The * available restrictions for Realms are: - `ip_version`: The IP version to * search for. - `management_type`: The management type of the Realm (e.g., * "CNR", "USER"). Only one of attribute_text or multiple attribute filters * can be specified. Examples: - `realm=test-realm` - `realm=test-realm AND * ip_address=10.0.0.0` - `realm=test-realm AND ip_version=IPV6` - * `realm=test-realm AND attribute_text=test` - `ip_address=10.0.0.0 AND * attribute:(key1=value1) AND attribute:(key2=value2)` - `attribute_text=test * AND * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range` * - `management_type=CNR` */ query?: string; /** * Optional. The type of resources to search for. If not specified, the * server will return Ranges. */ searchResourceTypes?: | "SEARCH_RESOURCE_TYPE_UNSPECIFIED" | "RANGES" | "REALMS"[]; /** * Optional. Whether to show the utilization of the Ranges in the response. */ showUtilization?: boolean; } /** * Response message for the CloudNumberRegistry.SearchIpResources method. */ export interface SearchIpResourcesResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Deprecated: Use results field instead. The list of Ranges matching the * search query. */ ranges?: Range[]; /** * The list of results matching the search query. */ results?: SearchIpResourcesResult[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * A result matching the search query, which can be either a Range or a Realm. */ export interface SearchIpResourcesResult { /** * A Range matching the search query. */ range?: Range; /** * A Realm matching the search query. */ realm?: Realm; } /** * Response message for the CloudNumberRegistry.ShowCustomRangeUtilization * method. */ export interface ShowCustomRangeUtilizationResponse { /** * The CustomRange resource. */ customRange?: CustomRange; /** * The utilization details of the CustomRange. */ rangeUtilization?: RangeUtilization; } /** * Response message for the CloudNumberRegistry.ShowDiscoveredRangeUtilization * method. */ export interface ShowDiscoveredRangeUtilizationResponse { /** * The DiscoveredRange resource. */ discoveredRange?: DiscoveredRange; /** * The utilization details of the DiscoveredRange. */ rangeUtilization?: RangeUtilization; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; }