Skip to content

Commit

Permalink
chore(ruby): configure transport for google-cloud-workstations-v1 (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] authored May 24, 2024
1 parent 125346e commit d038dbb
Show file tree
Hide file tree
Showing 10 changed files with 5,999 additions and 0 deletions.
7 changes: 7 additions & 0 deletions google-cloud-workstations-v1/.owlbot-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
"google-cloud-workstations-v1.gemspec",
"lib/google-cloud-workstations-v1.rb",
"lib/google/cloud/workstations/v1.rb",
"lib/google/cloud/workstations/v1/bindings_override.rb",
"lib/google/cloud/workstations/v1/rest.rb",
"lib/google/cloud/workstations/v1/version.rb",
"lib/google/cloud/workstations/v1/workstations.rb",
"lib/google/cloud/workstations/v1/workstations/client.rb",
"lib/google/cloud/workstations/v1/workstations/credentials.rb",
"lib/google/cloud/workstations/v1/workstations/operations.rb",
"lib/google/cloud/workstations/v1/workstations/paths.rb",
"lib/google/cloud/workstations/v1/workstations/rest.rb",
"lib/google/cloud/workstations/v1/workstations/rest/client.rb",
"lib/google/cloud/workstations/v1/workstations/rest/operations.rb",
"lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb",
"lib/google/cloud/workstations/v1/workstations_pb.rb",
"lib/google/cloud/workstations/v1/workstations_services_pb.rb",
"proto_docs/README.md",
Expand Down Expand Up @@ -61,6 +67,7 @@
"snippets/workstations/update_workstation_config.rb",
"test/google/cloud/workstations/v1/workstations_operations_test.rb",
"test/google/cloud/workstations/v1/workstations_paths_test.rb",
"test/google/cloud/workstations/v1/workstations_rest_test.rb",
"test/google/cloud/workstations/v1/workstations_test.rb",
"test/helper.rb"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ module Workstations
# require "google/cloud/workstations/v1"
# client = ::Google::Cloud::Workstations::V1::Workstations::Client.new
#
# @example Load this package, including all its services, and instantiate a REST client
#
# require "google/cloud/workstations/v1"
# client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new
#
module V1
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# frozen_string_literal: true

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!

require "gapic/config"

module Google
module Cloud
module Workstations
##
# @example Loading just the REST part of this package, including all its services, and instantiating a REST client
#
# require "google/cloud/workstations/v1/rest"
# client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new
#
module V1
##
# @private
# Initialize the mixin bindings configuration
#
def self.configure
@configure ||= begin
namespace = ["Google", "Cloud", "Workstations"]
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 = Configuration.new parent_config
default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
uri_method: :get,
uri_template: "/v1/{resource}:getIamPolicy",
matches: [
["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false]
],
body: nil
),
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
uri_method: :get,
uri_template: "/v1/{resource}:getIamPolicy",
matches: [
["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false]
],
body: nil
)
]
default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [

Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
uri_method: :post,
uri_template: "/v1/{resource}:setIamPolicy",
matches: [
["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false]
],
body: "*"
),
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
uri_method: :post,
uri_template: "/v1/{resource}:setIamPolicy",
matches: [
["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false]
],
body: "*"
)
]
default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [

Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
uri_method: :post,
uri_template: "/v1/{resource}:testIamPermissions",
matches: [
["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false]
],
body: "*"
),
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
uri_method: :post,
uri_template: "/v1/{resource}:testIamPermissions",
matches: [
["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false]
],
body: "*"
)
]
default_config
end
yield @configure if block_given?
@configure
end

##
# @private
# Configuration class for the google.cloud.workstations.v1 package.
#
# This class contains common configuration for all services
# of the google.cloud.workstations.v1 package.
#
# This configuration is for internal use of the client library classes,
# and it is not intended that the end-users will read or change it.
#
class Configuration
extend ::Gapic::Config

# @private
# Overrides for http bindings for the RPC of the mixins for this package.
# Services in this package should use these when creating clients for the mixin services.
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
config_attr :bindings_override, {}, ::Hash, nil

# @private
def initialize parent_config = nil
@parent_config = parent_config unless parent_config.nil?

yield self if block_given?
end
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# frozen_string_literal: true

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!

require "google/cloud/workstations/v1/workstations/rest"
require "google/cloud/workstations/v1/bindings_override"
require "google/cloud/workstations/v1/version"

module Google
module Cloud
module Workstations
##
# To load just the REST part of this package, including all its services, and instantiate a REST client:
#
# @example
#
# require "google/cloud/workstations/v1/rest"
# client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new
#
module V1
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
require "google/cloud/workstations/v1/workstations/paths"
require "google/cloud/workstations/v1/workstations/operations"
require "google/cloud/workstations/v1/workstations/client"
require "google/cloud/workstations/v1/workstations/rest"

module Google
module Cloud
Expand All @@ -39,6 +40,11 @@ module V1
# require "google/cloud/workstations/v1/workstations"
# client = ::Google::Cloud::Workstations::V1::Workstations::Client.new
#
# @example Load this service and instantiate a REST client
#
# require "google/cloud/workstations/v1/workstations/rest"
# client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new
#
module Workstations
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# frozen_string_literal: true

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!

require "gapic/rest"
require "gapic/config"
require "gapic/config/method"

require "google/cloud/workstations/v1/version"
require "google/cloud/workstations/v1/bindings_override"

require "google/cloud/workstations/v1/workstations/credentials"
require "google/cloud/workstations/v1/workstations/paths"
require "google/cloud/workstations/v1/workstations/rest/operations"
require "google/cloud/workstations/v1/workstations/rest/client"

module Google
module Cloud
module Workstations
module V1
##
# Service for interacting with Cloud Workstations.
#
# To load this service and instantiate a REST client:
#
# require "google/cloud/workstations/v1/workstations/rest"
# client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new
#
module Workstations
# Client for the REST transport
module Rest
end
end
end
end
end
end

helper_path = ::File.join __dir__, "rest", "helpers.rb"
require "google/cloud/workstations/v1/workstations/rest/helpers" if ::File.file? helper_path
Loading

0 comments on commit d038dbb

Please sign in to comment.