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

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

Overview

REST 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, #instance_path, #issue_comment_path, #issue_path, #location_path, #pull_request_comment_path, #pull_request_path, #repository_path, #service_attachment_path

Constructor Details

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

Create a new SecureSourceManager REST client object.

Examples:


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

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

Yields:

  • (config)

    Configure the SecureSourceManager client.

Yield Parameters:



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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 155

def initialize
  # 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 = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::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 = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.new(
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    credentials: credentials,
    logger: @config.logger
  )

  @secure_source_manager_stub.logger(stub: true)&.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::Rest::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.bindings_override = @config.bindings_override
    config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger=
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::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.bindings_override = @config.bindings_override
    config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Rest::Client (readonly)

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

Returns:

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


241
242
243
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 241

def iam_policy_client
  @iam_policy_client
end

#location_clientGoogle::Cloud::Location::Locations::Rest::Client (readonly)

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

Returns:

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


234
235
236
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 234

def location_client
  @location_client
end

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

Get the associated client for long-running operations.



227
228
229
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 227

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::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



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
107
108
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 68

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 Postition 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4269

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.batch_create_pull_request_comments request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3725

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.close_issue request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2821

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.close_pull_request request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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:



125
126
127
128
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 125

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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1852

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_branch_rule request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1325

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_hook request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 493

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_instance request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3181

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_issue request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4559

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_issue_comment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2291

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_pull_request request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3991

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_pull_request_comment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 872

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_repository request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2201

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_branch_rule request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



1507
1508
1509
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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1507

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_hook request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_instance(request, options = nil) ⇒ ::Gapic::Operation #delete_instance(name: nil, request_id: 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::Rest::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) ⇒ ::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).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 594

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_instance request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3539

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_issue request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



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
4940
4941
4942
4943
4944
4945
4946
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4911

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_issue_comment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4171

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_pull_request_comment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1060

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_repository request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3093

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.fetch_blob request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#fetch_tree(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry> #fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3009

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.fetch_tree request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :fetch_tree, "tree_entries", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2019

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_branch_rule request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



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
1262
1263
1264
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1231

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_hook request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Google::Iam::V1::Policy)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

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

Raises:

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

    if the REST call is aborted.



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1591

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_iam_policy_repo request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 390

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_instance request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3263

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_issue request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4641

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_issue_comment request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



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
2401
2402
2403
2404
2405
2406
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2373

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_pull_request request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3807

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_pull_request_comment request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 777

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_repository request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_branch_rules(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule> #list_branch_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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)
    • page_token (::String) (defaults to: nil)

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1937

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_branch_rules request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, "branch_rules", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_hooks(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook> #list_hooks(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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. 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.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1149

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_hooks request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_hooks, "hooks", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_instances(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance> #list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

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

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

    • filter (::String) (defaults to: nil)

      Filter for filtering results.

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



310
311
312
313
314
315
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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 310

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_instances request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_instances, "instances", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_issue_comments(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment> #list_issue_comments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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. 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.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4729

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_issue_comments request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, "issue_comments", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_issues(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue> #list_issues(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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. 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. Used to filter the resulting issues list.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3353

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_issues request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issues, "issues", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_pull_request_comments(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment> #list_pull_request_comments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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, at most 100 pull request comments will be returned. 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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



3896
3897
3898
3899
3900
3901
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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3896

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_pull_request_comments request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_comments, "pull_request_comments", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_pull_request_file_diffs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff> #list_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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. 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.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2912

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_pull_request_file_diffs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_file_diffs, "file_diffs", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_pull_requests(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest> #list_pull_requests(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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. 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.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2461

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_pull_requests request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_requests, "pull_requests", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_repositories(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository> #list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, instance: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

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

      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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 695

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_repositories request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_repositories, "repositories", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


248
249
250
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 248

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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2643

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.merge_pull_request request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3632

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.open_issue request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



2732
2733
2734
2735
2736
2737
2738
2739
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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2732

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.open_pull_request request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4369

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.resolve_pull_request_comments request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Google::Iam::V1::Policy)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

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

Raises:

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

    if the REST call is aborted.



1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1681

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.set_iam_policy_repo request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Google::Iam::V1::TestIamPermissionsResponse)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Google::Iam::V1::TestIamPermissionsResponse)

Raises:

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

    if the REST call is aborted.



1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1766

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.test_iam_permissions_repo request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


135
136
137
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 135

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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4469

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.unresolve_pull_request_comments request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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)

      Required. 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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2112

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_branch_rule request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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)

      Required. 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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



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
1452
1453
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 1418

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_hook request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 3446

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_issue request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4822

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_issue_comment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



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
2585
2586
2587
2588
2589
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 2554

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_pull_request request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



4082
4083
4084
4085
4086
4087
4088
4089
4090
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
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 4082

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_pull_request_comment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb', line 968

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_repository request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end