Reference documentation and code samples for the Developer Connect V1 API class Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.
REST client for the DeveloperConnect service.
Service describing handlers for resources
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the DeveloperConnect Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all DeveloperConnect clients ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.configure do |config| config.timeout = 10.0 end
#add_git_repository_link_pull_request_comment
def add_git_repository_link_pull_request_comment(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestComment
def add_git_repository_link_pull_request_comment(name: nil, pull_request_id: nil, comment: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestCommentAdd a comment to a Pull Request.
def add_git_repository_link_pull_request_comment(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestCommentadd_git_repository_link_pull_request_comment via a request object, either of type
AddGitRepositoryLinkPullRequestCommentRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::AddGitRepositoryLinkPullRequestCommentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def add_git_repository_link_pull_request_comment(name: nil, pull_request_id: nil, comment: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestCommentadd_git_repository_link_pull_request_comment via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the GitRepositoryLink in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. - pull_request_id (::String) — Required. The ID of the Pull Request.
- comment (::Google::Cloud::DeveloperConnect::V1::PullRequestComment, ::Hash) — Required. The comment to add.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::PullRequestComment)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::AddGitRepositoryLinkPullRequestCommentRequest.new # Call the add_git_repository_link_pull_request_comment method. result = client.add_git_repository_link_pull_request_comment request # The returned object is of type Google::Cloud::DeveloperConnect::V1::PullRequestComment. p result
#add_git_repository_link_pull_request_review_comment
def add_git_repository_link_pull_request_review_comment(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestReviewComment
def add_git_repository_link_pull_request_review_comment(name: nil, pull_request_id: nil, comment: nil, commit_id: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestReviewCommentAdd a review comment (inline on diff) to a Pull Request.
def add_git_repository_link_pull_request_review_comment(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestReviewCommentadd_git_repository_link_pull_request_review_comment via a request object, either of type
AddGitRepositoryLinkPullRequestReviewCommentRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::AddGitRepositoryLinkPullRequestReviewCommentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def add_git_repository_link_pull_request_review_comment(name: nil, pull_request_id: nil, comment: nil, commit_id: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestReviewCommentadd_git_repository_link_pull_request_review_comment via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the GitRepositoryLink in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. - pull_request_id (::String) — Required. The ID of the Pull Request.
- comment (::Google::Cloud::DeveloperConnect::V1::PullRequestReviewComment, ::Hash) — Required. The review comment to add.
- commit_id (::String) — Optional. The commit SHA to comment on. If not specified, defaults to the HEAD commit of the Pull Request.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::PullRequestReviewComment)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::AddGitRepositoryLinkPullRequestReviewCommentRequest.new # Call the add_git_repository_link_pull_request_review_comment method. result = client.add_git_repository_link_pull_request_review_comment request # The returned object is of type Google::Cloud::DeveloperConnect::V1::PullRequestReviewComment. p result
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the DeveloperConnect Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_account_connector
def create_account_connector(request, options = nil) -> ::Gapic::Operation
def create_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil) -> ::Gapic::OperationCreates a new AccountConnector in a given project and location.
def create_account_connector(request, options = nil) -> ::Gapic::Operationcreate_account_connector via a request object, either of type
CreateAccountConnectorRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operationcreate_account_connector via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Location resource name as the account_connector’s parent.
- account_connector_id (::String) — Required. The ID to use for the AccountConnector, which will become the final component of the AccountConnector's resource name. Its format should adhere to https://google.aip.dev/122#resource-id-segments Names must be unique per-project per-location.
- account_connector (::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash) — Required. The AccountConnector to create.
-
request_id (::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).
- validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new # Call the create_account_connector method. result = client.create_account_connector request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#create_connection
def create_connection(request, options = nil) -> ::Gapic::Operation
def create_connection(parent: nil, connection_id: nil, connection: nil, request_id: nil, validate_only: nil) -> ::Gapic::OperationCreates a new Connection in a given project and location.
def create_connection(request, options = nil) -> ::Gapic::Operationcreate_connection via a request object, either of type
CreateConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_connection(parent: nil, connection_id: nil, connection: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operationcreate_connection via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Value for parent.
- connection_id (::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
- connection (::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash) — Required. The resource being created
-
request_id (::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).
- validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new # Call the create_connection method. result = client.create_connection request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#create_git_repository_link
def create_git_repository_link(request, options = nil) -> ::Gapic::Operation
def create_git_repository_link(parent: nil, git_repository_link: nil, git_repository_link_id: nil, request_id: nil, validate_only: nil) -> ::Gapic::OperationCreates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. Connections that use Gemini Code Assist will have events forwarded to Gemini Code Assist service. All other Connections will have events forwarded to Cloud Build.
def create_git_repository_link(request, options = nil) -> ::Gapic::Operationcreate_git_repository_link via a request object, either of type
CreateGitRepositoryLinkRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_git_repository_link(parent: nil, git_repository_link: nil, git_repository_link_id: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operationcreate_git_repository_link via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Value for parent.
- git_repository_link (::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink, ::Hash) — Required. The resource being created
- git_repository_link_id (::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 -._~%!$&'()*+,;=@.
-
request_id (::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).
- validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new # Call the create_git_repository_link method. result = client.create_git_repository_link request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_account_connector
def delete_account_connector(request, options = nil) -> ::Gapic::Operation
def delete_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil) -> ::Gapic::OperationDeletes a single AccountConnector.
def delete_account_connector(request, options = nil) -> ::Gapic::Operationdelete_account_connector via a request object, either of type
Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil) -> ::Gapic::Operationdelete_account_connector via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
-
request_id (::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).
- validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- etag (::String) — Optional. The current etag of the AccountConnectorn. If an etag is provided and does not match the current etag of the AccountConnector, deletion will be blocked and an ABORTED error will be returned.
- force (::Boolean) — Optional. If set to true, any Users from this AccountConnector will also be deleted. (Otherwise, the request will only work if the AccountConnector has no Users.)
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new # Call the delete_account_connector method. result = client.delete_account_connector request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_connection
def delete_connection(request, options = nil) -> ::Gapic::Operation
def delete_connection(name: nil, request_id: nil, validate_only: nil, etag: nil) -> ::Gapic::OperationDeletes a single Connection.
def delete_connection(request, options = nil) -> ::Gapic::Operationdelete_connection via a request object, either of type
Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_connection(name: nil, request_id: nil, validate_only: nil, etag: nil) -> ::Gapic::Operationdelete_connection via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
-
request_id (::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).
- validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- etag (::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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new # Call the delete_connection method. result = client.delete_connection request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_git_repository_link
def delete_git_repository_link(request, options = nil) -> ::Gapic::Operation
def delete_git_repository_link(name: nil, request_id: nil, validate_only: nil, etag: nil) -> ::Gapic::OperationDeletes a single GitRepositoryLink.
def delete_git_repository_link(request, options = nil) -> ::Gapic::Operationdelete_git_repository_link via a request object, either of type
Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_git_repository_link(name: nil, request_id: nil, validate_only: nil, etag: nil) -> ::Gapic::Operationdelete_git_repository_link via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
-
request_id (::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).
- validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- etag (::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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new # Call the delete_git_repository_link method. result = client.delete_git_repository_link request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_self
def delete_self(request, options = nil) -> ::Gapic::Operation
def delete_self(name: nil) -> ::Gapic::OperationDelete the User based on the user credentials.
def delete_self(request, options = nil) -> ::Gapic::Operationdelete_self via a request object, either of type
Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_self(name: nil) -> ::Gapic::Operationdelete_self via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the AccountConnector resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new # Call the delete_self method. result = client.delete_self request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_user
def delete_user(request, options = nil) -> ::Gapic::Operation
def delete_user(name: nil, request_id: nil, validate_only: nil, etag: nil) -> ::Gapic::OperationDeletes a single User.
def delete_user(request, options = nil) -> ::Gapic::Operationdelete_user via a request object, either of type
Google::Cloud::DeveloperConnect::V1::DeleteUserRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_user(name: nil, request_id: nil, validate_only: nil, etag: nil) -> ::Gapic::Operationdelete_user via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
-
request_id (::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).
- validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- etag (::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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new # Call the delete_user method. result = client.delete_user request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#diff_git_repository_link_commit
def diff_git_repository_link_commit(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::DiffGitRepositoryLinkCommitResponse
def diff_git_repository_link_commit(name: nil, base_sha: nil, head_sha: nil, path_filters: nil) -> ::Google::Cloud::DeveloperConnect::V1::DiffGitRepositoryLinkCommitResponseDiff commits for a GitRepositoryLink.
def diff_git_repository_link_commit(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::DiffGitRepositoryLinkCommitResponsediff_git_repository_link_commit via a request object, either of type
Google::Cloud::DeveloperConnect::V1::DiffGitRepositoryLinkCommitRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::DiffGitRepositoryLinkCommitRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def diff_git_repository_link_commit(name: nil, base_sha: nil, head_sha: nil, path_filters: nil) -> ::Google::Cloud::DeveloperConnect::V1::DiffGitRepositoryLinkCommitResponsediff_git_repository_link_commit via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The resource name of the GitRepositoryLink.
- base_sha (::String) — Required. The base commit SHA or ref.
- head_sha (::String) — Required. The head commit SHA or ref.
-
path_filters (::Array<::String>) — Optional. Path patterns or exact paths to filter returned files.
When
path_filtersis specified,FileDiff.patchis populated for all matching files (use["**"]to include patches for all changed files). Whenpath_filtersis omitted or empty, the full list ofFileDiffis returned without patch diffs (FileDiff.patchis empty).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::DiffGitRepositoryLinkCommitResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::DiffGitRepositoryLinkCommitRequest.new # Call the diff_git_repository_link_commit method. result = client.diff_git_repository_link_commit request # The returned object is of type Google::Cloud::DeveloperConnect::V1::DiffGitRepositoryLinkCommitResponse. p result
#fetch_access_token
def fetch_access_token(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse
def fetch_access_token(account_connector: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponseFetches OAuth access token based on end user credentials.
def fetch_access_token(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponsefetch_access_token via a request object, either of type
FetchAccessTokenRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_access_token(account_connector: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponsefetch_access_token via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
account_connector (::String) — Required. The resource name of the AccountConnector in the format
projects/*/locations/*/accountConnectors/*.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new # Call the fetch_access_token method. result = client.fetch_access_token request # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. p result
#fetch_git_hub_installations
def fetch_git_hub_installations(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse
def fetch_git_hub_installations(connection: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponseFetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com, only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.
def fetch_git_hub_installations(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponsefetch_git_hub_installations via a request object, either of type
FetchGitHubInstallationsRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_git_hub_installations(connection: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponsefetch_git_hub_installations via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
connection (::String) — Required. The resource name of the connection in the format
projects/*/locations/*/connections/*.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new # Call the fetch_git_hub_installations method. result = client.fetch_git_hub_installations request # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse. p result
#fetch_git_refs
def fetch_git_refs(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse
def fetch_git_refs(git_repository_link: nil, ref_type: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponseFetch the list of branches or tags for a given repository.
def fetch_git_refs(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponsefetch_git_refs via a request object, either of type
FetchGitRefsRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_git_refs(git_repository_link: nil, ref_type: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponsefetch_git_refs via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
git_repository_link (::String) — Required. The resource name of GitRepositoryLink in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. - ref_type (::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest::RefType) — Required. Type of refs to fetch.
- page_size (::Integer) — Optional. Number of results to return in the list. Default to 20.
- page_token (::String) — Optional. Page start.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new # Call the fetch_git_refs method. result = client.fetch_git_refs request # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse. p result
#fetch_git_repository_link_commit
def fetch_git_repository_link_commit(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitResponse
def fetch_git_repository_link_commit(name: nil, commit_sha: nil, view: nil, path_filters: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitResponseFetch Commit details from a Git repository link.
def fetch_git_repository_link_commit(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitResponsefetch_git_repository_link_commit via a request object, either of type
FetchGitRepositoryLinkCommitRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_git_repository_link_commit(name: nil, commit_sha: nil, view: nil, path_filters: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitResponsefetch_git_repository_link_commit via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the GitRepositoryLink in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. - commit_sha (::String) — Required. The commit SHA, or symbolic revision (e.g., branch name, tag, or Git reference).
-
view (::Google::Cloud::DeveloperConnect::V1::CommitView) — Optional. The level of commit details to return in the response.
Defaults to
FULLif unspecified. InFULLview,filesmetadata (paths and statuses) are returned;path_filtersmust also be specified to populate line patch hunks. -
path_filters (::Array<::String>) — Optional. Path patterns or exact paths to filter returned files (only
applicable in
FULLview). Whenpath_filtersis specified,FileDiff.patchis populated for all matching files (use["**"]to include patches for all changed files). Whenpath_filtersis omitted or empty, the full list ofFileDiffis returned without patch diffs (FileDiff.patchis empty).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitRequest.new # Call the fetch_git_repository_link_commit method. result = client.fetch_git_repository_link_commit request # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitResponse. p result
#fetch_git_repository_link_commit_list
def fetch_git_repository_link_commit_list(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::SCMCommit>
def fetch_git_repository_link_commit_list(name: nil, ref: nil, page_size: nil, page_token: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::SCMCommit>Fetch a list of Commits from a Git repository link.
def fetch_git_repository_link_commit_list(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::SCMCommit>fetch_git_repository_link_commit_list via a request object, either of type
FetchGitRepositoryLinkCommitListRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitListRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_git_repository_link_commit_list(name: nil, ref: nil, page_size: nil, page_token: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::SCMCommit>fetch_git_repository_link_commit_list via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the GitRepositoryLink in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. - ref (::String) — Optional. The commit SHA, or symbolic revision (e.g., branch name, tag, or Git reference) from which to start listing commits.
- page_size (::Integer) — Optional. Number of results to return in the list. Default is 50. Max is 100.
-
page_token (::String) — Optional. A page token, received from a previous
FetchGitRepositoryLinkCommitListcall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
FetchGitRepositoryLinkCommitListmust match the call that provided the page token. -
view (::Google::Cloud::DeveloperConnect::V1::CommitView) — Optional. The level of commit details to return in the response.
Only
BASICis supported;FULLreturnsINVALID_ARGUMENT. Defaults toBASICif unspecified. UseFetchGitRepositoryLinkCommitto get file diffs for a single commit.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::SCMCommit>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::SCMCommit>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkCommitListRequest.new # Call the fetch_git_repository_link_commit_list method. result = client.fetch_git_repository_link_commit_list request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::DeveloperConnect::V1::SCMCommit. p item end
#fetch_git_repository_link_file_blame
def fetch_git_repository_link_file_blame(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkFileBlameResponse
def fetch_git_repository_link_file_blame(name: nil, ref: nil, path: nil, first_line: nil, last_line: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkFileBlameResponseFetches blame information for a file or line range in a file.
def fetch_git_repository_link_file_blame(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkFileBlameResponsefetch_git_repository_link_file_blame via a request object, either of type
FetchGitRepositoryLinkFileBlameRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkFileBlameRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_git_repository_link_file_blame(name: nil, ref: nil, path: nil, first_line: nil, last_line: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkFileBlameResponsefetch_git_repository_link_file_blame via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the GitRepositoryLink in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. - ref (::String) — Required. The SCM commit SHA, or symbolic revision (e.g., branch name, tag) from which to fetch the blame.
- path (::String) — Required. The file path within the repository.
- first_line (::Integer) — Optional. The 1-indexed starting line number of the range to blame (inclusive). If not specified, blame begins at line 1.
- last_line (::Integer) — Optional. The 1-indexed ending line number of the range to blame (inclusive). If not specified, blame extends to the end of the file.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkFileBlameResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkFileBlameRequest.new # Call the fetch_git_repository_link_file_blame method. result = client.fetch_git_repository_link_file_blame request # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkFileBlameResponse. p result
#fetch_git_repository_link_pull_request
def fetch_git_repository_link_pull_request(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequest
def fetch_git_repository_link_pull_request(name: nil, pull_request_id: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestFetch Pull Request details from a Git repository link.
def fetch_git_repository_link_pull_request(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestfetch_git_repository_link_pull_request via a request object, either of type
FetchGitRepositoryLinkPullRequestRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkPullRequestRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_git_repository_link_pull_request(name: nil, pull_request_id: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestfetch_git_repository_link_pull_request via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the GitRepositoryLink in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. - pull_request_id (::String) — Required. The ID of the Pull Request.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::PullRequest)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkPullRequestRequest.new # Call the fetch_git_repository_link_pull_request method. result = client.fetch_git_repository_link_pull_request request # The returned object is of type Google::Cloud::DeveloperConnect::V1::PullRequest. p result
#fetch_git_repository_link_pull_request_list
def fetch_git_repository_link_pull_request_list(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::PullRequest>
def fetch_git_repository_link_pull_request_list(name: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::PullRequest>Fetches a list of Pull Requests from the remote repository.
def fetch_git_repository_link_pull_request_list(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::PullRequest>fetch_git_repository_link_pull_request_list via a request object, either of type
FetchGitRepositoryLinkPullRequestListRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkPullRequestListRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_git_repository_link_pull_request_list(name: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::PullRequest>fetch_git_repository_link_pull_request_list via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The GitRepositoryLink resource name in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. -
filter (::String) — Optional. A filter expression that filters the pull requests returned in
the response. Only a single equality comparison on
stateis supported, for examplestate = "OPEN". Supported values areOPEN,CLOSED, andMERGED.DECLINEDis only supported for SCM providers that support declining pull requests, and returnsINVALID_ARGUMENTfor GitHub, GitHub Enterprise, GitLab, and GitLab Enterprise. Other values or expressions returnINVALID_ARGUMENT. Defaults tostate = "OPEN"if unspecified. -
page_size (::Integer) —
Optional. Number of results to return in the list. Default is 20. Max is
- A page may contain fewer than
page_sizeresults even when more results are available; usenext_page_tokento check for more pages.
- A page may contain fewer than
-
page_token (::String) — Optional. A page token, received from a previous
FetchGitRepositoryLinkPullRequestListcall. Provide this to retrieve the subsequent page.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::PullRequest>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::PullRequest>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchGitRepositoryLinkPullRequestListRequest.new # Call the fetch_git_repository_link_pull_request_list method. result = client.fetch_git_repository_link_pull_request_list request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::DeveloperConnect::V1::PullRequest. p item end
#fetch_linkable_git_repositories
def fetch_linkable_git_repositories(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>
def fetch_linkable_git_repositories(connection: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.
def fetch_linkable_git_repositories(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>fetch_linkable_git_repositories via a request object, either of type
FetchLinkableGitRepositoriesRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_linkable_git_repositories(connection: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>fetch_linkable_git_repositories via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
connection (::String) — Required. The name of the Connection.
Format:
projects/*/locations/*/connections/*. - page_size (::Integer) — Optional. Number of results to return in the list. Defaults to 20.
- page_token (::String) — Optional. Page start.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new # Call the fetch_linkable_git_repositories method. result = client.fetch_linkable_git_repositories request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository. p item end
#fetch_read_token
def fetch_read_token(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse
def fetch_read_token(git_repository_link: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponseFetches read token of a given gitRepositoryLink.
def fetch_read_token(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponsefetch_read_token via a request object, either of type
FetchReadTokenRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_read_token(git_repository_link: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponsefetch_read_token via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
git_repository_link (::String) — Required. The resource name of the gitRepositoryLink in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new # Call the fetch_read_token method. result = client.fetch_read_token request # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse. p result
#fetch_read_write_token
def fetch_read_write_token(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse
def fetch_read_write_token(git_repository_link: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponseFetches read/write token of a given gitRepositoryLink.
def fetch_read_write_token(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponsefetch_read_write_token via a request object, either of type
FetchReadWriteTokenRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_read_write_token(git_repository_link: nil) -> ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponsefetch_read_write_token via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
git_repository_link (::String) — Required. The resource name of the gitRepositoryLink in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new # Call the fetch_read_write_token method. result = client.fetch_read_write_token request # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse. p result
#fetch_self
def fetch_self(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::User
def fetch_self(name: nil) -> ::Google::Cloud::DeveloperConnect::V1::UserFetch the User based on the user credentials.
def fetch_self(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::Userfetch_self via a request object, either of type
FetchSelfRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_self(name: nil) -> ::Google::Cloud::DeveloperConnect::V1::Userfetch_self via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the AccountConnector resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::User)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new # Call the fetch_self method. result = client.fetch_self request # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. p result
#finish_o_auth
def finish_o_auth(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse
def finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil) -> ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponseFinishes OAuth flow for an account connector.
def finish_o_auth(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponsefinish_o_auth via a request object, either of type
FinishOAuthRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil) -> ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponsefinish_o_auth via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
oauth_params (::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams, ::Hash) — The params returned by non-Google OAuth 2.0 flow redirect.
Note: The following parameters are mutually exclusive:
oauth_params,google_oauth_params. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. -
google_oauth_params (::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams, ::Hash) — The params returned by Google OAuth flow redirects.
Note: The following parameters are mutually exclusive:
google_oauth_params,oauth_params. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. -
account_connector (::String) — Required. The resource name of the AccountConnector in the format
projects/*/locations/*/accountConnectors/*.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new # Call the finish_o_auth method. result = client.finish_o_auth request # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse. p result
#get_account_connector
def get_account_connector(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::AccountConnector
def get_account_connector(name: nil) -> ::Google::Cloud::DeveloperConnect::V1::AccountConnectorGets details of a single AccountConnector.
def get_account_connector(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::AccountConnectorget_account_connector via a request object, either of type
GetAccountConnectorRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_account_connector(name: nil) -> ::Google::Cloud::DeveloperConnect::V1::AccountConnectorget_account_connector via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::AccountConnector)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new # Call the get_account_connector method. result = client.get_account_connector request # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. p result
#get_connection
def get_connection(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::Connection
def get_connection(name: nil) -> ::Google::Cloud::DeveloperConnect::V1::ConnectionGets details of a single Connection.
def get_connection(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::Connectionget_connection via a request object, either of type
GetConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_connection(name: nil) -> ::Google::Cloud::DeveloperConnect::V1::Connectionget_connection via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::Connection)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new # Call the get_connection method. result = client.get_connection request # The returned object is of type Google::Cloud::DeveloperConnect::V1::Connection. p result
#get_git_repository_link
def get_git_repository_link(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink
def get_git_repository_link(name: nil) -> ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLinkGets details of a single GitRepositoryLink.
def get_git_repository_link(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLinkget_git_repository_link via a request object, either of type
GetGitRepositoryLinkRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_git_repository_link(name: nil) -> ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLinkget_git_repository_link via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new # Call the get_git_repository_link method. result = client.get_git_repository_link request # The returned object is of type Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new DeveloperConnect REST client object.
- (config) — Configure the DeveloperConnect client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| config.timeout = 10.0 end
#list_account_connectors
def list_account_connectors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>
def list_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>Lists AccountConnectors in a given project and location.
def list_account_connectors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>list_account_connectors via a request object, either of type
ListAccountConnectorsRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>list_account_connectors via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Parent value for ListAccountConnectorsRequest
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new # Call the list_account_connectors method. result = client.list_account_connectors request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::DeveloperConnect::V1::AccountConnector. p item end
#list_connections
def list_connections(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>
def list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>Lists Connections in a given project and location.
def list_connections(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>list_connections via a request object, either of type
ListConnectionsRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>list_connections via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Parent value for ListConnectionsRequest
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new # Call the list_connections method. result = client.list_connections request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::DeveloperConnect::V1::Connection. p item end
#list_git_repository_links
def list_git_repository_links(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>
def list_git_repository_links(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>Lists GitRepositoryLinks in a given project, location, and connection.
def list_git_repository_links(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>list_git_repository_links via a request object, either of type
ListGitRepositoryLinksRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_git_repository_links(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>list_git_repository_links via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Parent value for ListGitRepositoryLinksRequest
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new # Call the list_git_repository_links method. result = client.list_git_repository_links request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. p item end
#list_users
def list_users(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>
def list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>Lists Users in a given project, location, and account_connector.
def list_users(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>list_users via a request object, either of type
ListUsersRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>list_users via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Parent value for ListUsersRequest
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new # Call the list_users method. result = client.list_users request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::DeveloperConnect::V1::User. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#modify_git_repository_link_pull_request
def modify_git_repository_link_pull_request(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequest
def modify_git_repository_link_pull_request(name: nil, pull_request_id: nil, title: nil, body: nil, base_ref: nil, state: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestModifies a Pull Request in the remote SCM repository associated with a GitRepositoryLink.
def modify_git_repository_link_pull_request(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestmodify_git_repository_link_pull_request via a request object, either of type
ModifyGitRepositoryLinkPullRequestRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::ModifyGitRepositoryLinkPullRequestRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def modify_git_repository_link_pull_request(name: nil, pull_request_id: nil, title: nil, body: nil, base_ref: nil, state: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestmodify_git_repository_link_pull_request via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The GitRepositoryLink resource name in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. - pull_request_id (::String) — Required. The SCM-specific Pull Request identifier (e.g., "45").
- title (::String) — Optional. The title of the Pull Request.
- body (::String) — Optional. The body description of the Pull Request.
- base_ref (::String) — Optional. The target branch to merge into.
- state (::Google::Cloud::DeveloperConnect::V1::ModifyGitRepositoryLinkPullRequestRequest::State) — Optional. The state of the Pull Request.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::PullRequest)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::ModifyGitRepositoryLinkPullRequestRequest.new # Call the modify_git_repository_link_pull_request method. result = client.modify_git_repository_link_pull_request request # The returned object is of type Google::Cloud::DeveloperConnect::V1::PullRequest. p result
#open_git_repository_link_pull_request
def open_git_repository_link_pull_request(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequest
def open_git_repository_link_pull_request(name: nil, pull_request: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestOpens a Pull Request in the remote SCM repository associated with a GitRepositoryLink.
def open_git_repository_link_pull_request(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestopen_git_repository_link_pull_request via a request object, either of type
OpenGitRepositoryLinkPullRequestRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::OpenGitRepositoryLinkPullRequestRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def open_git_repository_link_pull_request(name: nil, pull_request: nil) -> ::Google::Cloud::DeveloperConnect::V1::PullRequestopen_git_repository_link_pull_request via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The GitRepositoryLink resource name in the format
projects/*/locations/*/connections/*/gitRepositoryLinks/*. - pull_request (::Google::Cloud::DeveloperConnect::V1::PullRequest, ::Hash) — Required. The Pull Request details to open. Input fields used: title, body, head_ref, base_ref.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::PullRequest)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::OpenGitRepositoryLinkPullRequestRequest.new # Call the open_git_repository_link_pull_request method. result = client.open_git_repository_link_pull_request request # The returned object is of type Google::Cloud::DeveloperConnect::V1::PullRequest. p result
#operations_client
def operations_client() -> ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::OperationsGet the associated client for long-running operations.
#start_o_auth
def start_o_auth(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse
def start_o_auth(account_connector: nil) -> ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponseStarts OAuth flow for an account connector.
def start_o_auth(request, options = nil) -> ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponsestart_o_auth via a request object, either of type
StartOAuthRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def start_o_auth(account_connector: nil) -> ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponsestart_o_auth via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
account_connector (::String) — Required. The resource name of the AccountConnector in the format
projects/*/locations/*/accountConnectors/*.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new # Call the start_o_auth method. result = client.start_o_auth request # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse. p result
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)
#update_account_connector
def update_account_connector(request, options = nil) -> ::Gapic::Operation
def update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil) -> ::Gapic::OperationUpdates the parameters of a single AccountConnector.
def update_account_connector(request, options = nil) -> ::Gapic::Operationupdate_account_connector via a request object, either of type
UpdateAccountConnectorRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil) -> ::Gapic::Operationupdate_account_connector via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The list of fields to be updated.
- account_connector (::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash) — Required. The AccountConnector to update.
-
request_id (::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).
-
allow_missing (::Boolean) — Optional. If set to true, and the accountConnector is not found a new
accountConnector will be created. In this situation
update_maskis ignored. The creation will succeed only if the input accountConnector has all the necessary - validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new # Call the update_account_connector method. result = client.update_account_connector request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#update_connection
def update_connection(request, options = nil) -> ::Gapic::Operation
def update_connection(update_mask: nil, connection: nil, request_id: nil, allow_missing: nil, validate_only: nil) -> ::Gapic::OperationUpdates the parameters of a single Connection.
def update_connection(request, options = nil) -> ::Gapic::Operationupdate_connection via a request object, either of type
UpdateConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_connection(update_mask: nil, connection: nil, request_id: nil, allow_missing: nil, validate_only: nil) -> ::Gapic::Operationupdate_connection via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — 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.
- connection (::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash) — Required. The resource being updated
-
request_id (::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).
-
allow_missing (::Boolean) — Optional. If set to true, and the connection is not found a new connection
will be created. In this situation
update_maskis 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). - validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new # Call the update_connection method. result = client.update_connection request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end