As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Devtools Cloudbuild v2 API

class google.cloud.devtools.cloudbuild_v2.types.BatchCreateRepositoriesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for creating repositoritories in batch.

parent

Required. The connection to contain all the repositories being created. Format: projects//locations//connections/* The parent field in the CreateRepositoryRequest messages must either be empty or match this field.

Type

str

requests

Required. The request messages specifying the repositories to create.

Type

MutableSequence[google.cloud.devtools.cloudbuild_v2.types.CreateRepositoryRequest]

class google.cloud.devtools.cloudbuild_v2.types.BatchCreateRepositoriesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for response of creating repositories in batch.

repositories

Repository resources created.

Type

MutableSequence[google.cloud.devtools.cloudbuild_v2.types.Repository]

class google.cloud.devtools.cloudbuild_v2.types.BitbucketCloudConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configuration for connections to Bitbucket Cloud.

workspace

Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.

Type

str

webhook_secret_secret_version

Required. SecretManager resource containing the webhook secret used to verify webhook events, formatted as projects/*/secrets/*/versions/*.

Type

str

read_authorizer_credential

Required. An access token with the repository access. It can be either a workspace, project or repository access token. It’s recommended to use a system account to generate the credentials.

Type

google.cloud.devtools.cloudbuild_v2.types.UserCredential

authorizer_credential

Required. An access token with the webhook, repository, repository:admin and pullrequest scope access. It can be either a workspace, project or repository access token. It’s recommended to use a system account to generate these credentials.

Type

google.cloud.devtools.cloudbuild_v2.types.UserCredential

class google.cloud.devtools.cloudbuild_v2.types.BitbucketDataCenterConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configuration for connections to Bitbucket Data Center.

host_uri

Required. The URI of the Bitbucket Data Center instance or cluster this connection is for.

Type

str

webhook_secret_secret_version

Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as projects/*/secrets/*/versions/*.

Type

str

read_authorizer_credential

Required. A http access token with the REPO_READ access.

Type

google.cloud.devtools.cloudbuild_v2.types.UserCredential

authorizer_credential

Required. A http access token with the REPO_ADMIN scope access.

Type

google.cloud.devtools.cloudbuild_v2.types.UserCredential

service_directory_config

Optional. Configuration for using Service Directory to privately connect to a Bitbucket Data Center. 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.

Type

google.cloud.devtools.cloudbuild_v2.types.ServiceDirectoryConfig

ssl_ca

Optional. SSL certificate to use for requests to the Bitbucket Data Center.

Type

str

server_version

Output only. Version of the Bitbucket Data Center running on the host_uri.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.Connection(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center, Bitbucket Cloud or GitLab.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

name

Immutable. The resource name of the connection, in the format projects/{project}/locations/{location}/connections/{connection_id}.

Type

str

create_time

Output only. Server assigned timestamp for when the connection was created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Server assigned timestamp for when the connection was updated.

Type

google.protobuf.timestamp_pb2.Timestamp

github_config

Configuration for connections to github.com.

This field is a member of oneof connection_config.

Type

google.cloud.devtools.cloudbuild_v2.types.GitHubConfig

github_enterprise_config

Configuration for connections to an instance of GitHub Enterprise.

This field is a member of oneof connection_config.

Type

google.cloud.devtools.cloudbuild_v2.types.GitHubEnterpriseConfig

gitlab_config

Configuration for connections to gitlab.com or an instance of GitLab Enterprise.

This field is a member of oneof connection_config.

Type

google.cloud.devtools.cloudbuild_v2.types.GitLabConfig

bitbucket_data_center_config

Configuration for connections to Bitbucket Data Center.

This field is a member of oneof connection_config.

Type

google.cloud.devtools.cloudbuild_v2.types.BitbucketDataCenterConfig

bitbucket_cloud_config

Configuration for connections to Bitbucket Cloud.

This field is a member of oneof connection_config.

Type

google.cloud.devtools.cloudbuild_v2.types.BitbucketCloudConfig

installation_state

Output only. Installation state of the Connection.

Type

google.cloud.devtools.cloudbuild_v2.types.InstallationState

disabled

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.

Type

bool

reconciling

Output only. Set to true when the connection is being set up or updated in the background.

Type

bool

annotations

Allows clients to store small amounts of arbitrary data.

Type

MutableMapping[str, str]

etag

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.

Type

str

class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.devtools.cloudbuild_v2.types.CreateConnectionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for creating a Connection

parent

Required. Project and location where the connection will be created. Format: projects/*/locations/*.

Type

str

connection

Required. The Connection to create.

Type

google.cloud.devtools.cloudbuild_v2.types.Connection

connection_id

Required. The ID to use for the Connection, which will become the final component of the Connection’s resource name. Names must be unique per-project per-location. Allows alphanumeric characters and any of -._~%!$&’()*+,;=@.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.CreateRepositoryRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for creating a Repository.

parent

Required. The connection to contain the repository. If the request is part of a BatchCreateRepositoriesRequest, this field should be empty or match the parent specified there.

Type

str

repository

Required. The repository to create.

Type

google.cloud.devtools.cloudbuild_v2.types.Repository

repository_id

Required. The ID to use for the repository, which will become the final component of the repository’s resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._~%!$&’()*+,;=@.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.DeleteConnectionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for deleting a Connection.

name

Required. The name of the Connection to delete. Format: projects/*/locations/*/connections/*.

Type

str

etag

The current etag of the connection. If an etag is provided and does not match the current etag of the connection, deletion will be blocked and an ABORTED error will be returned.

Type

str

validate_only

If set, validate the request, but do not actually post it.

Type

bool

class google.cloud.devtools.cloudbuild_v2.types.DeleteRepositoryRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for deleting a Repository.

name

Required. The name of the Repository to delete. Format: projects/*/locations/*/connections/*/repositories/*.

Type

str

etag

The current etag of the repository. If an etag is provided and does not match the current etag of the repository, deletion will be blocked and an ABORTED error will be returned.

Type

str

validate_only

If set, validate the request, but do not actually post it.

Type

bool

class google.cloud.devtools.cloudbuild_v2.types.FetchGitRefsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for fetching git refs

repository

Required. The resource name of the repository in the format projects/*/locations/*/connections/*/repositories/*.

Type

str

ref_type

Type of refs to fetch

Type

google.cloud.devtools.cloudbuild_v2.types.FetchGitRefsRequest.RefType

class RefType(value)[source]

Bases: proto.enums.Enum

Type of refs

Values:
REF_TYPE_UNSPECIFIED (0):

No type specified.

TAG (1):

To fetch tags.

BRANCH (2):

To fetch branches.

class google.cloud.devtools.cloudbuild_v2.types.FetchGitRefsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for fetching git refs

ref_names

Name of the refs fetched.

Type

MutableSequence[str]

class google.cloud.devtools.cloudbuild_v2.types.FetchLinkableRepositoriesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for FetchLinkableRepositories.

connection

Required. The name of the Connection. Format: projects/*/locations/*/connections/*.

Type

str

page_size

Number of results to return in the list. Default to 20.

Type

int

page_token

Page start.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.FetchLinkableRepositoriesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for FetchLinkableRepositories.

repositories

repositories ready to be created.

Type

MutableSequence[google.cloud.devtools.cloudbuild_v2.types.Repository]

next_page_token

A token identifying a page of results the server should return.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.FetchReadTokenRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for fetching SCM read token.

repository

Required. The resource name of the repository in the format projects/*/locations/*/connections/*/repositories/*.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.FetchReadTokenResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for responding to get read token.

token

The token content.

Type

str

expiration_time

Expiration timestamp. Can be empty if unknown or non-expiring.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.devtools.cloudbuild_v2.types.FetchReadWriteTokenRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for fetching SCM read/write token.

repository

Required. The resource name of the repository in the format projects/*/locations/*/connections/*/repositories/*.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.FetchReadWriteTokenResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for responding to get read/write token.

token

The token content.

Type

str

expiration_time

Expiration timestamp. Can be empty if unknown or non-expiring.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.devtools.cloudbuild_v2.types.GetConnectionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for getting the details of a Connection.

name

Required. The name of the Connection to retrieve. Format: projects/*/locations/*/connections/*.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.GetRepositoryRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for getting the details of a Repository.

name

Required. The name of the Repository to retrieve. Format: projects/*/locations/*/connections/*/repositories/*.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.GitHubConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configuration for connections to github.com.

authorizer_credential

OAuth credential of the account that authorized the Cloud Build GitHub App. It is recommended to use a robot account instead of a human user account. The OAuth token must be tied to the Cloud Build GitHub App.

Type

google.cloud.devtools.cloudbuild_v2.types.OAuthCredential

app_installation_id

GitHub App installation id.

Type

int

class google.cloud.devtools.cloudbuild_v2.types.GitHubEnterpriseConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configuration for connections to an instance of GitHub Enterprise.

host_uri

Required. The URI of the GitHub Enterprise host this connection is for.

Type

str

api_key

Required. API Key used for authentication of webhook events.

Type

str

app_id

Id of the GitHub App created from the manifest.

Type

int

app_slug

The URL-friendly name of the GitHub App.

Type

str

private_key_secret_version

SecretManager resource containing the private key of the GitHub App, formatted as projects/*/secrets/*/versions/*.

Type

str

webhook_secret_secret_version

SecretManager resource containing the webhook secret of the GitHub App, formatted as projects/*/secrets/*/versions/*.

Type

str

app_installation_id

ID of the installation of the GitHub App.

Type

int

service_directory_config

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.

Type

google.cloud.devtools.cloudbuild_v2.types.ServiceDirectoryConfig

ssl_ca

SSL certificate to use for requests to GitHub Enterprise.

Type

str

server_version

Output only. GitHub Enterprise version installed at the host_uri.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.GitLabConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configuration for connections to gitlab.com or an instance of GitLab Enterprise.

host_uri

The URI of the GitLab Enterprise host this connection is for. If not specified, the default value is https://gitlab.com.

Type

str

webhook_secret_secret_version

Required. Immutable. SecretManager resource containing the webhook secret of a GitLab Enterprise project, formatted as projects/*/secrets/*/versions/*.

Type

str

read_authorizer_credential

Required. A GitLab personal access token with the minimum read_api scope access.

Type

google.cloud.devtools.cloudbuild_v2.types.UserCredential

authorizer_credential

Required. A GitLab personal access token with the api scope access.

Type

google.cloud.devtools.cloudbuild_v2.types.UserCredential

service_directory_config

Configuration for using Service Directory to privately connect to a GitLab Enterprise server. 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.

Type

google.cloud.devtools.cloudbuild_v2.types.ServiceDirectoryConfig

ssl_ca

SSL certificate to use for requests to GitLab Enterprise.

Type

str

server_version

Output only. Version of the GitLab Enterprise server running on the host_uri.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.InstallationState(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections.

stage

Output only. Current step of the installation process.

Type

google.cloud.devtools.cloudbuild_v2.types.InstallationState.Stage

message

Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete.

Type

str

action_uri

Output only. Link to follow for next action. Empty string if the installation is already complete.

Type

str

class Stage(value)[source]

Bases: proto.enums.Enum

Stage of the installation process.

Values:
STAGE_UNSPECIFIED (0):

No stage specified.

PENDING_CREATE_APP (1):

Only for GitHub Enterprise. An App creation has been requested. The user needs to confirm the creation in their GitHub enterprise host.

PENDING_USER_OAUTH (2):

User needs to authorize the GitHub (or Enterprise) App via OAuth.

PENDING_INSTALL_APP (3):

User needs to follow the link to install the GitHub (or Enterprise) App.

COMPLETE (10):

Installation process has been completed.

class google.cloud.devtools.cloudbuild_v2.types.ListConnectionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for requesting list of Connections.

parent

Required. The parent, which owns this collection of Connections. Format: projects/*/locations/*.

Type

str

page_size

Number of results to return in the list.

Type

int

page_token

Page start.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.ListConnectionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for response to listing Connections.

connections

The list of Connections.

Type

MutableSequence[google.cloud.devtools.cloudbuild_v2.types.Connection]

next_page_token

A token identifying a page of results the server should return.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.ListRepositoriesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for requesting list of Repositories.

parent

Required. The parent, which owns this collection of Repositories. Format: projects/*/locations/*/connections/*.

Type

str

page_size

Number of results to return in the list.

Type

int

page_token

Page start.

Type

str

filter

A filter expression that filters resources listed in the response. Expressions must follow API improvement proposal AIP-160. e.g. remote_uri:"https://github.com*".

Type

str

class google.cloud.devtools.cloudbuild_v2.types.ListRepositoriesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for response to listing Repositories.

repositories

The list of Repositories.

Type

MutableSequence[google.cloud.devtools.cloudbuild_v2.types.Repository]

next_page_token

A token identifying a page of results the server should return.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.OAuthCredential(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents an OAuth token of the account that authorized the Connection, and associated metadata.

oauth_token_secret_version

A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: projects/*/secrets/*/versions/*.

Type

str

username

Output only. The username associated to this token.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.OperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the metadata of the long-running operation.

create_time

Output only. The time the operation was created.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

Output only. The time the operation finished running.

Type

google.protobuf.timestamp_pb2.Timestamp

target

Output only. Server-defined resource path for the target of the operation.

Type

str

verb

Output only. Name of the verb executed by the operation.

Type

str

status_message

Output only. Human-readable status of the operation, if any.

Type

str

requested_cancellation

Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED.

Type

bool

api_version

Output only. API version used to start the operation.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.ProcessWebhookRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

RPC request object accepted by the ProcessWebhook RPC method.

parent

Required. Project and location where the webhook will be received. Format: projects/*/locations/*.

Type

str

body

HTTP request body.

Type

google.api.httpbody_pb2.HttpBody

webhook_key

Arbitrary additional key to find the maching repository for a webhook event if needed.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.Repository(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A repository associated to a parent connection.

name

Immutable. Resource name of the repository, in the format projects/*/locations/*/connections/*/repositories/*.

Type

str

remote_uri

Required. Git Clone HTTPS URI.

Type

str

create_time

Output only. Server assigned timestamp for when the connection was created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Server assigned timestamp for when the connection was updated.

Type

google.protobuf.timestamp_pb2.Timestamp

annotations

Allows clients to store small amounts of arbitrary data.

Type

MutableMapping[str, str]

etag

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.

Type

str

webhook_id

Output only. External ID of the webhook created for the repository.

Type

str

class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.devtools.cloudbuild_v2.types.RunWorkflowCustomOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the custom metadata of the RunWorkflow long-running operation.

create_time

Output only. The time the operation was created.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

Output only. The time the operation finished running.

Type

google.protobuf.timestamp_pb2.Timestamp

verb

Output only. Name of the verb executed by the operation.

Type

str

requested_cancellation

Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED.

Type

bool

api_version

Output only. API version used to start the operation.

Type

str

target

Output only. Server-defined resource path for the target of the operation.

Type

str

pipeline_run_id

Output only. ID of the pipeline run created by RunWorkflow.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.ServiceDirectoryConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

ServiceDirectoryConfig represents Service Directory configuration for a connection.

service

Required. The Service Directory service name. Format:

projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.UpdateConnectionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message for updating a Connection.

connection

Required. The Connection to update.

Type

google.cloud.devtools.cloudbuild_v2.types.Connection

update_mask

The list of fields to be updated.

Type

google.protobuf.field_mask_pb2.FieldMask

allow_missing

If set to true, and the connection is not found a new connection will be created. In this situation update_mask is ignored. The creation will succeed only if the input connection has all the necessary information (e.g a github_config with both user_oauth_token and installation_id properties).

Type

bool

etag

The current etag of the connection. If an etag is provided and does not match the current etag of the connection, update will be blocked and an ABORTED error will be returned.

Type

str

class google.cloud.devtools.cloudbuild_v2.types.UserCredential(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a personal access token that authorized the Connection, and associated metadata.

user_token_secret_version

Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: projects/*/secrets/*/versions/*.

Type

str

username

Output only. The username associated to this token.

Type

str