// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * API hub API Client for Deno * =========================== * * * * Docs: https://cloud.google.com/apigee/docs/api-hub/what-is-api-hub * Source: https://googleapis.deno.dev/v1/apihub:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; export class APIhub { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://apihub.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Get an addon. * * @param name Required. The name of the addon to get. Format: `projects/{project}/locations/{location}/addons/{addon}`. */ async projectsLocationsAddonsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1Addon; } /** * List addons. * * @param parent Required. The parent resource where this addon will be created. Format: `projects/{project}/locations/{location}`. */ async projectsLocationsAddonsList(parent: string, opts: ProjectsLocationsAddonsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/addons`); 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 GoogleCloudApihubV1ListAddonsResponse; } /** * Manage addon config. This RPC is used for managing the config of the * addon. Calling this RPC moves the addon into an updating state until the * long-running operation succeeds. * * @param name Required. The name of the addon for which the config is to be managed. Format: `projects/{project}/locations/{location}/addons/{addon}`. */ async projectsLocationsAddonsManageConfig(name: string, req: GoogleCloudApihubV1ManageAddonConfigRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:manageConfig`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Provisions instance resources for the API Hub. * * @param parent Required. The parent resource for the Api Hub instance resource. Format: `projects/{project}/locations/{location}` */ async projectsLocationsApiHubInstancesCreate(parent: string, req: GoogleCloudApihubV1ApiHubInstance, opts: ProjectsLocationsApiHubInstancesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/apiHubInstances`); if (opts.apiHubInstanceId !== undefined) { url.searchParams.append("apiHubInstanceId", String(opts.apiHubInstanceId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes the API hub instance. Deleting the API hub instance will also * result in the removal of all associated runtime project attachments and the * host project registration. * * @param name Required. The name of the Api Hub instance to delete. Format: `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`. */ async projectsLocationsApiHubInstancesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets details of a single API Hub instance. * * @param name Required. The name of the Api Hub instance to retrieve. Format: `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`. */ async projectsLocationsApiHubInstancesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1ApiHubInstance; } /** * Looks up an Api Hub instance in a given Google Cloud project. There will * always be only one Api Hub instance for a Google Cloud project across all * locations. * * @param parent Required. There will always be only one Api Hub instance for a Google Cloud project across all locations. The parent resource for the Api Hub instance resource. Format: `projects/{project}/locations/{location}` */ async projectsLocationsApiHubInstancesLookup(parent: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/apiHubInstances:lookup`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1LookupApiHubInstanceResponse; } /** * Create an API resource in the API hub. Once an API resource is created, * versions can be added to it. * * @param parent Required. The parent resource for the API resource. Format: `projects/{project}/locations/{location}` */ async projectsLocationsApisCreate(parent: string, req: GoogleCloudApihubV1Api, opts: ProjectsLocationsApisCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/apis`); if (opts.apiId !== undefined) { url.searchParams.append("apiId", String(opts.apiId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1Api; } /** * Delete an API resource in the API hub. API can only be deleted if all * underlying versions are deleted. * * @param name Required. The name of the API resource to delete. Format: `projects/{project}/locations/{location}/apis/{api}` */ async projectsLocationsApisDelete(name: string, opts: ProjectsLocationsApisDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Get API resource details including the API versions contained in it. * * @param name Required. The name of the API resource to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}` */ async projectsLocationsApisGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1Api; } /** * List API resources in the API hub. * * @param parent Required. The parent, which owns this collection of API resources. Format: `projects/{project}/locations/{location}` */ async projectsLocationsApisList(parent: string, opts: ProjectsLocationsApisListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/apis`); 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 GoogleCloudApihubV1ListApisResponse; } /** * Update an API resource in the API hub. The following fields in the API can * be updated: * display_name * description * owner * documentation * * target_user * team * business_unit * maturity_level * api_style * * attributes * fingerprint The update_mask should be used to specify the * fields being updated. Updating the owner field requires complete owner * message and updates both owner and email fields. * * @param name Identifier. The name of the API resource in the API Hub. Format: `projects/{project}/locations/{location}/apis/{api}` */ async projectsLocationsApisPatch(name: string, req: GoogleCloudApihubV1Api, opts: ProjectsLocationsApisPatchOptions = {}): Promise { opts = serializeProjectsLocationsApisPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 GoogleCloudApihubV1Api; } /** * Create an API version for an API resource in the API hub. * * @param parent Required. The parent resource for API version. Format: `projects/{project}/locations/{location}/apis/{api}` */ async projectsLocationsApisVersionsCreate(parent: string, req: GoogleCloudApihubV1Version, opts: ProjectsLocationsApisVersionsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/versions`); if (opts.versionId !== undefined) { url.searchParams.append("versionId", String(opts.versionId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1Version; } /** * Get details about a definition in an API version. * * @param name Required. The name of the definition to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}` */ async projectsLocationsApisVersionsDefinitionsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1Definition; } /** * Delete an API version. Version can only be deleted if all underlying * specs, operations, definitions and linked deployments are deleted. * * @param name Required. The name of the version to delete. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ async projectsLocationsApisVersionsDelete(name: string, opts: ProjectsLocationsApisVersionsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Get details about the API version of an API resource. This will include * information about the specs and operations present in the API version as * well as the deployments linked to it. * * @param name Required. The name of the API version to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ async projectsLocationsApisVersionsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1Version; } /** * List API versions of an API resource in the API hub. * * @param parent Required. The parent which owns this collection of API versions i.e., the API resource Format: `projects/{project}/locations/{location}/apis/{api}` */ async projectsLocationsApisVersionsList(parent: string, opts: ProjectsLocationsApisVersionsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/versions`); 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 GoogleCloudApihubV1ListVersionsResponse; } /** * Create an apiOperation in an API version. An apiOperation can be created * only if the version has no apiOperations which were created by parsing a * spec. * * @param parent Required. The parent resource for the operation resource. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ async projectsLocationsApisVersionsOperationsCreate(parent: string, req: GoogleCloudApihubV1ApiOperation, opts: ProjectsLocationsApisVersionsOperationsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/operations`); if (opts.apiOperationId !== undefined) { url.searchParams.append("apiOperationId", String(opts.apiOperationId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1ApiOperation; } /** * Delete an operation in an API version and we can delete only the * operations created via create API. If the operation was created by parsing * the spec, then it can be deleted by editing or deleting the spec. * * @param name Required. The name of the operation resource to delete. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` */ async projectsLocationsApisVersionsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Get details about a particular operation in API version. * * @param name Required. The name of the operation to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` */ async projectsLocationsApisVersionsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1ApiOperation; } /** * List operations in an API version. * * @param parent Required. The parent which owns this collection of operations i.e., the API version. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ async projectsLocationsApisVersionsOperationsList(parent: string, opts: ProjectsLocationsApisVersionsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1ListApiOperationsResponse; } /** * Update an operation in an API version. The following fields in the * ApiOperation resource can be updated: * details.description * * details.documentation * details.http_operation.path * * details.http_operation.method * details.deprecated * attributes * * details.mcp_tool.title * details.mcp_tool.description * * details.mcp_tool.input_schema * details.mcp_tool.output_schema * * details.input_schema * details.output_schema * * details.mcp_tool.annotations.title * * details.mcp_tool.annotations.read_only_hint * * details.mcp_tool.annotations.destructive_hint * * details.mcp_tool.annotations.idempotent_hint * * details.mcp_tool.annotations.open_world_hint * * details.mcp_tool.annotations.additional_hints The update_mask should be * used to specify the fields being updated. An operation can be updated only * if the operation was created via CreateApiOperation API. If the operation * was created by parsing the spec, then it can be edited by updating the * spec. * * @param name Identifier. The name of the operation. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` */ async projectsLocationsApisVersionsOperationsPatch(name: string, req: GoogleCloudApihubV1ApiOperation, opts: ProjectsLocationsApisVersionsOperationsPatchOptions = {}): Promise { opts = serializeProjectsLocationsApisVersionsOperationsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 GoogleCloudApihubV1ApiOperation; } /** * Update API version. The following fields in the version can be updated * currently: * display_name * description * documentation * deployments * * lifecycle * compliance * accreditation * attributes The update_mask should * be used to specify the fields being updated. * * @param name Identifier. The name of the version. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ async projectsLocationsApisVersionsPatch(name: string, req: GoogleCloudApihubV1Version, opts: ProjectsLocationsApisVersionsPatchOptions = {}): Promise { opts = serializeProjectsLocationsApisVersionsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 GoogleCloudApihubV1Version; } /** * Add a spec to an API version in the API hub. Multiple specs can be added * to an API version. Note, while adding a spec, at least one of `contents` or * `source_uri` must be provided. If `contents` is provided, then `spec_type` * must also be provided. On adding a spec with contents to the version, the * operations present in it will be added to the version.Note that the file * contents in the spec should be of the same type as defined in the * `projects/{project}/locations/{location}/attributes/system-spec-type` * attribute associated with spec resource. Note that specs of various types * can be uploaded, however parsing of details is supported for OpenAPI spec * currently. In order to access the information parsed from the spec, use the * GetSpec method. In order to access the raw contents for a particular spec, * use the GetSpecContents method. In order to access the operations parsed * from the spec, use the ListAPIOperations method. * * @param parent Required. The parent resource for Spec. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ async projectsLocationsApisVersionsSpecsCreate(parent: string, req: GoogleCloudApihubV1Spec, opts: ProjectsLocationsApisVersionsSpecsCreateOptions = {}): Promise { req = serializeGoogleCloudApihubV1Spec(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/specs`); if (opts.specId !== undefined) { url.searchParams.append("specId", String(opts.specId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudApihubV1Spec(data); } /** * Delete a spec. Deleting a spec will also delete the associated operations * from the version. * * @param name Required. The name of the spec to delete. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` */ async projectsLocationsApisVersionsSpecsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Fetch additional spec content. * * @param name Required. The name of the spec whose contents need to be retrieved. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` */ async projectsLocationsApisVersionsSpecsFetchAdditionalSpecContent(name: string, opts: ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:fetchAdditionalSpecContent`); if (opts.specContentType !== undefined) { url.searchParams.append("specContentType", String(opts.specContentType)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudApihubV1FetchAdditionalSpecContentResponse(data); } /** * Get details about the information parsed from a spec. Note that this * method does not return the raw spec contents. Use GetSpecContents method to * retrieve the same. * * @param name Required. The name of the spec to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` */ async projectsLocationsApisVersionsSpecsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudApihubV1Spec(data); } /** * Get spec contents. * * @param name Required. The name of the spec whose contents need to be retrieved. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` */ async projectsLocationsApisVersionsSpecsGetContents(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:contents`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudApihubV1SpecContents(data); } /** * Lints the requested spec and updates the corresponding API Spec with the * lint response. This lint response will be available in all subsequent Get * and List Spec calls to Core service. * * @param name Required. The name of the spec to be linted. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` */ async projectsLocationsApisVersionsSpecsLint(name: string, req: GoogleCloudApihubV1LintSpecRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:lint`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Empty; } /** * List specs corresponding to a particular API resource. * * @param parent Required. The parent, which owns this collection of specs. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ async projectsLocationsApisVersionsSpecsList(parent: string, opts: ProjectsLocationsApisVersionsSpecsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/specs`); 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 deserializeGoogleCloudApihubV1ListSpecsResponse(data); } /** * Update spec. The following fields in the spec can be updated: * * display_name * source_uri * lint_response * attributes * contents * * spec_type In case of an OAS spec, updating spec contents can lead to: 1. * Creation, deletion and update of operations. 2. Creation, deletion and * update of definitions. 3. Update of other info parsed out from the new * spec. In case of contents or source_uri being present in update mask, * spec_type must also be present. Also, spec_type can not be present in * update mask if contents or source_uri is not present. The update_mask * should be used to specify the fields being updated. * * @param name Identifier. The name of the spec. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` */ async projectsLocationsApisVersionsSpecsPatch(name: string, req: GoogleCloudApihubV1Spec, opts: ProjectsLocationsApisVersionsSpecsPatchOptions = {}): Promise { req = serializeGoogleCloudApihubV1Spec(req); opts = serializeProjectsLocationsApisVersionsSpecsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 deserializeGoogleCloudApihubV1Spec(data); } /** * Create a user defined attribute. Certain pre defined attributes are * already created by the API hub. These attributes will have type as * `SYSTEM_DEFINED` and can be listed via ListAttributes method. Allowed * values for the same can be updated via UpdateAttribute method. * * @param parent Required. The parent resource for Attribute. Format: `projects/{project}/locations/{location}` */ async projectsLocationsAttributesCreate(parent: string, req: GoogleCloudApihubV1Attribute, opts: ProjectsLocationsAttributesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/attributes`); if (opts.attributeId !== undefined) { url.searchParams.append("attributeId", String(opts.attributeId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1Attribute; } /** * Delete an attribute. Note: System defined attributes cannot be deleted. * All associations of the attribute being deleted with any API hub resource * will also get deleted. * * @param name Required. The name of the attribute to delete. Format: `projects/{project}/locations/{location}/attributes/{attribute}` */ async projectsLocationsAttributesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Get details about the attribute. * * @param name Required. The name of the attribute to retrieve. Format: `projects/{project}/locations/{location}/attributes/{attribute}` */ async projectsLocationsAttributesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1Attribute; } /** * List all attributes. * * @param parent Required. The parent resource for Attribute. Format: `projects/{project}/locations/{location}` */ async projectsLocationsAttributesList(parent: string, opts: ProjectsLocationsAttributesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/attributes`); 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 GoogleCloudApihubV1ListAttributesResponse; } /** * Update the attribute. The following fields in the Attribute resource can * be updated: * display_name The display name can be updated for user defined * attributes only. * description The description can be updated for user * defined attributes only. * allowed_values To update the list of allowed * values, clients need to use the fetched list of allowed values and add or * remove values to or from the same list. The mutable allowed values can be * updated for both user defined and System defined attributes. The immutable * allowed values cannot be updated or deleted. The updated list of allowed * values cannot be empty. If an allowed value that is already used by some * resource's attribute is deleted, then the association between the resource * and the attribute value will also be deleted. * cardinality The cardinality * can be updated for user defined attributes only. Cardinality can only be * increased during an update. The update_mask should be used to specify the * fields being updated. * * @param name Identifier. The name of the attribute in the API Hub. Format: `projects/{project}/locations/{location}/attributes/{attribute}` */ async projectsLocationsAttributesPatch(name: string, req: GoogleCloudApihubV1Attribute, opts: ProjectsLocationsAttributesPatchOptions = {}): Promise { opts = serializeProjectsLocationsAttributesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 GoogleCloudApihubV1Attribute; } /** * Collect API data from a source and push it to Hub's collect layer. * * @param location Required. The regional location of the API hub instance and its resources. Format: `projects/{project}/locations/{location}` */ async projectsLocationsCollectApiData(location: string, req: GoogleCloudApihubV1CollectApiDataRequest): Promise { req = serializeGoogleCloudApihubV1CollectApiDataRequest(req); const url = new URL(`${this.#baseUrl}v1/${ location }:collectApiData`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Create a curation resource in the API hub. Once a curation resource is * created, plugin instances can start using it. * * @param parent Required. The parent resource for the curation resource. Format: `projects/{project}/locations/{location}` */ async projectsLocationsCurationsCreate(parent: string, req: GoogleCloudApihubV1Curation, opts: ProjectsLocationsCurationsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/curations`); if (opts.curationId !== undefined) { url.searchParams.append("curationId", String(opts.curationId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1Curation; } /** * Delete a curation resource in the API hub. A curation can only be deleted * if it's not being used by any plugin instance. * * @param name Required. The name of the curation resource to delete. Format: `projects/{project}/locations/{location}/curations/{curation}` */ async projectsLocationsCurationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Get curation resource details. * * @param name Required. The name of the curation resource to retrieve. Format: `projects/{project}/locations/{location}/curations/{curation}` */ async projectsLocationsCurationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1Curation; } /** * List curation resources in the API hub. * * @param parent Required. The parent, which owns this collection of curation resources. Format: `projects/{project}/locations/{location}` */ async projectsLocationsCurationsList(parent: string, opts: ProjectsLocationsCurationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/curations`); 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 GoogleCloudApihubV1ListCurationsResponse; } /** * Update a curation resource in the API hub. The following fields in the * curation can be updated: * display_name * description The update_mask * should be used to specify the fields being updated. * * @param name Identifier. The name of the curation. Format: `projects/{project}/locations/{location}/curations/{curation}` */ async projectsLocationsCurationsPatch(name: string, req: GoogleCloudApihubV1Curation, opts: ProjectsLocationsCurationsPatchOptions = {}): Promise { opts = serializeProjectsLocationsCurationsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 GoogleCloudApihubV1Curation; } /** * Create a dependency between two entities in the API hub. * * @param parent Required. The parent resource for the dependency resource. Format: `projects/{project}/locations/{location}` */ async projectsLocationsDependenciesCreate(parent: string, req: GoogleCloudApihubV1Dependency, opts: ProjectsLocationsDependenciesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/dependencies`); if (opts.dependencyId !== undefined) { url.searchParams.append("dependencyId", String(opts.dependencyId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1Dependency; } /** * Delete the dependency resource. * * @param name Required. The name of the dependency resource to delete. Format: `projects/{project}/locations/{location}/dependencies/{dependency}` */ async projectsLocationsDependenciesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Get details about a dependency resource in the API hub. * * @param name Required. The name of the dependency resource to retrieve. Format: `projects/{project}/locations/{location}/dependencies/{dependency}` */ async projectsLocationsDependenciesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1Dependency; } /** * List dependencies based on the provided filter and pagination parameters. * * @param parent Required. The parent which owns this collection of dependency resources. Format: `projects/{project}/locations/{location}` */ async projectsLocationsDependenciesList(parent: string, opts: ProjectsLocationsDependenciesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/dependencies`); 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 GoogleCloudApihubV1ListDependenciesResponse; } /** * Update a dependency based on the update_mask provided in the request. The * following fields in the dependency can be updated: * description * * @param name Identifier. The name of the dependency in the API Hub. Format: `projects/{project}/locations/{location}/dependencies/{dependency}` */ async projectsLocationsDependenciesPatch(name: string, req: GoogleCloudApihubV1Dependency, opts: ProjectsLocationsDependenciesPatchOptions = {}): Promise { opts = serializeProjectsLocationsDependenciesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 GoogleCloudApihubV1Dependency; } /** * Create a deployment resource in the API hub. Once a deployment resource is * created, it can be associated with API versions. * * @param parent Required. The parent resource for the deployment resource. Format: `projects/{project}/locations/{location}` */ async projectsLocationsDeploymentsCreate(parent: string, req: GoogleCloudApihubV1Deployment, opts: ProjectsLocationsDeploymentsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/deployments`); if (opts.deploymentId !== undefined) { url.searchParams.append("deploymentId", String(opts.deploymentId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1Deployment; } /** * Delete a deployment resource in the API hub. * * @param name Required. The name of the deployment resource to delete. Format: `projects/{project}/locations/{location}/deployments/{deployment}` */ async projectsLocationsDeploymentsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Get details about a deployment and the API versions linked to it. * * @param name Required. The name of the deployment resource to retrieve. Format: `projects/{project}/locations/{location}/deployments/{deployment}` */ async projectsLocationsDeploymentsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1Deployment; } /** * List deployment resources in the API hub. * * @param parent Required. The parent, which owns this collection of deployment resources. Format: `projects/{project}/locations/{location}` */ async projectsLocationsDeploymentsList(parent: string, opts: ProjectsLocationsDeploymentsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/deployments`); 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 GoogleCloudApihubV1ListDeploymentsResponse; } /** * Update a deployment resource in the API hub. The following fields in the * deployment resource can be updated: * display_name * description * * documentation * deployment_type * resource_uri * endpoints * slo * * environment * attributes * source_project * source_environment * * management_url * source_uri The update_mask should be used to specify the * fields being updated. * * @param name Identifier. The name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}` */ async projectsLocationsDeploymentsPatch(name: string, req: GoogleCloudApihubV1Deployment, opts: ProjectsLocationsDeploymentsPatchOptions = {}): Promise { opts = serializeProjectsLocationsDeploymentsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 GoogleCloudApihubV1Deployment; } /** * Gets a DiscoveredAPIOperation in a given project, location, ApiObservation * and ApiOperation. * * @param name Required. The name of the DiscoveredApiOperation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation} */ async projectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudApihubV1DiscoveredApiOperation(data); } /** * Lists all the DiscoveredAPIOperations in a given project, location and * ApiObservation. * * @param parent Required. The parent, which owns this collection of DiscoveredApiOperations. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} */ async projectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsList(parent: string, opts: ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/discoveredApiOperations`); 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 deserializeGoogleCloudApihubV1ListDiscoveredApiOperationsResponse(data); } /** * Gets a DiscoveredAPIObservation in a given project, location and * ApiObservation. * * @param name Required. The name of the DiscoveredApiObservation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} */ async projectsLocationsDiscoveredApiObservationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudApihubV1DiscoveredApiObservation(data); } /** * Lists all the DiscoveredAPIObservations in a given project and location. * * @param parent Required. The parent, which owns this collection of ApiObservations. Format: projects/{project}/locations/{location} */ async projectsLocationsDiscoveredApiObservationsList(parent: string, opts: ProjectsLocationsDiscoveredApiObservationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/discoveredApiObservations`); 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 deserializeGoogleCloudApihubV1ListDiscoveredApiObservationsResponse(data); } /** * Create an External API resource in the API hub. * * @param parent Required. The parent resource for the External API resource. Format: `projects/{project}/locations/{location}` */ async projectsLocationsExternalApisCreate(parent: string, req: GoogleCloudApihubV1ExternalApi, opts: ProjectsLocationsExternalApisCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/externalApis`); if (opts.externalApiId !== undefined) { url.searchParams.append("externalApiId", String(opts.externalApiId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1ExternalApi; } /** * Delete an External API resource in the API hub. * * @param name Required. The name of the External API resource to delete. Format: `projects/{project}/locations/{location}/externalApis/{externalApi}` */ async projectsLocationsExternalApisDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Get details about an External API resource in the API hub. * * @param name Required. The name of the External API resource to retrieve. Format: `projects/{project}/locations/{location}/externalApis/{externalApi}` */ async projectsLocationsExternalApisGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1ExternalApi; } /** * List External API resources in the API hub. * * @param parent Required. The parent, which owns this collection of External API resources. Format: `projects/{project}/locations/{location}` */ async projectsLocationsExternalApisList(parent: string, opts: ProjectsLocationsExternalApisListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/externalApis`); 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 GoogleCloudApihubV1ListExternalApisResponse; } /** * Update an External API resource in the API hub. The following fields can * be updated: * display_name * description * documentation * endpoints * * paths The update_mask should be used to specify the fields being updated. * * @param name Identifier. Format: `projects/{project}/locations/{location}/externalApi/{externalApi}`. */ async projectsLocationsExternalApisPatch(name: string, req: GoogleCloudApihubV1ExternalApi, opts: ProjectsLocationsExternalApisPatchOptions = {}): Promise { opts = serializeProjectsLocationsExternalApisPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 GoogleCloudApihubV1ExternalApi; } /** * Gets information about a location. * * @param name Resource name for the location. */ async projectsLocationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudLocationLocation; } /** * Create a host project registration. A Google cloud project can be * registered as a host project if it is not attached as a runtime project to * another host project. A project can be registered as a host project only * once. Subsequent register calls for the same project will fail. * * @param parent Required. The parent resource for the host project. Format: `projects/{project}/locations/{location}` */ async projectsLocationsHostProjectRegistrationsCreate(parent: string, req: GoogleCloudApihubV1HostProjectRegistration, opts: ProjectsLocationsHostProjectRegistrationsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/hostProjectRegistrations`); if (opts.hostProjectRegistrationId !== undefined) { url.searchParams.append("hostProjectRegistrationId", String(opts.hostProjectRegistrationId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1HostProjectRegistration; } /** * Get a host project registration. * * @param name Required. Host project registration resource name. projects/{project}/locations/{location}/hostProjectRegistrations/{host_project_registration_id} */ async projectsLocationsHostProjectRegistrationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1HostProjectRegistration; } /** * Lists host project registrations. * * @param parent Required. The parent, which owns this collection of host projects. Format: `projects/*/locations/*` */ async projectsLocationsHostProjectRegistrationsList(parent: string, opts: ProjectsLocationsHostProjectRegistrationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/hostProjectRegistrations`); 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 GoogleCloudApihubV1ListHostProjectRegistrationsResponse; } /** * 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}v1/${ 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 GoogleCloudLocationListLocationsResponse; } /** * Look up a runtime project attachment. This API can be called in the * context of any project. * * @param name Required. Runtime project ID to look up runtime project attachment for. Lookup happens across all regions. Expected format: `projects/{project}/locations/{location}`. */ async projectsLocationsLookupRuntimeProjectAttachment(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:lookupRuntimeProjectAttachment`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse; } /** * 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: GoogleLongrunningCancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Empty; } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param name The name of the operation resource to be deleted. */ async projectsLocationsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } 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 GoogleLongrunningListOperationsResponse; } /** * Create an API Hub plugin resource in the API hub. Once a plugin is * created, it can be used to create plugin instances. * * @param parent Required. The parent resource where this plugin will be created. Format: `projects/{project}/locations/{location}`. */ async projectsLocationsPluginsCreate(parent: string, req: GoogleCloudApihubV1Plugin, opts: ProjectsLocationsPluginsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/plugins`); if (opts.pluginId !== undefined) { url.searchParams.append("pluginId", String(opts.pluginId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1Plugin; } /** * Delete a Plugin in API hub. Note, only user owned plugins can be deleted * via this method. * * @param name Required. The name of the Plugin resource to delete. Format: `projects/{project}/locations/{location}/plugins/{plugin}` */ async projectsLocationsPluginsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Disables a plugin. The `state` of the plugin after disabling is `DISABLED` * * @param name Required. The name of the plugin to disable. Format: `projects/{project}/locations/{location}/plugins/{plugin}`. */ async projectsLocationsPluginsDisable(name: string, req: GoogleCloudApihubV1DisablePluginRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:disable`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1Plugin; } /** * Enables a plugin. The `state` of the plugin after enabling is `ENABLED` * * @param name Required. The name of the plugin to enable. Format: `projects/{project}/locations/{location}/plugins/{plugin}`. */ async projectsLocationsPluginsEnable(name: string, req: GoogleCloudApihubV1EnablePluginRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:enable`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1Plugin; } /** * Get an API Hub plugin. * * @param name Required. The name of the plugin to retrieve. Format: `projects/{project}/locations/{location}/plugins/{plugin}`. */ async projectsLocationsPluginsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1Plugin; } /** * Get the style guide being used for linting. * * @param name Required. The name of the spec to retrieve. Format: `projects/{project}/locations/{location}/plugins/{plugin}/styleGuide`. */ async projectsLocationsPluginsGetStyleGuide(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudApihubV1StyleGuide(data); } /** * Creates a Plugin instance in the API hub. * * @param parent Required. The parent of the plugin instance resource. Format: `projects/{project}/locations/{location}/plugins/{plugin}` */ async projectsLocationsPluginsInstancesCreate(parent: string, req: GoogleCloudApihubV1PluginInstance, opts: ProjectsLocationsPluginsInstancesCreateOptions = {}): Promise { req = serializeGoogleCloudApihubV1PluginInstance(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/instances`); if (opts.pluginInstanceId !== undefined) { url.searchParams.append("pluginInstanceId", String(opts.pluginInstanceId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes a plugin instance in the API hub. * * @param name Required. The name of the plugin instance to delete. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`. */ async projectsLocationsPluginsInstancesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Disables a plugin instance in the API hub. * * @param name Required. The name of the plugin instance to disable. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` */ async projectsLocationsPluginsInstancesDisableAction(name: string, req: GoogleCloudApihubV1DisablePluginInstanceActionRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:disableAction`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Enables a plugin instance in the API hub. * * @param name Required. The name of the plugin instance to enable. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` */ async projectsLocationsPluginsInstancesEnableAction(name: string, req: GoogleCloudApihubV1EnablePluginInstanceActionRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:enableAction`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Executes a plugin instance in the API hub. * * @param name Required. The name of the plugin instance to execute. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` */ async projectsLocationsPluginsInstancesExecuteAction(name: string, req: GoogleCloudApihubV1ExecutePluginInstanceActionRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:executeAction`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Get an API Hub plugin instance. * * @param name Required. The name of the plugin instance to retrieve. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` */ async projectsLocationsPluginsInstancesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudApihubV1PluginInstance(data); } /** * List all the plugins in a given project and location. `-` can be used as * wildcard value for {plugin_id} * * @param parent Required. The parent resource where this plugin will be created. Format: `projects/{project}/locations/{location}/plugins/{plugin}`. To list plugin instances for multiple plugins, use the - character instead of the plugin ID. */ async projectsLocationsPluginsInstancesList(parent: string, opts: ProjectsLocationsPluginsInstancesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/instances`); 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 deserializeGoogleCloudApihubV1ListPluginInstancesResponse(data); } /** * Manages data for a given plugin instance. * * @param name Required. The name of the plugin instance for which data needs to be managed. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` */ async projectsLocationsPluginsInstancesManageSourceData(name: string, req: GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest): Promise { req = serializeGoogleCloudApihubV1ManagePluginInstanceSourceDataRequest(req); const url = new URL(`${this.#baseUrl}v1/${ name }:manageSourceData`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1ManagePluginInstanceSourceDataResponse; } /** * Updates a plugin instance in the API hub. The following fields in the * plugin_instance can be updated currently: * display_name * * schedule_cron_expression The update_mask should be used to specify the * fields being updated. To update the auth_config and additional_config of * the plugin instance, use the ApplyPluginInstanceConfig method. * * @param name Identifier. The unique name of the plugin instance resource. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` */ async projectsLocationsPluginsInstancesPatch(name: string, req: GoogleCloudApihubV1PluginInstance, opts: ProjectsLocationsPluginsInstancesPatchOptions = {}): Promise { req = serializeGoogleCloudApihubV1PluginInstance(req); opts = serializeProjectsLocationsPluginsInstancesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 deserializeGoogleCloudApihubV1PluginInstance(data); } /** * List all the plugins in a given project and location. * * @param parent Required. The parent resource where this plugin will be created. Format: `projects/{project}/locations/{location}`. */ async projectsLocationsPluginsList(parent: string, opts: ProjectsLocationsPluginsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/plugins`); 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 GoogleCloudApihubV1ListPluginsResponse; } /** * Get the contents of the style guide. * * @param name Required. The name of the StyleGuide whose contents need to be retrieved. There is exactly one style guide resource per project per location. The expected format is `projects/{project}/locations/{location}/plugins/{plugin}/styleGuide`. */ async projectsLocationsPluginsStyleGuideGetContents(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:contents`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudApihubV1StyleGuideContents(data); } /** * Update the styleGuide to be used for liniting in by API hub. * * @param name Identifier. The name of the style guide. Format: `projects/{project}/locations/{location}/plugins/{plugin}/styleGuide` */ async projectsLocationsPluginsUpdateStyleGuide(name: string, req: GoogleCloudApihubV1StyleGuide, opts: ProjectsLocationsPluginsUpdateStyleGuideOptions = {}): Promise { req = serializeGoogleCloudApihubV1StyleGuide(req); opts = serializeProjectsLocationsPluginsUpdateStyleGuideOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); 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 deserializeGoogleCloudApihubV1StyleGuide(data); } /** * Retrieve API views. * * @param parent Required. The parent resource name. Format: `projects/{project}/locations/{location}`. */ async projectsLocationsRetrieveApiViews(parent: string, opts: ProjectsLocationsRetrieveApiViewsOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }:retrieveApiViews`); 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.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1RetrieveApiViewsResponse; } /** * Attaches a runtime project to the host project. * * @param parent Required. The parent resource for the Runtime Project Attachment. Format: `projects/{project}/locations/{location}` */ async projectsLocationsRuntimeProjectAttachmentsCreate(parent: string, req: GoogleCloudApihubV1RuntimeProjectAttachment, opts: ProjectsLocationsRuntimeProjectAttachmentsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/runtimeProjectAttachments`); if (opts.runtimeProjectAttachmentId !== undefined) { url.searchParams.append("runtimeProjectAttachmentId", String(opts.runtimeProjectAttachmentId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudApihubV1RuntimeProjectAttachment; } /** * Delete a runtime project attachment in the API Hub. This call will detach * the runtime project from the host project. * * @param name Required. The name of the Runtime Project Attachment to delete. Format: `projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}` */ async projectsLocationsRuntimeProjectAttachmentsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a runtime project attachment. * * @param name Required. The name of the API resource to retrieve. Format: `projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}` */ async projectsLocationsRuntimeProjectAttachmentsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudApihubV1RuntimeProjectAttachment; } /** * List runtime projects attached to the host project. * * @param parent Required. The parent, which owns this collection of runtime project attachments. Format: `projects/{project}/locations/{location}` */ async projectsLocationsRuntimeProjectAttachmentsList(parent: string, opts: ProjectsLocationsRuntimeProjectAttachmentsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/runtimeProjectAttachments`); 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 GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse; } /** * Search across API-Hub resources. * * @param location Required. The resource name of the location which will be of the type `projects/{project_id}/locations/{location_id}`. This field is used to identify the instance of API-Hub in which resources should be searched. */ async projectsLocationsSearchResources(location: string, req: GoogleCloudApihubV1SearchResourcesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ location }:searchResources`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudApihubV1SearchResourcesResponse(data); } } /** * 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 details for the action to execute. */ export interface GoogleCloudApihubV1ActionExecutionDetail { /** * Required. The action id of the plugin to execute. */ actionId?: string; } /** * The additional spec content for the spec. This contains the metadata and the * last update time for the additional spec content. */ export interface GoogleCloudApihubV1AdditionalSpecContent { /** * Output only. The time at which the spec content was created. */ readonly createTime?: Date; /** * Optional. The labels of the spec content e.g. specboost addon version. */ labels?: { [key: string]: string }; /** * Optional. The additional spec contents. */ specContents?: GoogleCloudApihubV1SpecContents; /** * Required. The type of the spec content. */ specContentType?: | "SPEC_CONTENT_TYPE_UNSPECIFIED" | "BOOSTED_SPEC_CONTENT" | "GATEWAY_OPEN_API_SPEC"; /** * Output only. The time at which the spec content was last updated. */ readonly updateTime?: Date; } function serializeGoogleCloudApihubV1AdditionalSpecContent(data: any): GoogleCloudApihubV1AdditionalSpecContent { return { ...data, specContents: data["specContents"] !== undefined ? serializeGoogleCloudApihubV1SpecContents(data["specContents"]) : undefined, }; } function deserializeGoogleCloudApihubV1AdditionalSpecContent(data: any): GoogleCloudApihubV1AdditionalSpecContent { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, specContents: data["specContents"] !== undefined ? deserializeGoogleCloudApihubV1SpecContents(data["specContents"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Addon resource. */ export interface GoogleCloudApihubV1Addon { /** * Required. The configuration of the addon. */ config?: GoogleCloudApihubV1AddonConfig; /** * Output only. The time at which the addon was created. */ readonly createTime?: Date; /** * Required. The data source on which the addon operates. This determines * which field in the `config` oneof is used. */ dataSource?: | "DATA_SOURCE_UNSPECIFIED" | "PLUGIN_INSTANCE" | "ALL_DATA"; /** * Optional. The description of the addon. */ description?: string; /** * Required. The display name of the addon. */ displayName?: string; /** * Identifier. The name of the addon to enable. Format: * `projects/{project}/locations/{location}/addons/{addon}`. */ name?: string; /** * Output only. The state of the addon. */ readonly state?: | "ADDON_STATE_UNSPECIFIED" | "ACTIVE" | "UPDATING" | "ERROR" | "INACTIVE"; /** * Output only. The time at which the addon was last updated. */ readonly updateTime?: Date; } /** * Configuration for the addon. */ export interface GoogleCloudApihubV1AddonConfig { /** * Configuration for addons which act on all data in the API hub. */ allDataAddonConfig?: GoogleCloudApihubV1AllDataAddonConfig; /** * Configuration for gateway plugin addons. */ gatewayPluginAddonConfig?: GoogleCloudApihubV1GatewayPluginAddonConfig; } /** * Configuration for addons which act on all data in the API hub. This is used * to specify if the addon is enabled for all data in the API hub. */ export interface GoogleCloudApihubV1AllDataAddonConfig { /** * Required. If true, the addon is enabled for all data in the API hub. */ enabled?: boolean; } /** * The value that can be assigned to the attribute when the data type is enum. */ export interface GoogleCloudApihubV1AllowedValue { /** * Optional. The detailed description of the allowed value. */ description?: string; /** * Required. The display name of the allowed value. */ displayName?: string; /** * Required. The ID of the allowed value. * If provided, the same will be * used. The service will throw an error if the specified id is already used * by another allowed value in the same attribute resource. * If not provided, * a system generated id derived from the display name will be used. In this * case, the service will handle conflict resolution by adding a system * generated suffix in case of duplicates. This value should be 4-63 * characters, and valid characters are /a-z-/. */ id?: string; /** * Optional. When set to true, the allowed value cannot be updated or deleted * by the user. It can only be true for System defined attributes. */ immutable?: boolean; } /** * An API resource in the API Hub. */ export interface GoogleCloudApihubV1Api { /** * Optional. The api functional requirements associated with the API * resource. Carinality is 1 for this attribute. This maps to the following * system defined attribute: * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements` * attribute. The value of the attribute should be a proper URI, and in case * of Cloud Storage URI, it should point to a Cloud Storage object, not a * directory. */ apiFunctionalRequirements?: GoogleCloudApihubV1AttributeValues; /** * Optional. The api requirement doc associated with the API resource. * Carinality is 1 for this attribute. This maps to the following system * defined attribute: * `projects/{project}/locations/{location}/attributes/system-api-requirements` * attribute. The value of the attribute should be a proper URI, and in case * of Cloud Storage URI, it should point to a Cloud Storage object, not a * directory. */ apiRequirements?: GoogleCloudApihubV1AttributeValues; /** * Optional. The style of the API. This maps to the following system defined * attribute: * `projects/{project}/locations/{location}/attributes/system-api-style` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. All values should be from the list of allowed values defined for the * attribute. */ apiStyle?: GoogleCloudApihubV1AttributeValues; /** * Optional. The api technical requirements associated with the API resource. * Carinality is 1 for this attribute. This maps to the following system * defined attribute: * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements` * attribute. The value of the attribute should be a proper URI, and in case * of Cloud Storage URI, it should point to a Cloud Storage object, not a * directory. */ apiTechnicalRequirements?: GoogleCloudApihubV1AttributeValues; /** * Optional. The list of user defined attributes associated with the API * resource. The key is the attribute name. It will be of the format: * `projects/{project}/locations/{location}/attributes/{attribute}`. The value * is the attribute values associated with the resource. */ attributes?: { [key: string]: GoogleCloudApihubV1AttributeValues }; /** * Optional. The business unit owning the API. This maps to the following * system defined attribute: * `projects/{project}/locations/{location}/attributes/system-business-unit` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. All values should be from the list of allowed values defined for the * attribute. */ businessUnit?: GoogleCloudApihubV1AttributeValues; /** * Output only. The time at which the API resource was created. */ readonly createTime?: Date; /** * Optional. The description of the API resource. */ description?: string; /** * Required. The display name of the API resource. */ displayName?: string; /** * Optional. The documentation for the API resource. */ documentation?: GoogleCloudApihubV1Documentation; /** * Optional. Fingerprint of the API resource. This must be unique for each * API resource. It can neither be unset nor be updated to an existing * fingerprint of another API resource. */ fingerprint?: string; /** * Optional. The maturity level of the API. This maps to the following system * defined attribute: * `projects/{project}/locations/{location}/attributes/system-maturity-level` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. All values should be from the list of allowed values defined for the * attribute. */ maturityLevel?: GoogleCloudApihubV1AttributeValues; /** * Identifier. The name of the API resource in the API Hub. Format: * `projects/{project}/locations/{location}/apis/{api}` */ name?: string; /** * Optional. Owner details for the API resource. */ owner?: GoogleCloudApihubV1Owner; /** * Optional. The selected version for an API resource. This can be used when * special handling is needed on client side for particular version of the * API. Format is * `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ selectedVersion?: string; /** * Output only. The list of sources and metadata from the sources of the API * resource. */ readonly sourceMetadata?: GoogleCloudApihubV1SourceMetadata[]; /** * Optional. The target users for the API. This maps to the following system * defined attribute: * `projects/{project}/locations/{location}/attributes/system-target-user` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. All values should be from the list of allowed values defined for the * attribute. */ targetUser?: GoogleCloudApihubV1AttributeValues; /** * Optional. The team owning the API. This maps to the following system * defined attribute: * `projects/{project}/locations/{location}/attributes/system-team` attribute. * The number of values for this attribute will be based on the cardinality of * the attribute. The same can be retrieved via GetAttribute API. All values * should be from the list of allowed values defined for the attribute. */ team?: GoogleCloudApihubV1AttributeValues; /** * Output only. The time at which the API resource was last updated. */ readonly updateTime?: Date; /** * Output only. The list of versions present in an API resource. Note: An API * resource can be associated with more than 1 version. Format is * `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ readonly versions?: string[]; } /** * The API data to be collected. */ export interface GoogleCloudApihubV1ApiData { /** * Optional. The list of API metadata. */ apiMetadataList?: GoogleCloudApihubV1ApiMetadataList; } function serializeGoogleCloudApihubV1ApiData(data: any): GoogleCloudApihubV1ApiData { return { ...data, apiMetadataList: data["apiMetadataList"] !== undefined ? serializeGoogleCloudApihubV1ApiMetadataList(data["apiMetadataList"]) : undefined, }; } function deserializeGoogleCloudApihubV1ApiData(data: any): GoogleCloudApihubV1ApiData { return { ...data, apiMetadataList: data["apiMetadataList"] !== undefined ? deserializeGoogleCloudApihubV1ApiMetadataList(data["apiMetadataList"]) : undefined, }; } /** * Configuration for Apigee Edge gateways. Applicability of a filter is * determined by the filter being provided. If none of the filters are provided * the addon will be enabled for all data brought in by the gateway plugin * instance. */ export interface GoogleCloudApihubV1ApigeeEdgeConfig { /** * Optional. The filter to apply on the resources managed by the gateway * plugin instance. If provided this filter applies environment specific * filtering. */ environmentFilter?: GoogleCloudApihubV1EnvironmentFilter; } /** * Configuration for Apigee OPDK gateways. Applicability of a filter is * determined by the filter being provided. If none of the filters are provided * the addon will be enabled for all data brought in by the gateway plugin * instance. */ export interface GoogleCloudApihubV1ApigeeOPDKConfig { /** * Optional. The filter to apply on the resources managed by the gateway * plugin instance. If provided this filter applies environment specific * filtering. */ environmentFilter?: GoogleCloudApihubV1EnvironmentFilter; } /** * Configuration for Apigee X and Apigee Hybrid gateways. Applicability of a * filter is determined by the filter being provided. If none of the filters are * provided the addon will be enabled for all data brought in by the gateway * plugin instance. */ export interface GoogleCloudApihubV1ApigeeXHybridConfig { /** * Optional. The filter to apply on the resources managed by the gateway * plugin instance. If provided this filter applies environment specific * filtering. */ environmentFilter?: GoogleCloudApihubV1EnvironmentFilter; } /** * An ApiHubInstance represents the instance resources of the API Hub. * Currently, only one ApiHub instance is allowed for each project. */ export interface GoogleCloudApihubV1ApiHubInstance { /** * Required. Config of the ApiHub instance. */ config?: GoogleCloudApihubV1Config; /** * Output only. Creation timestamp. */ readonly createTime?: Date; /** * Optional. Description of the ApiHub instance. */ description?: string; /** * Optional. Instance labels to represent user-provided metadata. Refer to * cloud documentation on labels for more details. * https://cloud.google.com/compute/docs/labeling-resources */ labels?: { [key: string]: string }; /** * Identifier. Format: * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`. */ name?: string; /** * Output only. The current state of the ApiHub instance. */ readonly state?: | "STATE_UNSPECIFIED" | "INACTIVE" | "CREATING" | "ACTIVE" | "UPDATING" | "DELETING" | "FAILED"; /** * Output only. Extra information about ApiHub instance state. Currently the * message would be populated when state is `FAILED`. */ readonly stateMessage?: string; /** * Output only. Last update timestamp. */ readonly updateTime?: Date; } /** * ApiHubResource is one of the resources such as Api, Operation, Deployment, * Definition, Spec and Version resources stored in API-Hub. */ export interface GoogleCloudApihubV1ApiHubResource { /** * This represents Api resource in search results. Only name, display_name, * description and owner fields are populated in search results. */ api?: GoogleCloudApihubV1Api; /** * This represents Definition resource in search results. Only name field is * populated in search results. */ definition?: GoogleCloudApihubV1Definition; /** * This represents Deployment resource in search results. Only name, * display_name, description, deployment_type and api_versions fields are * populated in search results. */ deployment?: GoogleCloudApihubV1Deployment; /** * This represents ApiOperation resource in search results. Only name, * description, spec and details fields are populated in search results. */ operation?: GoogleCloudApihubV1ApiOperation; /** * This represents Spec resource in search results. Only name, display_name, * description, spec_type and documentation fields are populated in search * results. */ spec?: GoogleCloudApihubV1Spec; /** * This represents Version resource in search results. Only name, * display_name, description, lifecycle, compliance and accreditation fields * are populated in search results. */ version?: GoogleCloudApihubV1Version; } function serializeGoogleCloudApihubV1ApiHubResource(data: any): GoogleCloudApihubV1ApiHubResource { return { ...data, spec: data["spec"] !== undefined ? serializeGoogleCloudApihubV1Spec(data["spec"]) : undefined, }; } function deserializeGoogleCloudApihubV1ApiHubResource(data: any): GoogleCloudApihubV1ApiHubResource { return { ...data, spec: data["spec"] !== undefined ? deserializeGoogleCloudApihubV1Spec(data["spec"]) : undefined, }; } /** * Config for authentication with API key. */ export interface GoogleCloudApihubV1ApiKeyConfig { /** * Required. The name of the SecretManager secret version resource storing * the API key. Format: * `projects/{project}/secrets/{secrete}/versions/{version}`. The * `secretmanager.versions.access` permission should be granted to the service * account accessing the secret. */ apiKey?: GoogleCloudApihubV1Secret; /** * Required. The location of the API key. The default value is QUERY. */ httpElementLocation?: | "HTTP_ELEMENT_LOCATION_UNSPECIFIED" | "QUERY" | "HEADER" | "PATH" | "BODY" | "COOKIE"; /** * Required. The parameter name of the API key. E.g. If the API request is * "https://example.com/act?api_key=", "api_key" would be the parameter name. */ name?: string; } /** * The API metadata. */ export interface GoogleCloudApihubV1APIMetadata { /** * Required. The API resource to be pushed to Hub's collect layer. The ID of * the API resource will be generated by Hub to ensure uniqueness across all * APIs across systems. */ api?: GoogleCloudApihubV1Api; /** * Optional. Timestamp indicating when the API was created at the source. */ originalCreateTime?: Date; /** * Optional. The unique identifier of the API in the system where it was * originally created. */ originalId?: string; /** * Required. Timestamp indicating when the API was last updated at the * source. */ originalUpdateTime?: Date; /** * Optional. The list of versions present in an API resource. */ versions?: GoogleCloudApihubV1VersionMetadata[]; } function serializeGoogleCloudApihubV1APIMetadata(data: any): GoogleCloudApihubV1APIMetadata { return { ...data, originalCreateTime: data["originalCreateTime"] !== undefined ? data["originalCreateTime"].toISOString() : undefined, originalUpdateTime: data["originalUpdateTime"] !== undefined ? data["originalUpdateTime"].toISOString() : undefined, versions: data["versions"] !== undefined ? data["versions"].map((item: any) => (serializeGoogleCloudApihubV1VersionMetadata(item))) : undefined, }; } function deserializeGoogleCloudApihubV1APIMetadata(data: any): GoogleCloudApihubV1APIMetadata { return { ...data, originalCreateTime: data["originalCreateTime"] !== undefined ? new Date(data["originalCreateTime"]) : undefined, originalUpdateTime: data["originalUpdateTime"] !== undefined ? new Date(data["originalUpdateTime"]) : undefined, versions: data["versions"] !== undefined ? data["versions"].map((item: any) => (deserializeGoogleCloudApihubV1VersionMetadata(item))) : undefined, }; } /** * The message to hold repeated API metadata. */ export interface GoogleCloudApihubV1ApiMetadataList { /** * Required. The list of API metadata. */ apiMetadata?: GoogleCloudApihubV1APIMetadata[]; } function serializeGoogleCloudApihubV1ApiMetadataList(data: any): GoogleCloudApihubV1ApiMetadataList { return { ...data, apiMetadata: data["apiMetadata"] !== undefined ? data["apiMetadata"].map((item: any) => (serializeGoogleCloudApihubV1APIMetadata(item))) : undefined, }; } function deserializeGoogleCloudApihubV1ApiMetadataList(data: any): GoogleCloudApihubV1ApiMetadataList { return { ...data, apiMetadata: data["apiMetadata"] !== undefined ? data["apiMetadata"].map((item: any) => (deserializeGoogleCloudApihubV1APIMetadata(item))) : undefined, }; } /** * Represents an operation contained in an API version in the API Hub. An * operation is added/updated/deleted in an API version when a new spec is added * or an existing spec is updated/deleted in a version. Currently, an operation * will be created only corresponding to OpenAPI spec as parsing is supported * for OpenAPI spec. Alternatively operations can be managed via create,update * and delete APIs, creation of apiOperation can be possible only for version * with no parsed operations and update/delete can be possible only for * operations created via create API. */ export interface GoogleCloudApihubV1ApiOperation { /** * Optional. The list of user defined attributes associated with the API * operation resource. The key is the attribute name. It will be of the * format: `projects/{project}/locations/{location}/attributes/{attribute}`. * The value is the attribute values associated with the resource. */ attributes?: { [key: string]: GoogleCloudApihubV1AttributeValues }; /** * Output only. The time at which the operation was created. */ readonly createTime?: Date; /** * Optional. Operation details. Note: Even though this field is optional, it * is required for CreateApiOperation API and we will fail the request if not * provided. */ details?: GoogleCloudApihubV1OperationDetails; /** * Identifier. The name of the operation. Format: * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` */ name?: string; /** * Output only. The list of sources and metadata from the sources of the API * operation. */ readonly sourceMetadata?: GoogleCloudApihubV1SourceMetadata[]; /** * Output only. The name of the spec will be of the format: * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` * Note:The name of the spec will be empty if the operation is created via * CreateApiOperation API. */ readonly spec?: string; /** * Output only. The time at which the operation was last updated. */ readonly updateTime?: Date; } /** * The view of an API. */ export interface GoogleCloudApihubV1ApiView { /** * Output only. MCP server view. */ readonly mcpServerView?: GoogleCloudApihubV1FlattenedApiVersionDeploymentView; /** * Output only. MCP tools view. */ readonly mcpToolView?: GoogleCloudApihubV1FlattenedApiVersionOperationDeploymentView; } /** * The details of the Application Integration endpoint to be triggered for * curation. */ export interface GoogleCloudApihubV1ApplicationIntegrationEndpointDetails { /** * Required. The API trigger ID of the Application Integration workflow. */ triggerId?: string; /** * Required. The endpoint URI should be a valid REST URI for triggering an * Application Integration. Format: * `https://integrations.googleapis.com/v1/{name=projects/*\/locations/*\/integrations/*}:execute` * or * `https://{location}-integrations.googleapis.com/v1/{name=projects/*\/locations/*\/integrations/*}:execute` */ uri?: string; } /** * An attribute in the API Hub. An attribute is a name value pair which can be * attached to different resources in the API hub based on the scope of the * attribute. Attributes can either be pre-defined by the API Hub or created by * users. */ export interface GoogleCloudApihubV1Attribute { /** * Optional. The list of allowed values when the attribute value is of type * enum. This is required when the data_type of the attribute is ENUM. The * maximum number of allowed values of an attribute will be 1000. */ allowedValues?: GoogleCloudApihubV1AllowedValue[]; /** * Optional. The maximum number of values that the attribute can have when * associated with an API Hub resource. Cardinality 1 would represent a * single-valued attribute. It must not be less than 1 or greater than 20. If * not specified, the cardinality would be set to 1 by default and represent a * single-valued attribute. */ cardinality?: number; /** * Output only. The time at which the attribute was created. */ readonly createTime?: Date; /** * Required. The type of the data of the attribute. */ dataType?: | "DATA_TYPE_UNSPECIFIED" | "ENUM" | "JSON" | "STRING" | "URI"; /** * Output only. The definition type of the attribute. */ readonly definitionType?: | "DEFINITION_TYPE_UNSPECIFIED" | "SYSTEM_DEFINED" | "USER_DEFINED"; /** * Optional. The description of the attribute. */ description?: string; /** * Required. The display name of the attribute. */ displayName?: string; /** * Output only. When mandatory is true, the attribute is mandatory for the * resource specified in the scope. Only System defined attributes can be * mandatory. */ readonly mandatory?: boolean; /** * Identifier. The name of the attribute in the API Hub. Format: * `projects/{project}/locations/{location}/attributes/{attribute}` */ name?: string; /** * Required. The scope of the attribute. It represents the resource in the * API Hub to which the attribute can be linked. */ scope?: | "SCOPE_UNSPECIFIED" | "API" | "VERSION" | "SPEC" | "API_OPERATION" | "DEPLOYMENT" | "DEPENDENCY" | "DEFINITION" | "EXTERNAL_API" | "PLUGIN"; /** * Output only. The time at which the attribute was last updated. */ readonly updateTime?: Date; } /** * The attribute values associated with resource. */ export interface GoogleCloudApihubV1AttributeValues { /** * Output only. The name of the attribute. Format: * projects/{project}/locations/{location}/attributes/{attribute} */ readonly attribute?: string; /** * The attribute values associated with a resource in case attribute data * type is enum. */ enumValues?: GoogleCloudApihubV1EnumAttributeValues; /** * The attribute values associated with a resource in case attribute data * type is JSON. */ jsonValues?: GoogleCloudApihubV1StringAttributeValues; /** * The attribute values associated with a resource in case attribute data * type is string. */ stringValues?: GoogleCloudApihubV1StringAttributeValues; /** * The attribute values associated with a resource in case attribute data * type is URL, URI or IP, like gs://bucket-name/object-name. */ uriValues?: GoogleCloudApihubV1StringAttributeValues; } /** * AuthConfig represents the authentication information. */ export interface GoogleCloudApihubV1AuthConfig { /** * Api Key Config. */ apiKeyConfig?: GoogleCloudApihubV1ApiKeyConfig; /** * Required. The authentication type. */ authType?: | "AUTH_TYPE_UNSPECIFIED" | "NO_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "USER_PASSWORD" | "API_KEY" | "OAUTH2_CLIENT_CREDENTIALS"; /** * Google Service Account. */ googleServiceAccountConfig?: GoogleCloudApihubV1GoogleServiceAccountConfig; /** * Oauth2.0 Client Credentials. */ oauth2ClientCredentialsConfig?: GoogleCloudApihubV1Oauth2ClientCredentialsConfig; /** * User Password. */ userPasswordConfig?: GoogleCloudApihubV1UserPasswordConfig; } /** * AuthConfigTemplate represents the authentication template for a plugin. */ export interface GoogleCloudApihubV1AuthConfigTemplate { /** * Optional. The service account of the plugin hosting service. This service * account should be granted the required permissions on the Auth Config * parameters provided while creating the plugin instances corresponding to * this plugin. For example, if the plugin instance auth config requires a * secret manager secret, the service account should be granted the * secretmanager.versions.access permission on the corresponding secret, if * the plugin instance auth config contains a service account, the service * account should be granted the iam.serviceAccounts.getAccessToken permission * on the corresponding service account. */ serviceAccount?: GoogleCloudApihubV1GoogleServiceAccountConfig; /** * Required. The list of authentication types supported by the plugin. */ supportedAuthTypes?: | "AUTH_TYPE_UNSPECIFIED" | "NO_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "USER_PASSWORD" | "API_KEY" | "OAUTH2_CLIENT_CREDENTIALS"[]; } /** * The CollectApiData method's request. */ export interface GoogleCloudApihubV1CollectApiDataRequest { /** * Required. The action ID to be used for collecting the API data. This * should map to one of the action IDs specified in action configs in the * plugin. */ actionId?: string; /** * Required. The API data to be collected. */ apiData?: GoogleCloudApihubV1ApiData; /** * Required. The type of collection. Applies to all entries in api_data. */ collectionType?: | "COLLECTION_TYPE_UNSPECIFIED" | "COLLECTION_TYPE_UPSERT" | "COLLECTION_TYPE_DELETE"; /** * Required. The plugin instance collecting the API data. Format: * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`. */ pluginInstance?: string; } function serializeGoogleCloudApihubV1CollectApiDataRequest(data: any): GoogleCloudApihubV1CollectApiDataRequest { return { ...data, apiData: data["apiData"] !== undefined ? serializeGoogleCloudApihubV1ApiData(data["apiData"]) : undefined, }; } function deserializeGoogleCloudApihubV1CollectApiDataRequest(data: any): GoogleCloudApihubV1CollectApiDataRequest { return { ...data, apiData: data["apiData"] !== undefined ? deserializeGoogleCloudApihubV1ApiData(data["apiData"]) : undefined, }; } /** * Available configurations to provision an ApiHub Instance. */ export interface GoogleCloudApihubV1Config { /** * Optional. The Customer Managed Encryption Key (CMEK) used for data * encryption. The CMEK name should follow the format of * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`, * where the location must match the instance location. If the CMEK is not * provided, a GMEK will be created for the instance. */ cmekKeyName?: string; /** * Optional. If true, the search will be disabled for the instance. The * default value is false. */ disableSearch?: boolean; /** * Optional. Encryption type for the region. If the encryption type is CMEK, * the cmek_key_name must be provided. If no encryption type is provided, GMEK * will be used. */ encryptionType?: | "ENCRYPTION_TYPE_UNSPECIFIED" | "GMEK" | "CMEK"; /** * Optional. The name of the Vertex AI location where the data store is * stored. */ vertexLocation?: string; } /** * ConfigTemplate represents the configuration template for a plugin. */ export interface GoogleCloudApihubV1ConfigTemplate { /** * Optional. The list of additional configuration variables for the plugin's * configuration. */ additionalConfigTemplate?: GoogleCloudApihubV1ConfigVariableTemplate[]; /** * Optional. The authentication template for the plugin. */ authConfigTemplate?: GoogleCloudApihubV1AuthConfigTemplate; } /** * ConfigValueOption represents an option for a config variable of type enum or * multi select. */ export interface GoogleCloudApihubV1ConfigValueOption { /** * Optional. Description of the option. */ description?: string; /** * Required. Display name of the option. */ displayName?: string; /** * Required. Id of the option. */ id?: string; } /** * ConfigVariable represents a additional configuration variable present in a * PluginInstance Config or AuthConfig, based on a ConfigVariableTemplate. */ export interface GoogleCloudApihubV1ConfigVariable { /** * Optional. The config variable value in case of config variable of type * boolean. */ boolValue?: boolean; /** * Optional. The config variable value in case of config variable of type * enum. */ enumValue?: GoogleCloudApihubV1ConfigValueOption; /** * Optional. The config variable value in case of config variable of type * integer. */ intValue?: bigint; /** * Output only. Key will be the id to uniquely identify the config variable. */ readonly key?: string; /** * Optional. The config variable value in case of config variable of type * multi integer. */ multiIntValues?: GoogleCloudApihubV1MultiIntValues; /** * Optional. The config variable value in case of config variable of type * multi select. */ multiSelectValues?: GoogleCloudApihubV1MultiSelectValues; /** * Optional. The config variable value in case of config variable of type * multi string. */ multiStringValues?: GoogleCloudApihubV1MultiStringValues; /** * Optional. The config variable value in case of config variable of type * secret. */ secretValue?: GoogleCloudApihubV1Secret; /** * Optional. The config variable value in case of config variable of type * string. */ stringValue?: string; } function serializeGoogleCloudApihubV1ConfigVariable(data: any): GoogleCloudApihubV1ConfigVariable { return { ...data, intValue: data["intValue"] !== undefined ? String(data["intValue"]) : undefined, }; } function deserializeGoogleCloudApihubV1ConfigVariable(data: any): GoogleCloudApihubV1ConfigVariable { return { ...data, intValue: data["intValue"] !== undefined ? BigInt(data["intValue"]) : undefined, }; } /** * ConfigVariableTemplate represents a configuration variable template present * in a Plugin Config. */ export interface GoogleCloudApihubV1ConfigVariableTemplate { /** * Optional. Description. */ description?: string; /** * Optional. Enum options. To be populated if `ValueType` is `ENUM`. */ enumOptions?: GoogleCloudApihubV1ConfigValueOption[]; /** * Required. ID of the config variable. Must be unique within the * configuration. */ id?: string; /** * Optional. Multi select options. To be populated if `ValueType` is * `MULTI_SELECT`. */ multiSelectOptions?: GoogleCloudApihubV1ConfigValueOption[]; /** * Optional. Flag represents that this `ConfigVariable` must be provided for * a PluginInstance. */ required?: boolean; /** * Optional. Regular expression in RE2 syntax used for validating the `value` * of a `ConfigVariable`. */ validationRegex?: string; /** * Required. Type of the parameter: string, int, bool etc. */ valueType?: | "VALUE_TYPE_UNSPECIFIED" | "STRING" | "INT" | "BOOL" | "SECRET" | "ENUM" | "MULTI_SELECT" | "MULTI_STRING" | "MULTI_INT"; } /** * A curation resource in the API Hub. */ export interface GoogleCloudApihubV1Curation { /** * Output only. The time at which the curation was created. */ readonly createTime?: Date; /** * Optional. The description of the curation. */ description?: string; /** * Required. The display name of the curation. */ displayName?: string; /** * Required. The endpoint to be triggered for curation. */ endpoint?: GoogleCloudApihubV1Endpoint; /** * Output only. The error code of the last execution of the curation. The * error code is populated only when the last execution state is failed. */ readonly lastExecutionErrorCode?: | "ERROR_CODE_UNSPECIFIED" | "INTERNAL_ERROR" | "UNAUTHORIZED"; /** * Output only. Error message describing the failure, if any, during the last * execution of the curation. */ readonly lastExecutionErrorMessage?: string; /** * Output only. The last execution state of the curation. */ readonly lastExecutionState?: | "LAST_EXECUTION_STATE_UNSPECIFIED" | "SUCCEEDED" | "FAILED"; /** * Identifier. The name of the curation. Format: * `projects/{project}/locations/{location}/curations/{curation}` */ name?: string; /** * Output only. The plugin instances and associated actions that are using * the curation. Note: A particular curation could be used by multiple plugin * instances or multiple actions in a plugin instance. */ readonly pluginInstanceActions?: GoogleCloudApihubV1PluginInstanceActionID[]; /** * Output only. The time at which the curation was last updated. */ readonly updateTime?: Date; } /** * The curation information for this plugin instance. */ export interface GoogleCloudApihubV1CurationConfig { /** * Required. The curation type for this plugin instance. */ curationType?: | "CURATION_TYPE_UNSPECIFIED" | "DEFAULT_CURATION_FOR_API_METADATA" | "CUSTOM_CURATION_FOR_API_METADATA"; /** * Optional. Custom curation information for this plugin instance. */ customCuration?: GoogleCloudApihubV1CustomCuration; } /** * Custom curation information for this plugin instance. */ export interface GoogleCloudApihubV1CustomCuration { /** * Required. The unique name of the curation resource. This will be the name * of the curation resource in the format: * `projects/{project}/locations/{location}/curations/{curation}` */ curation?: string; } /** * Represents a definition for example schema, request, response definitions * contained in an API version. A definition is added/updated/deleted in an API * version when a new spec is added or an existing spec is updated/deleted in a * version. Currently, definition will be created only corresponding to OpenAPI * spec as parsing is supported for OpenAPI spec. Also, within OpenAPI spec, * only `schema` object is supported. */ export interface GoogleCloudApihubV1Definition { /** * Optional. The list of user defined attributes associated with the * definition resource. The key is the attribute name. It will be of the * format: `projects/{project}/locations/{location}/attributes/{attribute}`. * The value is the attribute values associated with the resource. */ attributes?: { [key: string]: GoogleCloudApihubV1AttributeValues }; /** * Output only. The time at which the definition was created. */ readonly createTime?: Date; /** * Identifier. The name of the definition. Format: * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}` */ name?: string; /** * Output only. The value of a schema definition. */ readonly schema?: GoogleCloudApihubV1Schema; /** * Output only. The name of the spec from where the definition was parsed. * Format is * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` */ readonly spec?: string; /** * Output only. The type of the definition. */ readonly type?: | "TYPE_UNSPECIFIED" | "SCHEMA"; /** * Output only. The time at which the definition was last updated. */ readonly updateTime?: Date; } /** * A dependency resource defined in the API hub describes a dependency directed * from a consumer to a supplier entity. A dependency can be defined between two * Operations or between an Operation and External API. */ export interface GoogleCloudApihubV1Dependency { /** * Optional. The list of user defined attributes associated with the * dependency resource. The key is the attribute name. It will be of the * format: `projects/{project}/locations/{location}/attributes/{attribute}`. * The value is the attribute values associated with the resource. */ attributes?: { [key: string]: GoogleCloudApihubV1AttributeValues }; /** * Required. Immutable. The entity acting as the consumer in the dependency. */ consumer?: GoogleCloudApihubV1DependencyEntityReference; /** * Output only. The time at which the dependency was created. */ readonly createTime?: Date; /** * Optional. Human readable description corresponding of the dependency. */ description?: string; /** * Output only. Discovery mode of the dependency. */ readonly discoveryMode?: | "DISCOVERY_MODE_UNSPECIFIED" | "MANUAL"; /** * Output only. Error details of a dependency if the system has detected it * internally. */ readonly errorDetail?: GoogleCloudApihubV1DependencyErrorDetail; /** * Identifier. The name of the dependency in the API Hub. Format: * `projects/{project}/locations/{location}/dependencies/{dependency}` */ name?: string; /** * Output only. State of the dependency. */ readonly state?: | "STATE_UNSPECIFIED" | "PROPOSED" | "VALIDATED"; /** * Required. Immutable. The entity acting as the supplier in the dependency. */ supplier?: GoogleCloudApihubV1DependencyEntityReference; /** * Output only. The time at which the dependency was last updated. */ readonly updateTime?: Date; } /** * Reference to an entity participating in a dependency. */ export interface GoogleCloudApihubV1DependencyEntityReference { /** * Output only. Display name of the entity. */ readonly displayName?: string; /** * The resource name of an external API in the API Hub. Format: * `projects/{project}/locations/{location}/externalApis/{external_api}` */ externalApiResourceName?: string; /** * The resource name of an operation in the API Hub. Format: * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` */ operationResourceName?: string; } /** * Details describing error condition of a dependency. */ export interface GoogleCloudApihubV1DependencyErrorDetail { /** * Optional. Error in the dependency. */ error?: | "ERROR_UNSPECIFIED" | "SUPPLIER_NOT_FOUND" | "SUPPLIER_RECREATED"; /** * Optional. Timestamp at which the error was found. */ errorTime?: Date; } function serializeGoogleCloudApihubV1DependencyErrorDetail(data: any): GoogleCloudApihubV1DependencyErrorDetail { return { ...data, errorTime: data["errorTime"] !== undefined ? data["errorTime"].toISOString() : undefined, }; } function deserializeGoogleCloudApihubV1DependencyErrorDetail(data: any): GoogleCloudApihubV1DependencyErrorDetail { return { ...data, errorTime: data["errorTime"] !== undefined ? new Date(data["errorTime"]) : undefined, }; } /** * Details of the deployment where APIs are hosted. A deployment could * represent an Apigee proxy, API gateway, other Google Cloud services or * non-Google Cloud services as well. A deployment entity is a root level entity * in the API hub and exists independent of any API. */ export interface GoogleCloudApihubV1Deployment { /** * Output only. The API versions linked to this deployment. Note: A * particular deployment could be linked to multiple different API versions * (of same or different APIs). */ readonly apiVersions?: string[]; /** * Optional. The list of user defined attributes associated with the * deployment resource. The key is the attribute name. It will be of the * format: `projects/{project}/locations/{location}/attributes/{attribute}`. * The value is the attribute values associated with the resource. */ attributes?: { [key: string]: GoogleCloudApihubV1AttributeValues }; /** * Output only. The time at which the deployment was created. */ readonly createTime?: Date; /** * Required. The type of deployment. This maps to the following system * defined attribute: * `projects/{project}/locations/{location}/attributes/system-deployment-type` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. All values should be from the list of allowed values defined for the * attribute. */ deploymentType?: GoogleCloudApihubV1AttributeValues; /** * Optional. The description of the deployment. */ description?: string; /** * Required. The display name of the deployment. */ displayName?: string; /** * Optional. The documentation of the deployment. */ documentation?: GoogleCloudApihubV1Documentation; /** * Required. The endpoints at which this deployment resource is listening for * API requests. This could be a list of complete URIs, hostnames or an IP * addresses. */ endpoints?: string[]; /** * Optional. The environment mapping to this deployment. This maps to the * following system defined attribute: * `projects/{project}/locations/{location}/attributes/system-environment` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. All values should be from the list of allowed values defined for the * attribute. */ environment?: GoogleCloudApihubV1AttributeValues; /** * Optional. The uri where users can navigate to for the management of the * deployment. This maps to the following system defined attribute: * `projects/{project}/locations/{location}/attributes/system-management-url` * The number of values for this attribute will be based on the cardinality of * the attribute. The same can be retrieved via GetAttribute API. The value of * the attribute should be a valid URL. */ managementUrl?: GoogleCloudApihubV1AttributeValues; /** * Identifier. The name of the deployment. Format: * `projects/{project}/locations/{location}/deployments/{deployment}` */ name?: string; /** * Required. The resource URI identifies the deployment within its gateway. * For Apigee gateways, its recommended to use the format: * organizations/{org}/environments/{env}/apis/{api}. For ex: if a proxy with * name `orders` is deployed in `staging` environment of `cymbal` * organization, the resource URI would be: * `organizations/cymbal/environments/staging/apis/orders`. */ resourceUri?: string; /** * Optional. The SLO for this deployment. This maps to the following system * defined attribute: * `projects/{project}/locations/{location}/attributes/system-slo` attribute. * The number of values for this attribute will be based on the cardinality of * the attribute. The same can be retrieved via GetAttribute API. All values * should be from the list of allowed values defined for the attribute. */ slo?: GoogleCloudApihubV1AttributeValues; /** * Optional. The environment at source for the deployment. For example: prod, * dev, staging, etc. */ sourceEnvironment?: string; /** * Output only. The list of sources and metadata from the sources of the * deployment. */ readonly sourceMetadata?: GoogleCloudApihubV1SourceMetadata[]; /** * Optional. The project to which the deployment belongs. For Google Cloud * gateways, this will refer to the project identifier. For others like * Edge/OPDK, this will refer to the org identifier. */ sourceProject?: string; /** * Optional. The uri where additional source specific information for this * deployment can be found. This maps to the following system defined * attribute: * `projects/{project}/locations/{location}/attributes/system-source-uri` The * number of values for this attribute will be based on the cardinality of the * attribute. The same can be retrieved via GetAttribute API. The value of the * attribute should be a valid URI, and in case of Cloud Storage URI, it * should point to a Cloud Storage object, not a directory. */ sourceUri?: GoogleCloudApihubV1AttributeValues; /** * Output only. The time at which the deployment was last updated. */ readonly updateTime?: Date; } /** * The metadata associated with a deployment. */ export interface GoogleCloudApihubV1DeploymentMetadata { /** * Required. The deployment resource to be pushed to Hub's collect layer. The * ID of the deployment will be generated by Hub. */ deployment?: GoogleCloudApihubV1Deployment; /** * Optional. Timestamp indicating when the deployment was created at the * source. */ originalCreateTime?: Date; /** * Optional. The unique identifier of the deployment in the system where it * was originally created. */ originalId?: string; /** * Required. Timestamp indicating when the deployment was last updated at the * source. */ originalUpdateTime?: Date; } function serializeGoogleCloudApihubV1DeploymentMetadata(data: any): GoogleCloudApihubV1DeploymentMetadata { return { ...data, originalCreateTime: data["originalCreateTime"] !== undefined ? data["originalCreateTime"].toISOString() : undefined, originalUpdateTime: data["originalUpdateTime"] !== undefined ? data["originalUpdateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudApihubV1DeploymentMetadata(data: any): GoogleCloudApihubV1DeploymentMetadata { return { ...data, originalCreateTime: data["originalCreateTime"] !== undefined ? new Date(data["originalCreateTime"]) : undefined, originalUpdateTime: data["originalUpdateTime"] !== undefined ? new Date(data["originalUpdateTime"]) : undefined, }; } /** * The DisablePluginInstanceAction method's request. */ export interface GoogleCloudApihubV1DisablePluginInstanceActionRequest { /** * Required. The action id to disable. */ actionId?: string; } /** * The DisablePlugin method's request. */ export interface GoogleCloudApihubV1DisablePluginRequest { } /** * Respresents an API Observation observed in one of the sources. */ export interface GoogleCloudApihubV1DiscoveredApiObservation { /** * Optional. The number of observed API Operations. */ apiOperationCount?: bigint; /** * Output only. Create time stamp of the observation in API Hub. */ readonly createTime?: Date; /** * Optional. The hostname of requests processed for this Observation. */ hostname?: string; /** * Output only. The number of known API Operations. */ readonly knownOperationsCount?: bigint; /** * Optional. Last event detected time stamp */ lastEventDetectedTime?: Date; /** * Identifier. The name of the discovered API Observation. Format: * `projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}` */ name?: string; /** * Optional. For an observation pushed from a Google Cloud resource, this * would be the Google Cloud project id. */ origin?: string; /** * Optional. The IP address (IPv4 or IPv6) of the origin server that the * request was sent to. This field can include port information. Examples: * `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`. */ serverIps?: string[]; /** * Optional. The location of the observation source. */ sourceLocations?: string[]; /** * Output only. The metadata of the source from which the observation was * collected. */ readonly sourceMetadata?: GoogleCloudApihubV1SourceMetadata; /** * Optional. The type of the source from which the observation was collected. */ sourceTypes?: | "SOURCE_TYPE_UNSPECIFIED" | "GCP_XLB" | "GCP_ILB"[]; /** * Optional. Style of ApiObservation */ style?: | "STYLE_UNSPECIFIED" | "REST" | "GRPC" | "GRAPHQL"; /** * Output only. The number of unknown API Operations. */ readonly unknownOperationsCount?: bigint; /** * Output only. Update time stamp of the observation in API Hub. */ readonly updateTime?: Date; } function serializeGoogleCloudApihubV1DiscoveredApiObservation(data: any): GoogleCloudApihubV1DiscoveredApiObservation { return { ...data, apiOperationCount: data["apiOperationCount"] !== undefined ? String(data["apiOperationCount"]) : undefined, lastEventDetectedTime: data["lastEventDetectedTime"] !== undefined ? data["lastEventDetectedTime"].toISOString() : undefined, }; } function deserializeGoogleCloudApihubV1DiscoveredApiObservation(data: any): GoogleCloudApihubV1DiscoveredApiObservation { return { ...data, apiOperationCount: data["apiOperationCount"] !== undefined ? BigInt(data["apiOperationCount"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, knownOperationsCount: data["knownOperationsCount"] !== undefined ? BigInt(data["knownOperationsCount"]) : undefined, lastEventDetectedTime: data["lastEventDetectedTime"] !== undefined ? new Date(data["lastEventDetectedTime"]) : undefined, unknownOperationsCount: data["unknownOperationsCount"] !== undefined ? BigInt(data["unknownOperationsCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * DiscoveredApiOperation represents an API Operation observed in one of the * sources. */ export interface GoogleCloudApihubV1DiscoveredApiOperation { /** * Output only. The classification of the discovered API operation. */ readonly classification?: | "CLASSIFICATION_UNSPECIFIED" | "KNOWN" | "UNKNOWN"; /** * Optional. The number of occurrences of this API Operation. */ count?: bigint; /** * Output only. Create time stamp of the discovered API operation in API Hub. */ readonly createTime?: Date; /** * Optional. First seen time stamp */ firstSeenTime?: Date; /** * Optional. An HTTP Operation. */ httpOperation?: GoogleCloudApihubV1HttpOperationDetails; /** * Optional. Last seen time stamp */ lastSeenTime?: Date; /** * Output only. The list of matched results for the discovered API operation. * This will be populated only if the classification is known. The current * usecase is for a single match. Keeping it repeated to support multiple * matches in future. */ readonly matchResults?: GoogleCloudApihubV1MatchResult[]; /** * Identifier. The name of the discovered API Operation. Format: * `projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation}` */ name?: string; /** * Output only. The metadata of the source from which the api operation was * collected. */ readonly sourceMetadata?: GoogleCloudApihubV1SourceMetadata; /** * Output only. Update time stamp of the discovered API operation in API Hub. */ readonly updateTime?: Date; } function serializeGoogleCloudApihubV1DiscoveredApiOperation(data: any): GoogleCloudApihubV1DiscoveredApiOperation { return { ...data, count: data["count"] !== undefined ? String(data["count"]) : undefined, firstSeenTime: data["firstSeenTime"] !== undefined ? data["firstSeenTime"].toISOString() : undefined, httpOperation: data["httpOperation"] !== undefined ? serializeGoogleCloudApihubV1HttpOperationDetails(data["httpOperation"]) : undefined, lastSeenTime: data["lastSeenTime"] !== undefined ? data["lastSeenTime"].toISOString() : undefined, }; } function deserializeGoogleCloudApihubV1DiscoveredApiOperation(data: any): GoogleCloudApihubV1DiscoveredApiOperation { return { ...data, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, firstSeenTime: data["firstSeenTime"] !== undefined ? new Date(data["firstSeenTime"]) : undefined, httpOperation: data["httpOperation"] !== undefined ? deserializeGoogleCloudApihubV1HttpOperationDetails(data["httpOperation"]) : undefined, lastSeenTime: data["lastSeenTime"] !== undefined ? new Date(data["lastSeenTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Documentation details. */ export interface GoogleCloudApihubV1Documentation { /** * Optional. The uri of the externally hosted documentation. */ externalUri?: string; } /** * The EnablePluginInstanceAction method's request. */ export interface GoogleCloudApihubV1EnablePluginInstanceActionRequest { /** * Required. The action id to enable. */ actionId?: string; } /** * The EnablePlugin method's request. */ export interface GoogleCloudApihubV1EnablePluginRequest { } /** * The endpoint to be triggered for curation. The endpoint will be invoked with * a request payload containing ApiMetadata. Response should contain curated * data in the form of ApiMetadata. */ export interface GoogleCloudApihubV1Endpoint { /** * Required. The details of the Application Integration endpoint to be * triggered for curation. */ applicationIntegrationEndpointDetails?: GoogleCloudApihubV1ApplicationIntegrationEndpointDetails; } /** * The attribute values of data type enum. */ export interface GoogleCloudApihubV1EnumAttributeValues { /** * Required. The attribute values in case attribute data type is enum. */ values?: GoogleCloudApihubV1AllowedValue[]; } /** * Filter for environments. */ export interface GoogleCloudApihubV1EnvironmentFilter { /** * Optional. Indicates if this filter should match all environments or only a * subset of environments. If set to true, all environments are matched. */ allEnvironments?: boolean; /** * Optional. If provided, only environments in this list are matched. This * field is ignored if `all_environments` is true. */ environments?: string[]; } /** * The ExecutePluginInstanceAction method's request. */ export interface GoogleCloudApihubV1ExecutePluginInstanceActionRequest { /** * Required. The execution details for the action to execute. */ actionExecutionDetail?: GoogleCloudApihubV1ActionExecutionDetail; } /** * The execution status for the plugin instance. */ export interface GoogleCloudApihubV1ExecutionStatus { /** * Output only. The current state of the execution. */ readonly currentExecutionState?: | "CURRENT_EXECUTION_STATE_UNSPECIFIED" | "RUNNING" | "NOT_RUNNING"; /** * Output only. The last execution of the plugin instance. */ readonly lastExecution?: GoogleCloudApihubV1LastExecution; } /** * An external API represents an API being provided by external sources. This * can be used to model third-party APIs and can be used to define dependencies. */ export interface GoogleCloudApihubV1ExternalApi { /** * Optional. The list of user defined attributes associated with the Version * resource. The key is the attribute name. It will be of the format: * `projects/{project}/locations/{location}/attributes/{attribute}`. The value * is the attribute values associated with the resource. */ attributes?: { [key: string]: GoogleCloudApihubV1AttributeValues }; /** * Output only. Creation timestamp. */ readonly createTime?: Date; /** * Optional. Description of the external API. Max length is 2000 characters * (Unicode Code Points). */ description?: string; /** * Required. Display name of the external API. Max length is 63 characters * (Unicode Code Points). */ displayName?: string; /** * Optional. Documentation of the external API. */ documentation?: GoogleCloudApihubV1Documentation; /** * Optional. List of endpoints on which this API is accessible. */ endpoints?: string[]; /** * Identifier. Format: * `projects/{project}/locations/{location}/externalApi/{externalApi}`. */ name?: string; /** * Optional. List of paths served by this API. */ paths?: string[]; /** * Output only. Last update timestamp. */ readonly updateTime?: Date; } /** * The FetchAdditionalSpecContent method's response. */ export interface GoogleCloudApihubV1FetchAdditionalSpecContentResponse { /** * The additional spec content. */ additionalSpecContent?: GoogleCloudApihubV1AdditionalSpecContent; } function serializeGoogleCloudApihubV1FetchAdditionalSpecContentResponse(data: any): GoogleCloudApihubV1FetchAdditionalSpecContentResponse { return { ...data, additionalSpecContent: data["additionalSpecContent"] !== undefined ? serializeGoogleCloudApihubV1AdditionalSpecContent(data["additionalSpecContent"]) : undefined, }; } function deserializeGoogleCloudApihubV1FetchAdditionalSpecContentResponse(data: any): GoogleCloudApihubV1FetchAdditionalSpecContentResponse { return { ...data, additionalSpecContent: data["additionalSpecContent"] !== undefined ? deserializeGoogleCloudApihubV1AdditionalSpecContent(data["additionalSpecContent"]) : undefined, }; } /** * A flattened view of an API, its version and one of the linked deployments. */ export interface GoogleCloudApihubV1FlattenedApiVersionDeploymentView { /** * The API. */ api?: GoogleCloudApihubV1Api; /** * The deployment. */ deployment?: GoogleCloudApihubV1Deployment; /** * The version. */ version?: GoogleCloudApihubV1Version; } /** * A flattened view of an API, its version, one of its operations and one of * the linked deployments. If there are no deployments linked to the operation * then the result will be empty. */ export interface GoogleCloudApihubV1FlattenedApiVersionOperationDeploymentView { /** * The API. */ api?: GoogleCloudApihubV1Api; /** * The API operation. */ apiOperation?: GoogleCloudApihubV1ApiOperation; /** * The deployment. */ deployment?: GoogleCloudApihubV1Deployment; /** * The version. */ version?: GoogleCloudApihubV1Version; } /** * Configuration for gateway plugin addons. This is used to specify the list of * gateway plugin configs for which the addon is enabled. */ export interface GoogleCloudApihubV1GatewayPluginAddonConfig { /** * Required. The list of gateway plugin configs for which the addon is * enabled. Each gateway plugin config should have a unique plugin instance. */ gatewayPluginConfigs?: GoogleCloudApihubV1GatewayPluginConfig[]; } /** * Configuration for a gateway plugin. This is used to specify configs for * different gateways. */ export interface GoogleCloudApihubV1GatewayPluginConfig { /** * Configuration for Apigee Edge gateways. */ apigeeEdgeConfig?: GoogleCloudApihubV1ApigeeEdgeConfig; /** * Configuration for Apigee OPDK gateways. */ apigeeOpdkConfig?: GoogleCloudApihubV1ApigeeOPDKConfig; /** * Configuration for Apigee X and Apigee Hybrid gateways. */ apigeeXHybridConfig?: GoogleCloudApihubV1ApigeeXHybridConfig; /** * Required. The name of the gateway plugin instance for which the config is * to be specified. Format: * projects/{project}/locations/{location}/plugins/{plugin}/pluginInstances/{plugin_instance} */ pluginInstance?: string; } /** * Config for Google service account authentication. */ export interface GoogleCloudApihubV1GoogleServiceAccountConfig { /** * Required. The service account to be used for authenticating request. The * `iam.serviceAccounts.getAccessToken` permission should be granted on this * service account to the impersonator service account. */ serviceAccount?: string; } /** * An aggregation of HTTP header occurrences. */ export interface GoogleCloudApihubV1Header { /** * The number of occurrences of this Header across transactions. */ count?: bigint; /** * Data type of header */ dataType?: | "DATA_TYPE_UNSPECIFIED" | "BOOL" | "INTEGER" | "FLOAT" | "STRING" | "UUID"; /** * Header name. */ name?: string; } function serializeGoogleCloudApihubV1Header(data: any): GoogleCloudApihubV1Header { return { ...data, count: data["count"] !== undefined ? String(data["count"]) : undefined, }; } function deserializeGoogleCloudApihubV1Header(data: any): GoogleCloudApihubV1Header { return { ...data, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, }; } /** * The information related to the service implemented by the plugin developer, * used to invoke the plugin's functionality. */ export interface GoogleCloudApihubV1HostingService { /** * Optional. The URI of the service implemented by the plugin developer, used * to invoke the plugin's functionality. This information is only required for * user defined plugins. */ serviceUri?: string; } /** * Host project registration refers to the registration of a Google cloud * project with Api Hub as a host project. This is the project where Api Hub is * provisioned. It acts as the consumer project for the Api Hub instance * provisioned. Multiple runtime projects can be attached to the host project * and these attachments define the scope of Api Hub. */ export interface GoogleCloudApihubV1HostProjectRegistration { /** * Output only. The time at which the host project registration was created. */ readonly createTime?: Date; /** * Required. Immutable. Google cloud project name in the format: * "projects/abc" or "projects/123". As input, project name with either * project id or number are accepted. As output, this field will contain * project number. */ gcpProject?: string; /** * Identifier. The name of the host project registration. Format: * "projects/{project}/locations/{location}/hostProjectRegistrations/{host_project_registration}". */ name?: string; } /** * The HTTP Operation. */ export interface GoogleCloudApihubV1HttpOperation { /** * Optional. Operation method Note: Even though this field is optional, it is * required for CreateApiOperation API and we will fail the request if not * provided. */ method?: | "METHOD_UNSPECIFIED" | "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH" | "TRACE"; /** * Optional. The path details for the Operation. Note: Even though this field * is optional, it is required for CreateApiOperation API and we will fail the * request if not provided. */ path?: GoogleCloudApihubV1Path; } /** * An HTTP-based API Operation, sometimes called a "REST" Operation. */ export interface GoogleCloudApihubV1HttpOperationDetails { /** * Required. An HTTP Operation. */ httpOperation?: GoogleCloudApihubV1HttpOperation; /** * Optional. Path params of HttpOperation */ pathParams?: GoogleCloudApihubV1PathParam[]; /** * Optional. Query params of HttpOperation */ queryParams?: { [key: string]: GoogleCloudApihubV1QueryParam }; /** * Optional. Request metadata. */ request?: GoogleCloudApihubV1HttpRequest; /** * Optional. Response metadata. */ response?: GoogleCloudApihubV1HttpResponse; } function serializeGoogleCloudApihubV1HttpOperationDetails(data: any): GoogleCloudApihubV1HttpOperationDetails { return { ...data, queryParams: data["queryParams"] !== undefined ? Object.fromEntries(Object.entries(data["queryParams"]).map(([k, v]: [string, any]) => ([k, serializeGoogleCloudApihubV1QueryParam(v)]))) : undefined, request: data["request"] !== undefined ? serializeGoogleCloudApihubV1HttpRequest(data["request"]) : undefined, response: data["response"] !== undefined ? serializeGoogleCloudApihubV1HttpResponse(data["response"]) : undefined, }; } function deserializeGoogleCloudApihubV1HttpOperationDetails(data: any): GoogleCloudApihubV1HttpOperationDetails { return { ...data, queryParams: data["queryParams"] !== undefined ? Object.fromEntries(Object.entries(data["queryParams"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudApihubV1QueryParam(v)]))) : undefined, request: data["request"] !== undefined ? deserializeGoogleCloudApihubV1HttpRequest(data["request"]) : undefined, response: data["response"] !== undefined ? deserializeGoogleCloudApihubV1HttpResponse(data["response"]) : undefined, }; } /** * An aggregation of HTTP requests. */ export interface GoogleCloudApihubV1HttpRequest { /** * Optional. Unordered map from header name to header metadata */ headers?: { [key: string]: GoogleCloudApihubV1Header }; } function serializeGoogleCloudApihubV1HttpRequest(data: any): GoogleCloudApihubV1HttpRequest { return { ...data, headers: data["headers"] !== undefined ? Object.fromEntries(Object.entries(data["headers"]).map(([k, v]: [string, any]) => ([k, serializeGoogleCloudApihubV1Header(v)]))) : undefined, }; } function deserializeGoogleCloudApihubV1HttpRequest(data: any): GoogleCloudApihubV1HttpRequest { return { ...data, headers: data["headers"] !== undefined ? Object.fromEntries(Object.entries(data["headers"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudApihubV1Header(v)]))) : undefined, }; } /** * An aggregation of HTTP responses. */ export interface GoogleCloudApihubV1HttpResponse { /** * Optional. Unordered map from header name to header metadata */ headers?: { [key: string]: GoogleCloudApihubV1Header }; /** * Optional. Map of status code to observed count */ responseCodes?: { [key: string]: bigint }; } function serializeGoogleCloudApihubV1HttpResponse(data: any): GoogleCloudApihubV1HttpResponse { return { ...data, headers: data["headers"] !== undefined ? Object.fromEntries(Object.entries(data["headers"]).map(([k, v]: [string, any]) => ([k, serializeGoogleCloudApihubV1Header(v)]))) : undefined, responseCodes: data["responseCodes"] !== undefined ? Object.fromEntries(Object.entries(data["responseCodes"]).map(([k, v]: [string, any]) => ([k, String(v)]))) : undefined, }; } function deserializeGoogleCloudApihubV1HttpResponse(data: any): GoogleCloudApihubV1HttpResponse { return { ...data, headers: data["headers"] !== undefined ? Object.fromEntries(Object.entries(data["headers"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudApihubV1Header(v)]))) : undefined, responseCodes: data["responseCodes"] !== undefined ? Object.fromEntries(Object.entries(data["responseCodes"]).map(([k, v]: [string, any]) => ([k, BigInt(v)]))) : undefined, }; } /** * Issue contains the details of a single issue found by the linter. */ export interface GoogleCloudApihubV1Issue { /** * Required. Rule code unique to each rule defined in linter. */ code?: string; /** * Required. Human-readable message describing the issue found by the linter. */ message?: string; /** * Required. An array of strings indicating the location in the analyzed * document where the rule was triggered. */ path?: string[]; /** * Required. Object describing where in the file the issue was found. */ range?: GoogleCloudApihubV1Range; /** * Required. Severity level of the rule violation. */ severity?: | "SEVERITY_UNSPECIFIED" | "SEVERITY_ERROR" | "SEVERITY_WARNING" | "SEVERITY_INFO" | "SEVERITY_HINT"; } /** * The result of the last execution of the plugin instance. */ export interface GoogleCloudApihubV1LastExecution { /** * Output only. The last execution end time of the plugin instance. */ readonly endTime?: Date; /** * Output only. Error message describing the failure, if any, during the last * execution. */ readonly errorMessage?: string; /** * Output only. The result of the last execution of the plugin instance. */ readonly result?: | "RESULT_UNSPECIFIED" | "SUCCEEDED" | "FAILED"; /** * Output only. The result metadata of the last execution of the plugin * instance. This will be a string representation of a JSON object and will be * available on successful execution. */ readonly resultMetadata?: string; /** * Output only. The last execution start time of the plugin instance. */ readonly startTime?: Date; } /** * LintResponse contains the response from the linter. */ export interface GoogleCloudApihubV1LintResponse { /** * Required. Timestamp when the linting response was generated. */ createTime?: Date; /** * Optional. Array of issues found in the analyzed document. */ issues?: GoogleCloudApihubV1Issue[]; /** * Required. Name of the linter used. */ linter?: | "LINTER_UNSPECIFIED" | "SPECTRAL" | "OTHER"; /** * Required. Name of the linting application. */ source?: string; /** * Required. Lint state represents success or failure for linting. */ state?: | "LINT_STATE_UNSPECIFIED" | "LINT_STATE_SUCCESS" | "LINT_STATE_ERROR"; /** * Optional. Summary of all issue types and counts for each severity level. */ summary?: GoogleCloudApihubV1SummaryEntry[]; } function serializeGoogleCloudApihubV1LintResponse(data: any): GoogleCloudApihubV1LintResponse { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, }; } function deserializeGoogleCloudApihubV1LintResponse(data: any): GoogleCloudApihubV1LintResponse { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, }; } /** * The LintSpec method's request. */ export interface GoogleCloudApihubV1LintSpecRequest { } /** * The ListAddons method's response. */ export interface GoogleCloudApihubV1ListAddonsResponse { /** * The list of addons. */ addons?: GoogleCloudApihubV1Addon[]; /** * A token to retrieve the next page of results, or empty if there are no * more results in the list. */ nextPageToken?: string; } /** * The ListApiOperations method's response. */ export interface GoogleCloudApihubV1ListApiOperationsResponse { /** * The operations corresponding to an API version. */ apiOperations?: GoogleCloudApihubV1ApiOperation[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * The ListApis method's response. */ export interface GoogleCloudApihubV1ListApisResponse { /** * The API resources present in the API hub. */ apis?: GoogleCloudApihubV1Api[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * The ListAttributes method's response. */ export interface GoogleCloudApihubV1ListAttributesResponse { /** * The list of all attributes. */ attributes?: GoogleCloudApihubV1Attribute[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * The ListCurations method's response. */ export interface GoogleCloudApihubV1ListCurationsResponse { /** * The curation resources present in the API hub. */ curations?: GoogleCloudApihubV1Curation[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * The ListDependencies method's response. */ export interface GoogleCloudApihubV1ListDependenciesResponse { /** * The dependency resources present in the API hub. */ dependencies?: GoogleCloudApihubV1Dependency[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * The ListDeployments method's response. */ export interface GoogleCloudApihubV1ListDeploymentsResponse { /** * The deployment resources present in the API hub. */ deployments?: GoogleCloudApihubV1Deployment[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Message for response to listing DiscoveredApiObservations */ export interface GoogleCloudApihubV1ListDiscoveredApiObservationsResponse { /** * The DiscoveredApiObservation from the specified project and location. */ discoveredApiObservations?: GoogleCloudApihubV1DiscoveredApiObservation[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } function serializeGoogleCloudApihubV1ListDiscoveredApiObservationsResponse(data: any): GoogleCloudApihubV1ListDiscoveredApiObservationsResponse { return { ...data, discoveredApiObservations: data["discoveredApiObservations"] !== undefined ? data["discoveredApiObservations"].map((item: any) => (serializeGoogleCloudApihubV1DiscoveredApiObservation(item))) : undefined, }; } function deserializeGoogleCloudApihubV1ListDiscoveredApiObservationsResponse(data: any): GoogleCloudApihubV1ListDiscoveredApiObservationsResponse { return { ...data, discoveredApiObservations: data["discoveredApiObservations"] !== undefined ? data["discoveredApiObservations"].map((item: any) => (deserializeGoogleCloudApihubV1DiscoveredApiObservation(item))) : undefined, }; } /** * Message for response to listing DiscoveredApiOperations */ export interface GoogleCloudApihubV1ListDiscoveredApiOperationsResponse { /** * The DiscoveredApiOperations from the specified project, location and * DiscoveredApiObservation. */ discoveredApiOperations?: GoogleCloudApihubV1DiscoveredApiOperation[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } function serializeGoogleCloudApihubV1ListDiscoveredApiOperationsResponse(data: any): GoogleCloudApihubV1ListDiscoveredApiOperationsResponse { return { ...data, discoveredApiOperations: data["discoveredApiOperations"] !== undefined ? data["discoveredApiOperations"].map((item: any) => (serializeGoogleCloudApihubV1DiscoveredApiOperation(item))) : undefined, }; } function deserializeGoogleCloudApihubV1ListDiscoveredApiOperationsResponse(data: any): GoogleCloudApihubV1ListDiscoveredApiOperationsResponse { return { ...data, discoveredApiOperations: data["discoveredApiOperations"] !== undefined ? data["discoveredApiOperations"].map((item: any) => (deserializeGoogleCloudApihubV1DiscoveredApiOperation(item))) : undefined, }; } /** * The ListExternalApis method's response. */ export interface GoogleCloudApihubV1ListExternalApisResponse { /** * The External API resources present in the API hub. */ externalApis?: GoogleCloudApihubV1ExternalApi[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * The ListHostProjectRegistrations method's response. */ export interface GoogleCloudApihubV1ListHostProjectRegistrationsResponse { /** * The list of host project registrations. */ hostProjectRegistrations?: GoogleCloudApihubV1HostProjectRegistration[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * The ListPluginInstances method's response. */ export interface GoogleCloudApihubV1ListPluginInstancesResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The plugin instances from the specified parent resource. */ pluginInstances?: GoogleCloudApihubV1PluginInstance[]; } function serializeGoogleCloudApihubV1ListPluginInstancesResponse(data: any): GoogleCloudApihubV1ListPluginInstancesResponse { return { ...data, pluginInstances: data["pluginInstances"] !== undefined ? data["pluginInstances"].map((item: any) => (serializeGoogleCloudApihubV1PluginInstance(item))) : undefined, }; } function deserializeGoogleCloudApihubV1ListPluginInstancesResponse(data: any): GoogleCloudApihubV1ListPluginInstancesResponse { return { ...data, pluginInstances: data["pluginInstances"] !== undefined ? data["pluginInstances"].map((item: any) => (deserializeGoogleCloudApihubV1PluginInstance(item))) : undefined, }; } /** * The ListPlugins method's response. */ export interface GoogleCloudApihubV1ListPluginsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The plugins from the specified parent resource. */ plugins?: GoogleCloudApihubV1Plugin[]; } /** * The ListRuntimeProjectAttachments method's response. */ export interface GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * List of runtime project attachments. */ runtimeProjectAttachments?: GoogleCloudApihubV1RuntimeProjectAttachment[]; } /** * The ListSpecs method's response. */ export interface GoogleCloudApihubV1ListSpecsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The specs corresponding to an API Version. */ specs?: GoogleCloudApihubV1Spec[]; } function serializeGoogleCloudApihubV1ListSpecsResponse(data: any): GoogleCloudApihubV1ListSpecsResponse { return { ...data, specs: data["specs"] !== undefined ? data["specs"].map((item: any) => (serializeGoogleCloudApihubV1Spec(item))) : undefined, }; } function deserializeGoogleCloudApihubV1ListSpecsResponse(data: any): GoogleCloudApihubV1ListSpecsResponse { return { ...data, specs: data["specs"] !== undefined ? data["specs"].map((item: any) => (deserializeGoogleCloudApihubV1Spec(item))) : undefined, }; } /** * The ListVersions method's response. */ export interface GoogleCloudApihubV1ListVersionsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The versions corresponding to an API. */ versions?: GoogleCloudApihubV1Version[]; } /** * The LookupApiHubInstance method's response.` */ export interface GoogleCloudApihubV1LookupApiHubInstanceResponse { /** * API Hub instance for a project if it exists, empty otherwise. */ apiHubInstance?: GoogleCloudApihubV1ApiHubInstance; } /** * The ListRuntimeProjectAttachments method's response. */ export interface GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse { /** * Runtime project attachment for a project if exists, empty otherwise. */ runtimeProjectAttachment?: GoogleCloudApihubV1RuntimeProjectAttachment; } /** * The ManageAddonConfig method's request. */ export interface GoogleCloudApihubV1ManageAddonConfigRequest { /** * Required. The config of the addon to be managed. This config will replace * the config present in the addon. The type of the config should match the * config type already present in the addon. */ config?: GoogleCloudApihubV1AddonConfig; } /** * The ManagePluginInstanceSourceData method's request. */ export interface GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest { /** * Required. Action to be performed. */ action?: | "ACTION_UNSPECIFIED" | "UPLOAD" | "DELETE"; /** * Required. Data to be managed. */ data?: Uint8Array; /** * Required. Type of data to be managed. */ dataType?: | "DATA_TYPE_UNSPECIFIED" | "PROXY_DEPLOYMENT_MANIFEST" | "ENVIRONMENT_MANIFEST" | "PROXY_BUNDLE" | "SHARED_FLOW_BUNDLE"; /** * Required. Relative path of data being managed for a given plugin instance. */ relativePath?: string; } function serializeGoogleCloudApihubV1ManagePluginInstanceSourceDataRequest(data: any): GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest { return { ...data, data: data["data"] !== undefined ? encodeBase64(data["data"]) : undefined, }; } function deserializeGoogleCloudApihubV1ManagePluginInstanceSourceDataRequest(data: any): GoogleCloudApihubV1ManagePluginInstanceSourceDataRequest { return { ...data, data: data["data"] !== undefined ? decodeBase64(data["data"] as string) : undefined, }; } /** * The ManagePluginInstanceSourceData method's response. */ export interface GoogleCloudApihubV1ManagePluginInstanceSourceDataResponse { } /** * MatchResult represents the result of matching a discovered API operation * with a catalog API operation. */ export interface GoogleCloudApihubV1MatchResult { /** * Output only. The name of the matched API Operation. Format: * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` */ readonly name?: string; } /** * Details describing an MCP Tool. */ export interface GoogleCloudApihubV1McpTool { /** * Optional. Optional annotations for the tool. */ annotations?: GoogleCloudApihubV1ToolAnnotations; /** * Optional. Description of what the tool does. */ description?: string; /** * Optional. Input schema for the operation. This can be parsed only from MCP * schema type. */ inputSchema?: GoogleCloudApihubV1OperationSchema; /** * Required. The name of the tool, unique within its parent scope (version). */ name?: string; /** * Optional. Output schema for the operation. This can be parsed only from * MCP schema type. */ outputSchema?: GoogleCloudApihubV1OperationSchema; /** * Optional. Optional title for the tool. */ title?: string; } /** * The config variable value of data type multi int. */ export interface GoogleCloudApihubV1MultiIntValues { /** * Optional. The config variable value of data type multi int. */ values?: number[]; } /** * The config variable value of data type multi select. */ export interface GoogleCloudApihubV1MultiSelectValues { /** * Optional. The config variable value of data type multi select. */ values?: GoogleCloudApihubV1ConfigValueOption[]; } /** * The config variable value of data type multi string. */ export interface GoogleCloudApihubV1MultiStringValues { /** * Optional. The config variable value of data type multi string. */ values?: string[]; } /** * Parameters to support Oauth 2.0 client credentials grant authentication. See * https://tools.ietf.org/html/rfc6749#section-1.3.4 for more details. */ export interface GoogleCloudApihubV1Oauth2ClientCredentialsConfig { /** * Required. The client identifier. */ clientId?: string; /** * Required. Secret version reference containing the client secret. The * `secretmanager.versions.access` permission should be granted to the service * account accessing the secret. */ clientSecret?: GoogleCloudApihubV1Secret; } /** * OpenApiSpecDetails contains the details parsed from an OpenAPI spec in * addition to the fields mentioned in SpecDetails. */ export interface GoogleCloudApihubV1OpenApiSpecDetails { /** * Output only. The format of the spec. */ readonly format?: | "FORMAT_UNSPECIFIED" | "OPEN_API_SPEC_2_0" | "OPEN_API_SPEC_3_0" | "OPEN_API_SPEC_3_1"; /** * Output only. Owner details for the spec. This maps to `info.contact` in * OpenAPI spec. */ readonly owner?: GoogleCloudApihubV1Owner; /** * Output only. The version in the spec. This maps to `info.version` in * OpenAPI spec. */ readonly version?: string; } /** * The operation details parsed from the spec. */ export interface GoogleCloudApihubV1OperationDetails { /** * Optional. For OpenAPI spec, this will be set if `operation.deprecated`is * marked as `true` in the spec. */ deprecated?: boolean; /** * Optional. Description of the operation behavior. For OpenAPI spec, this * will map to `operation.description` in the spec, in case description is * empty, `operation.summary` will be used. */ description?: string; /** * Optional. Additional external documentation for this operation. For * OpenAPI spec, this will map to `operation.documentation` in the spec. */ documentation?: GoogleCloudApihubV1Documentation; /** * The HTTP Operation. */ httpOperation?: GoogleCloudApihubV1HttpOperation; /** * The MCP Tool Operation. */ mcpTool?: GoogleCloudApihubV1McpTool; } /** * Represents the metadata of the long-running operation. */ export interface GoogleCloudApihubV1OperationMetadata { /** * 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; } /** * The operation schema needed for an operation. */ export interface GoogleCloudApihubV1OperationSchema { /** * The JSON schema. Only valid JSON is accepted but semantic validation of * schema is not supported right now. */ jsonSchema?: { [key: string]: any }; } /** * Owner details. */ export interface GoogleCloudApihubV1Owner { /** * Optional. The name of the owner. */ displayName?: string; /** * Required. The email of the owner. */ email?: string; } /** * The path details derived from the spec. */ export interface GoogleCloudApihubV1Path { /** * Optional. A short description for the path applicable to all operations. */ description?: string; /** * Optional. Complete path relative to server endpoint. Note: Even though * this field is optional, it is required for CreateApiOperation API and we * will fail the request if not provided. */ path?: string; } /** * HTTP Path parameter. */ export interface GoogleCloudApihubV1PathParam { /** * Optional. Data type of path param */ dataType?: | "DATA_TYPE_UNSPECIFIED" | "BOOL" | "INTEGER" | "FLOAT" | "STRING" | "UUID"; /** * Optional. Segment location in the path, 1-indexed */ position?: number; } /** * A plugin resource in the API Hub. */ export interface GoogleCloudApihubV1Plugin { /** * Optional. The configuration of actions supported by the plugin. * **REQUIRED**: This field must be provided when creating or updating a * Plugin. The server will reject requests if this field is missing. */ actionsConfig?: GoogleCloudApihubV1PluginActionConfig[]; /** * Optional. The configuration template for the plugin. */ configTemplate?: GoogleCloudApihubV1ConfigTemplate; /** * Output only. Timestamp indicating when the plugin was created. */ readonly createTime?: Date; /** * Optional. The plugin description. Max length is 2000 characters (Unicode * code points). */ description?: string; /** * Required. The display name of the plugin. Max length is 50 characters * (Unicode code points). */ displayName?: string; /** * Optional. The documentation of the plugin, that explains how to set up and * use the plugin. */ documentation?: GoogleCloudApihubV1Documentation; /** * Optional. The type of the gateway. */ gatewayType?: | "GATEWAY_TYPE_UNSPECIFIED" | "APIGEE_X_AND_HYBRID" | "APIGEE_EDGE_PUBLIC_CLOUD" | "APIGEE_EDGE_PRIVATE_CLOUD" | "CLOUD_API_GATEWAY" | "CLOUD_ENDPOINTS" | "API_DISCOVERY" | "OTHERS"; /** * Optional. This field is optional. It is used to notify the plugin hosting * service for any lifecycle changes of the plugin instance and trigger * execution of plugin instance actions in case of API hub managed actions. * This field should be provided if the plugin instance lifecycle of the * developed plugin needs to be managed from API hub. Also, in this case the * plugin hosting service interface needs to be implemented. This field should * not be provided if the plugin wants to manage plugin instance lifecycle * events outside of hub interface and use plugin framework for only * registering of plugin and plugin instances to capture the source of data * into hub. Note, in this case the plugin hosting service interface is not * required to be implemented. Also, the plugin instance lifecycle actions * will be disabled from API hub's UI. */ hostingService?: GoogleCloudApihubV1HostingService; /** * Identifier. The name of the plugin. Format: * `projects/{project}/locations/{location}/plugins/{plugin}` */ name?: string; /** * Output only. The type of the plugin, indicating whether it is * 'SYSTEM_OWNED' or 'USER_OWNED'. */ readonly ownershipType?: | "OWNERSHIP_TYPE_UNSPECIFIED" | "SYSTEM_OWNED" | "USER_OWNED"; /** * Optional. The category of the plugin, identifying its primary category or * purpose. This field is required for all plugins. */ pluginCategory?: | "PLUGIN_CATEGORY_UNSPECIFIED" | "API_GATEWAY" | "API_PRODUCER"; /** * Output only. Represents the state of the plugin. Note this field will not * be set for plugins developed via plugin framework as the state will be * managed at plugin instance level. */ readonly state?: | "STATE_UNSPECIFIED" | "ENABLED" | "DISABLED"; /** * Optional. The type of the API. This maps to the following system defined * attribute: * `projects/{project}/locations/{location}/attributes/system-plugin-type` * attribute. The number of allowed values for this attribute will be based on * the cardinality of the attribute. The same can be retrieved via * GetAttribute API. All values should be from the list of allowed values * defined for the attribute. Note this field is not required for plugins * developed via plugin framework. */ type?: GoogleCloudApihubV1AttributeValues; /** * Output only. Timestamp indicating when the plugin was last updated. */ readonly updateTime?: Date; } /** * PluginActionConfig represents the configuration of an action supported by a * plugin. */ export interface GoogleCloudApihubV1PluginActionConfig { /** * Required. The description of the operation performed by the action. */ description?: string; /** * Required. The display name of the action. */ displayName?: string; /** * Required. The id of the action. */ id?: string; /** * Required. The trigger mode supported by the action. */ triggerMode?: | "TRIGGER_MODE_UNSPECIFIED" | "API_HUB_ON_DEMAND_TRIGGER" | "API_HUB_SCHEDULE_TRIGGER" | "NON_API_HUB_MANAGED"; } /** * Represents a plugin instance resource in the API Hub. A PluginInstance is a * specific instance of a hub plugin with its own configuration, state, and * execution details. */ export interface GoogleCloudApihubV1PluginInstance { /** * Required. The action status for the plugin instance. */ actions?: GoogleCloudApihubV1PluginInstanceAction[]; /** * Optional. The additional information for this plugin instance * corresponding to the additional config template of the plugin. This * information will be sent to plugin hosting service on each call to plugin * hosted service. The key will be the config_variable_template.display_name * to uniquely identify the config variable. */ additionalConfig?: { [key: string]: GoogleCloudApihubV1ConfigVariable }; /** * Optional. The authentication information for this plugin instance. */ authConfig?: GoogleCloudApihubV1AuthConfig; /** * Output only. Timestamp indicating when the plugin instance was created. */ readonly createTime?: Date; /** * Required. The display name for this plugin instance. Max length is 255 * characters. */ displayName?: string; /** * Output only. Error message describing the failure, if any, during Create, * Delete or ApplyConfig operation corresponding to the plugin instance.This * field will only be populated if the plugin instance is in the ERROR or * FAILED state. */ readonly errorMessage?: string; /** * Identifier. The unique name of the plugin instance resource. Format: * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` */ name?: string; /** * Optional. The source environment's config present in the gateway instance * linked to the plugin instance. The key is the `source_environment` name * from the SourceEnvironment message. */ sourceEnvironmentsConfig?: { [key: string]: GoogleCloudApihubV1SourceEnvironment }; /** * Optional. The source project id of the plugin instance. This will be the * id of runtime project in case of Google Cloud based plugins and org id in * case of non-Google Cloud based plugins. This field will be a required field * for Google provided on-ramp plugins. */ sourceProjectId?: string; /** * Output only. The current state of the plugin instance (e.g., enabled, * disabled, provisioning). */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "APPLYING_CONFIG" | "ERROR" | "FAILED" | "DELETING"; /** * Output only. Timestamp indicating when the plugin instance was last * updated. */ readonly updateTime?: Date; } function serializeGoogleCloudApihubV1PluginInstance(data: any): GoogleCloudApihubV1PluginInstance { return { ...data, additionalConfig: data["additionalConfig"] !== undefined ? Object.fromEntries(Object.entries(data["additionalConfig"]).map(([k, v]: [string, any]) => ([k, serializeGoogleCloudApihubV1ConfigVariable(v)]))) : undefined, sourceEnvironmentsConfig: data["sourceEnvironmentsConfig"] !== undefined ? Object.fromEntries(Object.entries(data["sourceEnvironmentsConfig"]).map(([k, v]: [string, any]) => ([k, serializeGoogleCloudApihubV1SourceEnvironment(v)]))) : undefined, }; } function deserializeGoogleCloudApihubV1PluginInstance(data: any): GoogleCloudApihubV1PluginInstance { return { ...data, additionalConfig: data["additionalConfig"] !== undefined ? Object.fromEntries(Object.entries(data["additionalConfig"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudApihubV1ConfigVariable(v)]))) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, sourceEnvironmentsConfig: data["sourceEnvironmentsConfig"] !== undefined ? Object.fromEntries(Object.entries(data["sourceEnvironmentsConfig"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudApihubV1SourceEnvironment(v)]))) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * PluginInstanceAction represents an action which can be executed in the * plugin instance. */ export interface GoogleCloudApihubV1PluginInstanceAction { /** * Required. This should map to one of the action id specified in * actions_config in the plugin. */ actionId?: string; /** * Optional. This configuration should be provided if the plugin action is * publishing data to API hub curate layer. */ curationConfig?: GoogleCloudApihubV1CurationConfig; /** * Optional. The execution information for the plugin instance action done * corresponding to an API hub instance. */ hubInstanceAction?: GoogleCloudApihubV1ExecutionStatus; /** * Output only. The configuration of resources created for a given plugin * instance action. Note these will be returned only in case of non-Google * Cloud plugins like OPDK. */ readonly resourceConfig?: GoogleCloudApihubV1ResourceConfig; /** * Optional. The schedule for this plugin instance action. This can only be * set if the plugin supports API_HUB_SCHEDULE_TRIGGER mode for this action. */ scheduleCronExpression?: string; /** * Optional. The time zone for the schedule cron expression. If not provided, * UTC will be used. */ scheduleTimeZone?: string; /** * Optional. The service account used to publish data. Note, the service * account will only be accepted for non-Google Cloud plugins like OPDK. */ serviceAccount?: string; /** * Output only. The current state of the plugin action in the plugin * instance. */ readonly state?: | "STATE_UNSPECIFIED" | "ENABLED" | "DISABLED" | "ENABLING" | "DISABLING" | "ERROR"; } /** * The plugin instance and associated action that is using the curation. */ export interface GoogleCloudApihubV1PluginInstanceActionID { /** * Output only. The action ID that is using the curation. This should map to * one of the action IDs specified in action configs in the plugin. */ readonly actionId?: string; /** * Output only. Plugin instance that is using the curation. Format is * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` */ readonly pluginInstance?: string; } /** * PluginInstanceActionSource represents the plugin instance action source. */ export interface GoogleCloudApihubV1PluginInstanceActionSource { /** * Output only. The id of the plugin instance action. */ readonly actionId?: string; /** * Output only. The resource name of the source plugin instance. Format is * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` */ readonly pluginInstance?: string; } /** * Point within the file (line and character). */ export interface GoogleCloudApihubV1Point { /** * Required. Character position within the line (zero-indexed). */ character?: number; /** * Required. Line number (zero-indexed). */ line?: number; } /** * An aggregation of HTTP query parameter occurrences. */ export interface GoogleCloudApihubV1QueryParam { /** * Optional. The number of occurrences of this query parameter across * transactions. */ count?: bigint; /** * Optional. Data type of path param */ dataType?: | "DATA_TYPE_UNSPECIFIED" | "BOOL" | "INTEGER" | "FLOAT" | "STRING" | "UUID"; /** * Required. Name of query param */ name?: string; } function serializeGoogleCloudApihubV1QueryParam(data: any): GoogleCloudApihubV1QueryParam { return { ...data, count: data["count"] !== undefined ? String(data["count"]) : undefined, }; } function deserializeGoogleCloudApihubV1QueryParam(data: any): GoogleCloudApihubV1QueryParam { return { ...data, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, }; } /** * Object describing where in the file the issue was found. */ export interface GoogleCloudApihubV1Range { /** * Required. End of the issue. */ end?: GoogleCloudApihubV1Point; /** * Required. Start of the issue. */ start?: GoogleCloudApihubV1Point; } /** * The configuration of resources created for a given plugin instance action. */ export interface GoogleCloudApihubV1ResourceConfig { /** * Output only. The type of the action. */ readonly actionType?: | "ACTION_TYPE_UNSPECIFIED" | "SYNC_METADATA" | "SYNC_RUNTIME_DATA"; /** * Output only. The pubsub topic to publish the data to. Format is * projects/{project}/topics/{topic} */ readonly pubsubTopic?: string; } /** * The RetrieveApiViews method's response. */ export interface GoogleCloudApihubV1RetrieveApiViewsResponse { /** * The list of API views. */ apiViews?: GoogleCloudApihubV1ApiView[]; /** * Next page token. */ nextPageToken?: string; } /** * Runtime project attachment represents an attachment from the runtime project * to the host project. Api Hub looks for deployments in the attached runtime * projects and creates corresponding resources in Api Hub for the discovered * deployments. */ export interface GoogleCloudApihubV1RuntimeProjectAttachment { /** * Output only. Create time. */ readonly createTime?: Date; /** * Identifier. The resource name of a runtime project attachment. Format: * "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}". */ name?: string; /** * Required. Immutable. Google cloud project name in the format: * "projects/abc" or "projects/123". As input, project name with either * project id or number are accepted. As output, this field will contain * project number. */ runtimeProject?: string; } /** * The schema details derived from the spec. Currently, this entity is * supported for OpenAPI spec only. For OpenAPI spec, this maps to the schema * defined in the `definitions` section for OpenAPI 2.0 version and in * `components.schemas` section for OpenAPI 3.0 and 3.1 version. */ export interface GoogleCloudApihubV1Schema { /** * Output only. The display name of the schema. This will map to the name of * the schema in the spec. */ readonly displayName?: string; /** * Output only. The raw value of the schema definition corresponding to the * schema name in the spec. */ readonly rawValue?: Uint8Array; } /** * The SearchResources method's request. */ export interface GoogleCloudApihubV1SearchResourcesRequest { /** * Optional. An expression that filters the list of search results. A filter * expression consists of a field name, a comparison operator, and a value for * filtering. The value must be a string, a number, or a boolean. The * comparison operator must be `=`. Filters are not case sensitive. The * following field names are eligible for filtering: * `resource_type` - The * type of resource in the search results. Must be one of the following: * `Api`, `ApiOperation`, `Deployment`, `Definition`, `Spec` or `Version`. * This field can only be specified once in the filter. Here are is an * example: * `resource_type = Api` - The resource_type is _Api_. */ filter?: string; /** * Optional. The maximum number of search results to return. The service may * return fewer than this value. If unspecified at most 10 search results will * be returned. If value is negative then `INVALID_ARGUMENT` error is * returned. The maximum value is 25; values above 25 will be coerced to 25. * While paginating, you can specify a new page size parameter for each page * of search results to be listed. */ pageSize?: number; /** * Optional. A page token, received from a previous SearchResources call. * Specify this parameter to retrieve the next page of transactions. When * paginating, you must specify the `page_token` parameter and all the other * parameters except page_size should be specified with the same value which * was used in the previous call. If the other fields are set with a different * value than the previous call then `INVALID_ARGUMENT` error is returned. */ pageToken?: string; /** * Required. The free text search query. This query can contain keywords * which could be related to any detail of the API-Hub resources such display * names, descriptions, attributes etc. */ query?: string; } /** * Response for the SearchResources method. */ export interface GoogleCloudApihubV1SearchResourcesResponse { /** * Pass this token in the SearchResourcesRequest to continue to list results. * If all results have been returned, this field is an empty string or not * present in the response. */ nextPageToken?: string; /** * List of search results according to the filter and search query specified. * The order of search results represents the ranking. */ searchResults?: GoogleCloudApihubV1SearchResult[]; } function serializeGoogleCloudApihubV1SearchResourcesResponse(data: any): GoogleCloudApihubV1SearchResourcesResponse { return { ...data, searchResults: data["searchResults"] !== undefined ? data["searchResults"].map((item: any) => (serializeGoogleCloudApihubV1SearchResult(item))) : undefined, }; } function deserializeGoogleCloudApihubV1SearchResourcesResponse(data: any): GoogleCloudApihubV1SearchResourcesResponse { return { ...data, searchResults: data["searchResults"] !== undefined ? data["searchResults"].map((item: any) => (deserializeGoogleCloudApihubV1SearchResult(item))) : undefined, }; } /** * Represents the search results. */ export interface GoogleCloudApihubV1SearchResult { /** * This represents the ApiHubResource. Note: Only selected fields of the * resources are populated in response. */ resource?: GoogleCloudApihubV1ApiHubResource; } function serializeGoogleCloudApihubV1SearchResult(data: any): GoogleCloudApihubV1SearchResult { return { ...data, resource: data["resource"] !== undefined ? serializeGoogleCloudApihubV1ApiHubResource(data["resource"]) : undefined, }; } function deserializeGoogleCloudApihubV1SearchResult(data: any): GoogleCloudApihubV1SearchResult { return { ...data, resource: data["resource"] !== undefined ? deserializeGoogleCloudApihubV1ApiHubResource(data["resource"]) : undefined, }; } /** * Secret provides a reference to entries in Secret Manager. */ export interface GoogleCloudApihubV1Secret { /** * Required. The resource name of the secret version in the format, format * as: `projects/*\/secrets/*\/versions/*`. */ secretVersion?: string; } /** * Message representing the source environment details. */ export interface GoogleCloudApihubV1SourceEnvironment { /** * Optional. The time at which the environment was created at the source. */ createTime?: Date; /** * Required. The name of the environment at the source. This should map to * Deployment. */ sourceEnvironment?: string; /** * The location where additional information about source environments can be * found. The location should be relative path of the environment manifest * with respect to a plugin instance. */ sourceEnvironmentUri?: string; /** * Optional. The time at which the environment was last updated at the * source. */ updateTime?: Date; } function serializeGoogleCloudApihubV1SourceEnvironment(data: any): GoogleCloudApihubV1SourceEnvironment { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudApihubV1SourceEnvironment(data: any): GoogleCloudApihubV1SourceEnvironment { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * SourceMetadata represents the metadata for a resource at the source. */ export interface GoogleCloudApihubV1SourceMetadata { /** * Output only. The time at which the resource was created at the source. */ readonly originalResourceCreateTime?: Date; /** * Output only. The unique identifier of the resource at the source. */ readonly originalResourceId?: string; /** * Output only. The time at which the resource was last updated at the * source. */ readonly originalResourceUpdateTime?: Date; /** * Output only. The source of the resource is a plugin instance action. */ readonly pluginInstanceActionSource?: GoogleCloudApihubV1PluginInstanceActionSource; /** * Output only. The type of the source. */ readonly sourceType?: | "SOURCE_TYPE_UNSPECIFIED" | "PLUGIN"; } /** * Represents a spec associated with an API version in the API Hub. Note that * specs of various types can be uploaded, however parsing of details is * supported for OpenAPI spec currently. */ export interface GoogleCloudApihubV1Spec { /** * Output only. The additional spec contents for the spec. */ readonly additionalSpecContents?: GoogleCloudApihubV1AdditionalSpecContent[]; /** * Optional. The list of user defined attributes associated with the spec. * The key is the attribute name. It will be of the format: * `projects/{project}/locations/{location}/attributes/{attribute}`. The value * is the attribute values associated with the resource. */ attributes?: { [key: string]: GoogleCloudApihubV1AttributeValues }; /** * Optional. Input only. The contents of the uploaded spec. */ contents?: GoogleCloudApihubV1SpecContents; /** * Output only. The time at which the spec was created. */ readonly createTime?: Date; /** * Output only. Details parsed from the spec. */ readonly details?: GoogleCloudApihubV1SpecDetails; /** * Required. The display name of the spec. This can contain the file name of * the spec. */ displayName?: string; /** * Optional. The documentation of the spec. For OpenAPI spec, this will be * populated from `externalDocs` in OpenAPI spec. */ documentation?: GoogleCloudApihubV1Documentation; /** * Optional. The lint response for the spec. */ lintResponse?: GoogleCloudApihubV1LintResponse; /** * Identifier. The name of the spec. Format: * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` */ name?: string; /** * Optional. Input only. Enum specifying the parsing mode for OpenAPI * Specification (OAS) parsing. */ parsingMode?: | "PARSING_MODE_UNSPECIFIED" | "RELAXED" | "STRICT"; /** * Output only. The list of sources and metadata from the sources of the * spec. */ readonly sourceMetadata?: GoogleCloudApihubV1SourceMetadata[]; /** * Optional. The URI of the spec source in case file is uploaded from an * external version control system. */ sourceUri?: string; /** * Required. The type of spec. The value should be one of the allowed values * defined for * `projects/{project}/locations/{location}/attributes/system-spec-type` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. Note, this field is mandatory if content is provided. */ specType?: GoogleCloudApihubV1AttributeValues; /** * Output only. The time at which the spec was last updated. */ readonly updateTime?: Date; } function serializeGoogleCloudApihubV1Spec(data: any): GoogleCloudApihubV1Spec { return { ...data, contents: data["contents"] !== undefined ? serializeGoogleCloudApihubV1SpecContents(data["contents"]) : undefined, lintResponse: data["lintResponse"] !== undefined ? serializeGoogleCloudApihubV1LintResponse(data["lintResponse"]) : undefined, }; } function deserializeGoogleCloudApihubV1Spec(data: any): GoogleCloudApihubV1Spec { return { ...data, additionalSpecContents: data["additionalSpecContents"] !== undefined ? data["additionalSpecContents"].map((item: any) => (deserializeGoogleCloudApihubV1AdditionalSpecContent(item))) : undefined, contents: data["contents"] !== undefined ? deserializeGoogleCloudApihubV1SpecContents(data["contents"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, lintResponse: data["lintResponse"] !== undefined ? deserializeGoogleCloudApihubV1LintResponse(data["lintResponse"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * The spec contents. */ export interface GoogleCloudApihubV1SpecContents { /** * Required. The contents of the spec. */ contents?: Uint8Array; /** * Required. The mime type of the content for example application/json, * application/yaml, application/wsdl etc. */ mimeType?: string; } function serializeGoogleCloudApihubV1SpecContents(data: any): GoogleCloudApihubV1SpecContents { return { ...data, contents: data["contents"] !== undefined ? encodeBase64(data["contents"]) : undefined, }; } function deserializeGoogleCloudApihubV1SpecContents(data: any): GoogleCloudApihubV1SpecContents { return { ...data, contents: data["contents"] !== undefined ? decodeBase64(data["contents"] as string) : undefined, }; } /** * SpecDetails contains the details parsed from supported spec types. */ export interface GoogleCloudApihubV1SpecDetails { /** * Output only. The description of the spec. */ readonly description?: string; /** * Output only. Additional details apart from `OperationDetails` parsed from * an OpenAPI spec. The OperationDetails parsed from the spec can be obtained * by using ListAPIOperations method. */ readonly openApiSpecDetails?: GoogleCloudApihubV1OpenApiSpecDetails; } /** * The metadata associated with a spec of the API version. */ export interface GoogleCloudApihubV1SpecMetadata { /** * Optional. Timestamp indicating when the spec was created at the source. */ originalCreateTime?: Date; /** * Optional. The unique identifier of the spec in the system where it was * originally created. */ originalId?: string; /** * Required. Timestamp indicating when the spec was last updated at the * source. */ originalUpdateTime?: Date; /** * Required. The spec resource to be pushed to Hub's collect layer. The ID of * the spec will be generated by Hub. */ spec?: GoogleCloudApihubV1Spec; } function serializeGoogleCloudApihubV1SpecMetadata(data: any): GoogleCloudApihubV1SpecMetadata { return { ...data, originalCreateTime: data["originalCreateTime"] !== undefined ? data["originalCreateTime"].toISOString() : undefined, originalUpdateTime: data["originalUpdateTime"] !== undefined ? data["originalUpdateTime"].toISOString() : undefined, spec: data["spec"] !== undefined ? serializeGoogleCloudApihubV1Spec(data["spec"]) : undefined, }; } function deserializeGoogleCloudApihubV1SpecMetadata(data: any): GoogleCloudApihubV1SpecMetadata { return { ...data, originalCreateTime: data["originalCreateTime"] !== undefined ? new Date(data["originalCreateTime"]) : undefined, originalUpdateTime: data["originalUpdateTime"] !== undefined ? new Date(data["originalUpdateTime"]) : undefined, spec: data["spec"] !== undefined ? deserializeGoogleCloudApihubV1Spec(data["spec"]) : undefined, }; } /** * The attribute values of data type string or JSON. */ export interface GoogleCloudApihubV1StringAttributeValues { /** * Required. The attribute values in case attribute data type is string or * JSON. */ values?: string[]; } /** * Represents a singleton style guide resource to be used for linting Open API * specs. */ export interface GoogleCloudApihubV1StyleGuide { /** * Required. Input only. The contents of the uploaded style guide. */ contents?: GoogleCloudApihubV1StyleGuideContents; /** * Required. Target linter for the style guide. */ linter?: | "LINTER_UNSPECIFIED" | "SPECTRAL" | "OTHER"; /** * Identifier. The name of the style guide. Format: * `projects/{project}/locations/{location}/plugins/{plugin}/styleGuide` */ name?: string; } function serializeGoogleCloudApihubV1StyleGuide(data: any): GoogleCloudApihubV1StyleGuide { return { ...data, contents: data["contents"] !== undefined ? serializeGoogleCloudApihubV1StyleGuideContents(data["contents"]) : undefined, }; } function deserializeGoogleCloudApihubV1StyleGuide(data: any): GoogleCloudApihubV1StyleGuide { return { ...data, contents: data["contents"] !== undefined ? deserializeGoogleCloudApihubV1StyleGuideContents(data["contents"]) : undefined, }; } /** * The style guide contents. */ export interface GoogleCloudApihubV1StyleGuideContents { /** * Required. The contents of the style guide. */ contents?: Uint8Array; /** * Required. The mime type of the content. */ mimeType?: string; } function serializeGoogleCloudApihubV1StyleGuideContents(data: any): GoogleCloudApihubV1StyleGuideContents { return { ...data, contents: data["contents"] !== undefined ? encodeBase64(data["contents"]) : undefined, }; } function deserializeGoogleCloudApihubV1StyleGuideContents(data: any): GoogleCloudApihubV1StyleGuideContents { return { ...data, contents: data["contents"] !== undefined ? decodeBase64(data["contents"] as string) : undefined, }; } /** * Count of issues with a given severity. */ export interface GoogleCloudApihubV1SummaryEntry { /** * Required. Count of issues with the given severity. */ count?: number; /** * Required. Severity of the issue. */ severity?: | "SEVERITY_UNSPECIFIED" | "SEVERITY_ERROR" | "SEVERITY_WARNING" | "SEVERITY_INFO" | "SEVERITY_HINT"; } /** * Annotations for a Tool. */ export interface GoogleCloudApihubV1ToolAnnotations { /** * Optional. Additional hints which may help tools and not covered in * defaults. */ additionalHints?: { [key: string]: string }; /** * Optional. Hint indicating if the tool may have destructive side effects. */ destructiveHint?: boolean; /** * Optional. Hint indicating if the tool is idempotent. */ idempotentHint?: boolean; /** * Optional. Hint indicating if the tool interacts with the open world (e.g., * internet). */ openWorldHint?: boolean; /** * Optional. Hint indicating if the tool is read-only. */ readOnlyHint?: boolean; /** * Optional. A human-readable title for the tool (if different from * Tool.title). */ title?: string; } /** * Parameters to support Username and Password Authentication. */ export interface GoogleCloudApihubV1UserPasswordConfig { /** * Required. Secret version reference containing the password. The * `secretmanager.versions.access` permission should be granted to the service * account accessing the secret. */ password?: GoogleCloudApihubV1Secret; /** * Required. Username. */ username?: string; } /** * Represents a version of the API resource in API hub. This is also referred * to as the API version. */ export interface GoogleCloudApihubV1Version { /** * Optional. The accreditations associated with the API version. This maps to * the following system defined attribute: * `projects/{project}/locations/{location}/attributes/system-accreditation` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. All values should be from the list of allowed values defined for the * attribute. */ accreditation?: GoogleCloudApihubV1AttributeValues; /** * Output only. The operations contained in the API version. These operations * will be added to the version when a new spec is added or when an existing * spec is updated. Format is * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` */ readonly apiOperations?: string[]; /** * Optional. The list of user defined attributes associated with the Version * resource. The key is the attribute name. It will be of the format: * `projects/{project}/locations/{location}/attributes/{attribute}`. The value * is the attribute values associated with the resource. */ attributes?: { [key: string]: GoogleCloudApihubV1AttributeValues }; /** * Optional. The compliance associated with the API version. This maps to the * following system defined attribute: * `projects/{project}/locations/{location}/attributes/system-compliance` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. All values should be from the list of allowed values defined for the * attribute. */ compliance?: GoogleCloudApihubV1AttributeValues; /** * Output only. The time at which the version was created. */ readonly createTime?: Date; /** * Output only. The definitions contained in the API version. These * definitions will be added to the version when a new spec is added or when * an existing spec is updated. Format is * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}` */ readonly definitions?: string[]; /** * Optional. The deployments linked to this API version. Note: A particular * API version could be deployed to multiple deployments (for dev deployment, * UAT deployment, etc) Format is * `projects/{project}/locations/{location}/deployments/{deployment}` */ deployments?: string[]; /** * Optional. The description of the version. */ description?: string; /** * Required. The display name of the version. */ displayName?: string; /** * Optional. The documentation of the version. */ documentation?: GoogleCloudApihubV1Documentation; /** * Optional. The lifecycle of the API version. This maps to the following * system defined attribute: * `projects/{project}/locations/{location}/attributes/system-lifecycle` * attribute. The number of values for this attribute will be based on the * cardinality of the attribute. The same can be retrieved via GetAttribute * API. All values should be from the list of allowed values defined for the * attribute. */ lifecycle?: GoogleCloudApihubV1AttributeValues; /** * Identifier. The name of the version. Format: * `projects/{project}/locations/{location}/apis/{api}/versions/{version}` */ name?: string; /** * Optional. The selected deployment for a Version resource. This can be used * when special handling is needed on client side for a particular deployment * linked to the version. Format is * `projects/{project}/locations/{location}/deployments/{deployment}` */ selectedDeployment?: string; /** * Output only. The list of sources and metadata from the sources of the * version. */ readonly sourceMetadata?: GoogleCloudApihubV1SourceMetadata[]; /** * Output only. The specs associated with this version. Note that an API * version can be associated with multiple specs. Format is * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` */ readonly specs?: string[]; /** * Output only. The time at which the version was last updated. */ readonly updateTime?: Date; } /** * The metadata associated with a version of the API resource. */ export interface GoogleCloudApihubV1VersionMetadata { /** * Optional. The deployments linked to this API version. Note: A particular * API version could be deployed to multiple deployments (for dev deployment, * UAT deployment, etc.) */ deployments?: GoogleCloudApihubV1DeploymentMetadata[]; /** * Optional. Timestamp indicating when the version was created at the source. */ originalCreateTime?: Date; /** * Optional. The unique identifier of the version in the system where it was * originally created. */ originalId?: string; /** * Required. Timestamp indicating when the version was last updated at the * source. */ originalUpdateTime?: Date; /** * Optional. The specs associated with this version. Note that an API version * can be associated with multiple specs. */ specs?: GoogleCloudApihubV1SpecMetadata[]; /** * Required. Represents a version of the API resource in API hub. The ID of * the version will be generated by Hub. */ version?: GoogleCloudApihubV1Version; } function serializeGoogleCloudApihubV1VersionMetadata(data: any): GoogleCloudApihubV1VersionMetadata { return { ...data, deployments: data["deployments"] !== undefined ? data["deployments"].map((item: any) => (serializeGoogleCloudApihubV1DeploymentMetadata(item))) : undefined, originalCreateTime: data["originalCreateTime"] !== undefined ? data["originalCreateTime"].toISOString() : undefined, originalUpdateTime: data["originalUpdateTime"] !== undefined ? data["originalUpdateTime"].toISOString() : undefined, specs: data["specs"] !== undefined ? data["specs"].map((item: any) => (serializeGoogleCloudApihubV1SpecMetadata(item))) : undefined, }; } function deserializeGoogleCloudApihubV1VersionMetadata(data: any): GoogleCloudApihubV1VersionMetadata { return { ...data, deployments: data["deployments"] !== undefined ? data["deployments"].map((item: any) => (deserializeGoogleCloudApihubV1DeploymentMetadata(item))) : undefined, originalCreateTime: data["originalCreateTime"] !== undefined ? new Date(data["originalCreateTime"]) : undefined, originalUpdateTime: data["originalUpdateTime"] !== undefined ? new Date(data["originalUpdateTime"]) : undefined, specs: data["specs"] !== undefined ? data["specs"].map((item: any) => (deserializeGoogleCloudApihubV1SpecMetadata(item))) : undefined, }; } /** * Represents the metadata of the long-running operation. */ export interface GoogleCloudCommonOperationMetadata { /** * Output only. API version used to start the operation. */ readonly apiVersion?: string; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have been cancelled successfully have * google.longrunning.Operation.error value with a google.rpc.Status.code of * `1`, corresponding to `Code.CANCELLED`. */ readonly cancelRequested?: boolean; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Human-readable status of the operation, if any. */ readonly statusDetail?: 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; } /** * The response message for Locations.ListLocations. */ export interface GoogleCloudLocationListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: GoogleCloudLocationLocation[]; /** * The standard List next-page token. */ nextPageToken?: 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 request message for Operations.CancelOperation. */ export interface GoogleLongrunningCancelOperationRequest { } /** * The response message for Operations.ListOperations. */ export interface GoogleLongrunningListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: GoogleLongrunningOperation[]; /** * 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[]; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface GoogleLongrunningOperation { /** * 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?: GoogleRpcStatus; /** * 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 }; } /** * 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 GoogleRpcStatus { /** * 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; } /** * Additional options for APIhub#projectsLocationsAddonsList. */ export interface ProjectsLocationsAddonsListOptions { /** * Optional. An expression that filters the list of addons. The only * supported filter is `plugin_instance_name`. It can be used to filter addons * that are enabled for a given plugin instance. The format of the filter is * `plugin_instance_name = * "projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}"`. */ filter?: string; /** * Optional. The maximum number of hub addons to return. The service may * return fewer than this value. If unspecified, at most 50 hub addons will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListAddons` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters (except page_size) provided to `ListAddons` must match the call * that provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsApiHubInstancesCreate. */ export interface ProjectsLocationsApiHubInstancesCreateOptions { /** * Optional. Identifier to assign to the Api Hub instance. Must be unique * within scope of the parent resource. If the field is not provided, system * generated id will be used. This value should be 4-40 characters, and valid * characters are `/a-z[0-9]-_/`. */ apiHubInstanceId?: string; } /** * Additional options for APIhub#projectsLocationsApisCreate. */ export interface ProjectsLocationsApisCreateOptions { /** * Optional. The ID to use for the API resource, which will become the final * component of the API's resource name. This field is optional. * If * provided, the same will be used. The service will throw an error if the * specified id is already used by another API resource in the API hub. * If * not provided, a system generated id will be used. This value should be * 4-500 characters, and valid characters are /a-z[0-9]-_/. */ apiId?: string; } /** * Additional options for APIhub#projectsLocationsApisDelete. */ export interface ProjectsLocationsApisDeleteOptions { /** * Optional. If set to true, any versions from this API will also be deleted. * Otherwise, the request will only work if the API has no versions. */ force?: boolean; } /** * Additional options for APIhub#projectsLocationsApisList. */ export interface ProjectsLocationsApisListOptions { /** * Optional. An expression that filters the list of ApiResources. A filter * expression consists of a field name, a comparison operator, and a value for * filtering. The value must be a string. The comparison operator must be one * of: `<`, `>`, `:` or `=`. Filters are not case sensitive. The following * fields in the `ApiResource` are eligible for filtering: * `owner.email` - * The email of the team which owns the ApiResource. Allowed comparison * operators: `=`. * `create_time` - The time at which the ApiResource was * created. The value should be in the * (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison * operators: `>` and `<`. * `display_name` - The display name of the * ApiResource. Allowed comparison operators: `=`. * * `target_user.enum_values.values.id` - The allowed value id of the target * users attribute associated with the ApiResource. Allowed comparison * operator is `:`. * `target_user.enum_values.values.display_name` - The * allowed value display name of the target users attribute associated with * the ApiResource. Allowed comparison operator is `:`. * * `team.enum_values.values.id` - The allowed value id of the team attribute * associated with the ApiResource. Allowed comparison operator is `:`. * * `team.enum_values.values.display_name` - The allowed value display name of * the team attribute associated with the ApiResource. Allowed comparison * operator is `:`. * `business_unit.enum_values.values.id` - The allowed * value id of the business unit attribute associated with the ApiResource. * Allowed comparison operator is `:`. * * `business_unit.enum_values.values.display_name` - The allowed value display * name of the business unit attribute associated with the ApiResource. * Allowed comparison operator is `:`. * * `maturity_level.enum_values.values.id` - The allowed value id of the * maturity level attribute associated with the ApiResource. Allowed * comparison operator is `:`. * * `maturity_level.enum_values.values.display_name` - The allowed value * display name of the maturity level attribute associated with the * ApiResource. Allowed comparison operator is `:`. * * `api_style.enum_values.values.id` - The allowed value id of the api style * attribute associated with the ApiResource. Allowed comparison operator is * `:`. * `api_style.enum_values.values.display_name` - The allowed value * display name of the api style attribute associated with the ApiResource. * Allowed comparison operator is `:`. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.id` - The allowed * value id of the user defined enum attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is * a placeholder that can be replaced with any user defined enum attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.display_name` - The * allowed value display name of the user defined enum attribute associated * with the Resource. Allowed comparison operator is `:`. Here * user-defined-attribute-enum-display-name is a placeholder that can be * replaced with any user defined enum attribute enum name. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.string_values.values` - The allowed * value of the user defined string attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-string is a * placeholder that can be replaced with any user defined string attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.json_values.values` - The allowed * value of the user defined JSON attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-json is a * placeholder that can be replaced with any user defined JSON attribute name. * A filter function is also supported in the filter string. The filter * function is `id(name)`. The `id(name)` function returns the id of the * resource name. For example, `id(name) = \"api-1\"` is equivalent to `name = * \"projects/test-project-id/locations/test-location-id/apis/api-1\"` * provided the parent is * `projects/test-project-id/locations/test-location-id`. Another supported * filter function is `plugins(source_metadata)`. This function filters for * resources that are associated with a specific plugin. For example, * `plugins(source_metadata) : * "projects/test-project-id/locations/test-location-id/plugins/test-plugin-id"` * will return resources sourced from the given plugin. Expressions are * combined with either `AND` logic operator or `OR` logical operator but not * both of them together i.e. only one of the `AND` or `OR` operator can be * used throughout the filter string and both the operators cannot be used * together. No other logical operators are supported. At most three filter * fields are allowed in the filter string and if provided more than that then * `INVALID_ARGUMENT` error is returned by the API. Here are a few examples: * * `owner.email = \"apihub@google.com\"` - - The owner team email is * _apihub@google.com_. * `owner.email = \"apihub@google.com\" AND create_time * < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - * The owner team email is _apihub@google.com_ and the api was created before * _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 UTC_. * * `owner.email = \"apihub@google.com\" OR team.enum_values.values.id: * apihub-team-id` - The filter string specifies the APIs where the owner team * email is _apihub@google.com_ or the id of the allowed value associated with * the team attribute is _apihub-team-id_. * `owner.email = * \"apihub@google.com\" OR team.enum_values.values.display_name: ApiHub Team` * - The filter string specifies the APIs where the owner team email is * _apihub@google.com_ or the display name of the allowed value associated * with the team attribute is `ApiHub Team`. * `owner.email = * \"apihub@google.com\" AND * attributes.projects/test-project-id/locations/test-location-id/ * attributes/17650f90-4a29-4971-b3c0-d5532da3764b.enum_values.values.id: * test_enum_id AND * attributes.projects/test-project-id/locations/test-location-id/ * attributes/1765\0f90-4a29-5431-b3d0-d5532da3764c.string_values.values: * test_string_value` - The filter string specifies the APIs where the owner * team email is _apihub@google.com_ and the id of the allowed value * associated with the user defined attribute of type enum is _test_enum_id_ * and the value of the user defined attribute of type string is _test_.. */ filter?: string; /** * Optional. The maximum number of API resources to return. The service may * return fewer than this value. If unspecified, at most 50 Apis will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListApis` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * (except page_size) provided to `ListApis` must match the call that provided * the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsApisPatch. */ export interface ProjectsLocationsApisPatchOptions { /** * Required. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsApisPatchOptions(data: any): ProjectsLocationsApisPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsApisPatchOptions(data: any): ProjectsLocationsApisPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for APIhub#projectsLocationsApisVersionsCreate. */ export interface ProjectsLocationsApisVersionsCreateOptions { /** * Optional. The ID to use for the API version, which will become the final * component of the version's resource name. This field is optional. * If * provided, the same will be used. The service will throw an error if the * specified id is already used by another version in the API resource. * If * not provided, a system generated id will be used. This value should be * 4-500 characters, overall resource name which will be of format * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, * its length is limited to 700 characters and valid characters are * /a-z[0-9]-_/. */ versionId?: string; } /** * Additional options for APIhub#projectsLocationsApisVersionsDelete. */ export interface ProjectsLocationsApisVersionsDeleteOptions { /** * Optional. If set to true, any specs from this version will also be * deleted. Otherwise, the request will only work if the version has no specs. */ force?: boolean; } /** * Additional options for APIhub#projectsLocationsApisVersionsList. */ export interface ProjectsLocationsApisVersionsListOptions { /** * Optional. An expression that filters the list of Versions. A filter * expression consists of a field name, a comparison operator, and a value for * filtering. The value must be a string, a number, or a boolean. The * comparison operator must be one of: `<`, `>` or `=`. Filters are not case * sensitive. The following fields in the `Version` are eligible for * filtering: * `display_name` - The display name of the Version. Allowed * comparison operators: `=`. * `create_time` - The time at which the Version * was created. The value should be in the * (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison * operators: `>` and `<`. * `lifecycle.enum_values.values.id` - The allowed * value id of the lifecycle attribute associated with the Version. Allowed * comparison operators: `:`. * `lifecycle.enum_values.values.display_name` - * The allowed value display name of the lifecycle attribute associated with * the Version. Allowed comparison operators: `:`. * * `compliance.enum_values.values.id` - The allowed value id of the * compliances attribute associated with the Version. Allowed comparison * operators: `:`. * `compliance.enum_values.values.display_name` - The * allowed value display name of the compliances attribute associated with the * Version. Allowed comparison operators: `:`. * * `accreditation.enum_values.values.id` - The allowed value id of the * accreditations attribute associated with the Version. Allowed comparison * operators: `:`. * `accreditation.enum_values.values.display_name` - The * allowed value display name of the accreditations attribute associated with * the Version. Allowed comparison operators: `:`. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.id` - The allowed * value id of the user defined enum attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is * a placeholder that can be replaced with any user defined enum attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.display_name` - The * allowed value display name of the user defined enum attribute associated * with the Resource. Allowed comparison operator is `:`. Here * user-defined-attribute-enum-display-name is a placeholder that can be * replaced with any user defined enum attribute enum name. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.string_values.values` - The allowed * value of the user defined string attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-string is a * placeholder that can be replaced with any user defined string attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.json_values.values` - The allowed * value of the user defined JSON attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-json is a * placeholder that can be replaced with any user defined JSON attribute name. * Expressions are combined with either `AND` logic operator or `OR` logical * operator but not both of them together i.e. only one of the `AND` or `OR` * operator can be used throughout the filter string and both the operators * cannot be used together. No other logical operators are supported. At most * three filter fields are allowed in the filter string and if provided more * than that then `INVALID_ARGUMENT` error is returned by the API. Here are a * few examples: * `lifecycle.enum_values.values.id: preview-id` - The filter * string specifies that the id of the allowed value associated with the * lifecycle attribute of the Version is _preview-id_. * * `lifecycle.enum_values.values.display_name: \"Preview Display Name\"` - The * filter string specifies that the display name of the allowed value * associated with the lifecycle attribute of the Version is `Preview Display * Name`. * `lifecycle.enum_values.values.id: preview-id AND create_time < * \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - The * id of the allowed value associated with the lifecycle attribute of the * Version is _preview-id_ and it was created before _2021-08-15 14:50:00 UTC_ * and after _2021-08-10 12:00:00 UTC_. * `compliance.enum_values.values.id: * gdpr-id OR compliance.enum_values.values.id: pci-dss-id` - The id of the * allowed value associated with the compliance attribute is _gdpr-id_ or * _pci-dss-id_. * `lifecycle.enum_values.values.id: preview-id AND * attributes.projects/test-project-id/locations/test-location-id/ * attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values: test` * - The filter string specifies that the id of the allowed value associated * with the lifecycle attribute of the Version is _preview-id_ and the value * of the user defined attribute of type string is _test_. */ filter?: string; /** * Optional. The maximum number of versions to return. The service may return * fewer than this value. If unspecified, at most 50 versions will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListVersions` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters (except page_size) provided to `ListVersions` must match the * call that provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsApisVersionsOperationsCreate. */ export interface ProjectsLocationsApisVersionsOperationsCreateOptions { /** * Optional. The ID to use for the operation resource, which will become the * final component of the operation's resource name. This field is optional. * * If provided, the same will be used. The service will throw an error if the * specified id is already used by another operation resource in the API hub. * * If not provided, a system generated id will be used. This value should be * 4-500 characters, overall resource name which will be of format * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`, * its length is limited to 700 characters, and valid characters are * /a-z[0-9]-_/. */ apiOperationId?: string; } /** * Additional options for APIhub#projectsLocationsApisVersionsOperationsList. */ export interface ProjectsLocationsApisVersionsOperationsListOptions { /** * Optional. An expression that filters the list of ApiOperations. A filter * expression consists of a field name, a comparison operator, and a value for * filtering. The value must be a string or a boolean. The comparison operator * must be one of: `<`, `>` or `=`. Filters are not case sensitive. The * following fields in the `ApiOperation` are eligible for filtering: * `name` * - The ApiOperation resource name. Allowed comparison operators: `=`. * * `details.http_operation.path.path` - The http operation's complete path * relative to server endpoint. Allowed comparison operators: `=`. * * `details.http_operation.method` - The http operation method type. Allowed * comparison operators: `=`. * `details.deprecated` - Indicates if the * ApiOperation is deprecated. Allowed values are True / False indicating the * deprycation status of the ApiOperation. Allowed comparison operators: `=`. * * `create_time` - The time at which the ApiOperation was created. The value * should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. * Allowed comparison operators: `>` and `<`. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.id` - The allowed * value id of the user defined enum attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is * a placeholder that can be replaced with any user defined enum attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.display_name` - The * allowed value display name of the user defined enum attribute associated * with the Resource. Allowed comparison operator is `:`. Here * user-defined-attribute-enum-display-name is a placeholder that can be * replaced with any user defined enum attribute enum name. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.string_values.values` - The allowed * value of the user defined string attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-string is a * placeholder that can be replaced with any user defined string attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.json_values.values` - The allowed * value of the user defined JSON attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-json is a * placeholder that can be replaced with any user defined JSON attribute name. * Expressions are combined with either `AND` logic operator or `OR` logical * operator but not both of them together i.e. only one of the `AND` or `OR` * operator can be used throughout the filter string and both the operators * cannot be used together. No other logical operators are supported. At most * three filter fields are allowed in the filter string and if provided more * than that then `INVALID_ARGUMENT` error is returned by the API. Here are a * few examples: * `details.deprecated = True` - The ApiOperation is * deprecated. * `details.http_operation.method = GET AND create_time < * \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - The * method of the http operation of the ApiOperation is _GET_ and the spec was * created before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 * UTC_. * `details.http_operation.method = GET OR * details.http_operation.method = POST`. - The http operation of the method * of ApiOperation is _GET_ or _POST_. * `details.deprecated = True AND * attributes.projects/test-project-id/locations/test-location-id/ * attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values: test` * - The filter string specifies that the ApiOperation is deprecated and the * value of the user defined attribute of type string is _test_. */ filter?: string; /** * Optional. The maximum number of operations to return. The service may * return fewer than this value. If unspecified, at most 50 operations will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListApiOperations` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters (except page_size) provided to `ListApiOperations` must match * the call that provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsApisVersionsOperationsPatch. */ export interface ProjectsLocationsApisVersionsOperationsPatchOptions { /** * Required. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsApisVersionsOperationsPatchOptions(data: any): ProjectsLocationsApisVersionsOperationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsApisVersionsOperationsPatchOptions(data: any): ProjectsLocationsApisVersionsOperationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for APIhub#projectsLocationsApisVersionsPatch. */ export interface ProjectsLocationsApisVersionsPatchOptions { /** * Required. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsApisVersionsPatchOptions(data: any): ProjectsLocationsApisVersionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsApisVersionsPatchOptions(data: any): ProjectsLocationsApisVersionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for APIhub#projectsLocationsApisVersionsSpecsCreate. */ export interface ProjectsLocationsApisVersionsSpecsCreateOptions { /** * Optional. The ID to use for the spec, which will become the final * component of the spec's resource name. This field is optional. * If * provided, the same will be used. The service will throw an error if the * specified id is already used by another spec in the API resource. * If not * provided, a system generated id will be used. This value should be 4-500 * characters, overall resource name which will be of format * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, * its length is limited to 1000 characters and valid characters are * /a-z[0-9]-_/. */ specId?: string; } /** * Additional options for * APIhub#projectsLocationsApisVersionsSpecsFetchAdditionalSpecContent. */ export interface ProjectsLocationsApisVersionsSpecsFetchAdditionalSpecContentOptions { /** * Optional. The type of the spec contents to be retrieved. */ specContentType?: | "SPEC_CONTENT_TYPE_UNSPECIFIED" | "BOOSTED_SPEC_CONTENT" | "GATEWAY_OPEN_API_SPEC"; } /** * Additional options for APIhub#projectsLocationsApisVersionsSpecsList. */ export interface ProjectsLocationsApisVersionsSpecsListOptions { /** * Optional. An expression that filters the list of Specs. A filter * expression consists of a field name, a comparison operator, and a value for * filtering. The value must be a string. The comparison operator must be one * of: `<`, `>`, `:` or `=`. Filters are not case sensitive. The following * fields in the `Spec` are eligible for filtering: * `display_name` - The * display name of the Spec. Allowed comparison operators: `=`. * * `create_time` - The time at which the Spec was created. The value should be * in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed * comparison operators: `>` and `<`. * `spec_type.enum_values.values.id` - * The allowed value id of the spec_type attribute associated with the Spec. * Allowed comparison operators: `:`. * * `spec_type.enum_values.values.display_name` - The allowed value display * name of the spec_type attribute associated with the Spec. Allowed * comparison operators: `:`. * `lint_response.json_values.values` - The json * value of the lint_response attribute associated with the Spec. Allowed * comparison operators: `:`. * `mime_type` - The MIME type of the Spec. * Allowed comparison operators: `=`. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.id` - The allowed * value id of the user defined enum attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is * a placeholder that can be replaced with any user defined enum attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.display_name` - The * allowed value display name of the user defined enum attribute associated * with the Resource. Allowed comparison operator is `:`. Here * user-defined-attribute-enum-display-name is a placeholder that can be * replaced with any user defined enum attribute enum name. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.string_values.values` - The allowed * value of the user defined string attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-string is a * placeholder that can be replaced with any user defined string attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.json_values.values` - The allowed * value of the user defined JSON attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-json is a * placeholder that can be replaced with any user defined JSON attribute name. * Expressions are combined with either `AND` logic operator or `OR` logical * operator but not both of them together i.e. only one of the `AND` or `OR` * operator can be used throughout the filter string and both the operators * cannot be used together. No other logical operators are supported. At most * three filter fields are allowed in the filter string and if provided more * than that then `INVALID_ARGUMENT` error is returned by the API. Here are a * few examples: * `spec_type.enum_values.values.id: rest-id` - The filter * string specifies that the id of the allowed value associated with the * spec_type attribute is _rest-id_. * * `spec_type.enum_values.values.display_name: \"Rest Display Name\"` - The * filter string specifies that the display name of the allowed value * associated with the spec_type attribute is `Rest Display Name`. * * `spec_type.enum_values.values.id: grpc-id AND create_time < * \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - The * id of the allowed value associated with the spec_type attribute is * _grpc-id_ and the spec was created before _2021-08-15 14:50:00 UTC_ and * after _2021-08-10 12:00:00 UTC_. * `spec_type.enum_values.values.id: * rest-id OR spec_type.enum_values.values.id: grpc-id` - The id of the * allowed value associated with the spec_type attribute is _rest-id_ or * _grpc-id_. * `spec_type.enum_values.values.id: rest-id AND * attributes.projects/test-project-id/locations/test-location-id/ * attributes/17650f90-4a29-4971-b3c0-d5532da3764b.enum_values.values.id: * test` - The filter string specifies that the id of the allowed value * associated with the spec_type attribute is _rest-id_ and the id of the * allowed value associated with the user defined attribute of type enum is * _test_. */ filter?: string; /** * Optional. The maximum number of specs to return. The service may return * fewer than this value. If unspecified, at most 50 specs will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListSpecs` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListSpecs` must match the call that provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsApisVersionsSpecsPatch. */ export interface ProjectsLocationsApisVersionsSpecsPatchOptions { /** * Required. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsApisVersionsSpecsPatchOptions(data: any): ProjectsLocationsApisVersionsSpecsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsApisVersionsSpecsPatchOptions(data: any): ProjectsLocationsApisVersionsSpecsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for APIhub#projectsLocationsAttributesCreate. */ export interface ProjectsLocationsAttributesCreateOptions { /** * Optional. The ID to use for the attribute, which will become the final * component of the attribute's resource name. This field is optional. * If * provided, the same will be used. The service will throw an error if the * specified id is already used by another attribute resource in the API hub. * * If not provided, a system generated id will be used. This value should be * 4-500 characters, and valid characters are /a-z[0-9]-_/. */ attributeId?: string; } /** * Additional options for APIhub#projectsLocationsAttributesList. */ export interface ProjectsLocationsAttributesListOptions { /** * Optional. An expression that filters the list of Attributes. A filter * expression consists of a field name, a comparison operator, and a value for * filtering. The value must be a string or a boolean. The comparison operator * must be one of: `<`, `>` or `=`. Filters are not case sensitive. The * following fields in the `Attribute` are eligible for filtering: * * `display_name` - The display name of the Attribute. Allowed comparison * operators: `=`. * `definition_type` - The definition type of the attribute. * Allowed comparison operators: `=`. * `scope` - The scope of the attribute. * Allowed comparison operators: `=`. * `data_type` - The type of the data of * the attribute. Allowed comparison operators: `=`. * `mandatory` - Denotes * whether the attribute is mandatory or not. Allowed comparison operators: * `=`. * `create_time` - The time at which the Attribute was created. The * value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] * format. Allowed comparison operators: `>` and `<`. Expressions are combined * with either `AND` logic operator or `OR` logical operator but not both of * them together i.e. only one of the `AND` or `OR` operator can be used * throughout the filter string and both the operators cannot be used * together. No other logical operators are supported. At most three filter * fields are allowed in the filter string and if provided more than that then * `INVALID_ARGUMENT` error is returned by the API. Here are a few examples: * * `display_name = production` - - The display name of the attribute is * _production_. * `(display_name = production) AND (create_time < * \"2021-08-15T14:50:00Z\") AND (create_time > \"2021-08-10T12:00:00Z\")` - * The display name of the attribute is _production_ and the attribute was * created before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 * UTC_. * `display_name = production OR scope = api` - The attribute where * the display name is _production_ or the scope is _api_. */ filter?: string; /** * Optional. The maximum number of attribute resources to return. The service * may return fewer than this value. If unspecified, at most 50 attributes * will be returned. The maximum value is 1000; values above 1000 will be * coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListAttributes` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListAttributes` must match the call that provided * the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsAttributesPatch. */ export interface ProjectsLocationsAttributesPatchOptions { /** * Required. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsAttributesPatchOptions(data: any): ProjectsLocationsAttributesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsAttributesPatchOptions(data: any): ProjectsLocationsAttributesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for APIhub#projectsLocationsCurationsCreate. */ export interface ProjectsLocationsCurationsCreateOptions { /** * Optional. The ID to use for the curation resource, which will become the * final component of the curations's resource name. This field is optional. * * If provided, the same will be used. The service will throw an error if the * specified ID is already used by another curation resource in the API hub. * * If not provided, a system generated ID will be used. This value should be * 4-500 characters, and valid characters are /a-z[0-9]-_/. */ curationId?: string; } /** * Additional options for APIhub#projectsLocationsCurationsList. */ export interface ProjectsLocationsCurationsListOptions { /** * Optional. An expression that filters the list of curation resources. A * filter expression consists of a field name, a comparison operator, and a * value for filtering. The value must be a string. The comparison operator * must be one of: `<`, `>`, `:` or `=`. Filters are case insensitive. The * following fields in the `curation resource` are eligible for filtering: * * `create_time` - The time at which the curation was created. The value * should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. * Allowed comparison operators: `>` and `<`. * `display_name` - The display * name of the curation. Allowed comparison operators: `=`. * `state` - The * state of the curation. Allowed comparison operators: `=`. Expressions are * combined with either `AND` logic operator or `OR` logical operator but not * both of them together i.e. only one of the `AND` or `OR` operator can be * used throughout the filter string and both the operators cannot be used * together. No other logical operators are supported. At most three filter * fields are allowed in the filter string and if provided more than that then * `INVALID_ARGUMENT` error is returned by the API. Here are a few examples: * * `create_time < \"2021-08-15T14:50:00Z\" AND create_time > * \"2021-08-10T12:00:00Z\"` - The curation resource was created before * _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 UTC_. */ filter?: string; /** * Optional. The maximum number of curation resources to return. The service * may return fewer than this value. If unspecified, at most 50 curations will * be returned. The maximum value is 1000; values above 1000 will be coerced * to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListCurations` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters (except page_size) provided to `ListCurations` must match the * call that provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsCurationsPatch. */ export interface ProjectsLocationsCurationsPatchOptions { /** * Optional. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCurationsPatchOptions(data: any): ProjectsLocationsCurationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCurationsPatchOptions(data: any): ProjectsLocationsCurationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for APIhub#projectsLocationsDependenciesCreate. */ export interface ProjectsLocationsDependenciesCreateOptions { /** * Optional. The ID to use for the dependency resource, which will become the * final component of the dependency's resource name. This field is optional. * * If provided, the same will be used. The service will throw an error if * duplicate id is provided by the client. * If not provided, a system * generated id will be used. This value should be 4-500 characters, and valid * characters are `a-z[0-9]-_`. */ dependencyId?: string; } /** * Additional options for APIhub#projectsLocationsDependenciesList. */ export interface ProjectsLocationsDependenciesListOptions { /** * Optional. An expression that filters the list of Dependencies. A filter * expression consists of a field name, a comparison operator, and a value for * filtering. The value must be a string. Allowed comparison operator is `=`. * Filters are not case sensitive. The following fields in the `Dependency` * are eligible for filtering: * `consumer.operation_resource_name` - The * operation resource name for the consumer entity involved in a dependency. * Allowed comparison operators: `=`. * `consumer.external_api_resource_name` * - The external api resource name for the consumer entity involved in a * dependency. Allowed comparison operators: `=`. * * `supplier.operation_resource_name` - The operation resource name for the * supplier entity involved in a dependency. Allowed comparison operators: * `=`. * `supplier.external_api_resource_name` - The external api resource * name for the supplier entity involved in a dependency. Allowed comparison * operators: `=`. Expressions are combined with either `AND` logic operator * or `OR` logical operator but not both of them together i.e. only one of the * `AND` or `OR` operator can be used throughout the filter string and both * the operators cannot be used together. No other logical operators are * supported. At most three filter fields are allowed in the filter string and * if provided more than that then `INVALID_ARGUMENT` error is returned by the * API. For example, `consumer.operation_resource_name = * \"projects/p1/locations/global/apis/a1/versions/v1/operations/o1\" OR * supplier.operation_resource_name = * \"projects/p1/locations/global/apis/a1/versions/v1/operations/o1\"` - The * dependencies with either consumer or supplier operation resource name as * _projects/p1/locations/global/apis/a1/versions/v1/operations/o1_. */ filter?: string; /** * Optional. The maximum number of dependency resources to return. The * service may return fewer than this value. If unspecified, at most 50 * dependencies will be returned. The maximum value is 1000; values above 1000 * will be coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListDependencies` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListDependencies` must match the call that provided * the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsDependenciesPatch. */ export interface ProjectsLocationsDependenciesPatchOptions { /** * Required. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsDependenciesPatchOptions(data: any): ProjectsLocationsDependenciesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsDependenciesPatchOptions(data: any): ProjectsLocationsDependenciesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for APIhub#projectsLocationsDeploymentsCreate. */ export interface ProjectsLocationsDeploymentsCreateOptions { /** * Optional. The ID to use for the deployment resource, which will become the * final component of the deployment's resource name. This field is optional. * * If provided, the same will be used. The service will throw an error if * the specified id is already used by another deployment resource in the API * hub. * If not provided, a system generated id will be used. This value * should be 4-500 characters, and valid characters are /a-z[0-9]-_/. */ deploymentId?: string; } /** * Additional options for APIhub#projectsLocationsDeploymentsList. */ export interface ProjectsLocationsDeploymentsListOptions { /** * Optional. An expression that filters the list of Deployments. A filter * expression consists of a field name, a comparison operator, and a value for * filtering. The value must be a string. The comparison operator must be one * of: `<`, `>` or `=`. Filters are not case sensitive. The following fields * in the `Deployments` are eligible for filtering: * `display_name` - The * display name of the Deployment. Allowed comparison operators: `=`. * * `create_time` - The time at which the Deployment was created. The value * should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. * Allowed comparison operators: `>` and `<`. * `resource_uri` - A URI to the * deployment resource. Allowed comparison operators: `=`. * `api_versions` - * The API versions linked to this deployment. Allowed comparison operators: * `:`. * `source_project` - The project/organization at source for the * deployment. Allowed comparison operators: `=`. * `source_environment` - The * environment at source for the deployment. Allowed comparison operators: * `=`. * `deployment_type.enum_values.values.id` - The allowed value id of * the deployment_type attribute associated with the Deployment. Allowed * comparison operators: `:`. * * `deployment_type.enum_values.values.display_name` - The allowed value * display name of the deployment_type attribute associated with the * Deployment. Allowed comparison operators: `:`. * `slo.string_values.values` * -The allowed string value of the slo attribute associated with the * deployment. Allowed comparison operators: `:`. * * `environment.enum_values.values.id` - The allowed value id of the * environment attribute associated with the deployment. Allowed comparison * operators: `:`. * `environment.enum_values.values.display_name` - The * allowed value display name of the environment attribute associated with the * deployment. Allowed comparison operators: `:`. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.id` - The allowed * value id of the user defined enum attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is * a placeholder that can be replaced with any user defined enum attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.enum_values.values.display_name` - The * allowed value display name of the user defined enum attribute associated * with the Resource. Allowed comparison operator is `:`. Here * user-defined-attribute-enum-display-name is a placeholder that can be * replaced with any user defined enum attribute enum name. * * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.string_values.values` - The allowed * value of the user defined string attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-string is a * placeholder that can be replaced with any user defined string attribute * name. * `attributes.projects/test-project-id/locations/test-location-id/ * attributes/user-defined-attribute-id.json_values.values` - The allowed * value of the user defined JSON attribute associated with the Resource. * Allowed comparison operator is `:`. Here user-defined-attribute-json is a * placeholder that can be replaced with any user defined JSON attribute name. * A filter function is also supported in the filter string. The filter * function is `id(name)`. The `id(name)` function returns the id of the * resource name. For example, `id(name) = \"deployment-1\"` is equivalent to * `name = * \"projects/test-project-id/locations/test-location-id/deployments/deployment-1\"` * provided the parent is * `projects/test-project-id/locations/test-location-id`. Expressions are * combined with either `AND` logic operator or `OR` logical operator but not * both of them together i.e. only one of the `AND` or `OR` operator can be * used throughout the filter string and both the operators cannot be used * together. No other logical operators are supported. At most three filter * fields are allowed in the filter string and if provided more than that then * `INVALID_ARGUMENT` error is returned by the API. Here are a few examples: * * `environment.enum_values.values.id: staging-id` - The allowed value id of * the environment attribute associated with the Deployment is _staging-id_. * * `environment.enum_values.values.display_name: \"Staging Deployment\"` - The * allowed value display name of the environment attribute associated with the * Deployment is `Staging Deployment`. * `environment.enum_values.values.id: * production-id AND create_time < \"2021-08-15T14:50:00Z\" AND create_time > * \"2021-08-10T12:00:00Z\"` - The allowed value id of the environment * attribute associated with the Deployment is _production-id_ and Deployment * was created before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 * UTC_. * `environment.enum_values.values.id: production-id OR * slo.string_values.values: \"99.99%\"` - The allowed value id of the * environment attribute Deployment is _production-id_ or string value of the * slo attribute is _99.99%_. * `environment.enum_values.values.id: staging-id * AND attributes.projects/test-project-id/locations/test-location-id/ * attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values: test` * - The filter string specifies that the allowed value id of the environment * attribute associated with the Deployment is _staging-id_ and the value of * the user defined attribute of type string is _test_. */ filter?: string; /** * Optional. The maximum number of deployment resources to return. The * service may return fewer than this value. If unspecified, at most 50 * deployments will be returned. The maximum value is 1000; values above 1000 * will be coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListDeployments` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters (except page_size) provided to `ListDeployments` must match the * call that provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsDeploymentsPatch. */ export interface ProjectsLocationsDeploymentsPatchOptions { /** * Required. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsDeploymentsPatchOptions(data: any): ProjectsLocationsDeploymentsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsDeploymentsPatchOptions(data: any): ProjectsLocationsDeploymentsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * APIhub#projectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsList. */ export interface ProjectsLocationsDiscoveredApiObservationsDiscoveredApiOperationsListOptions { /** * Optional. DiscoveredApiOperations will be returned. The maximum value is * 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous * `ListDiscoveredApiApiOperations` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * `ListDiscoveredApiApiOperations` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for * APIhub#projectsLocationsDiscoveredApiObservationsList. */ export interface ProjectsLocationsDiscoveredApiObservationsListOptions { /** * Optional. The maximum number of ApiObservations to return. The service may * return fewer than this value. If unspecified, at most 10 ApiObservations * will be returned. The maximum value is 1000; values above 1000 will be * coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListApiObservations` * call. Provide this to retrieve the subsequent page. When paginating, all * other parameters provided to `ListApiObservations` must match the call that * provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsExternalApisCreate. */ export interface ProjectsLocationsExternalApisCreateOptions { /** * Optional. The ID to use for the External API resource, which will become * the final component of the External API's resource name. This field is * optional. * If provided, the same will be used. The service will throw an * error if the specified id is already used by another External API resource * in the API hub. * If not provided, a system generated id will be used. This * value should be 4-500 characters, and valid characters are /a-z[0-9]-_/. */ externalApiId?: string; } /** * Additional options for APIhub#projectsLocationsExternalApisList. */ export interface ProjectsLocationsExternalApisListOptions { /** * Optional. The maximum number of External API resources to return. The * service may return fewer than this value. If unspecified, at most 50 * ExternalApis will be returned. The maximum value is 1000; values above 1000 * will be coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListExternalApis` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters (except page_size) provided to `ListExternalApis` must match the * call that provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsExternalApisPatch. */ export interface ProjectsLocationsExternalApisPatchOptions { /** * Required. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsExternalApisPatchOptions(data: any): ProjectsLocationsExternalApisPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsExternalApisPatchOptions(data: any): ProjectsLocationsExternalApisPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * APIhub#projectsLocationsHostProjectRegistrationsCreate. */ export interface ProjectsLocationsHostProjectRegistrationsCreateOptions { /** * Required. The ID to use for the Host Project Registration, which will * become the final component of the host project registration's resource * name. The ID must be the same as the Google cloud project specified in the * host_project_registration.gcp_project field. */ hostProjectRegistrationId?: string; } /** * Additional options for APIhub#projectsLocationsHostProjectRegistrationsList. */ export interface ProjectsLocationsHostProjectRegistrationsListOptions { /** * Optional. An expression that filters the list of HostProjectRegistrations. * A filter expression consists of a field name, a comparison operator, and a * value for filtering. The value must be a string. All standard operators as * documented at https://google.aip.dev/160 are supported. The following * fields in the `HostProjectRegistration` are eligible for filtering: * * `name` - The name of the HostProjectRegistration. * `create_time` - The * time at which the HostProjectRegistration was created. The value should be * in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. * * `gcp_project` - The Google cloud project associated with the * HostProjectRegistration. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. The maximum number of host project registrations to return. The * service may return fewer than this value. If unspecified, at most 50 host * project registrations will be returned. The maximum value is 1000; values * above 1000 will be coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous * `ListHostProjectRegistrations` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters (except page_size) * provided to `ListHostProjectRegistrations` must match the call that * provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#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 APIhub#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 APIhub#projectsLocationsPluginsCreate. */ export interface ProjectsLocationsPluginsCreateOptions { /** * Optional. The ID to use for the Plugin resource, which will become the * final component of the Plugin's resource name. This field is optional. * If * provided, the same will be used. The service will throw an error if the * specified id is already used by another Plugin resource in the API hub * instance. * If not provided, a system generated id will be used. This value * should be 4-63 characters, overall resource name which will be of format * `projects/{project}/locations/{location}/plugins/{plugin}`, its length is * limited to 1000 characters and valid characters are /a-z[0-9]-_/. */ pluginId?: string; } /** * Additional options for APIhub#projectsLocationsPluginsInstancesCreate. */ export interface ProjectsLocationsPluginsInstancesCreateOptions { /** * Optional. The ID to use for the plugin instance, which will become the * final component of the plugin instance's resource name. This field is * optional. * If provided, the same will be used. The service will throw an * error if the specified id is already used by another plugin instance in the * plugin resource. * If not provided, a system generated id will be used. * This value should be 4-63 characters, and valid characters are * /a-z[0-9]-_/. */ pluginInstanceId?: string; } /** * Additional options for APIhub#projectsLocationsPluginsInstancesList. */ export interface ProjectsLocationsPluginsInstancesListOptions { /** * Optional. An expression that filters the list of plugin instances. A * filter expression consists of a field name, a comparison operator, and a * value for filtering. The value must be a string. The comparison operator * must be one of: `<`, `>` or `=`. Filters are not case sensitive. The * following fields in the `PluginInstances` are eligible for filtering: * * `state` - The state of the Plugin Instance. Allowed comparison operators: * `=`. * `source_project_id` - The source project id of the Plugin Instance. * Allowed comparison operators: `=`. A filter function is also supported in * the filter string. The filter function is `id(name)`. The `id(name)` * function returns the id of the resource name. For example, `id(name) = * \"plugin-instance-1\"` is equivalent to `name = * \"projects/test-project-id/locations/test-location-id/plugins/plugin-1/instances/plugin-instance-1\"` * provided the parent is * `projects/test-project-id/locations/test-location-id/plugins/plugin-1`. * Expressions are combined with either `AND` logic operator or `OR` logical * operator but not both of them together i.e. only one of the `AND` or `OR` * operator can be used throughout the filter string and both the operators * cannot be used together. No other logical operators are supported. At most * three filter fields are allowed in the filter string and if provided more * than that then `INVALID_ARGUMENT` error is returned by the API. Here are a * few examples: * `state = ENABLED` - The plugin instance is in enabled * state. */ filter?: string; /** * Optional. The maximum number of hub plugins to return. The service may * return fewer than this value. If unspecified, at most 50 hub plugins will * be returned. The maximum value is 1000; values above 1000 will be coerced * to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListPluginInstances` * call. Provide this to retrieve the subsequent page. When paginating, all * other parameters provided to `ListPluginInstances` must match the call that * provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsPluginsInstancesPatch. */ export interface ProjectsLocationsPluginsInstancesPatchOptions { /** * Optional. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsPluginsInstancesPatchOptions(data: any): ProjectsLocationsPluginsInstancesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsPluginsInstancesPatchOptions(data: any): ProjectsLocationsPluginsInstancesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for APIhub#projectsLocationsPluginsList. */ export interface ProjectsLocationsPluginsListOptions { /** * Optional. An expression that filters the list of plugins. A filter * expression consists of a field name, a comparison operator, and a value for * filtering. The value must be a string. The comparison operator must be one * of: `<`, `>` or `=`. Filters are not case sensitive. The following fields * in the `Plugins` are eligible for filtering: * `plugin_category` - The * category of the Plugin. Allowed comparison operators: `=`. Expressions are * combined with either `AND` logic operator or `OR` logical operator but not * both of them together i.e. only one of the `AND` or `OR` operator can be * used throughout the filter string and both the operators cannot be used * together. No other logical operators are supported. At most three filter * fields are allowed in the filter string and if provided more than that then * `INVALID_ARGUMENT` error is returned by the API. Here are a few examples: * * `plugin_category = ON_RAMP` - The plugin is of category on ramp. */ filter?: string; /** * Optional. The maximum number of hub plugins to return. The service may * return fewer than this value. If unspecified, at most 50 hub plugins will * be returned. The maximum value is 1000; values above 1000 will be coerced * to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListPlugins` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters (except page_size) provided to `ListPlugins` must match the call * that provided the page token. */ pageToken?: string; } /** * Additional options for APIhub#projectsLocationsPluginsUpdateStyleGuide. */ export interface ProjectsLocationsPluginsUpdateStyleGuideOptions { /** * Optional. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsPluginsUpdateStyleGuideOptions(data: any): ProjectsLocationsPluginsUpdateStyleGuideOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsPluginsUpdateStyleGuideOptions(data: any): ProjectsLocationsPluginsUpdateStyleGuideOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for APIhub#projectsLocationsRetrieveApiViews. */ export interface ProjectsLocationsRetrieveApiViewsOptions { /** * Optional. The filter expression. */ filter?: string; /** * Optional. The maximum number of results to return. Default to 100. */ pageSize?: number; /** * Optional. A page token, received from a previous `RetrieveApiViews` call. * Provide this to retrieve the subsequent page. */ pageToken?: string; /** * Required. The view type to return. */ view?: | "API_VIEW_TYPE_UNSPECIFIED" | "MCP_SERVER" | "MCP_TOOL"; } /** * Additional options for * APIhub#projectsLocationsRuntimeProjectAttachmentsCreate. */ export interface ProjectsLocationsRuntimeProjectAttachmentsCreateOptions { /** * Required. The ID to use for the Runtime Project Attachment, which will * become the final component of the Runtime Project Attachment's name. The ID * must be the same as the project ID of the Google cloud project specified in * the runtime_project_attachment.runtime_project field. */ runtimeProjectAttachmentId?: string; } /** * Additional options for * APIhub#projectsLocationsRuntimeProjectAttachmentsList. */ export interface ProjectsLocationsRuntimeProjectAttachmentsListOptions { /** * Optional. An expression that filters the list of * RuntimeProjectAttachments. A filter expression consists of a field name, a * comparison operator, and a value for filtering. The value must be a string. * All standard operators as documented at https://google.aip.dev/160 are * supported. The following fields in the `RuntimeProjectAttachment` are * eligible for filtering: * `name` - The name of the * RuntimeProjectAttachment. * `create_time` - The time at which the * RuntimeProjectAttachment was created. The value should be in the * (RFC3339)[https://tools.ietf.org/html/rfc3339] format. * `runtime_project` * - The Google cloud project associated with the RuntimeProjectAttachment. */ filter?: string; /** * Optional. Hint for how to order the results. */ orderBy?: string; /** * Optional. The maximum number of runtime project attachments to return. The * service may return fewer than this value. If unspecified, at most 50 * runtime project attachments will be returned. The maximum value is 1000; * values above 1000 will be coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous * `ListRuntimeProjectAttachments` call. Provide this to retrieve the * subsequent page. When paginating, all other parameters (except page_size) * provided to `ListRuntimeProjectAttachments` must match the call that * provided the page token. */ pageToken?: string; } function decodeBase64(b64: string): Uint8Array { const binString = atob(b64); const size = binString.length; const bytes = new Uint8Array(size); for (let i = 0; i < size; i++) { bytes[i] = binString.charCodeAt(i); } return bytes; } const base64abc = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"]; /** * CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 * Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation * @param data */ function encodeBase64(uint8: Uint8Array): string { let result = "", i; const l = uint8.length; for (i = 2; i < l; i += 3) { result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[((uint8[i - 1] & 0x0f) << 2) | (uint8[i] >> 6)]; result += base64abc[uint8[i] & 0x3f]; } if (i === l + 1) { // 1 octet yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[(uint8[i - 2] & 0x03) << 4]; result += "=="; } if (i === l) { // 2 octets yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[(uint8[i - 1] & 0x0f) << 2]; result += "="; } return result; }