google-cloud-policy_simulator-v1 1.3.0 → 1.4.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/AUTHENTICATION.md +4 -4
- data/README.md +4 -4
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/client.rb +848 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials.rb +47 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/operations.rb +813 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/paths.rb +138 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/client.rb +794 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/operations.rb +998 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/service_stub.rb +326 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest.rb +63 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service.rb +66 -0
- data/lib/google/cloud/policy_simulator/v1/rest.rb +2 -1
- data/lib/google/cloud/policy_simulator/v1/simulator/rest/operations.rb +42 -0
- data/lib/google/cloud/policy_simulator/v1/version.rb +1 -1
- data/lib/google/cloud/policy_simulator/v1.rb +3 -2
- data/lib/google/cloud/policysimulator/v1/explanations_pb.rb +1 -1
- data/lib/google/cloud/policysimulator/v1/orgpolicy_pb.rb +70 -0
- data/lib/google/cloud/policysimulator/v1/orgpolicy_services_pb.rb +76 -0
- data/lib/google/cloud/policysimulator/v1/simulator_pb.rb +1 -1
- data/proto_docs/google/cloud/orgpolicy/v2/constraint.rb +370 -0
- data/proto_docs/google/cloud/orgpolicy/v2/orgpolicy.rb +454 -0
- data/proto_docs/google/cloud/policysimulator/v1/explanations.rb +3 -3
- data/proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb +380 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +108 -0
- metadata +32 -2
@@ -0,0 +1,138 @@
|
|
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 PolicySimulator
|
23
|
+
module V1
|
24
|
+
module OrgPolicyViolationsPreviewService
|
25
|
+
# Path helper methods for the OrgPolicyViolationsPreviewService API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified CustomConstraint resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `organizations/{organization}/customConstraints/{custom_constraint}`
|
33
|
+
#
|
34
|
+
# @param organization [String]
|
35
|
+
# @param custom_constraint [String]
|
36
|
+
#
|
37
|
+
# @return [::String]
|
38
|
+
def custom_constraint_path organization:, custom_constraint:
|
39
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
40
|
+
|
41
|
+
"organizations/#{organization}/customConstraints/#{custom_constraint}"
|
42
|
+
end
|
43
|
+
|
44
|
+
##
|
45
|
+
# Create a fully-qualified OrgPolicyViolationsPreview resource string.
|
46
|
+
#
|
47
|
+
# The resource will be in the following format:
|
48
|
+
#
|
49
|
+
# `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{org_policy_violations_preview}`
|
50
|
+
#
|
51
|
+
# @param organization [String]
|
52
|
+
# @param location [String]
|
53
|
+
# @param org_policy_violations_preview [String]
|
54
|
+
#
|
55
|
+
# @return [::String]
|
56
|
+
def org_policy_violations_preview_path organization:, location:, org_policy_violations_preview:
|
57
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
58
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
59
|
+
|
60
|
+
"organizations/#{organization}/locations/#{location}/orgPolicyViolationsPreviews/#{org_policy_violations_preview}"
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Create a fully-qualified OrganizationLocation resource string.
|
65
|
+
#
|
66
|
+
# The resource will be in the following format:
|
67
|
+
#
|
68
|
+
# `organizations/{organization}/locations/{location}`
|
69
|
+
#
|
70
|
+
# @param organization [String]
|
71
|
+
# @param location [String]
|
72
|
+
#
|
73
|
+
# @return [::String]
|
74
|
+
def organization_location_path organization:, location:
|
75
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
76
|
+
|
77
|
+
"organizations/#{organization}/locations/#{location}"
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# Create a fully-qualified Policy resource string.
|
82
|
+
#
|
83
|
+
# @overload policy_path(project:, policy:)
|
84
|
+
# The resource will be in the following format:
|
85
|
+
#
|
86
|
+
# `projects/{project}/policies/{policy}`
|
87
|
+
#
|
88
|
+
# @param project [String]
|
89
|
+
# @param policy [String]
|
90
|
+
#
|
91
|
+
# @overload policy_path(folder:, policy:)
|
92
|
+
# The resource will be in the following format:
|
93
|
+
#
|
94
|
+
# `folders/{folder}/policies/{policy}`
|
95
|
+
#
|
96
|
+
# @param folder [String]
|
97
|
+
# @param policy [String]
|
98
|
+
#
|
99
|
+
# @overload policy_path(organization:, policy:)
|
100
|
+
# The resource will be in the following format:
|
101
|
+
#
|
102
|
+
# `organizations/{organization}/policies/{policy}`
|
103
|
+
#
|
104
|
+
# @param organization [String]
|
105
|
+
# @param policy [String]
|
106
|
+
#
|
107
|
+
# @return [::String]
|
108
|
+
def policy_path **args
|
109
|
+
resources = {
|
110
|
+
"policy:project" => (proc do |project:, policy:|
|
111
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
112
|
+
|
113
|
+
"projects/#{project}/policies/#{policy}"
|
114
|
+
end),
|
115
|
+
"folder:policy" => (proc do |folder:, policy:|
|
116
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
117
|
+
|
118
|
+
"folders/#{folder}/policies/#{policy}"
|
119
|
+
end),
|
120
|
+
"organization:policy" => (proc do |organization:, policy:|
|
121
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
122
|
+
|
123
|
+
"organizations/#{organization}/policies/#{policy}"
|
124
|
+
end)
|
125
|
+
}
|
126
|
+
|
127
|
+
resource = resources[args.keys.sort.join(":")]
|
128
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
129
|
+
resource.call(**args)
|
130
|
+
end
|
131
|
+
|
132
|
+
extend self
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|