Class: Google::Cloud::ApigeeRegistry::V1::Registry::Client

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

Overview

Client for the Registry service.

The Registry service allows teams to manage descriptions of APIs.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#api_deployment_path, #api_path, #api_spec_path, #api_version_path, #artifact_path, #location_path

Constructor Details

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

Create a new Registry client object.

Examples:


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

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

Yields:

  • (config)

    Configure the Registry client.

Yield Parameters:



295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
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
346
347
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 295

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

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

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

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

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

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @registry_stub.endpoint
    config.universe_domain = @registry_stub.universe_domain
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @registry_stub.endpoint
    config.universe_domain = @registry_stub.universe_domain
  end
end

Instance Attribute Details

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

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

Returns:

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


361
362
363
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 361

def iam_policy_client
  @iam_policy_client
end

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

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

Returns:

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


354
355
356
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 354

def location_client
  @location_client
end

Class Method Details

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

Configure the Registry Client class.

See Configuration for a description of the configuration fields.

Examples:


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

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 64

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "ApigeeRegistry", "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_apis.timeout = 60.0
    default_config.rpcs.list_apis.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.get_api.timeout = 60.0
    default_config.rpcs.get_api.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.create_api.timeout = 60.0
    default_config.rpcs.create_api.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.update_api.timeout = 60.0
    default_config.rpcs.update_api.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.delete_api.timeout = 60.0
    default_config.rpcs.delete_api.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.list_api_versions.timeout = 60.0
    default_config.rpcs.list_api_versions.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.get_api_version.timeout = 60.0
    default_config.rpcs.get_api_version.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.create_api_version.timeout = 60.0
    default_config.rpcs.create_api_version.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.update_api_version.timeout = 60.0
    default_config.rpcs.update_api_version.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.delete_api_version.timeout = 60.0
    default_config.rpcs.delete_api_version.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.list_api_specs.timeout = 60.0
    default_config.rpcs.list_api_specs.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.get_api_spec.timeout = 60.0
    default_config.rpcs.get_api_spec.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.get_api_spec_contents.timeout = 60.0
    default_config.rpcs.get_api_spec_contents.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.create_api_spec.timeout = 60.0
    default_config.rpcs.create_api_spec.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.update_api_spec.timeout = 60.0
    default_config.rpcs.update_api_spec.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.delete_api_spec.timeout = 60.0
    default_config.rpcs.delete_api_spec.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.tag_api_spec_revision.timeout = 60.0
    default_config.rpcs.tag_api_spec_revision.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.list_api_spec_revisions.timeout = 60.0
    default_config.rpcs.list_api_spec_revisions.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.rollback_api_spec.timeout = 60.0

    default_config.rpcs.delete_api_spec_revision.timeout = 60.0
    default_config.rpcs.delete_api_spec_revision.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.list_api_deployments.timeout = 60.0
    default_config.rpcs.list_api_deployments.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.get_api_deployment.timeout = 60.0
    default_config.rpcs.get_api_deployment.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.create_api_deployment.timeout = 60.0
    default_config.rpcs.create_api_deployment.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.update_api_deployment.timeout = 60.0
    default_config.rpcs.update_api_deployment.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.delete_api_deployment.timeout = 60.0
    default_config.rpcs.delete_api_deployment.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.tag_api_deployment_revision.timeout = 60.0
    default_config.rpcs.tag_api_deployment_revision.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.list_api_deployment_revisions.timeout = 60.0
    default_config.rpcs.list_api_deployment_revisions.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.rollback_api_deployment.timeout = 60.0

    default_config.rpcs.delete_api_deployment_revision.timeout = 60.0
    default_config.rpcs.delete_api_deployment_revision.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.list_artifacts.timeout = 60.0
    default_config.rpcs.list_artifacts.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.get_artifact.timeout = 60.0
    default_config.rpcs.get_artifact.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.get_artifact_contents.timeout = 60.0
    default_config.rpcs.get_artifact_contents.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.create_artifact.timeout = 60.0
    default_config.rpcs.create_artifact.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.replace_artifact.timeout = 60.0
    default_config.rpcs.replace_artifact.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config.rpcs.delete_artifact.timeout = 60.0
    default_config.rpcs.delete_artifact.retry_policy = {
      initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14]
    }

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

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

Configure the Registry 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:



265
266
267
268
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 265

def configure
  yield @config if block_given?
  @config
end

#create_api(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api #create_api(parent: nil, api: nil, api_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api

Creates a specified API.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api.
p result

Overloads:

  • #create_api(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::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_api(parent: nil, api: nil, api_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api

    Pass arguments to create_api 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 parent, which owns this collection of APIs. Format: projects/*/locations/*

    • api (::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash) (defaults to: nil)

      Required. The API to create.

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

      Required. The ID to use for the API, which will become the final component of the API's resource name.

      This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

      Following AIP-162, IDs must not have the form of a UUID.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 613

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest

  # 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_api..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#create_api_deployment(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment #create_api_deployment(parent: nil, api_deployment: nil, api_deployment_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

Creates a specified deployment.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
p result

Overloads:

  • #create_api_deployment(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::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_api_deployment(parent: nil, api_deployment: nil, api_deployment_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

    Pass arguments to create_api_deployment 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 parent, which owns this collection of deployments. Format: projects/*/locations/*/apis/*

    • api_deployment (::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash) (defaults to: nil)

      Required. The deployment to create.

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

      Required. The ID to use for the deployment, which will become the final component of the deployment's resource name.

      This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

      Following AIP-162, IDs must not have the form of a UUID.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2505

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest

  # 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_api_deployment..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#create_api_spec(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec #create_api_spec(parent: nil, api_spec: nil, api_spec_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

Creates a specified spec.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
p result

Overloads:

  • #create_api_spec(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::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_api_spec(parent: nil, api_spec: nil, api_spec_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

    Pass arguments to create_api_spec 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 parent, which owns this collection of specs. Format: projects/*/locations/*/apis/*/versions/*

    • api_spec (::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash) (defaults to: nil)

      Required. The spec to create.

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

      Required. The ID to use for the spec, which will become the final component of the spec's resource name.

      This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

      Following AIP-162, IDs must not have the form of a UUID.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 1659

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest

  # 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_api_spec..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#create_api_version(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion #create_api_version(parent: nil, api_version: nil, api_version_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion

Creates a specified version.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion.
p result

Overloads:

  • #create_api_version(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::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_api_version(parent: nil, api_version: nil, api_version_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion

    Pass arguments to create_api_version 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 parent, which owns this collection of versions. Format: projects/*/locations/*/apis/*

    • api_version (::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash) (defaults to: nil)

      Required. The version to create.

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

      Required. The ID to use for the version, which will become the final component of the version's resource name.

      This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/.

      Following AIP-162, IDs must not have the form of a UUID.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 1091

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest

  # 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_api_version..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#create_artifact(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact #create_artifact(parent: nil, artifact: nil, artifact_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact

Creates a specified artifact.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact.
p result

Overloads:

  • #create_artifact(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::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_artifact(parent: nil, artifact: nil, artifact_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact

    Pass arguments to create_artifact 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 parent, which owns this collection of artifacts. Format: {parent}

    • artifact (::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash) (defaults to: nil)

      Required. The artifact to create.

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

      Required. The ID to use for the artifact, which will become the final component of the artifact's resource name.

      This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

      Following AIP-162, IDs must not have the form of a UUID.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3442
3443
3444
3445
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
3482
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 3442

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest

  # 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_artifact..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#delete_api(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_api(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

Removes a specified API and all of the resources that it owns.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_api(request, options = nil) ⇒ ::Google::Protobuf::Empty

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::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_api(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_api 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 name of the API to delete. Format: projects/*/locations/*/apis/*

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

      If set to true, any child resources will also be deleted. (Otherwise, the request will only work if there are no child resources.)

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 801

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest

  # 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_api..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#delete_api_deployment(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_api_deployment(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

Removes a specified deployment, all revisions, and all child resources (e.g., artifacts).

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_api_deployment(request, options = nil) ⇒ ::Google::Protobuf::Empty

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::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_api_deployment(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_api_deployment 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 name of the deployment to delete. Format: projects/*/locations/*/apis/*/deployments/*

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

      If set to true, any child resources will also be deleted. (Otherwise, the request will only work if there are no child resources.)

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2693

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest

  # 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_api_deployment..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#delete_api_deployment_revision(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment #delete_api_deployment_revision(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

Deletes a revision of a deployment.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
p result

Overloads:

  • #delete_api_deployment_revision(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::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_api_deployment_revision(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

    Pass arguments to delete_api_deployment_revision 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 name of the deployment revision to be deleted, with a revision ID explicitly included.

      Example: projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 3062

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest

  # 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_api_deployment_revision..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#delete_api_spec(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_api_spec(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

Removes a specified spec, all revisions, and all child resources (e.g., artifacts).

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_api_spec(request, options = nil) ⇒ ::Google::Protobuf::Empty

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::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_api_spec(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_api_spec 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 name of the spec to delete. Format: projects/*/locations/*/apis/*/versions/*/specs/*

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

      If set to true, any child resources will also be deleted. (Otherwise, the request will only work if there are no child resources.)

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1847
1848
1849
1850
1851
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/apigee_registry/v1/registry/client.rb', line 1847

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest

  # 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_api_spec..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#delete_api_spec_revision(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec #delete_api_spec_revision(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

Deletes a revision of a spec.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
p result

Overloads:

  • #delete_api_spec_revision(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::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_api_spec_revision(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

    Pass arguments to delete_api_spec_revision 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 name of the spec revision to be deleted, with a revision ID explicitly included.

      Example: projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2215

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest

  # 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_api_spec_revision..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#delete_api_version(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_api_version(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

Removes a specified version and all of the resources that it owns.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_api_version(request, options = nil) ⇒ ::Google::Protobuf::Empty

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::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_api_version(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_api_version 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 name of the version to delete. Format: projects/*/locations/*/apis/*/versions/*

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

      If set to true, any child resources will also be deleted. (Otherwise, the request will only work if there are no child resources.)

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 1279

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest

  # 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_api_version..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#delete_artifact(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_artifact(name: nil) ⇒ ::Google::Protobuf::Empty

Removes a specified artifact.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_artifact(request, options = nil) ⇒ ::Google::Protobuf::Empty

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::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_artifact(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_artifact 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 name of the artifact to delete. Format: {parent}/artifacts/*

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 3618

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest

  # 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_artifact..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#get_api(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api #get_api(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api

Returns a specified API.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api.
p result

Overloads:

  • #get_api(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::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_api(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api

    Pass arguments to get_api 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 name of the API to retrieve. Format: projects/*/locations/*/apis/*

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest

  # 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_api..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#get_api_deployment(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment #get_api_deployment(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

Returns a specified deployment.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
p result

Overloads:

  • #get_api_deployment(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::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_api_deployment(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

    Pass arguments to get_api_deployment 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 name of the deployment to retrieve. Format: projects/*/locations/*/apis/*/deployments/*

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2408

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest

  # 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_api_deployment..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#get_api_spec(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec #get_api_spec(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

Returns a specified spec.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
p result

Overloads:

  • #get_api_spec(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::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_api_spec(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

    Pass arguments to get_api_spec 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 name of the spec to retrieve. Format: projects/*/locations/*/apis/*/versions/*/specs/*

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 1472

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest

  # 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_api_spec..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#get_api_spec_contents(request, options = nil) ⇒ ::Google::Api::HttpBody #get_api_spec_contents(name: nil) ⇒ ::Google::Api::HttpBody

Returns the contents of a specified spec. If specs are stored with GZip compression, the default behavior is to return the spec uncompressed (the mime_type response field indicates the exact format returned).

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Api::HttpBody.
p result

Overloads:

  • #get_api_spec_contents(request, options = nil) ⇒ ::Google::Api::HttpBody

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::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_api_spec_contents(name: nil) ⇒ ::Google::Api::HttpBody

    Pass arguments to get_api_spec_contents 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 name of the spec whose contents should be retrieved. Format: projects/*/locations/*/apis/*/versions/*/specs/*

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 1562

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest

  # 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_api_spec_contents..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#get_api_version(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion #get_api_version(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion

Returns a specified version.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion.
p result

Overloads:

  • #get_api_version(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::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_api_version(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion

    Pass arguments to get_api_version 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 name of the version to retrieve. Format: projects/*/locations/*/apis/*/versions/*

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 994

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest

  # 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_api_version..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#get_artifact(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact #get_artifact(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact

Returns a specified artifact.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact.
p result

Overloads:

  • #get_artifact(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::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_artifact(name: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact

    Pass arguments to get_artifact 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 name of the artifact to retrieve. Format: {parent}/artifacts/*

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3255
3256
3257
3258
3259
3260
3261
3262
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
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 3255

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest

  # 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_artifact..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#get_artifact_contents(request, options = nil) ⇒ ::Google::Api::HttpBody #get_artifact_contents(name: nil) ⇒ ::Google::Api::HttpBody

Returns the contents of a specified artifact. If artifacts are stored with GZip compression, the default behavior is to return the artifact uncompressed (the mime_type response field indicates the exact format returned).

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Api::HttpBody.
p result

Overloads:

  • #get_artifact_contents(request, options = nil) ⇒ ::Google::Api::HttpBody

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::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_artifact_contents(name: nil) ⇒ ::Google::Api::HttpBody

    Pass arguments to get_artifact_contents 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 name of the artifact whose contents should be retrieved. Format: {parent}/artifacts/*

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3345
3346
3347
3348
3349
3350
3351
3352
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
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 3345

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest

  # 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_artifact_contents..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#list_api_deployment_revisions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment> #list_api_deployment_revisions(name: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>

Lists all revisions of a deployment. Revisions are returned in descending order of revision creation time.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

# Call the list_api_deployment_revisions method.
result = client.list_api_deployment_revisions 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::ApigeeRegistry::V1::ApiDeployment.
  p item
end

Overloads:

  • #list_api_deployment_revisions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::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_api_deployment_revisions(name: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>

    Pass arguments to list_api_deployment_revisions 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 name of the deployment to list revisions for.

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

      The maximum number of revisions to return per page.

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

      The page token, received from a previous ListApiDeploymentRevisions call. Provide this to retrieve the subsequent page.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2879

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest

  # 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_api_deployment_revisions..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#list_api_deployments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment> #list_api_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>

Returns matching deployments.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

# Call the list_api_deployments method.
result = client.list_api_deployments 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::ApigeeRegistry::V1::ApiDeployment.
  p item
end

Overloads:

  • #list_api_deployments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::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_api_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>

    Pass arguments to list_api_deployments 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 parent, which owns this collection of deployments. Format: projects/*/locations/*/apis/*

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

      The maximum number of deployments to return. The service may return fewer than this value. If unspecified, at most 50 values will be returned. The maximum is 1000; values above 1000 will be coerced to 1000.

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

      A page token, received from a previous ListApiDeployments call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListApiDeployments must match the call that provided the page token.

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

      An expression that can be used to filter the list. Filters use the Common Expression Language and can refer to all message fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2320

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest

  # 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_api_deployments..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#list_api_spec_revisions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec> #list_api_spec_revisions(name: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>

Lists all revisions of a spec. Revisions are returned in descending order of revision creation time.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

# Call the list_api_spec_revisions method.
result = client.list_api_spec_revisions 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::ApigeeRegistry::V1::ApiSpec.
  p item
end

Overloads:

  • #list_api_spec_revisions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::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_api_spec_revisions(name: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>

    Pass arguments to list_api_spec_revisions 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 name of the spec to list revisions for.

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

      The maximum number of revisions to return per page.

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

      The page token, received from a previous ListApiSpecRevisions call. Provide this to retrieve the subsequent page.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2032

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest

  # 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_api_spec_revisions..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#list_api_specs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec> #list_api_specs(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>

Returns matching specs.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

# Call the list_api_specs method.
result = client.list_api_specs 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::ApigeeRegistry::V1::ApiSpec.
  p item
end

Overloads:

  • #list_api_specs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::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_api_specs(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>

    Pass arguments to list_api_specs 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 parent, which owns this collection of specs. Format: projects/*/locations/*/apis/*/versions/*

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

      The maximum number of specs to return. The service may return fewer than this value. If unspecified, at most 50 values will be returned. The maximum is 1000; values above 1000 will be coerced to 1000.

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

      A page token, received from a previous ListApiSpecs call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListApiSpecs must match the call that provided the page token.

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

      An expression that can be used to filter the list. Filters use the Common Expression Language and can refer to all message fields except contents.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 1384

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest

  # 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_api_specs..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#list_api_versions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion> #list_api_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>

Returns matching versions.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

# Call the list_api_versions method.
result = client.list_api_versions 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::ApigeeRegistry::V1::ApiVersion.
  p item
end

Overloads:

  • #list_api_versions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::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_api_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>

    Pass arguments to list_api_versions 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 parent, which owns this collection of versions. Format: projects/*/locations/*/apis/*

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

      The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 50 values will be returned. The maximum is 1000; values above 1000 will be coerced to 1000.

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

      A page token, received from a previous ListApiVersions call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListApiVersions must match the call that provided the page token.

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

      An expression that can be used to filter the list. Filters use the Common Expression Language and can refer to all message fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 906

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest

  # 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_api_versions..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#list_apis(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api> #list_apis(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>

Returns matching APIs.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

# Call the list_apis method.
result = client.list_apis 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::ApigeeRegistry::V1::Api.
  p item
end

Overloads:

  • #list_apis(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::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_apis(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>

    Pass arguments to list_apis 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 parent, which owns this collection of APIs. Format: projects/*/locations/*

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

      The maximum number of APIs to return. The service may return fewer than this value. If unspecified, at most 50 values will be returned. The maximum is 1000; values above 1000 will be coerced to 1000.

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

      A page token, received from a previous ListApis call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListApis must match the call that provided the page token.

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

      An expression that can be used to filter the list. Filters use the Common Expression Language and can refer to all message fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 428

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest

  # 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_apis..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#list_artifacts(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact> #list_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>

Returns matching artifacts.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

# Call the list_artifacts method.
result = client.list_artifacts 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::ApigeeRegistry::V1::Artifact.
  p item
end

Overloads:

  • #list_artifacts(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::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_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>

    Pass arguments to list_artifacts 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 parent, which owns this collection of artifacts. Format: {parent}

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

      The maximum number of artifacts to return. The service may return fewer than this value. If unspecified, at most 50 values will be returned. The maximum is 1000; values above 1000 will be coerced to 1000.

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

      A page token, received from a previous ListArtifacts call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListArtifacts must match the call that provided the page token.

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

      An expression that can be used to filter the list. Filters use the Common Expression Language and can refer to all message fields except contents.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
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
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 3167

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest

  # 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_artifacts..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#replace_artifact(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact #replace_artifact(artifact: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Artifact

Used to replace a specified artifact.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3531
3532
3533
3534
3535
3536
3537
3538
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
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 3531

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest

  # 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.replace_artifact..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#rollback_api_deployment(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment #rollback_api_deployment(name: nil, revision_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
p result

Overloads:

  • #rollback_api_deployment(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

    Pass arguments to rollback_api_deployment via a request object, either of type Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::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.

  • #rollback_api_deployment(name: nil, revision_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

    Pass arguments to rollback_api_deployment 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 deployment being rolled back.

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

      Required. The revision ID to roll back to. It must be a revision of the same deployment.

      Example: c7cfa2a8

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2972

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest

  # 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.rollback_api_deployment..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#rollback_api_spec(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec #rollback_api_spec(name: nil, revision_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
p result

Overloads:

  • #rollback_api_spec(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

    Pass arguments to rollback_api_spec via a request object, either of type Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::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.

  • #rollback_api_spec(name: nil, revision_id: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

    Pass arguments to rollback_api_spec 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 spec being rolled back.

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

      Required. The revision ID to roll back to. It must be a revision of the same spec.

      Example: c7cfa2a8

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2125

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest

  # 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.rollback_api_spec..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#tag_api_deployment_revision(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment #tag_api_deployment_revision(name: nil, tag: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

Adds a tag to a specified revision of a deployment.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
p result

Overloads:

  • #tag_api_deployment_revision(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::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.

  • #tag_api_deployment_revision(name: nil, tag: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

    Pass arguments to tag_api_deployment_revision 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 name of the deployment to be tagged, including the revision ID.

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

      Required. The tag to apply. The tag should be at most 40 characters, and match [a-z][a-z0-9-]{3,39}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2783

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest

  # 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.tag_api_deployment_revision..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#tag_api_spec_revision(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec #tag_api_spec_revision(name: nil, tag: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

Adds a tag to a specified revision of a spec.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
p result

Overloads:

  • #tag_api_spec_revision(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::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.

  • #tag_api_spec_revision(name: nil, tag: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

    Pass arguments to tag_api_spec_revision 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 name of the spec to be tagged, including the revision ID.

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

      Required. The tag to apply. The tag should be at most 40 characters, and match [a-z][a-z0-9-]{3,39}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1936
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
1973
1974
1975
1976
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 1936

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest

  # 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.tag_api_spec_revision..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#universe_domainString

The effective universe domain

Returns:

  • (String)


275
276
277
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 275

def universe_domain
  @registry_stub.universe_domain
end

#update_api(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api #update_api(api: nil, update_mask: nil, allow_missing: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api

Used to modify a specified API.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api.
p result

Overloads:

  • #update_api(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::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_api(api: nil, update_mask: nil, allow_missing: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::Api

    Pass arguments to update_api 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:

    • api (::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash) (defaults to: nil)

      Required. The API to update.

      The name field is used to identify the API to update. Format: projects/*/locations/*/apis/*

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      The list of fields to be updated. If omitted, all fields are updated that are set in the request message (fields set to default values are ignored). If an asterisk "*" is specified, all fields are updated, including fields that are unspecified/default in the request.

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

      If set to true, and the API is not found, a new API will be created. In this situation, update_mask is ignored.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 710

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest

  # 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_api..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#update_api_deployment(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment #update_api_deployment(api_deployment: nil, update_mask: nil, allow_missing: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

Used to modify a specified deployment.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
p result

Overloads:

  • #update_api_deployment(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::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_api_deployment(api_deployment: nil, update_mask: nil, allow_missing: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment

    Pass arguments to update_api_deployment 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:

    • api_deployment (::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash) (defaults to: nil)

      Required. The deployment to update.

      The name field is used to identify the deployment to update. Format: projects/*/locations/*/apis/*/deployments/*

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      The list of fields to be updated. If omitted, all fields are updated that are set in the request message (fields set to default values are ignored). If an asterisk "*" is specified, all fields are updated, including fields that are unspecified/default in the request.

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

      If set to true, and the deployment is not found, a new deployment will be created. In this situation, update_mask is ignored.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 2602

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest

  # 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_api_deployment..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#update_api_spec(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec #update_api_spec(api_spec: nil, update_mask: nil, allow_missing: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

Used to modify a specified spec.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
p result

Overloads:

  • #update_api_spec(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::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_api_spec(api_spec: nil, update_mask: nil, allow_missing: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiSpec

    Pass arguments to update_api_spec 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:

    • api_spec (::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash) (defaults to: nil)

      Required. The spec to update.

      The name field is used to identify the spec to update. Format: projects/*/locations/*/apis/*/versions/*/specs/*

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      The list of fields to be updated. If omitted, all fields are updated that are set in the request message (fields set to default values are ignored). If an asterisk "*" is specified, all fields are updated, including fields that are unspecified/default in the request.

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

      If set to true, and the spec is not found, a new spec will be created. In this situation, update_mask is ignored.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
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
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 1756

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest

  # 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_api_spec..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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

#update_api_version(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion #update_api_version(api_version: nil, update_mask: nil, allow_missing: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion

Used to modify a specified version.

Examples:

Basic example

require "google/cloud/apigee_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion.
p result

Overloads:

  • #update_api_version(request, options = nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion

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

    Parameters:

    • request (::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::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_api_version(api_version: nil, update_mask: nil, allow_missing: nil) ⇒ ::Google::Cloud::ApigeeRegistry::V1::ApiVersion

    Pass arguments to update_api_version 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:

    • api_version (::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash) (defaults to: nil)

      Required. The version to update.

      The name field is used to identify the version to update. Format: projects/*/locations/*/apis/*/versions/*

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      The list of fields to be updated. If omitted, all fields are updated that are set in the request message (fields set to default values are ignored). If an asterisk "*" is specified, all fields are updated, including fields that are unspecified/default in the request.

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

      If set to true, and the version is not found, a new version will be created. In this situation, update_mask is ignored.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
# File 'lib/google/cloud/apigee_registry/v1/registry/client.rb', line 1188

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest

  # 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_api_version..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::ApigeeRegistry::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

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

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