UNPKG

googleapis

Version:
1,224 lines 238 kB
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace developerconnect_v1 { export interface Options extends GlobalOptions { version: 'v1'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Developer Connect API * * Connect third-party source code management to Google * * @example * ```js * const {google} = require('googleapis'); * const developerconnect = google.developerconnect('v1'); * ``` */ export class Developerconnect { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * AccountConnector encapsulates what a platform administrator needs to configure for users to connect to the service providers, which includes, among other fields, the OAuth client ID, client secret, and authorization and token endpoints. */ export interface Schema$AccountConnector { /** * Optional. Allows users to store small amounts of arbitrary data. */ annotations?: { [key: string]: string; } | null; /** * Output only. The timestamp when the accountConnector was created. */ createTime?: string | null; /** * Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. */ etag?: string | null; /** * Optional. Labels as key value pairs */ labels?: { [key: string]: string; } | null; /** * Identifier. The resource name of the accountConnector, in the format `projects/{project\}/locations/{location\}/accountConnectors/{account_connector_id\}`. */ name?: string | null; /** * Output only. Start OAuth flow by clicking on this URL. */ oauthStartUri?: string | null; /** * Provider OAuth config. */ providerOauthConfig?: Schema$ProviderOAuthConfig; /** * Output only. The timestamp when the accountConnector was updated. */ updateTime?: string | null; } /** * AppHubWorkload represents the App Hub Workload. */ export interface Schema$AppHubWorkload { /** * Output only. The criticality of the App Hub Workload. */ criticality?: string | null; /** * Output only. The environment of the App Hub Workload. */ environment?: string | null; /** * Required. Output only. Immutable. The name of the App Hub Workload. Format: `projects/{project\}/locations/{location\}/applications/{application\}/workloads/{workload\}`. */ workload?: string | null; } /** * The artifact config of the artifact that is deployed. */ export interface Schema$ArtifactConfig { /** * Optional. Set if the artifact metadata is stored in Artifact analysis. */ googleArtifactAnalysis?: Schema$GoogleArtifactAnalysis; /** * Optional. Set if the artifact is stored in Artifact registry. */ googleArtifactRegistry?: Schema$GoogleArtifactRegistry; /** * Required. Immutable. The URI of the artifact that is deployed. e.g. `us-docker.pkg.dev/my-project/my-repo/image`. The URI does not include the tag / digest because it captures a lineage of artifacts. */ uri?: string | null; } /** * Configuration for connections to an instance of Bitbucket Cloud. */ export interface Schema$BitbucketCloudConfig { /** * Required. An access token with the minimum `repository`, `pullrequest` and `webhook` scope access. It can either be a workspace, project or repository access token. This is needed to create webhooks. It's recommended to use a system account to generate these credentials. */ authorizerCredential?: Schema$UserCredential; /** * Required. An access token with the minimum `repository` access. It can either be a workspace, project or repository access token. It's recommended to use a system account to generate the credentials. */ readAuthorizerCredential?: Schema$UserCredential; /** * Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/x/secrets/x/versions/x`. This is used to validate and create webhooks. */ webhookSecretSecretVersion?: string | null; /** * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform. */ workspace?: string | null; } /** * Configuration for connections to an instance of Bitbucket Data Center. */ export interface Schema$BitbucketDataCenterConfig { /** * Required. An http access token with the minimum `Repository admin` scope access. This is needed to create webhooks. It's recommended to use a system account to generate these credentials. */ authorizerCredential?: Schema$UserCredential; /** * Required. The URI of the Bitbucket Data Center host this connection is for. */ hostUri?: string | null; /** * Required. An http access token with the minimum `Repository read` access. It's recommended to use a system account to generate the credentials. */ readAuthorizerCredential?: Schema$UserCredential; /** * Output only. Version of the Bitbucket Data Center server running on the `host_uri`. */ serverVersion?: string | null; /** * Optional. Configuration for using Service Directory to privately connect to a Bitbucket Data Center instance. This should only be set if the Bitbucket Data Center is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the Bitbucket Data Center will be made over the public internet. */ serviceDirectoryConfig?: Schema$ServiceDirectoryConfig; /** * Optional. SSL certificate authority to trust when making requests to Bitbucket Data Center. */ sslCaCertificate?: string | null; /** * Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/x/secrets/x/versions/x`. This is used to validate webhooks. */ webhookSecretSecretVersion?: string | null; } /** * The request message for Operations.CancelOperation. */ export interface Schema$CancelOperationRequest { } /** * Message describing Connection object */ export interface Schema$Connection { /** * Optional. Allows clients to store small amounts of arbitrary data. */ annotations?: { [key: string]: string; } | null; /** * Configuration for connections to an instance of Bitbucket Clouds. */ bitbucketCloudConfig?: Schema$BitbucketCloudConfig; /** * Configuration for connections to an instance of Bitbucket Data Center. */ bitbucketDataCenterConfig?: Schema$BitbucketDataCenterConfig; /** * Output only. [Output only] Create timestamp */ createTime?: string | null; /** * Optional. The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. */ cryptoKeyConfig?: Schema$CryptoKeyConfig; /** * Output only. [Output only] Delete timestamp */ deleteTime?: string | null; /** * Optional. If disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled. */ disabled?: boolean | null; /** * Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. */ etag?: string | null; /** * Configuration for connections to github.com. */ githubConfig?: Schema$GitHubConfig; /** * Configuration for connections to an instance of GitHub Enterprise. */ githubEnterpriseConfig?: Schema$GitHubEnterpriseConfig; /** * Configuration for connections to gitlab.com. */ gitlabConfig?: Schema$GitLabConfig; /** * Configuration for connections to an instance of GitLab Enterprise. */ gitlabEnterpriseConfig?: Schema$GitLabEnterpriseConfig; /** * Optional. Configuration for the git proxy feature. Enabling the git proxy allows clients to perform git operations on the repositories linked in the connection. */ gitProxyConfig?: Schema$GitProxyConfig; /** * Output only. Installation state of the Connection. */ installationState?: Schema$InstallationState; /** * Optional. Labels as key value pairs */ labels?: { [key: string]: string; } | null; /** * Identifier. The resource name of the connection, in the format `projects/{project\}/locations/{location\}/connections/{connection_id\}`. */ name?: string | null; /** * Output only. Set to true when the connection is being set up or updated in the background. */ reconciling?: boolean | null; /** * Output only. A system-assigned unique identifier for the Connection. */ uid?: string | null; /** * Output only. [Output only] Update timestamp */ updateTime?: string | null; } /** * The crypto key configuration. This field is used by the Customer-managed encryption keys (CMEK) feature. */ export interface Schema$CryptoKeyConfig { /** * Required. The name of the key which is used to encrypt/decrypt customer data. For key in Cloud KMS, the key should be in the format of `projects/x/locations/x/keyRings/x/cryptoKeys/x`. */ keyReference?: string | null; } /** * 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 Schema$Empty { } /** * Message for representing an error from exchanging OAuth tokens. */ export interface Schema$ExchangeError { /** * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error */ code?: string | null; /** * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error_description */ description?: string | null; } /** * Message for fetching an OAuth access token. */ export interface Schema$FetchAccessTokenRequest { } /** * Message for responding to getting an OAuth access token. */ export interface Schema$FetchAccessTokenResponse { /** * The error resulted from exchanging OAuth tokens from the service provider. */ exchangeError?: Schema$ExchangeError; /** * Expiration timestamp. Can be empty if unknown or non-expiring. */ expirationTime?: string | null; /** * The scopes of the access token. */ scopes?: string[] | null; /** * The token content. */ token?: string | null; } /** * Response of fetching github installations. */ export interface Schema$FetchGitHubInstallationsResponse { /** * List of installations available to the OAuth user (for github.com) or all the installations (for GitHub enterprise). */ installations?: Schema$Installation[]; } /** * Response for fetching git refs. */ export interface Schema$FetchGitRefsResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string | null; /** * Name of the refs fetched. */ refNames?: string[] | null; } /** * Response message for FetchLinkableGitRepositories. */ export interface Schema$FetchLinkableGitRepositoriesResponse { /** * The git repositories that can be linked to the connection. */ linkableGitRepositories?: Schema$LinkableGitRepository[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string | null; } /** * Message for fetching SCM read token. */ export interface Schema$FetchReadTokenRequest { } /** * Message for responding to get read token. */ export interface Schema$FetchReadTokenResponse { /** * Expiration timestamp. Can be empty if unknown or non-expiring. */ expirationTime?: string | null; /** * The git_username to specify when making a git clone with the token. For example, for GitHub GitRepositoryLinks, this would be "x-access-token" */ gitUsername?: string | null; /** * The token content. */ token?: string | null; } /** * Message for fetching SCM read/write token. */ export interface Schema$FetchReadWriteTokenRequest { } /** * Message for responding to get read/write token. */ export interface Schema$FetchReadWriteTokenResponse { /** * Expiration timestamp. Can be empty if unknown or non-expiring. */ expirationTime?: string | null; /** * The git_username to specify when making a git clone with the token. For example, for GitHub GitRepositoryLinks, this would be "x-access-token" */ gitUsername?: string | null; /** * The token content. */ token?: string | null; } /** * Configuration for connections to github.com. */ export interface Schema$GitHubConfig { /** * Optional. GitHub App installation id. */ appInstallationId?: string | null; /** * Optional. OAuth credential of the account that authorized the GitHub App. It is recommended to use a robot account instead of a human user account. The OAuth token must be tied to the GitHub App of this config. */ authorizerCredential?: Schema$OAuthCredential; /** * Required. Immutable. The GitHub Application that was installed to the GitHub user or organization. */ githubApp?: string | null; /** * Output only. The URI to navigate to in order to manage the installation associated with this GitHubConfig. */ installationUri?: string | null; } /** * Configuration for connections to an instance of GitHub Enterprise. */ export interface Schema$GitHubEnterpriseConfig { /** * Optional. ID of the GitHub App created from the manifest. */ appId?: string | null; /** * Optional. ID of the installation of the GitHub App. */ appInstallationId?: string | null; /** * Output only. The URL-friendly name of the GitHub App. */ appSlug?: string | null; /** * Required. The URI of the GitHub Enterprise host this connection is for. */ hostUri?: string | null; /** * Output only. The URI to navigate to in order to manage the installation associated with this GitHubEnterpriseConfig. */ installationUri?: string | null; /** * Optional. SecretManager resource containing the private key of the GitHub App, formatted as `projects/x/secrets/x/versions/x`. */ privateKeySecretVersion?: string | null; /** * Output only. GitHub Enterprise version installed at the host_uri. */ serverVersion?: string | null; /** * Optional. Configuration for using Service Directory to privately connect to a GitHub Enterprise server. This should only be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitHub Enterprise server will be made over the public internet. */ serviceDirectoryConfig?: Schema$ServiceDirectoryConfig; /** * Optional. SSL certificate to use for requests to GitHub Enterprise. */ sslCaCertificate?: string | null; /** * Optional. SecretManager resource containing the webhook secret of the GitHub App, formatted as `projects/x/secrets/x/versions/x`. */ webhookSecretSecretVersion?: string | null; } /** * Configuration for connections to gitlab.com. */ export interface Schema$GitLabConfig { /** * Required. A GitLab personal access token with the minimum `api` scope access and a minimum role of `maintainer`. The GitLab Projects visible to this Personal Access Token will control which Projects Developer Connect has access to. */ authorizerCredential?: Schema$UserCredential; /** * Required. A GitLab personal access token with the minimum `read_api` scope access and a minimum role of `reporter`. The GitLab Projects visible to this Personal Access Token will control which Projects Developer Connect has access to. */ readAuthorizerCredential?: Schema$UserCredential; /** * Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, formatted as `projects/x/secrets/x/versions/x`. This is used to validate webhooks. */ webhookSecretSecretVersion?: string | null; } /** * Configuration for connections to an instance of GitLab Enterprise. */ export interface Schema$GitLabEnterpriseConfig { /** * Required. A GitLab personal access token with the minimum `api` scope access and a minimum role of `maintainer`. The GitLab Projects visible to this Personal Access Token will control which Projects Developer Connect has access to. */ authorizerCredential?: Schema$UserCredential; /** * Required. The URI of the GitLab Enterprise host this connection is for. */ hostUri?: string | null; /** * Required. A GitLab personal access token with the minimum `read_api` scope access and a minimum role of `reporter`. The GitLab Projects visible to this Personal Access Token will control which Projects Developer Connect has access to. */ readAuthorizerCredential?: Schema$UserCredential; /** * Output only. Version of the GitLab Enterprise server running on the `host_uri`. */ serverVersion?: string | null; /** * Optional. Configuration for using Service Directory to privately connect to a GitLab Enterprise instance. This should only be set if the GitLab Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitLab Enterprise server will be made over the public internet. */ serviceDirectoryConfig?: Schema$ServiceDirectoryConfig; /** * Optional. SSL Certificate Authority certificate to use for requests to GitLab Enterprise instance. */ sslCaCertificate?: string | null; /** * Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, formatted as `projects/x/secrets/x/versions/x`. This is used to validate webhooks. */ webhookSecretSecretVersion?: string | null; } /** * The git proxy configuration. */ export interface Schema$GitProxyConfig { /** * Optional. Setting this to true allows the git proxy to be used for performing git operations on the repositories linked in the connection. */ enabled?: boolean | null; } /** * Message describing the GitRepositoryLink object */ export interface Schema$GitRepositoryLink { /** * Optional. Allows clients to store small amounts of arbitrary data. */ annotations?: { [key: string]: string; } | null; /** * Required. Git Clone URI. */ cloneUri?: string | null; /** * Output only. [Output only] Create timestamp */ createTime?: string | null; /** * Output only. [Output only] Delete timestamp */ deleteTime?: string | null; /** * Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. */ etag?: string | null; /** * Output only. URI to access the linked repository through the Git Proxy. This field is only populated if the git proxy is enabled for the connection. */ gitProxyUri?: string | null; /** * Optional. Labels as key value pairs */ labels?: { [key: string]: string; } | null; /** * Identifier. Resource name of the repository, in the format `projects/x/locations/x/connections/x/gitRepositoryLinks/x`. */ name?: string | null; /** * Output only. Set to true when the connection is being set up or updated in the background. */ reconciling?: boolean | null; /** * Output only. A system-assigned unique identifier for the GitRepositoryLink. */ uid?: string | null; /** * Output only. [Output only] Update timestamp */ updateTime?: string | null; /** * Output only. External ID of the webhook created for the repository. */ webhookId?: string | null; } /** * GKEWorkload represents the Google Kubernetes Engine runtime. */ export interface Schema$GKEWorkload { /** * Required. Immutable. The name of the GKE cluster. Format: `projects/{project\}/locations/{location\}/clusters/{cluster\}`. */ cluster?: string | null; /** * Output only. The name of the GKE deployment. Format: `projects/{project\}/locations/{location\}/clusters/{cluster\}/namespaces/{namespace\}/deployments/{deployment\}`. */ deployment?: string | null; } /** * Google Artifact Analysis configurations. */ export interface Schema$GoogleArtifactAnalysis { /** * Required. The project id of the project where the provenance is stored. */ projectId?: string | null; } /** * Google Artifact Registry configurations. */ export interface Schema$GoogleArtifactRegistry { /** * Required. Immutable. The name of the artifact registry package. */ artifactRegistryPackage?: string | null; /** * Required. The host project of Artifact Registry. */ projectId?: string | null; } /** * Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; \} service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); \} Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); \} Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. */ export interface Schema$HttpBody { /** * The HTTP Content-Type header value specifying the content type of the body. */ contentType?: string | null; /** * The HTTP request/response body as raw binary. */ data?: string | null; /** * Application specific response metadata. Must be set in the first response for streaming APIs. */ extensions?: Array<{ [key: string]: any; }> | null; } /** * The InsightsConfig resource is the core configuration object to capture events from your Software Development Lifecycle. It acts as the central hub for managing how Developer connect understands your application, its runtime environments, and the artifacts deployed within them. */ export interface Schema$InsightsConfig { /** * Optional. User specified annotations. See https://google.aip.dev/148#annotations for more details such as format and size limitations. */ annotations?: { [key: string]: string; } | null; /** * Optional. The name of the App Hub Application. Format: projects/{project\}/locations/{location\}/applications/{application\} */ appHubApplication?: string | null; /** * Optional. The artifact configurations of the artifacts that are deployed. */ artifactConfigs?: Schema$ArtifactConfig[]; /** * Output only. [Output only] Create timestamp */ createTime?: string | null; /** * Output only. Any errors that occurred while setting up the InsightsConfig. Each error will be in the format: `field_name: error_message`, e.g. GetAppHubApplication: Permission denied while getting App Hub application. Please grant permissions to the P4SA. */ errors?: Schema$Status[]; /** * Optional. Set of labels associated with an InsightsConfig. */ labels?: { [key: string]: string; } | null; /** * Identifier. The name of the InsightsConfig. Format: projects/{project\}/locations/{location\}/insightsConfigs/{insightsConfig\} */ name?: string | null; /** * Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of InsightsConfig does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance. */ reconciling?: boolean | null; /** * Output only. The runtime configurations where the application is deployed. */ runtimeConfigs?: Schema$RuntimeConfig[]; /** * Optional. Output only. The state of the InsightsConfig. */ state?: string | null; /** * Output only. [Output only] Update timestamp */ updateTime?: string | null; } /** * Represents an installation of the GitHub App. */ export interface Schema$Installation { /** * ID of the installation in GitHub. */ id?: string | null; /** * Name of the GitHub user or organization that owns this installation. */ name?: string | null; /** * Either "user" or "organization". */ type?: string | null; } /** * Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections. */ export interface Schema$InstallationState { /** * Output only. Link to follow for next action. Empty string if the installation is already complete. */ actionUri?: string | null; /** * Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete. */ message?: string | null; /** * Output only. Current step of the installation process. */ stage?: string | null; } /** * LinkableGitRepository represents a git repository that can be linked to a connection. */ export interface Schema$LinkableGitRepository { /** * The clone uri of the repository. */ cloneUri?: string | null; } /** * Message for response to listing AccountConnectors */ export interface Schema$ListAccountConnectorsResponse { /** * The list of AccountConnectors */ accountConnectors?: Schema$AccountConnector[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string | null; /** * Locations that could not be reached. */ unreachable?: string[] | null; } /** * Message for response to listing Connections */ export interface Schema$ListConnectionsResponse { /** * The list of Connection */ connections?: Schema$Connection[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string | null; /** * Locations that could not be reached. */ unreachable?: string[] | null; } /** * Message for response to listing GitRepositoryLinks */ export interface Schema$ListGitRepositoryLinksResponse { /** * The list of GitRepositoryLinks */ gitRepositoryLinks?: Schema$GitRepositoryLink[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string | null; /** * Locations that could not be reached. */ unreachable?: string[] | null; } /** * Request for response to listing InsightsConfigs. */ export interface Schema$ListInsightsConfigsResponse { /** * The list of InsightsConfigs. */ insightsConfigs?: Schema$InsightsConfig[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string | null; /** * Locations that could not be reached. */ unreachable?: string[] | null; } /** * The response message for Locations.ListLocations. */ export interface Schema$ListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: Schema$Location[]; /** * The standard List next-page token. */ nextPageToken?: string | null; } /** * The response message for Operations.ListOperations. */ export interface Schema$ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string | null; /** * A list of operations that matches the specified filter in the request. */ operations?: Schema$Operation[]; } /** * Message for response to listing Users */ export interface Schema$ListUsersResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string | null; /** * Locations that could not be reached. */ unreachable?: string[] | null; /** * The list of Users */ users?: Schema$User[]; } /** * A resource that represents a Google Cloud location. */ export interface Schema$Location { /** * The friendly name for this location, typically a nearby city name. For example, "Tokyo". */ displayName?: string | null; /** * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} */ labels?: { [key: string]: string; } | null; /** * The canonical id for this location. For example: `"us-east1"`. */ locationId?: string | null; /** * Service-specific metadata. For example the available capacity at the given location. */ metadata?: { [key: string]: any; } | null; /** * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` */ name?: string | null; } /** * Represents an OAuth token of the account that authorized the Connection, and associated metadata. */ export interface Schema$OAuthCredential { /** * Required. A SecretManager resource containing the OAuth token that authorizes the connection. Format: `projects/x/secrets/x/versions/x`. */ oauthTokenSecretVersion?: string | null; /** * Output only. The username associated with this token. */ username?: string | null; } /** * This resource represents a long-running operation that is the result of a network API call. */ export interface Schema$Operation { /** * If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */ done?: boolean | null; /** * The error result of the operation in case of failure or cancellation. */ error?: Schema$Status; /** * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any; } | null; /** * 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 | null; /** * 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; } | null; } /** * Represents the metadata of the long-running operation. */ export interface Schema$OperationMetadata { /** * Output only. API version used to start the operation. */ apiVersion?: string | null; /** * Output only. The time the operation was created. */ createTime?: string | null; /** * Output only. The time the operation finished running. */ endTime?: string | null; /** * 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`. */ requestedCancellation?: boolean | null; /** * Output only. Human-readable status of the operation, if any. */ statusMessage?: string | null; /** * Output only. Server-defined resource path for the target of the operation. */ target?: string | null; /** * Output only. Name of the verb executed by the operation. */ verb?: string | null; } /** * RPC request object accepted by the ProcessBitbucketCloudWebhook RPC method. */ export interface Schema$ProcessBitbucketCloudWebhookRequest { /** * Required. HTTP request body. */ body?: Schema$HttpBody; } /** * RPC request object accepted by the ProcessBitbucketDataCenterWebhook RPC method. */ export interface Schema$ProcessBitbucketDataCenterWebhookRequest { /** * Required. HTTP request body. */ body?: Schema$HttpBody; } /** * RPC request object accepted by the ProcessGitHubEnterpriseWebhook RPC method. */ export interface Schema$ProcessGitHubEnterpriseWebhookRequest { /** * Required. HTTP request body. */ body?: Schema$HttpBody; } /** * RPC request object accepted by the ProcessGitLabEnterpriseWebhook RPC method. */ export interface Schema$ProcessGitLabEnterpriseWebhookRequest { /** * Required. HTTP request body. */ body?: Schema$HttpBody; } /** * RPC request object accepted by the ProcessGitLabWebhook RPC method. */ export interface Schema$ProcessGitLabWebhookRequest { /** * Required. HTTP request body. */ body?: Schema$HttpBody; } /** * ProviderOAuthConfig is the OAuth config for a provider. */ export interface Schema$ProviderOAuthConfig { /** * Required. User selected scopes to apply to the Oauth config In the event of changing scopes, user records under AccountConnector will be deleted and users will re-auth again. */ scopes?: string[] | null; /** * Immutable. Developer Connect provided OAuth. */ systemProviderId?: string | null; } /** * RuntimeConfig represents the runtimes where the application is deployed. */ export interface Schema$RuntimeConfig { /** * Output only. App Hub Workload. */ appHubWorkload?: Schema$AppHubWorkload; /** * Output only. Google Kubernetes Engine runtime. */ gkeWorkload?: Schema$GKEWorkload; /** * Output only. The state of the Runtime. */ state?: string | null; /** * Required. Immutable. The URI of the runtime configuration. For GKE, this is the cluster name. For Cloud Run, this is the service name. */ uri?: string | null; } /** * ServiceDirectoryConfig represents Service Directory configuration for a connection. */ export interface Schema$ServiceDirectoryConfig { /** * Required. The Service Directory service name. Format: projects/{project\}/locations/{location\}/namespaces/{namespace\}/services/{service\}. */ service?: string | null; } /** * 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 Schema$Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number | null; /** * A list of messages that carry the error details. There is a common set of message types for APIs to use. */ details?: Array<{ [key: string]: any; }> | null; /** * 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 | null; } /** * User represents a user connected to the service providers through a AccountConnector. */ export interface Schema$User { /** * Output only. The timestamp when the user was created. */ createTime?: string | null; /** * Output only. Developer Connect automatically converts user identity to some human readable description, e.g., email address. */ displayName?: string | null; /** * Output only. The timestamp when the token was last requested. */ lastTokenRequestTime?: string | null; /** * Identifier. Resource name of the user, in the format `projects/x/locations/x/accountConnectors/x/users/x`. */ name?: string | null; } /** * Represents a personal access token that authorized the Connection, and associated metadata. */ export interface Schema$UserCredential { /** * Output only. The username associated with this token. */ username?: string | null; /** * Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: `projects/x/secrets/x/versions/x`. */ userTokenSecretVersion?: string | null; } export class Resource$Projects { context: APIRequestContext; locations: Resource$Projects$Locations; constructor(context: APIRequestContext); } export class Resource$Projects$Locations { context: APIRequestContext; accountConnectors: Resource$Projects$Locations$Accountconnectors; connections: Resource$Projects$Locations$Connections; insightsConfigs: Resource$Projects$Locations$Insightsconfigs; operations: Resource$Projects$Locations$Operations; constructor(context: APIRequestContext); /** * Gets information about a location. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/developerconnect.googleapis.com * // - Login into gcloud by running: * // ```sh * // $ gcloud auth application-default login * // ``` * // - Install the npm module by running: * // ```sh * // $ npm install googleapis * // ``` * * const {google} = require('googleapis'); * const developerconnect = google.developerconnect('v1'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: ['https://www.googleapis.com/auth/cloud-platform'], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await developerconnect.projects.locations.get({ * // Resource name for the location. * name: 'projects/my-project/locations/my-location', * }); * console.log(res.data); * * // Example response * // { * // "displayName": "my_displayName", * // "labels": {}, * // "locationId": "my_locationId", * // "metadata": {}, * // "name": "my_name" * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>; get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Location>>; get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; get(params: Params$Resource$Projects$Locations$Get, options: MethodOptions | BodyResponseCallback<Schema$Location>, callback: BodyResponseCallback<Schema$Location>): void; get(params: Params$Resource$Projects$Locations$Get, callback: BodyResponseCallback<Schema$Location>): void; get(callback: BodyResponseCallback<Schema$Location>): void; /** * Lists information about the supported locations for this service. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/developerconnect.googleapis.com * // - Login into gcloud by running: * // ```sh * // $ gcloud auth application-default login * // ``` * // - Install the npm module by running: * // ```sh * // $ npm install googleapis * // ``` * * const {google} = require('googleapis'); * const developerconnect = google.developerconnect('v1'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: ['https://www.googleapis.com/auth/cloud-platform'], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await developerconnect.projects.locations.list({ * // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations. * extraLocationTypes: 'placeholder-value', * // 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: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: