Class: Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb

Overview

Client for the SecureSourceManager service.

Secure Source Manager API

Access Secure Source Manager instances, resources, and repositories.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#branch_rule_path, #ca_pool_path, #crypto_key_path, #hook_path, #inspect_template_path, #instance_path, #issue_comment_path, #issue_path, #location_path, #pull_request_comment_path, #pull_request_path, #repository_path, #service_account_path, #service_attachment_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new SecureSourceManager client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config) —

    Configure the SecureSourceManager client.

Yield Parameters:



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 153

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/securesourcemanager/v1/secure_source_manager_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @secure_source_manager_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool,
    logger: @config.logger
  )

  @secure_source_manager_stub.stub_logger&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @secure_source_manager_stub.endpoint
    config.universe_domain = @secure_source_manager_stub.universe_domain
    config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger=
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @secure_source_manager_stub.endpoint
    config.universe_domain = @secure_source_manager_stub.universe_domain
    config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Client (readonly)

Get the associated client for mix-in of the IAMPolicy.

Returns:

  • (Google::Iam::V1::IAMPolicy::Client)


246
247
248
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 246

def iam_policy_client
  @iam_policy_client
end

#location_client ⇒ Google::Cloud::Location::Locations::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Client)


239
240
241
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 239

def location_client
  @location_client
end

#operations_client ⇒ ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations (readonly)

Get the associated client for long-running operations.



232
233
234
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 232

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the SecureSourceManager Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all SecureSourceManager clients
::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config) —

    Configure the Client client.

Yield Parameters:

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 66

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "SecureSourceManager", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.list_instances.timeout = 60.0
    default_config.rpcs.list_instances.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_instance.timeout = 60.0
    default_config.rpcs.get_instance.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_repositories.timeout = 60.0
    default_config.rpcs.list_repositories.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_repository.timeout = 60.0
    default_config.rpcs.get_repository.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_iam_policy_repo.timeout = 60.0
    default_config.rpcs.get_iam_policy_repo.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#batch_create_pull_request_comments(request, options = nil) ⇒ ::Gapic::Operation #batch_create_pull_request_comments(parent: nil, requests: nil) ⇒ ::Gapic::Operation

Batch creates pull request comments. This function is used to create multiple PullRequestComments for code review. There needs to be exactly one PullRequestComment of type Review, and at most 100 PullRequestComments of type Code per request. The Position of the code comments must be unique within the request.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new

# Call the batch_create_pull_request_comments method.
result = client.batch_create_pull_request_comments 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

Overloads:

  • #batch_create_pull_request_comments(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to batch_create_pull_request_comments via a request object, either of type BatchCreatePullRequestCommentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #batch_create_pull_request_comments(parent: nil, requests: nil) ⇒ ::Gapic::Operation

    Pass arguments to batch_create_pull_request_comments 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The pull request in which to create the pull request comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

    • requests (::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash>) (defaults to: nil) —

      Required. The request message specifying the resources to create. There should be exactly one CreatePullRequestCommentRequest with CommentDetail being REVIEW in the list, and no more than 100 CreatePullRequestCommentRequests with CommentDetail being CODE in the list

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4587

def batch_create_pull_request_comments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.batch_create_pull_request_comments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.batch_create_pull_request_comments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_create_pull_request_comments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :batch_create_pull_request_comments, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#close_issue(request, options = nil) ⇒ ::Gapic::Operation #close_issue(name: nil, etag: nil) ⇒ ::Gapic::Operation

Closes an issue.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new

# Call the close_issue method.
result = client.close_issue 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

Overloads:

  • #close_issue(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to close_issue via a request object, either of type CloseIssueRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #close_issue(name: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to close_issue 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the issue to close. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}.

    • etag (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4002

def close_issue request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.close_issue..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.close_issue.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.close_issue.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :close_issue, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#close_pull_request(request, options = nil) ⇒ ::Gapic::Operation #close_pull_request(name: nil) ⇒ ::Gapic::Operation

Closes a pull request without merging.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new

# Call the close_pull_request method.
result = client.close_pull_request 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

Overloads:

  • #close_pull_request(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to close_pull_request via a request object, either of type ClosePullRequestRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #close_pull_request(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to close_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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. The pull request to close. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3028

def close_pull_request request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.close_pull_request..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.close_pull_request.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.close_pull_request.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :close_pull_request, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#configure {|config| ... } ⇒ Client::Configuration

Configure the SecureSourceManager 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 configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config) —

    Configure the Client client.

Yield Parameters:

Returns:



123
124
125
126
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 123

def configure
  yield @config if block_given?
  @config
end

#create_branch_rule(request, options = nil) ⇒ ::Gapic::Operation #create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) ⇒ ::Gapic::Operation

CreateBranchRule creates a branch rule in a given repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new

# Call the create_branch_rule method.
result = client.create_branch_rule 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

Overloads:

  • #create_branch_rule(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_branch_rule via a request object, either of type CreateBranchRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_branch_rule 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).

    Parameters:

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1979

def create_branch_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_branch_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_branch_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_branch_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :create_branch_rule, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_hook(request, options = nil) ⇒ ::Gapic::Operation #create_hook(parent: nil, hook: nil, hook_id: nil) ⇒ ::Gapic::Operation

Creates a new hook in a given repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new

# Call the create_hook method.
result = client.create_hook 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

Overloads:

  • #create_hook(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_hook via a request object, either of type CreateHookRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_hook(parent: nil, hook: nil, hook_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_hook 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The repository in which to create the hook. Values are of the form projects/{project_number}/locations/{location_id}/repositories/{repository_id}

    • hook (::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash) (defaults to: nil) —

      Required. The resource being created.

    • hook_id (::String) (defaults to: nil) —

      Required. The ID to use for the hook, which will become the final component of the hook's resource name. This value restricts to lower-case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1410

def create_hook request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_hook..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_hook.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_hook.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :create_hook, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_instance(request, options = nil) ⇒ ::Gapic::Operation #create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new instance in a given project and location.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new

# Call the create_instance method.
result = client.create_instance 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

Overloads:

  • #create_instance(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_instance via a request object, either of type CreateInstanceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_instance 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. Value for parent.

    • instance_id (::String) (defaults to: nil) —

      Required. ID of the instance to be created.

    • instance (::Google::Cloud::SecureSourceManager::V1::Instance, ::Hash) (defaults to: nil) —

      Required. The resource being created.

    • request_id (::String) (defaults to: nil) —

      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).

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 513

def create_instance request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_instance..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_instance.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_instance.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :create_instance, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_issue(request, options = nil) ⇒ ::Gapic::Operation #create_issue(parent: nil, issue: nil) ⇒ ::Gapic::Operation

Creates an issue.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new

# Call the create_issue method.
result = client.create_issue 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

Overloads:

  • #create_issue(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_issue via a request object, either of type CreateIssueRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_issue(parent: nil, issue: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_issue 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The repository in which to create the issue. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}

    • issue (::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash) (defaults to: nil) —

      Required. The issue to create.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3416

def create_issue request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_issue..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_issue.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_issue.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :create_issue, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_issue_comment(request, options = nil) ⇒ ::Gapic::Operation #create_issue_comment(parent: nil, issue_comment: nil) ⇒ ::Gapic::Operation

Creates an issue comment.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new

# Call the create_issue_comment method.
result = client.create_issue_comment 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

Overloads:

  • #create_issue_comment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_issue_comment via a request object, either of type CreateIssueCommentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_issue_comment(parent: nil, issue_comment: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_issue_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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The issue in which to create the issue comment. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}

    • issue_comment (::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash) (defaults to: nil) —

      Required. The issue comment to create.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4898

def create_issue_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_issue_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_issue_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_issue_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :create_issue_comment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_pull_request(request, options = nil) ⇒ ::Gapic::Operation #create_pull_request(parent: nil, pull_request: nil) ⇒ ::Gapic::Operation

Creates a pull request.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new

# Call the create_pull_request method.
result = client.create_pull_request 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

Overloads:

  • #create_pull_request(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_pull_request via a request object, either of type CreatePullRequestRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_pull_request(parent: nil, pull_request: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The repository that the pull request is created from. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}

    • pull_request (::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash) (defaults to: nil) —

      Required. The pull request to create.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2456

def create_pull_request request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_pull_request..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_pull_request.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_pull_request.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :create_pull_request, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_pull_request_comment(request, options = nil) ⇒ ::Gapic::Operation #create_pull_request_comment(parent: nil, pull_request_comment: nil) ⇒ ::Gapic::Operation

Creates a pull request comment. This function is used to create a single PullRequestComment of type Comment, or a single PullRequestComment of type Code that's replying to another PullRequestComment of type Code. Use BatchCreatePullRequestComments to create multiple PullRequestComments for code reviews.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new

# Call the create_pull_request_comment method.
result = client.create_pull_request_comment 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

Overloads:

  • #create_pull_request_comment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_pull_request_comment via a request object, either of type CreatePullRequestCommentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_pull_request_comment(parent: nil, pull_request_comment: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The pull request in which to create the pull request comment. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

    • pull_request_comment (::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash) (defaults to: nil) —

      Required. The pull request comment to create.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4288

def create_pull_request_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_pull_request_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_pull_request_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_pull_request_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :create_pull_request_comment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_repository(request, options = nil) ⇒ ::Gapic::Operation #create_repository(parent: nil, repository: nil, repository_id: nil) ⇒ ::Gapic::Operation

Creates a new repository in a given project and location.

The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com endpoint.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new

# Call the create_repository method.
result = client.create_repository 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

Overloads:

  • #create_repository(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_repository via a request object, either of type CreateRepositoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_repository(parent: nil, repository: nil, repository_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_repository 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The project in which to create the repository. Values are of the form projects/{project_number}/locations/{location_id}

    • repository (::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash) (defaults to: nil) —

      Required. The resource being created.

    • repository_id (::String) (defaults to: nil) —

      Required. The ID to use for the repository, which will become the final component of the repository's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 922

def create_repository request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_repository..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_repository.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_repository.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :create_repository, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_branch_rule(request, options = nil) ⇒ ::Gapic::Operation #delete_branch_rule(name: nil, allow_missing: nil) ⇒ ::Gapic::Operation

DeleteBranchRule deletes a branch rule.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new

# Call the delete_branch_rule method.
result = client.delete_branch_rule 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

Overloads:

  • #delete_branch_rule(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_branch_rule via a request object, either of type DeleteBranchRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_branch_rule(name: nil, allow_missing: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_branch_rule 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).

    Parameters:

    • name (::String) (defaults to: nil)
    • allow_missing (::Boolean) (defaults to: nil) —

      Optional. If set to true, and the branch rule is not found, the request will succeed but no action will be taken on the server.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2359

def delete_branch_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_branch_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_branch_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_branch_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :delete_branch_rule, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_hook(request, options = nil) ⇒ ::Gapic::Operation #delete_hook(name: nil) ⇒ ::Gapic::Operation

Deletes a Hook.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new

# Call the delete_hook method.
result = client.delete_hook 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

Overloads:

  • #delete_hook(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_hook via a request object, either of type DeleteHookRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_hook(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_hook 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the hook to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1606

def delete_hook request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_hook..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_hook.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_hook.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :delete_hook, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_instance(request, options = nil) ⇒ ::Gapic::Operation #delete_instance(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

Deletes a single instance.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new

# Call the delete_instance method.
result = client.delete_instance 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

Overloads:

  • #delete_instance(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_instance via a request object, either of type DeleteInstanceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_instance(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_instance 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the resource.

    • request_id (::String) (defaults to: nil) —

      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).

    • force (::Boolean) (defaults to: nil) —

      Optional. If set to true, will force the deletion of the instance.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 623

def delete_instance request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_instance..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_instance.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_instance.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :delete_instance, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_issue(request, options = nil) ⇒ ::Gapic::Operation #delete_issue(name: nil, etag: nil) ⇒ ::Gapic::Operation

Deletes an issue.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new

# Call the delete_issue method.
result = client.delete_issue 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

Overloads:

  • #delete_issue(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_issue via a request object, either of type DeleteIssueRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_issue(name: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_issue 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the issue to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}.

    • etag (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3802

def delete_issue request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_issue..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_issue.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_issue.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :delete_issue, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_issue_comment(request, options = nil) ⇒ ::Gapic::Operation #delete_issue_comment(name: nil) ⇒ ::Gapic::Operation

Deletes an issue comment.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new

# Call the delete_issue_comment method.
result = client.delete_issue_comment 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

Overloads:

  • #delete_issue_comment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_issue_comment via a request object, either of type DeleteIssueCommentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_issue_comment(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_issue_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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the issue comment to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 5278

def delete_issue_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_issue_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_issue_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_issue_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :delete_issue_comment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_pull_request_comment(request, options = nil) ⇒ ::Gapic::Operation #delete_pull_request_comment(name: nil) ⇒ ::Gapic::Operation

Deletes a pull request comment.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new

# Call the delete_pull_request_comment method.
result = client.delete_pull_request_comment 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

Overloads:

  • #delete_pull_request_comment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_pull_request_comment via a request object, either of type DeletePullRequestCommentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_pull_request_comment(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the pull request comment to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4482

def delete_pull_request_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_pull_request_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_pull_request_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_pull_request_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :delete_pull_request_comment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_repository(request, options = nil) ⇒ ::Gapic::Operation #delete_repository(name: nil, allow_missing: nil) ⇒ ::Gapic::Operation

Deletes a Repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new

# Call the delete_repository method.
result = client.delete_repository 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

Overloads:

  • #delete_repository(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_repository via a request object, either of type DeleteRepositoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_repository(name: nil, allow_missing: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_repository 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the repository to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}.

    • allow_missing (::Boolean) (defaults to: nil) —

      Optional. If set to true, and the repository is not found, the request will succeed but no action will be taken on the server.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1124

def delete_repository request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_repository..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_repository.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_repository.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :delete_repository, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#fetch_blob(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse #fetch_blob(repository: nil, sha: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse

Fetches a blob from a repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new

# Call the fetch_blob method.
result = client.fetch_blob request

# The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.
p result

Overloads:

  • #fetch_blob(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse

    Pass arguments to fetch_blob via a request object, either of type FetchBlobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #fetch_blob(repository: nil, sha: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse

    Pass arguments to fetch_blob 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).

    Parameters:

    • repository (::String) (defaults to: nil) —

      Required. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}. Specifies the repository containing the blob.

    • sha (::String) (defaults to: nil) —

      Required. The SHA-1 hash of the blob to retrieve.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3321

def fetch_blob request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.fetch_blob..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.repository
    header_params["repository"] = request.repository
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.fetch_blob.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.fetch_blob.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :fetch_blob, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#fetch_tree(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry> #fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>

Fetches a tree from a repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new

# Call the fetch_tree method.
result = client.fetch_tree 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::SecureSourceManager::V1::TreeEntry.
  p item
end

Overloads:

  • #fetch_tree(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>

    Pass arguments to fetch_tree via a request object, either of type FetchTreeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>

    Pass arguments to fetch_tree 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).

    Parameters:

    • repository (::String) (defaults to: nil) —

      Required. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}. Specifies the repository to fetch the tree from.

    • ref (::String) (defaults to: nil) —

      Optional. ref can be a SHA-1 hash, a branch name, or a tag. Specifies which tree to fetch. If not specified, the default branch will be used.

    • recursive (::Boolean) (defaults to: nil) —

      Optional. If true, include all subfolders and their files in the response. If false, only the immediate children are returned.

    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, at most 10,000 items will be returned.

    • page_token (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3230

def fetch_tree request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.fetch_tree..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.repository
    header_params["repository"] = request.repository
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.fetch_tree.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.fetch_tree.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :fetch_tree, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :fetch_tree, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_branch_rule(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::BranchRule #get_branch_rule(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::BranchRule

GetBranchRule gets a branch rule.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new

# Call the get_branch_rule method.
result = client.get_branch_rule request

# The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule.
p result

Overloads:

  • #get_branch_rule(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::BranchRule

    Pass arguments to get_branch_rule via a request object, either of type GetBranchRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_branch_rule(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::BranchRule

    Pass arguments to get_branch_rule 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the repository to retrieve. The format is projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2163

def get_branch_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_branch_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_branch_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_branch_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :get_branch_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_hook(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Hook #get_hook(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Hook

Gets metadata of a hook.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new

# Call the get_hook method.
result = client.get_hook request

# The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook.
p result

Overloads:

  • #get_hook(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Hook

    Pass arguments to get_hook via a request object, either of type GetHookRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_hook(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Hook

    Pass arguments to get_hook 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the hook to retrieve. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1309

def get_hook request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetHookRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_hook..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_hook.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_hook.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :get_hook, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_iam_policy_repo(request, options = nil) ⇒ ::Google::Iam::V1::Policy #get_iam_policy_repo(resource: nil, options: nil) ⇒ ::Google::Iam::V1::Policy

Get IAM policy for a repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Iam::V1::GetIamPolicyRequest.new

# Call the get_iam_policy_repo method.
result = client.get_iam_policy_repo request

# The returned object is of type Google::Iam::V1::Policy.
p result

Overloads:

  • #get_iam_policy_repo(request, options = nil) ⇒ ::Google::Iam::V1::Policy

    Pass arguments to get_iam_policy_repo via a request object, either of type Iam::V1::GetIamPolicyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Iam::V1::GetIamPolicyRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_iam_policy_repo(resource: nil, options: nil) ⇒ ::Google::Iam::V1::Policy

    Pass arguments to get_iam_policy_repo 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).

    Parameters:

    • resource (::String) (defaults to: nil) —

      REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

    • options (::Google::Iam::V1::GetPolicyOptions, ::Hash) (defaults to: nil) —

      OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Google::Iam::V1::Policy)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Google::Iam::V1::Policy)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1697

def get_iam_policy_repo request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_iam_policy_repo..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.resource
    header_params["resource"] = request.resource
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_iam_policy_repo.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :get_iam_policy_repo, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_instance(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Instance #get_instance(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Instance

Gets details of a single instance.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new

# Call the get_instance method.
result = client.get_instance request

# The returned object is of type Google::Cloud::SecureSourceManager::V1::Instance.
p result

Overloads:

  • #get_instance(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Instance

    Pass arguments to get_instance via a request object, either of type GetInstanceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_instance(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Instance

    Pass arguments to get_instance 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the resource.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 403

def get_instance request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_instance..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_instance.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_instance.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :get_instance, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_issue(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Issue #get_issue(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Issue

Gets an issue.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new

# Call the get_issue method.
result = client.get_issue request

# The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue.
p result

Overloads:

  • #get_issue(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Issue

    Pass arguments to get_issue via a request object, either of type GetIssueRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_issue(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Issue

    Pass arguments to get_issue 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the issue to retrieve. The format is projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3505

def get_issue request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_issue..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_issue.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_issue.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :get_issue, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_issue_comment(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::IssueComment #get_issue_comment(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::IssueComment

Gets an issue comment.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new

# Call the get_issue_comment method.
result = client.get_issue_comment request

# The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment.
p result

Overloads:

  • #get_issue_comment(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::IssueComment

    Pass arguments to get_issue_comment via a request object, either of type GetIssueCommentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_issue_comment(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::IssueComment

    Pass arguments to get_issue_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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the issue comment to retrieve. The format is projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4987

def get_issue_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_issue_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_issue_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_issue_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :get_issue_comment, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_pull_request(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::PullRequest #get_pull_request(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::PullRequest

Gets a pull request.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new

# Call the get_pull_request method.
result = client.get_pull_request request

# The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest.
p result

Overloads:

  • #get_pull_request(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::PullRequest

    Pass arguments to get_pull_request via a request object, either of type GetPullRequestRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_pull_request(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::PullRequest

    Pass arguments to get_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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the pull request to retrieve. The format is projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2545

def get_pull_request request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_pull_request..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_pull_request.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_pull_request.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :get_pull_request, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_pull_request_comment(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::PullRequestComment #get_pull_request_comment(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::PullRequestComment

Gets a pull request comment.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new

# Call the get_pull_request_comment method.
result = client.get_pull_request_comment request

# The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment.
p result

Overloads:

  • #get_pull_request_comment(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::PullRequestComment

    Pass arguments to get_pull_request_comment via a request object, either of type GetPullRequestCommentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_pull_request_comment(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::PullRequestComment

    Pass arguments to get_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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the pull request comment to retrieve. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4091

def get_pull_request_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_pull_request_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_pull_request_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_pull_request_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :get_pull_request_comment, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_repository(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Repository #get_repository(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Repository

Gets metadata of a repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new

# Call the get_repository method.
result = client.get_repository request

# The returned object is of type Google::Cloud::SecureSourceManager::V1::Repository.
p result

Overloads:

  • #get_repository(request, options = nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Repository

    Pass arguments to get_repository via a request object, either of type GetRepositoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_repository(name: nil) ⇒ ::Google::Cloud::SecureSourceManager::V1::Repository

    Pass arguments to get_repository 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the repository to retrieve. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 820

def get_repository request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_repository..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_repository.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_repository.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :get_repository, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_branch_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule> #list_branch_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>

ListBranchRules lists branch rules in a given repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new

# Call the list_branch_rules method.
result = client.list_branch_rules 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::SecureSourceManager::V1::BranchRule.
  p item
end

Overloads:

  • #list_branch_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>

    Pass arguments to list_branch_rules via a request object, either of type ListBranchRulesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_branch_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>

    Pass arguments to list_branch_rules 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).

    Parameters:

    • parent (::String) (defaults to: nil)
    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100.

    • page_token (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2074

def list_branch_rules request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_branch_rules..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_branch_rules.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_branch_rules.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :list_branch_rules, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_hooks(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook> #list_hooks(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>

Lists hooks in a given repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new

# Call the list_hooks method.
result = client.list_hooks 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::SecureSourceManager::V1::Hook.
  p item
end

Overloads:

  • #list_hooks(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>

    Pass arguments to list_hooks via a request object, either of type ListHooksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_hooks(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>

    Pass arguments to list_hooks 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. Parent value for ListHooksRequest.

    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100.

    • page_token (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1220

def list_hooks request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_hooks..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_hooks.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_hooks.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :list_hooks, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_hooks, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_instances(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance> #list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>

Lists Instances in a given project and location.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new

# Call the list_instances method.
result = client.list_instances 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::SecureSourceManager::V1::Instance.
  p item
end

Overloads:

  • #list_instances(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>

    Pass arguments to list_instances via a request object, either of type ListInstancesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>

    Pass arguments to list_instances 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. Parent value for ListInstancesRequest.

    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil) —

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

    • filter (::String) (defaults to: nil) —

      Optional. Filter for filtering results.

    • order_by (::String) (defaults to: nil) —

      Optional. Hint for how to order the results.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 316

def list_instances request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_instances..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_instances.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_instances.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :list_instances, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_instances, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_issue_comments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment> #list_issue_comments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>

Lists comments in an issue.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new

# Call the list_issue_comments method.
result = client.list_issue_comments 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::SecureSourceManager::V1::IssueComment.
  p item
end

Overloads:

  • #list_issue_comments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>

    Pass arguments to list_issue_comments via a request object, either of type ListIssueCommentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_issue_comments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>

    Pass arguments to list_issue_comments 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The issue in which to list the comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}

    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100.

    • page_token (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 5082

def list_issue_comments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_issue_comments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_issue_comments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_issue_comments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :list_issue_comments, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_issues(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue> #list_issues(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>

Lists issues in a repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new

# Call the list_issues method.
result = client.list_issues 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::SecureSourceManager::V1::Issue.
  p item
end

Overloads:

  • #list_issues(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>

    Pass arguments to list_issues via a request object, either of type ListIssuesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_issues(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>

    Pass arguments to list_issues 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The repository in which to list issues. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}

    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100.

    • page_token (::String) (defaults to: nil) —

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

    • filter (::String) (defaults to: nil) —

      Optional. Used to filter the resulting issues list.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3602

def list_issues request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_issues..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_issues.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_issues.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :list_issues, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_issues, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_pull_request_comments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment> #list_pull_request_comments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>

Lists pull request comments.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new

# Call the list_pull_request_comments method.
result = client.list_pull_request_comments 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::SecureSourceManager::V1::PullRequestComment.
  p item
end

Overloads:

  • #list_pull_request_comments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>

    Pass arguments to list_pull_request_comments via a request object, either of type ListPullRequestCommentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_pull_request_comments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>

    Pass arguments to list_pull_request_comments 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The pull request in which to list pull request comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100.

    • page_token (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4186

def list_pull_request_comments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_pull_request_comments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_pull_request_comments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_pull_request_comments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :list_pull_request_comments, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_comments, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_pull_request_file_diffs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff> #list_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>

Lists a pull request's file diffs.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new

# Call the list_pull_request_file_diffs method.
result = client.list_pull_request_file_diffs 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::SecureSourceManager::V1::FileDiff.
  p item
end

Overloads:

  • #list_pull_request_file_diffs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>

    Pass arguments to list_pull_request_file_diffs via a request object, either of type ListPullRequestFileDiffsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>

    Pass arguments to list_pull_request_file_diffs 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. The pull request to list file diffs for. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100.

    • page_token (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3126

def list_pull_request_file_diffs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_pull_request_file_diffs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_pull_request_file_diffs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_pull_request_file_diffs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :list_pull_request_file_diffs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_file_diffs, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_pull_requests(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest> #list_pull_requests(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>

Lists pull requests in a repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new

# Call the list_pull_requests method.
result = client.list_pull_requests 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::SecureSourceManager::V1::PullRequest.
  p item
end

Overloads:

  • #list_pull_requests(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>

    Pass arguments to list_pull_requests via a request object, either of type ListPullRequestsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_pull_requests(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>

    Pass arguments to list_pull_requests 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The repository in which to list pull requests. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}

    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100.

    • page_token (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2640

def list_pull_requests request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_pull_requests..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_pull_requests.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_pull_requests.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :list_pull_requests, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_requests, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_repositories(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository> #list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, instance: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>

Lists Repositories in a given project and location.

The instance field is required in the query parameter for requests using the securesourcemanager.googleapis.com endpoint.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new

# Call the list_repositories method.
result = client.list_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::SecureSourceManager::V1::Repository.
  p item
end

Overloads:

  • #list_repositories(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>

    Pass arguments to list_repositories via a request object, either of type ListRepositoriesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, instance: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>

    Pass arguments to list_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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. Parent value for ListRepositoriesRequest.

    • page_size (::Integer) (defaults to: nil) —

      Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100.

    • page_token (::String) (defaults to: nil) —

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

    • filter (::String) (defaults to: nil) —

      Optional. Filter results.

    • instance (::String) (defaults to: nil) —

      Optional. The name of the instance in which the repository is hosted, formatted as projects/{project_number}/locations/{location_id}/instances/{instance_id}. When listing repositories via securesourcemanager.googleapis.com, this field is required. When listing repositories via *.sourcemanager.dev, this field is ignored.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 731

def list_repositories request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_repositories..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_repositories.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_repositories.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :list_repositories, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_repositories, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#logger ⇒ Logger

The logger used for request/response debug logging.

Returns:

  • (Logger)


253
254
255
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 253

def logger
  @secure_source_manager_stub.logger
end

#merge_pull_request(request, options = nil) ⇒ ::Gapic::Operation #merge_pull_request(name: nil) ⇒ ::Gapic::Operation

Merges a pull request.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new

# Call the merge_pull_request method.
result = client.merge_pull_request 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

Overloads:

  • #merge_pull_request(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to merge_pull_request via a request object, either of type MergePullRequestRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #merge_pull_request(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to merge_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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. The pull request to merge. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2836

def merge_pull_request request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.merge_pull_request..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.merge_pull_request.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.merge_pull_request.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :merge_pull_request, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#open_issue(request, options = nil) ⇒ ::Gapic::Operation #open_issue(name: nil, etag: nil) ⇒ ::Gapic::Operation

Opens an issue.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new

# Call the open_issue method.
result = client.open_issue 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

Overloads:

  • #open_issue(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to open_issue via a request object, either of type OpenIssueRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #open_issue(name: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to open_issue 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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. Name of the issue to open. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}.

    • etag (::String) (defaults to: nil) —

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

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3902

def open_issue request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.open_issue..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.open_issue.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.open_issue.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :open_issue, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#open_pull_request(request, options = nil) ⇒ ::Gapic::Operation #open_pull_request(name: nil) ⇒ ::Gapic::Operation

Opens a pull request.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new

# Call the open_pull_request method.
result = client.open_pull_request 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

Overloads:

  • #open_pull_request(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to open_pull_request via a request object, either of type OpenPullRequestRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #open_pull_request(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to open_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).

    Parameters:

    • name (::String) (defaults to: nil) —

      Required. The pull request to open. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2932

def open_pull_request request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.open_pull_request..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.open_pull_request.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.open_pull_request.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :open_pull_request, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#resolve_pull_request_comments(request, options = nil) ⇒ ::Gapic::Operation #resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) ⇒ ::Gapic::Operation

Resolves pull request comments. A list of PullRequestComment names must be provided. The PullRequestComment names must be in the same conversation thread. If auto_fill is set, all comments in the conversation thread will be resolved.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new

# Call the resolve_pull_request_comments method.
result = client.resolve_pull_request_comments 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

Overloads:

  • #resolve_pull_request_comments(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to resolve_pull_request_comments via a request object, either of type ResolvePullRequestCommentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) ⇒ ::Gapic::Operation

    Pass arguments to resolve_pull_request_comments 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The pull request in which to resolve the pull request comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

    • names (::Array<::String>) (defaults to: nil) —

      Required. The names of the pull request comments to resolve. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id} Only comments from the same threads are allowed in the same request.

    • auto_fill (::Boolean) (defaults to: nil) —

      Optional. If set, at least one comment in a thread is required, rest of the comments in the same thread will be automatically updated to resolved. If unset, all comments in the same thread need be present.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4694

def resolve_pull_request_comments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.resolve_pull_request_comments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.resolve_pull_request_comments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.resolve_pull_request_comments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :resolve_pull_request_comments, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#set_iam_policy_repo(request, options = nil) ⇒ ::Google::Iam::V1::Policy #set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) ⇒ ::Google::Iam::V1::Policy

Set IAM policy on a repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Iam::V1::SetIamPolicyRequest.new

# Call the set_iam_policy_repo method.
result = client.set_iam_policy_repo request

# The returned object is of type Google::Iam::V1::Policy.
p result

Overloads:

  • #set_iam_policy_repo(request, options = nil) ⇒ ::Google::Iam::V1::Policy

    Pass arguments to set_iam_policy_repo via a request object, either of type Iam::V1::SetIamPolicyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Iam::V1::SetIamPolicyRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) ⇒ ::Google::Iam::V1::Policy

    Pass arguments to set_iam_policy_repo 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).

    Parameters:

    • resource (::String) (defaults to: nil) —

      REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

    • policy (::Google::Iam::V1::Policy, ::Hash) (defaults to: nil) —

      REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil) —

      OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:

      paths: "bindings, etag"

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Google::Iam::V1::Policy)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Google::Iam::V1::Policy)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1794

def set_iam_policy_repo request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.set_iam_policy_repo..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.resource
    header_params["resource"] = request.resource
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.set_iam_policy_repo.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :set_iam_policy_repo, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#test_iam_permissions_repo(request, options = nil) ⇒ ::Google::Iam::V1::TestIamPermissionsResponse #test_iam_permissions_repo(resource: nil, permissions: nil) ⇒ ::Google::Iam::V1::TestIamPermissionsResponse

Test IAM permissions on a repository. IAM permission checks are not required on this method.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Iam::V1::TestIamPermissionsRequest.new

# Call the test_iam_permissions_repo method.
result = client.test_iam_permissions_repo request

# The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
p result

Overloads:

  • #test_iam_permissions_repo(request, options = nil) ⇒ ::Google::Iam::V1::TestIamPermissionsResponse

    Pass arguments to test_iam_permissions_repo via a request object, either of type Iam::V1::TestIamPermissionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Iam::V1::TestIamPermissionsRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #test_iam_permissions_repo(resource: nil, permissions: nil) ⇒ ::Google::Iam::V1::TestIamPermissionsResponse

    Pass arguments to test_iam_permissions_repo 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).

    Parameters:

    • resource (::String) (defaults to: nil) —

      REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

    • permissions (::Array<::String>) (defaults to: nil) —

      The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Google::Iam::V1::TestIamPermissionsResponse)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Google::Iam::V1::TestIamPermissionsResponse)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1886

def test_iam_permissions_repo request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.test_iam_permissions_repo..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.resource
    header_params["resource"] = request.resource
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.test_iam_permissions_repo.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :test_iam_permissions_repo, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domain ⇒ String

The effective universe domain

Returns:

  • (String)


133
134
135
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 133

def universe_domain
  @secure_source_manager_stub.universe_domain
end

#unresolve_pull_request_comments(request, options = nil) ⇒ ::Gapic::Operation #unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) ⇒ ::Gapic::Operation

Unresolves pull request comments. A list of PullRequestComment names must be provided. The PullRequestComment names must be in the same conversation thread. If auto_fill is set, all comments in the conversation thread will be unresolved.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new

# Call the unresolve_pull_request_comments method.
result = client.unresolve_pull_request_comments 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

Overloads:

  • #unresolve_pull_request_comments(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to unresolve_pull_request_comments via a request object, either of type UnresolvePullRequestCommentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) ⇒ ::Gapic::Operation

    Pass arguments to unresolve_pull_request_comments 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).

    Parameters:

    • parent (::String) (defaults to: nil) —

      Required. The pull request in which to resolve the pull request comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

    • names (::Array<::String>) (defaults to: nil) —

      Required. The names of the pull request comments to unresolve. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id} Only comments from the same threads are allowed in the same request.

    • auto_fill (::Boolean) (defaults to: nil) —

      Optional. If set, at least one comment in a thread is required, rest of the comments in the same thread will be automatically updated to unresolved. If unset, all comments in the same thread need be present.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4801

def unresolve_pull_request_comments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.unresolve_pull_request_comments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.unresolve_pull_request_comments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.unresolve_pull_request_comments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :unresolve_pull_request_comments, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_branch_rule(request, options = nil) ⇒ ::Gapic::Operation #update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation

UpdateBranchRule updates a branch rule.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new

# Call the update_branch_rule method.
result = client.update_branch_rule 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

Overloads:

  • #update_branch_rule(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_branch_rule via a request object, either of type UpdateBranchRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_branch_rule 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).

    Parameters:

    • branch_rule (::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash) (defaults to: nil)
    • validate_only (::Boolean) (defaults to: nil) —

      Optional. If set, validate the request and preview the review, but do not actually post it. (https://google.aip.dev/163, for declarative friendly)

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil) —

      Optional. Field mask is used to specify the fields to be overwritten in the branchRule 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. The special value "*" means full replacement.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2263

def update_branch_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_branch_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.branch_rule&.name
    header_params["branch_rule.name"] = request.branch_rule.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_branch_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_branch_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :update_branch_rule, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_hook(request, options = nil) ⇒ ::Gapic::Operation #update_hook(update_mask: nil, hook: nil) ⇒ ::Gapic::Operation

Updates the metadata of a hook.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new

# Call the update_hook method.
result = client.update_hook 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

Overloads:

  • #update_hook(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_hook via a request object, either of type UpdateHookRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_hook(update_mask: nil, hook: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_hook 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).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil) —

      Optional. Field mask is used to specify the fields to be overwritten in the hook 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. The special value "*" means full replacement.

    • hook (::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash) (defaults to: nil) —

      Required. The hook being updated.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1510

def update_hook request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_hook..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.hook&.name
    header_params["hook.name"] = request.hook.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_hook.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_hook.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :update_hook, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_issue(request, options = nil) ⇒ ::Gapic::Operation #update_issue(issue: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates a issue.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new

# Call the update_issue method.
result = client.update_issue 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

Overloads:

  • #update_issue(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_issue via a request object, either of type UpdateIssueRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_issue(issue: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_issue 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).

    Parameters:

    • issue (::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash) (defaults to: nil) —

      Required. The issue to update.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil) —

      Optional. Field mask is used to specify the fields to be overwritten in the issue 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. The special value "*" means full replacement.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 3702

def update_issue request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_issue..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.issue&.name
    header_params["issue.name"] = request.issue.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_issue.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_issue.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :update_issue, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_issue_comment(request, options = nil) ⇒ ::Gapic::Operation #update_issue_comment(issue_comment: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates an issue comment.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new

# Call the update_issue_comment method.
result = client.update_issue_comment 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

Overloads:

  • #update_issue_comment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_issue_comment via a request object, either of type UpdateIssueCommentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_issue_comment(issue_comment: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_issue_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).

    Parameters:

    • issue_comment (::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash) (defaults to: nil) —

      Required. The issue comment to update.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil) —

      Optional. Field mask is used to specify the fields to be overwritten in the issue comment 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. The special value "*" means full replacement.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 5182

def update_issue_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_issue_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.issue_comment&.name
    header_params["issue_comment.name"] = request.issue_comment.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_issue_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_issue_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :update_issue_comment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_pull_request(request, options = nil) ⇒ ::Gapic::Operation #update_pull_request(pull_request: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates a pull request.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new

# Call the update_pull_request method.
result = client.update_pull_request 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

Overloads:

  • #update_pull_request(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_pull_request via a request object, either of type UpdatePullRequestRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_pull_request(pull_request: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_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).

    Parameters:

    • pull_request (::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash) (defaults to: nil) —

      Required. The pull request to update.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil) —

      Optional. Field mask is used to specify the fields to be overwritten in the pull request 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. The special value "*" means full replacement.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 2740

def update_pull_request request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_pull_request..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.pull_request&.name
    header_params["pull_request.name"] = request.pull_request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_pull_request.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_pull_request.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :update_pull_request, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_pull_request_comment(request, options = nil) ⇒ ::Gapic::Operation #update_pull_request_comment(pull_request_comment: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates a pull request comment.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new

# Call the update_pull_request_comment method.
result = client.update_pull_request_comment 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

Overloads:

  • #update_pull_request_comment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_pull_request_comment via a request object, either of type UpdatePullRequestCommentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_pull_request_comment(pull_request_comment: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_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).

    Parameters:

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 4386

def update_pull_request_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_pull_request_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.pull_request_comment&.name
    header_params["pull_request_comment.name"] = request.pull_request_comment.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_pull_request_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_pull_request_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :update_pull_request_comment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_repository(request, options = nil) ⇒ ::Gapic::Operation #update_repository(update_mask: nil, repository: nil, validate_only: nil) ⇒ ::Gapic::Operation

Updates the metadata of a repository.

Examples:

Basic example

require "google/cloud/secure_source_manager/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new

# Call the update_repository method.
result = client.update_repository 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

Overloads:

  • #update_repository(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_repository via a request object, either of type UpdateRepositoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::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) (defaults to: nil) —

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_repository(update_mask: nil, repository: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_repository 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).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil) —

      Optional. Field mask is used to specify the fields to be overwritten in the repository 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.

    • repository (::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash) (defaults to: nil) —

      Required. The repository being updated.

    • validate_only (::Boolean) (defaults to: nil) —

      Optional. False by default. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (response, operation) —

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error) —

    if the RPC is aborted.



1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb', line 1025

def update_repository request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_repository..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.repository&.name
    header_params["repository.name"] = request.repository.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_repository.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_repository.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @secure_source_manager_stub.call_rpc :update_repository, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end