# frozen_string_literal: true # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! module Google module Cloud module DeveloperConnect module V1 # Message describing Connection object # @!attribute [rw] github_config # @return [::Google::Cloud::DeveloperConnect::V1::GitHubConfig] # Configuration for connections to github.com. # @!attribute [rw] name # @return [::String] # Identifier. The resource name of the connection, in the format # `projects/{project}/locations/{location}/connections/{connection_id}`. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. [Output only] Create timestamp # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. [Output only] Update timestamp # @!attribute [r] delete_time # @return [::Google::Protobuf::Timestamp] # Output only. [Output only] Delete timestamp # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Labels as key value pairs # @!attribute [r] installation_state # @return [::Google::Cloud::DeveloperConnect::V1::InstallationState] # Output only. Installation state of the Connection. # @!attribute [rw] disabled # @return [::Boolean] # 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. # @!attribute [r] reconciling # @return [::Boolean] # Output only. Set to true when the connection is being set up or updated in # the background. # @!attribute [rw] annotations # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Allows clients to store small amounts of arbitrary data. # @!attribute [rw] etag # @return [::String] # 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. # @!attribute [r] uid # @return [::String] # Output only. A system-assigned unique identifier for a the # GitRepositoryLink. class Connection include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class AnnotationsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Describes stage and necessary actions to be taken by the # user to complete the installation. Used for GitHub and GitHub Enterprise # based connections. # @!attribute [r] stage # @return [::Google::Cloud::DeveloperConnect::V1::InstallationState::Stage] # Output only. Current step of the installation process. # @!attribute [r] message # @return [::String] # Output only. Message of what the user should do next to continue the # installation. Empty string if the installation is already complete. # @!attribute [r] action_uri # @return [::String] # Output only. Link to follow for next action. Empty string if the # installation is already complete. class InstallationState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Stage of the installation process. module Stage # No stage specified. STAGE_UNSPECIFIED = 0 # Only for GitHub Enterprise. An App creation has been requested. # The user needs to confirm the creation in their GitHub enterprise host. PENDING_CREATE_APP = 1 # User needs to authorize the GitHub (or Enterprise) App via OAuth. PENDING_USER_OAUTH = 2 # User needs to follow the link to install the GitHub (or Enterprise) App. PENDING_INSTALL_APP = 3 # Installation process has been completed. COMPLETE = 10 end end # Configuration for connections to github.com. # @!attribute [rw] github_app # @return [::Google::Cloud::DeveloperConnect::V1::GitHubConfig::GitHubApp] # Required. Immutable. The GitHub Application that was installed to the # GitHub user or organization. # @!attribute [rw] authorizer_credential # @return [::Google::Cloud::DeveloperConnect::V1::OAuthCredential] # 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. # @!attribute [rw] app_installation_id # @return [::Integer] # Optional. GitHub App installation id. # @!attribute [r] installation_uri # @return [::String] # Output only. The URI to navigate to in order to manage the installation # associated with this GitHubConfig. class GitHubConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the various GitHub Applications that can be installed to a # GitHub user or organization and used with Developer Connect. module GitHubApp # GitHub App not specified. GIT_HUB_APP_UNSPECIFIED = 0 # The Developer Connect GitHub Application. DEVELOPER_CONNECT = 1 # The Firebase GitHub Application. FIREBASE = 2 end end # Represents an OAuth token of the account that authorized the Connection, # and associated metadata. # @!attribute [rw] oauth_token_secret_version # @return [::String] # Required. A SecretManager resource containing the OAuth token that # authorizes the connection. Format: `projects/*/secrets/*/versions/*`. # @!attribute [r] username # @return [::String] # Output only. The username associated with this token. class OAuthCredential include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for requesting list of Connections # @!attribute [rw] parent # @return [::String] # Required. Parent value for ListConnectionsRequest # @!attribute [rw] page_size # @return [::Integer] # Optional. Requested page size. Server may return fewer items than # requested. If unspecified, server will pick an appropriate default. # @!attribute [rw] page_token # @return [::String] # Optional. A token identifying a page of results the server should return. # @!attribute [rw] filter # @return [::String] # Optional. Filtering results # @!attribute [rw] order_by # @return [::String] # Optional. Hint for how to order the results class ListConnectionsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for response to listing Connections # @!attribute [rw] connections # @return [::Array<::Google::Cloud::DeveloperConnect::V1::Connection>] # The list of Connection # @!attribute [rw] next_page_token # @return [::String] # A token identifying a page of results the server should return. # @!attribute [rw] unreachable # @return [::Array<::String>] # Locations that could not be reached. class ListConnectionsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for getting a Connection # @!attribute [rw] name # @return [::String] # Required. Name of the resource class GetConnectionRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for creating a Connection # @!attribute [rw] parent # @return [::String] # Required. Value for parent. # @!attribute [rw] connection_id # @return [::String] # Required. Id of the requesting object # If auto-generating Id server-side, remove this field and # connection_id from the method_signature of Create RPC # @!attribute [rw] connection # @return [::Google::Cloud::DeveloperConnect::V1::Connection] # Required. The resource being created # @!attribute [rw] request_id # @return [::String] # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is # not supported (00000000-0000-0000-0000-000000000000). # @!attribute [rw] validate_only # @return [::Boolean] # Optional. If set, validate the request, but do not actually post it. class CreateConnectionRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for updating a Connection # @!attribute [rw] update_mask # @return [::Google::Protobuf::FieldMask] # Required. Field mask is used to specify the fields to be overwritten in the # Connection resource by the update. # The fields specified in the update_mask are relative to the resource, not # the full request. A field will be overwritten if it is in the mask. If the # user does not provide a mask then all fields will be overwritten. # @!attribute [rw] connection # @return [::Google::Cloud::DeveloperConnect::V1::Connection] # Required. The resource being updated # @!attribute [rw] request_id # @return [::String] # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is # not supported (00000000-0000-0000-0000-000000000000). # @!attribute [rw] allow_missing # @return [::Boolean] # Optional. 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). # @!attribute [rw] validate_only # @return [::Boolean] # Optional. If set, validate the request, but do not actually post it. class UpdateConnectionRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for deleting a Connection # @!attribute [rw] name # @return [::String] # Required. Name of the resource # @!attribute [rw] request_id # @return [::String] # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes after the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is # not supported (00000000-0000-0000-0000-000000000000). # @!attribute [rw] validate_only # @return [::Boolean] # Optional. If set, validate the request, but do not actually post it. # @!attribute [rw] etag # @return [::String] # Optional. 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. class DeleteConnectionRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the metadata of the long-running operation. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time the operation was created. # @!attribute [r] end_time # @return [::Google::Protobuf::Timestamp] # Output only. The time the operation finished running. # @!attribute [r] target # @return [::String] # Output only. Server-defined resource path for the target of the operation. # @!attribute [r] verb # @return [::String] # Output only. Name of the verb executed by the operation. # @!attribute [r] status_message # @return [::String] # Output only. Human-readable status of the operation, if any. # @!attribute [r] requested_cancellation # @return [::Boolean] # 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 google.rpc.Status.code} of 1, corresponding to # `Code.CANCELLED`. # @!attribute [r] api_version # @return [::String] # Output only. API version used to start the operation. class OperationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message describing the GitRepositoryLink object # @!attribute [rw] name # @return [::String] # Identifier. Resource name of the repository, in the format # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. # @!attribute [rw] clone_uri # @return [::String] # Required. Git Clone URI. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. [Output only] Create timestamp # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. [Output only] Update timestamp # @!attribute [r] delete_time # @return [::Google::Protobuf::Timestamp] # Output only. [Output only] Delete timestamp # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Labels as key value pairs # @!attribute [rw] etag # @return [::String] # 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. # @!attribute [r] reconciling # @return [::Boolean] # Output only. Set to true when the connection is being set up or updated in # the background. # @!attribute [rw] annotations # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Allows clients to store small amounts of arbitrary data. # @!attribute [r] uid # @return [::String] # Output only. A system-assigned unique identifier for a the # GitRepositoryLink. class GitRepositoryLink include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class AnnotationsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Message for creating a GitRepositoryLink # @!attribute [rw] parent # @return [::String] # Required. Value for parent. # @!attribute [rw] git_repository_link # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] # Required. The resource being created # @!attribute [rw] git_repository_link_id # @return [::String] # 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 # -._~%!$&'()*+,;=@. # @!attribute [rw] request_id # @return [::String] # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes since the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is # not supported (00000000-0000-0000-0000-000000000000). # @!attribute [rw] validate_only # @return [::Boolean] # Optional. If set, validate the request, but do not actually post it. class CreateGitRepositoryLinkRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for deleting a GitRepositoryLink # @!attribute [rw] name # @return [::String] # Required. Name of the resource # @!attribute [rw] request_id # @return [::String] # Optional. An optional request ID to identify requests. Specify a unique # request ID so that if you must retry your request, the server will know to # ignore the request if it has already been completed. The server will # guarantee that for at least 60 minutes after the first request. # # For example, consider a situation where you make an initial request and the # request times out. If you make the request again with the same request # ID, the server can check if original operation with the same request ID # was received, and if so, will ignore the second request. This prevents # clients from accidentally creating duplicate commitments. # # The request ID must be a valid UUID with the exception that zero UUID is # not supported (00000000-0000-0000-0000-000000000000). # @!attribute [rw] validate_only # @return [::Boolean] # Optional. If set, validate the request, but do not actually post it. # @!attribute [rw] etag # @return [::String] # 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. class DeleteGitRepositoryLinkRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for requesting a list of GitRepositoryLinks # @!attribute [rw] parent # @return [::String] # Required. Parent value for ListGitRepositoryLinksRequest # @!attribute [rw] page_size # @return [::Integer] # Optional. Requested page size. Server may return fewer items than # requested. If unspecified, server will pick an appropriate default. # @!attribute [rw] page_token # @return [::String] # Optional. A token identifying a page of results the server should return. # @!attribute [rw] filter # @return [::String] # Optional. Filtering results # @!attribute [rw] order_by # @return [::String] # Optional. Hint for how to order the results class ListGitRepositoryLinksRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for response to listing GitRepositoryLinks # @!attribute [rw] git_repository_links # @return [::Array<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] # The list of GitRepositoryLinks # @!attribute [rw] next_page_token # @return [::String] # A token identifying a page of results the server should return. # @!attribute [rw] unreachable # @return [::Array<::String>] # Locations that could not be reached. class ListGitRepositoryLinksResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for getting a GitRepositoryLink # @!attribute [rw] name # @return [::String] # Required. Name of the resource class GetGitRepositoryLinkRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for fetching SCM read/write token. # @!attribute [rw] git_repository_link # @return [::String] # Required. The resource name of the gitRepositoryLink in the format # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. class FetchReadWriteTokenRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for fetching SCM read token. # @!attribute [rw] git_repository_link # @return [::String] # Required. The resource name of the gitRepositoryLink in the format # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. class FetchReadTokenRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for responding to get read token. # @!attribute [rw] token # @return [::String] # The token content. # @!attribute [rw] expiration_time # @return [::Google::Protobuf::Timestamp] # Expiration timestamp. Can be empty if unknown or non-expiring. # @!attribute [rw] git_username # @return [::String] # The git_username to specify when making a git clone with the # token. For example, for GitHub GitRepositoryLinks, this would be # "x-access-token" class FetchReadTokenResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Message for responding to get read/write token. # @!attribute [rw] token # @return [::String] # The token content. # @!attribute [rw] expiration_time # @return [::Google::Protobuf::Timestamp] # Expiration timestamp. Can be empty if unknown or non-expiring. # @!attribute [rw] git_username # @return [::String] # The git_username to specify when making a git clone with the # token. For example, for GitHub GitRepositoryLinks, this would be # "x-access-token" class FetchReadWriteTokenResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Request message for FetchLinkableGitRepositoriesRequest. # @!attribute [rw] connection # @return [::String] # Required. The name of the Connection. # Format: `projects/*/locations/*/connections/*`. # @!attribute [rw] page_size # @return [::Integer] # Optional. Number of results to return in the list. Defaults to 20. # @!attribute [rw] page_token # @return [::String] # Optional. Page start. class FetchLinkableGitRepositoriesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Response message for FetchLinkableGitRepositories. # @!attribute [rw] linkable_git_repositories # @return [::Array<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] # The git repositories that can be linked to the connection. # @!attribute [rw] next_page_token # @return [::String] # A token identifying a page of results the server should return. class FetchLinkableGitRepositoriesResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # LinkableGitRepository represents a git repository that can be linked to a # connection. # @!attribute [rw] clone_uri # @return [::String] # The clone uri of the repository. class LinkableGitRepository include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Request for fetching github installations. # @!attribute [rw] connection # @return [::String] # Required. The resource name of the connection in the format # `projects/*/locations/*/connections/*`. class FetchGitHubInstallationsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Response of fetching github installations. # @!attribute [rw] installations # @return [::Array<::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse::Installation>] # List of installations available to the OAuth user (for github.com) # or all the installations (for GitHub enterprise). class FetchGitHubInstallationsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents an installation of the GitHub App. # @!attribute [rw] id # @return [::Integer] # ID of the installation in GitHub. # @!attribute [rw] name # @return [::String] # Name of the GitHub user or organization that owns this installation. # @!attribute [rw] type # @return [::String] # Either "user" or "organization". class Installation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Request for fetching git refs. # @!attribute [rw] git_repository_link # @return [::String] # Required. The resource name of GitRepositoryLink in the format # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. # @!attribute [rw] ref_type # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest::RefType] # Required. Type of refs to fetch. # @!attribute [rw] page_size # @return [::Integer] # Optional. Number of results to return in the list. Default to 20. # @!attribute [rw] page_token # @return [::String] # Optional. Page start. class FetchGitRefsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Type of refs. module RefType # No type specified. REF_TYPE_UNSPECIFIED = 0 # To fetch tags. TAG = 1 # To fetch branches. BRANCH = 2 end end # Response for fetching git refs. # @!attribute [rw] ref_names # @return [::Array<::String>] # Name of the refs fetched. # @!attribute [rw] next_page_token # @return [::String] # A token identifying a page of results the server should return. class FetchGitRefsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end