google-cloud-resource_settings-v1 1.2.0 → 2.0.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.
@@ -1,51 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2021 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 ResourceSettings
24
- module V1
25
- module ResourceSettingsService
26
- # Credentials for the ResourceSettingsService API.
27
- class Credentials < ::Google::Auth::Credentials
28
- self.scope = [
29
- "https://www.googleapis.com/auth/cloud-platform"
30
- ]
31
- self.env_vars = [
32
- "RESOURCE_SETTINGS_CREDENTIALS",
33
- "RESOURCE_SETTINGS_KEYFILE",
34
- "GOOGLE_CLOUD_CREDENTIALS",
35
- "GOOGLE_CLOUD_KEYFILE",
36
- "GCLOUD_KEYFILE",
37
- "RESOURCE_SETTINGS_CREDENTIALS_JSON",
38
- "RESOURCE_SETTINGS_KEYFILE_JSON",
39
- "GOOGLE_CLOUD_CREDENTIALS_JSON",
40
- "GOOGLE_CLOUD_KEYFILE_JSON",
41
- "GCLOUD_KEYFILE_JSON"
42
- ]
43
- self.paths = [
44
- "~/.config/google_cloud/application_default_credentials.json"
45
- ]
46
- end
47
- end
48
- end
49
- end
50
- end
51
- end
@@ -1,85 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2021 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 ResourceSettings
23
- module V1
24
- module ResourceSettingsService
25
- # Path helper methods for the ResourceSettingsService API.
26
- module Paths
27
- ##
28
- # Create a fully-qualified Setting resource string.
29
- #
30
- # @overload setting_path(project_number:, setting_name:)
31
- # The resource will be in the following format:
32
- #
33
- # `projects/{project_number}/settings/{setting_name}`
34
- #
35
- # @param project_number [String]
36
- # @param setting_name [String]
37
- #
38
- # @overload setting_path(folder:, setting_name:)
39
- # The resource will be in the following format:
40
- #
41
- # `folders/{folder}/settings/{setting_name}`
42
- #
43
- # @param folder [String]
44
- # @param setting_name [String]
45
- #
46
- # @overload setting_path(organization:, setting_name:)
47
- # The resource will be in the following format:
48
- #
49
- # `organizations/{organization}/settings/{setting_name}`
50
- #
51
- # @param organization [String]
52
- # @param setting_name [String]
53
- #
54
- # @return [::String]
55
- def setting_path **args
56
- resources = {
57
- "project_number:setting_name" => (proc do |project_number:, setting_name:|
58
- raise ::ArgumentError, "project_number cannot contain /" if project_number.to_s.include? "/"
59
-
60
- "projects/#{project_number}/settings/#{setting_name}"
61
- end),
62
- "folder:setting_name" => (proc do |folder:, setting_name:|
63
- raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
64
-
65
- "folders/#{folder}/settings/#{setting_name}"
66
- end),
67
- "organization:setting_name" => (proc do |organization:, setting_name:|
68
- raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
69
-
70
- "organizations/#{organization}/settings/#{setting_name}"
71
- end)
72
- }
73
-
74
- resource = resources[args.keys.sort.join(":")]
75
- raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
76
- resource.call(**args)
77
- end
78
-
79
- extend self
80
- end
81
- end
82
- end
83
- end
84
- end
85
- end