google-cloud-api_hub-v1 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/api_hub/v1/api_hub/paths.rb +21 -0
- data/lib/google/cloud/api_hub/v1/api_hub/rest/client.rb +497 -9
- data/lib/google/cloud/api_hub/v1/api_hub/rest/service_stub.rb +185 -0
- data/lib/google/cloud/api_hub/v1/api_hub_collect/credentials.rb +47 -0
- data/lib/google/cloud/api_hub/v1/api_hub_collect/paths.rb +218 -0
- data/lib/google/cloud/api_hub/v1/api_hub_collect/rest/client.rb +487 -0
- data/lib/google/cloud/api_hub/v1/api_hub_collect/rest/operations.rb +914 -0
- data/lib/google/cloud/api_hub/v1/api_hub_collect/rest/service_stub.rb +143 -0
- data/lib/google/cloud/api_hub/v1/api_hub_collect/rest.rb +56 -0
- data/lib/google/cloud/api_hub/v1/api_hub_collect.rb +50 -0
- data/lib/google/cloud/api_hub/v1/api_hub_curate/credentials.rb +47 -0
- data/lib/google/cloud/api_hub/v1/api_hub_curate/paths.rb +90 -0
- data/lib/google/cloud/api_hub/v1/api_hub_curate/rest/client.rb +869 -0
- data/lib/google/cloud/api_hub/v1/api_hub_curate/rest/service_stub.rb +388 -0
- data/lib/google/cloud/api_hub/v1/api_hub_curate/rest.rb +54 -0
- data/lib/google/cloud/api_hub/v1/api_hub_curate.rb +49 -0
- data/lib/google/cloud/api_hub/v1/api_hub_discovery/credentials.rb +47 -0
- data/lib/google/cloud/api_hub/v1/api_hub_discovery/paths.rb +90 -0
- data/lib/google/cloud/api_hub/v1/api_hub_discovery/rest/client.rb +750 -0
- data/lib/google/cloud/api_hub/v1/api_hub_discovery/rest/service_stub.rb +325 -0
- data/lib/google/cloud/api_hub/v1/api_hub_discovery/rest.rb +54 -0
- data/lib/google/cloud/api_hub/v1/api_hub_discovery.rb +49 -0
- data/lib/google/cloud/api_hub/v1/api_hub_plugin/paths.rb +74 -0
- data/lib/google/cloud/api_hub/v1/api_hub_plugin/rest/client.rb +1265 -98
- data/lib/google/cloud/api_hub/v1/api_hub_plugin/rest/operations.rb +914 -0
- data/lib/google/cloud/api_hub/v1/api_hub_plugin/rest/service_stub.rb +677 -0
- data/lib/google/cloud/api_hub/v1/api_hub_plugin/rest.rb +1 -0
- data/lib/google/cloud/api_hub/v1/bindings_override.rb +2 -29
- data/lib/google/cloud/api_hub/v1/provisioning/rest/client.rb +96 -0
- data/lib/google/cloud/api_hub/v1/provisioning/rest/service_stub.rb +61 -0
- data/lib/google/cloud/api_hub/v1/rest.rb +3 -0
- data/lib/google/cloud/api_hub/v1/version.rb +1 -1
- data/lib/google/cloud/api_hub/v1.rb +3 -0
- data/lib/google/cloud/apihub/v1/apihub_service_pb.rb +4 -1
- data/lib/google/cloud/apihub/v1/apihub_service_services_pb.rb +35 -2
- data/lib/google/cloud/apihub/v1/collect_service_pb.rb +60 -0
- data/lib/google/cloud/apihub/v1/collect_service_services_pb.rb +47 -0
- data/lib/google/cloud/apihub/v1/common_fields_pb.rb +34 -1
- data/lib/google/cloud/apihub/v1/curate_service_pb.rb +63 -0
- data/lib/google/cloud/apihub/v1/curate_service_services_pb.rb +64 -0
- data/lib/google/cloud/apihub/v1/discovery_service_pb.rb +54 -0
- data/lib/google/cloud/apihub/v1/discovery_service_services_pb.rb +55 -0
- data/lib/google/cloud/apihub/v1/plugin_service_pb.rb +44 -1
- data/lib/google/cloud/apihub/v1/plugin_service_services_pb.rb +43 -1
- data/lib/google/cloud/apihub/v1/provisioning_service_pb.rb +3 -1
- data/lib/google/cloud/apihub/v1/provisioning_service_services_pb.rb +2 -0
- data/proto_docs/google/cloud/apihub/v1/apihub_service.rb +251 -15
- data/proto_docs/google/cloud/apihub/v1/collect_service.rb +188 -0
- data/proto_docs/google/cloud/apihub/v1/common_fields.rb +819 -28
- data/proto_docs/google/cloud/apihub/v1/curate_service.rb +268 -0
- data/proto_docs/google/cloud/apihub/v1/discovery_service.rb +124 -0
- data/proto_docs/google/cloud/apihub/v1/linting_service.rb +10 -4
- data/proto_docs/google/cloud/apihub/v1/plugin_service.rb +799 -1
- data/proto_docs/google/cloud/apihub/v1/provisioning_service.rb +13 -0
- metadata +33 -4
@@ -713,6 +713,46 @@ module Google
|
|
713
713
|
end
|
714
714
|
end
|
715
715
|
|
716
|
+
##
|
717
|
+
# Baseline implementation for the create_api_operation REST call
|
718
|
+
#
|
719
|
+
# @param request_pb [::Google::Cloud::ApiHub::V1::CreateApiOperationRequest]
|
720
|
+
# A request object representing the call parameters. Required.
|
721
|
+
# @param options [::Gapic::CallOptions]
|
722
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
723
|
+
#
|
724
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
725
|
+
# @yieldparam result [::Google::Cloud::ApiHub::V1::ApiOperation]
|
726
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
727
|
+
#
|
728
|
+
# @return [::Google::Cloud::ApiHub::V1::ApiOperation]
|
729
|
+
# A result object deserialized from the server's reply
|
730
|
+
def create_api_operation request_pb, options = nil
|
731
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
732
|
+
|
733
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_api_operation_request request_pb
|
734
|
+
query_string_params = if query_string_params.any?
|
735
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
736
|
+
else
|
737
|
+
{}
|
738
|
+
end
|
739
|
+
|
740
|
+
response = @client_stub.make_http_request(
|
741
|
+
verb,
|
742
|
+
uri: uri,
|
743
|
+
body: body || "",
|
744
|
+
params: query_string_params,
|
745
|
+
method_name: "create_api_operation",
|
746
|
+
options: options
|
747
|
+
)
|
748
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
749
|
+
result = ::Google::Cloud::ApiHub::V1::ApiOperation.decode_json response.body, ignore_unknown_fields: true
|
750
|
+
catch :response do
|
751
|
+
yield result, operation if block_given?
|
752
|
+
result
|
753
|
+
end
|
754
|
+
end
|
755
|
+
|
716
756
|
##
|
717
757
|
# Baseline implementation for the get_api_operation REST call
|
718
758
|
#
|
@@ -793,6 +833,86 @@ module Google
|
|
793
833
|
end
|
794
834
|
end
|
795
835
|
|
836
|
+
##
|
837
|
+
# Baseline implementation for the update_api_operation REST call
|
838
|
+
#
|
839
|
+
# @param request_pb [::Google::Cloud::ApiHub::V1::UpdateApiOperationRequest]
|
840
|
+
# A request object representing the call parameters. Required.
|
841
|
+
# @param options [::Gapic::CallOptions]
|
842
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
843
|
+
#
|
844
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
845
|
+
# @yieldparam result [::Google::Cloud::ApiHub::V1::ApiOperation]
|
846
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
847
|
+
#
|
848
|
+
# @return [::Google::Cloud::ApiHub::V1::ApiOperation]
|
849
|
+
# A result object deserialized from the server's reply
|
850
|
+
def update_api_operation request_pb, options = nil
|
851
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
852
|
+
|
853
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_api_operation_request request_pb
|
854
|
+
query_string_params = if query_string_params.any?
|
855
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
856
|
+
else
|
857
|
+
{}
|
858
|
+
end
|
859
|
+
|
860
|
+
response = @client_stub.make_http_request(
|
861
|
+
verb,
|
862
|
+
uri: uri,
|
863
|
+
body: body || "",
|
864
|
+
params: query_string_params,
|
865
|
+
method_name: "update_api_operation",
|
866
|
+
options: options
|
867
|
+
)
|
868
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
869
|
+
result = ::Google::Cloud::ApiHub::V1::ApiOperation.decode_json response.body, ignore_unknown_fields: true
|
870
|
+
catch :response do
|
871
|
+
yield result, operation if block_given?
|
872
|
+
result
|
873
|
+
end
|
874
|
+
end
|
875
|
+
|
876
|
+
##
|
877
|
+
# Baseline implementation for the delete_api_operation REST call
|
878
|
+
#
|
879
|
+
# @param request_pb [::Google::Cloud::ApiHub::V1::DeleteApiOperationRequest]
|
880
|
+
# A request object representing the call parameters. Required.
|
881
|
+
# @param options [::Gapic::CallOptions]
|
882
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
883
|
+
#
|
884
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
885
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
886
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
887
|
+
#
|
888
|
+
# @return [::Google::Protobuf::Empty]
|
889
|
+
# A result object deserialized from the server's reply
|
890
|
+
def delete_api_operation request_pb, options = nil
|
891
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
892
|
+
|
893
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_operation_request request_pb
|
894
|
+
query_string_params = if query_string_params.any?
|
895
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
896
|
+
else
|
897
|
+
{}
|
898
|
+
end
|
899
|
+
|
900
|
+
response = @client_stub.make_http_request(
|
901
|
+
verb,
|
902
|
+
uri: uri,
|
903
|
+
body: body || "",
|
904
|
+
params: query_string_params,
|
905
|
+
method_name: "delete_api_operation",
|
906
|
+
options: options
|
907
|
+
)
|
908
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
909
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
910
|
+
catch :response do
|
911
|
+
yield result, operation if block_given?
|
912
|
+
result
|
913
|
+
end
|
914
|
+
end
|
915
|
+
|
796
916
|
##
|
797
917
|
# Baseline implementation for the get_definition REST call
|
798
918
|
#
|
@@ -1815,6 +1935,28 @@ module Google
|
|
1815
1935
|
transcoder.transcode request_pb
|
1816
1936
|
end
|
1817
1937
|
|
1938
|
+
##
|
1939
|
+
# @private
|
1940
|
+
#
|
1941
|
+
# GRPC transcoding helper method for the create_api_operation REST call
|
1942
|
+
#
|
1943
|
+
# @param request_pb [::Google::Cloud::ApiHub::V1::CreateApiOperationRequest]
|
1944
|
+
# A request object representing the call parameters. Required.
|
1945
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1946
|
+
# Uri, Body, Query string parameters
|
1947
|
+
def self.transcode_create_api_operation_request request_pb
|
1948
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1949
|
+
.with_bindings(
|
1950
|
+
uri_method: :post,
|
1951
|
+
uri_template: "/v1/{parent}/operations",
|
1952
|
+
body: "api_operation",
|
1953
|
+
matches: [
|
1954
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false]
|
1955
|
+
]
|
1956
|
+
)
|
1957
|
+
transcoder.transcode request_pb
|
1958
|
+
end
|
1959
|
+
|
1818
1960
|
##
|
1819
1961
|
# @private
|
1820
1962
|
#
|
@@ -1857,6 +1999,49 @@ module Google
|
|
1857
1999
|
transcoder.transcode request_pb
|
1858
2000
|
end
|
1859
2001
|
|
2002
|
+
##
|
2003
|
+
# @private
|
2004
|
+
#
|
2005
|
+
# GRPC transcoding helper method for the update_api_operation REST call
|
2006
|
+
#
|
2007
|
+
# @param request_pb [::Google::Cloud::ApiHub::V1::UpdateApiOperationRequest]
|
2008
|
+
# A request object representing the call parameters. Required.
|
2009
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
2010
|
+
# Uri, Body, Query string parameters
|
2011
|
+
def self.transcode_update_api_operation_request request_pb
|
2012
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
2013
|
+
.with_bindings(
|
2014
|
+
uri_method: :patch,
|
2015
|
+
uri_template: "/v1/{api_operation.name}",
|
2016
|
+
body: "api_operation",
|
2017
|
+
matches: [
|
2018
|
+
["api_operation.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/operations/[^/]+/?$}, false]
|
2019
|
+
]
|
2020
|
+
)
|
2021
|
+
transcoder.transcode request_pb
|
2022
|
+
end
|
2023
|
+
|
2024
|
+
##
|
2025
|
+
# @private
|
2026
|
+
#
|
2027
|
+
# GRPC transcoding helper method for the delete_api_operation REST call
|
2028
|
+
#
|
2029
|
+
# @param request_pb [::Google::Cloud::ApiHub::V1::DeleteApiOperationRequest]
|
2030
|
+
# A request object representing the call parameters. Required.
|
2031
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
2032
|
+
# Uri, Body, Query string parameters
|
2033
|
+
def self.transcode_delete_api_operation_request request_pb
|
2034
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
2035
|
+
.with_bindings(
|
2036
|
+
uri_method: :delete,
|
2037
|
+
uri_template: "/v1/{name}",
|
2038
|
+
matches: [
|
2039
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/operations/[^/]+/?$}, false]
|
2040
|
+
]
|
2041
|
+
)
|
2042
|
+
transcoder.transcode request_pb
|
2043
|
+
end
|
2044
|
+
|
1860
2045
|
##
|
1861
2046
|
# @private
|
1862
2047
|
#
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module ApiHub
|
24
|
+
module V1
|
25
|
+
module ApiHubCollect
|
26
|
+
# Credentials for the ApiHubCollect API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
30
|
+
]
|
31
|
+
self.env_vars = [
|
32
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
33
|
+
"GOOGLE_CLOUD_KEYFILE",
|
34
|
+
"GCLOUD_KEYFILE",
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
36
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
37
|
+
"GCLOUD_KEYFILE_JSON"
|
38
|
+
]
|
39
|
+
self.paths = [
|
40
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
41
|
+
]
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,218 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module ApiHub
|
23
|
+
module V1
|
24
|
+
module ApiHubCollect
|
25
|
+
# Path helper methods for the ApiHubCollect API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Api resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/apis/{api}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param api [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def api_path project:, location:, api:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/apis/#{api}"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Create a fully-qualified ApiOperation resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
# @param api [String]
|
56
|
+
# @param version [String]
|
57
|
+
# @param operation [String]
|
58
|
+
#
|
59
|
+
# @return [::String]
|
60
|
+
def api_operation_path project:, location:, api:, version:, operation:
|
61
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
62
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
63
|
+
raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/"
|
64
|
+
raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/"
|
65
|
+
|
66
|
+
"projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/operations/#{operation}"
|
67
|
+
end
|
68
|
+
|
69
|
+
##
|
70
|
+
# Create a fully-qualified Attribute resource string.
|
71
|
+
#
|
72
|
+
# The resource will be in the following format:
|
73
|
+
#
|
74
|
+
# `projects/{project}/locations/{location}/attributes/{attribute}`
|
75
|
+
#
|
76
|
+
# @param project [String]
|
77
|
+
# @param location [String]
|
78
|
+
# @param attribute [String]
|
79
|
+
#
|
80
|
+
# @return [::String]
|
81
|
+
def attribute_path project:, location:, attribute:
|
82
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
83
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
84
|
+
|
85
|
+
"projects/#{project}/locations/#{location}/attributes/#{attribute}"
|
86
|
+
end
|
87
|
+
|
88
|
+
##
|
89
|
+
# Create a fully-qualified Definition resource string.
|
90
|
+
#
|
91
|
+
# The resource will be in the following format:
|
92
|
+
#
|
93
|
+
# `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}`
|
94
|
+
#
|
95
|
+
# @param project [String]
|
96
|
+
# @param location [String]
|
97
|
+
# @param api [String]
|
98
|
+
# @param version [String]
|
99
|
+
# @param definition [String]
|
100
|
+
#
|
101
|
+
# @return [::String]
|
102
|
+
def definition_path project:, location:, api:, version:, definition:
|
103
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
104
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
105
|
+
raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/"
|
106
|
+
raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/"
|
107
|
+
|
108
|
+
"projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/definitions/#{definition}"
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# Create a fully-qualified Deployment resource string.
|
113
|
+
#
|
114
|
+
# The resource will be in the following format:
|
115
|
+
#
|
116
|
+
# `projects/{project}/locations/{location}/deployments/{deployment}`
|
117
|
+
#
|
118
|
+
# @param project [String]
|
119
|
+
# @param location [String]
|
120
|
+
# @param deployment [String]
|
121
|
+
#
|
122
|
+
# @return [::String]
|
123
|
+
def deployment_path project:, location:, deployment:
|
124
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
125
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
126
|
+
|
127
|
+
"projects/#{project}/locations/#{location}/deployments/#{deployment}"
|
128
|
+
end
|
129
|
+
|
130
|
+
##
|
131
|
+
# Create a fully-qualified Location resource string.
|
132
|
+
#
|
133
|
+
# The resource will be in the following format:
|
134
|
+
#
|
135
|
+
# `projects/{project}/locations/{location}`
|
136
|
+
#
|
137
|
+
# @param project [String]
|
138
|
+
# @param location [String]
|
139
|
+
#
|
140
|
+
# @return [::String]
|
141
|
+
def location_path project:, location:
|
142
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
143
|
+
|
144
|
+
"projects/#{project}/locations/#{location}"
|
145
|
+
end
|
146
|
+
|
147
|
+
##
|
148
|
+
# Create a fully-qualified PluginInstance resource string.
|
149
|
+
#
|
150
|
+
# The resource will be in the following format:
|
151
|
+
#
|
152
|
+
# `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
|
153
|
+
#
|
154
|
+
# @param project [String]
|
155
|
+
# @param location [String]
|
156
|
+
# @param plugin [String]
|
157
|
+
# @param instance [String]
|
158
|
+
#
|
159
|
+
# @return [::String]
|
160
|
+
def plugin_instance_path project:, location:, plugin:, instance:
|
161
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
162
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
163
|
+
raise ::ArgumentError, "plugin cannot contain /" if plugin.to_s.include? "/"
|
164
|
+
|
165
|
+
"projects/#{project}/locations/#{location}/plugins/#{plugin}/instances/#{instance}"
|
166
|
+
end
|
167
|
+
|
168
|
+
##
|
169
|
+
# Create a fully-qualified Spec resource string.
|
170
|
+
#
|
171
|
+
# The resource will be in the following format:
|
172
|
+
#
|
173
|
+
# `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
|
174
|
+
#
|
175
|
+
# @param project [String]
|
176
|
+
# @param location [String]
|
177
|
+
# @param api [String]
|
178
|
+
# @param version [String]
|
179
|
+
# @param spec [String]
|
180
|
+
#
|
181
|
+
# @return [::String]
|
182
|
+
def spec_path project:, location:, api:, version:, spec:
|
183
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
184
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
185
|
+
raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/"
|
186
|
+
raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/"
|
187
|
+
|
188
|
+
"projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/specs/#{spec}"
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# Create a fully-qualified Version resource string.
|
193
|
+
#
|
194
|
+
# The resource will be in the following format:
|
195
|
+
#
|
196
|
+
# `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
|
197
|
+
#
|
198
|
+
# @param project [String]
|
199
|
+
# @param location [String]
|
200
|
+
# @param api [String]
|
201
|
+
# @param version [String]
|
202
|
+
#
|
203
|
+
# @return [::String]
|
204
|
+
def version_path project:, location:, api:, version:
|
205
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
206
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
207
|
+
raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/"
|
208
|
+
|
209
|
+
"projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}"
|
210
|
+
end
|
211
|
+
|
212
|
+
extend self
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|