google-iam-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/iam/v1/version"
24
+
25
+ require "google/iam/v1/iam_policy/credentials"
26
+ require "google/iam/v1/iam_policy/client"
27
+
28
+ module Google
29
+ module Iam
30
+ module V1
31
+ ##
32
+ # API Overview
33
+ #
34
+ #
35
+ # Manages Identity and Access Management (IAM) policies.
36
+ #
37
+ # Any implementation of an API that offers access control features
38
+ # implements the google.iam.v1.IAMPolicy interface.
39
+ #
40
+ # ## Data model
41
+ #
42
+ # Access control is applied when a principal (user or service account), takes
43
+ # some action on a resource exposed by a service. Resources, identified by
44
+ # URI-like names, are the unit of access control specification. Service
45
+ # implementations can choose the granularity of access control and the
46
+ # supported permissions for their resources.
47
+ # For example one database service may allow access control to be
48
+ # specified only at the Table level, whereas another might allow access control
49
+ # to also be specified at the Column level.
50
+ #
51
+ # ## Policy Structure
52
+ #
53
+ # See google.iam.v1.Policy
54
+ #
55
+ # This is intentionally not a CRUD style API because access control policies
56
+ # are created and deleted implicitly with the resources to which they are
57
+ # attached.
58
+ #
59
+ # To load this service and instantiate a client:
60
+ #
61
+ # require "google/iam/v1/iam_policy"
62
+ # client = ::Google::Iam::V1::IAMPolicy::Client.new
63
+ #
64
+ module IAMPolicy
65
+ end
66
+ end
67
+ end
68
+ end
69
+
70
+ helper_path = ::File.join __dir__, "iam_policy", "helpers.rb"
71
+ require "google/iam/v1/iam_policy/helpers" if ::File.file? helper_path
@@ -0,0 +1,44 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/iam/v1/iam_policy.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/iam/v1/options_pb'
11
+ require 'google/iam/v1/policy_pb'
12
+ require 'google/protobuf/field_mask_pb'
13
+
14
+ Google::Protobuf::DescriptorPool.generated_pool.build do
15
+ add_file("google/iam/v1/iam_policy.proto", :syntax => :proto3) do
16
+ add_message "google.iam.v1.SetIamPolicyRequest" do
17
+ optional :resource, :string, 1
18
+ optional :policy, :message, 2, "google.iam.v1.Policy"
19
+ optional :update_mask, :message, 3, "google.protobuf.FieldMask"
20
+ end
21
+ add_message "google.iam.v1.GetIamPolicyRequest" do
22
+ optional :resource, :string, 1
23
+ optional :options, :message, 2, "google.iam.v1.GetPolicyOptions"
24
+ end
25
+ add_message "google.iam.v1.TestIamPermissionsRequest" do
26
+ optional :resource, :string, 1
27
+ repeated :permissions, :string, 2
28
+ end
29
+ add_message "google.iam.v1.TestIamPermissionsResponse" do
30
+ repeated :permissions, :string, 1
31
+ end
32
+ end
33
+ end
34
+
35
+ module Google
36
+ module Iam
37
+ module V1
38
+ SetIamPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.SetIamPolicyRequest").msgclass
39
+ GetIamPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.GetIamPolicyRequest").msgclass
40
+ TestIamPermissionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.TestIamPermissionsRequest").msgclass
41
+ TestIamPermissionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.TestIamPermissionsResponse").msgclass
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,83 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/iam/v1/iam_policy.proto for package 'google.iam.v1'
3
+ # Original file comments:
4
+ # Copyright 2022 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/iam/v1/iam_policy_pb'
21
+
22
+ module Google
23
+ module Iam
24
+ module V1
25
+ module IAMPolicy
26
+ # API Overview
27
+ #
28
+ #
29
+ # Manages Identity and Access Management (IAM) policies.
30
+ #
31
+ # Any implementation of an API that offers access control features
32
+ # implements the google.iam.v1.IAMPolicy interface.
33
+ #
34
+ # ## Data model
35
+ #
36
+ # Access control is applied when a principal (user or service account), takes
37
+ # some action on a resource exposed by a service. Resources, identified by
38
+ # URI-like names, are the unit of access control specification. Service
39
+ # implementations can choose the granularity of access control and the
40
+ # supported permissions for their resources.
41
+ # For example one database service may allow access control to be
42
+ # specified only at the Table level, whereas another might allow access control
43
+ # to also be specified at the Column level.
44
+ #
45
+ # ## Policy Structure
46
+ #
47
+ # See google.iam.v1.Policy
48
+ #
49
+ # This is intentionally not a CRUD style API because access control policies
50
+ # are created and deleted implicitly with the resources to which they are
51
+ # attached.
52
+ class Service
53
+
54
+ include ::GRPC::GenericService
55
+
56
+ self.marshal_class_method = :encode
57
+ self.unmarshal_class_method = :decode
58
+ self.service_name = 'google.iam.v1.IAMPolicy'
59
+
60
+ # Sets the access control policy on the specified resource. Replaces any
61
+ # existing policy.
62
+ #
63
+ # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
64
+ rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
65
+ # Gets the access control policy for a resource.
66
+ # Returns an empty policy if the resource exists and does not have a policy
67
+ # set.
68
+ rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
69
+ # Returns permissions that a caller has on the specified resource.
70
+ # If the resource does not exist, this will return an empty set of
71
+ # permissions, not a `NOT_FOUND` error.
72
+ #
73
+ # Note: This operation is designed to be used for building permission-aware
74
+ # UIs and command-line tools, not for authorization checking. This operation
75
+ # may "fail open" without warning.
76
+ rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
77
+ end
78
+
79
+ Stub = Service.rpc_stub_class
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,25 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/iam/v1/logging/audit_data.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/iam/v1/policy_pb'
8
+
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("google/iam/v1/logging/audit_data.proto", :syntax => :proto3) do
11
+ add_message "google.iam.v1.logging.AuditData" do
12
+ optional :policy_delta, :message, 2, "google.iam.v1.PolicyDelta"
13
+ end
14
+ end
15
+ end
16
+
17
+ module Google
18
+ module Iam
19
+ module V1
20
+ module Logging
21
+ AuditData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.logging.AuditData").msgclass
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,20 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/iam/v1/options.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("google/iam/v1/options.proto", :syntax => :proto3) do
8
+ add_message "google.iam.v1.GetPolicyOptions" do
9
+ optional :requested_policy_version, :int32, 1
10
+ end
11
+ end
12
+ end
13
+
14
+ module Google
15
+ module Iam
16
+ module V1
17
+ GetPolicyOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.GetPolicyOptions").msgclass
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,79 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/iam/v1/policy.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/type/expr_pb'
7
+
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("google/iam/v1/policy.proto", :syntax => :proto3) do
10
+ add_message "google.iam.v1.Policy" do
11
+ optional :version, :int32, 1
12
+ repeated :bindings, :message, 4, "google.iam.v1.Binding"
13
+ repeated :audit_configs, :message, 6, "google.iam.v1.AuditConfig"
14
+ optional :etag, :bytes, 3
15
+ end
16
+ add_message "google.iam.v1.Binding" do
17
+ optional :role, :string, 1
18
+ repeated :members, :string, 2
19
+ optional :condition, :message, 3, "google.type.Expr"
20
+ end
21
+ add_message "google.iam.v1.AuditConfig" do
22
+ optional :service, :string, 1
23
+ repeated :audit_log_configs, :message, 3, "google.iam.v1.AuditLogConfig"
24
+ end
25
+ add_message "google.iam.v1.AuditLogConfig" do
26
+ optional :log_type, :enum, 1, "google.iam.v1.AuditLogConfig.LogType"
27
+ repeated :exempted_members, :string, 2
28
+ end
29
+ add_enum "google.iam.v1.AuditLogConfig.LogType" do
30
+ value :LOG_TYPE_UNSPECIFIED, 0
31
+ value :ADMIN_READ, 1
32
+ value :DATA_WRITE, 2
33
+ value :DATA_READ, 3
34
+ end
35
+ add_message "google.iam.v1.PolicyDelta" do
36
+ repeated :binding_deltas, :message, 1, "google.iam.v1.BindingDelta"
37
+ repeated :audit_config_deltas, :message, 2, "google.iam.v1.AuditConfigDelta"
38
+ end
39
+ add_message "google.iam.v1.BindingDelta" do
40
+ optional :action, :enum, 1, "google.iam.v1.BindingDelta.Action"
41
+ optional :role, :string, 2
42
+ optional :member, :string, 3
43
+ optional :condition, :message, 4, "google.type.Expr"
44
+ end
45
+ add_enum "google.iam.v1.BindingDelta.Action" do
46
+ value :ACTION_UNSPECIFIED, 0
47
+ value :ADD, 1
48
+ value :REMOVE, 2
49
+ end
50
+ add_message "google.iam.v1.AuditConfigDelta" do
51
+ optional :action, :enum, 1, "google.iam.v1.AuditConfigDelta.Action"
52
+ optional :service, :string, 2
53
+ optional :exempted_member, :string, 3
54
+ optional :log_type, :string, 4
55
+ end
56
+ add_enum "google.iam.v1.AuditConfigDelta.Action" do
57
+ value :ACTION_UNSPECIFIED, 0
58
+ value :ADD, 1
59
+ value :REMOVE, 2
60
+ end
61
+ end
62
+ end
63
+
64
+ module Google
65
+ module Iam
66
+ module V1
67
+ Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.Policy").msgclass
68
+ Binding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.Binding").msgclass
69
+ AuditConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.AuditConfig").msgclass
70
+ AuditLogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.AuditLogConfig").msgclass
71
+ AuditLogConfig::LogType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.AuditLogConfig.LogType").enummodule
72
+ PolicyDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.PolicyDelta").msgclass
73
+ BindingDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.BindingDelta").msgclass
74
+ BindingDelta::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.BindingDelta.Action").enummodule
75
+ AuditConfigDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.AuditConfigDelta").msgclass
76
+ AuditConfigDelta::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.AuditConfigDelta.Action").enummodule
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 Iam
22
+ module V1
23
+ VERSION = "0.1.0"
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 "google/iam/v1/iam_policy"
20
+ require "google/iam/v1/version"
21
+
22
+ module Google
23
+ module Iam
24
+ ##
25
+ # To load this package, including all its services, and instantiate a client:
26
+ #
27
+ # @example
28
+ #
29
+ # require "google/iam/v1"
30
+ # client = ::Google::Iam::V1::IAMPolicy::Client.new
31
+ #
32
+ module V1
33
+ end
34
+ end
35
+ end
36
+
37
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
38
+ require "google/iam/v1/_helpers" if ::File.file? helper_path
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/iam/v1"
@@ -0,0 +1,4 @@
1
+ # IAM Protocol Buffer Documentation
2
+
3
+ These files are for the YARD documentation of the generated protobuf files.
4
+ They are not intended to be required or loaded at runtime.
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 Api
22
+ # An indicator of the behavior of a given field (for example, that a field
23
+ # is required in requests, or given as output but ignored as input).
24
+ # This **does not** change the behavior in protocol buffers itself; it only
25
+ # denotes the behavior and may affect how API tooling handles the field.
26
+ #
27
+ # Note: This enum **may** receive new values in the future.
28
+ module FieldBehavior
29
+ # Conventional default for enums. Do not use this.
30
+ FIELD_BEHAVIOR_UNSPECIFIED = 0
31
+
32
+ # Specifically denotes a field as optional.
33
+ # While all fields in protocol buffers are optional, this may be specified
34
+ # for emphasis if appropriate.
35
+ OPTIONAL = 1
36
+
37
+ # Denotes a field as required.
38
+ # This indicates that the field **must** be provided as part of the request,
39
+ # and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
40
+ REQUIRED = 2
41
+
42
+ # Denotes a field as output only.
43
+ # This indicates that the field is provided in responses, but including the
44
+ # field in a request does nothing (the server *must* ignore it and
45
+ # *must not* throw an error as a result of the field's presence).
46
+ OUTPUT_ONLY = 3
47
+
48
+ # Denotes a field as input only.
49
+ # This indicates that the field is provided in requests, and the
50
+ # corresponding field is not included in output.
51
+ INPUT_ONLY = 4
52
+
53
+ # Denotes a field as immutable.
54
+ # This indicates that the field may be set once in a request to create a
55
+ # resource, but may not be changed thereafter.
56
+ IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
69
+ end
70
+ end
71
+ end