google-cloud-bigquery-data_policies-v1 0.1.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 +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/LICENSE.md +201 -0
- data/README.md +144 -0
- data/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/client.rb +1236 -0
- data/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/credentials.rb +50 -0
- data/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/paths.rb +71 -0
- data/lib/google/cloud/bigquery/data_policies/v1/data_policy_service.rb +51 -0
- data/lib/google/cloud/bigquery/data_policies/v1/version.rb +30 -0
- data/lib/google/cloud/bigquery/data_policies/v1.rb +42 -0
- data/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_pb.rb +95 -0
- data/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb.rb +65 -0
- data/lib/google-cloud-bigquery-data_policies-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb +217 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
- data/proto_docs/google/iam/v1/options.rb +50 -0
- data/proto_docs/google/iam/v1/policy.rb +418 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +231 -0
@@ -0,0 +1,217 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 Bigquery
|
23
|
+
module DataPolicies
|
24
|
+
module V1
|
25
|
+
# Request message for the CreateDataPolicy method.
|
26
|
+
# @!attribute [rw] parent
|
27
|
+
# @return [::String]
|
28
|
+
# Required. Resource name of the project that the data policy will belong to.
|
29
|
+
# The format is `projects/{project_number}/locations/{location_id}`.
|
30
|
+
# @!attribute [rw] data_policy
|
31
|
+
# @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy]
|
32
|
+
# Required. The data policy to create. The `name` field does not need to be
|
33
|
+
# provided for the data policy creation.
|
34
|
+
class CreateDataPolicyRequest
|
35
|
+
include ::Google::Protobuf::MessageExts
|
36
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
37
|
+
end
|
38
|
+
|
39
|
+
# Response message for the UpdateDataPolicy method.
|
40
|
+
# @!attribute [rw] data_policy
|
41
|
+
# @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy]
|
42
|
+
# Required. Update the data policy's metadata.
|
43
|
+
#
|
44
|
+
# The target data policy is determined by the `name` field.
|
45
|
+
# Other fields are updated to the specified values based on the field masks.
|
46
|
+
# @!attribute [rw] update_mask
|
47
|
+
# @return [::Google::Protobuf::FieldMask]
|
48
|
+
# The update mask applies to the resource. For the `FieldMask` definition,
|
49
|
+
# see
|
50
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
51
|
+
# If not set, defaults to all of the fields that are allowed to update.
|
52
|
+
#
|
53
|
+
# Updates to the `name` and `dataPolicyId` fields are not allowed.
|
54
|
+
class UpdateDataPolicyRequest
|
55
|
+
include ::Google::Protobuf::MessageExts
|
56
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
57
|
+
end
|
58
|
+
|
59
|
+
# Request message for the RenameDataPolicy method.
|
60
|
+
# @!attribute [rw] name
|
61
|
+
# @return [::String]
|
62
|
+
# Required. Resource name of the data policy to rename. The format is
|
63
|
+
# `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`
|
64
|
+
# @!attribute [rw] new_data_policy_id
|
65
|
+
# @return [::String]
|
66
|
+
# Required. The new data policy id.
|
67
|
+
class RenameDataPolicyRequest
|
68
|
+
include ::Google::Protobuf::MessageExts
|
69
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
70
|
+
end
|
71
|
+
|
72
|
+
# Request message for the DeleteDataPolicy method.
|
73
|
+
# @!attribute [rw] name
|
74
|
+
# @return [::String]
|
75
|
+
# Required. Resource name of the data policy to delete. Format is
|
76
|
+
# `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
|
77
|
+
class DeleteDataPolicyRequest
|
78
|
+
include ::Google::Protobuf::MessageExts
|
79
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
80
|
+
end
|
81
|
+
|
82
|
+
# Request message for the GetDataPolicy method.
|
83
|
+
# @!attribute [rw] name
|
84
|
+
# @return [::String]
|
85
|
+
# Required. Resource name of the requested data policy. Format is
|
86
|
+
# `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
|
87
|
+
class GetDataPolicyRequest
|
88
|
+
include ::Google::Protobuf::MessageExts
|
89
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
90
|
+
end
|
91
|
+
|
92
|
+
# Request message for the ListDataPolicies method.
|
93
|
+
# @!attribute [rw] parent
|
94
|
+
# @return [::String]
|
95
|
+
# Required. Resource name of the project for which to list data policies.
|
96
|
+
# Format is `projects/{project_number}/locations/{location_id}`.
|
97
|
+
# @!attribute [rw] page_size
|
98
|
+
# @return [::Integer]
|
99
|
+
# The maximum number of data policies to return. Must be a value between 1
|
100
|
+
# and 1000.
|
101
|
+
# If not set, defaults to 50.
|
102
|
+
# @!attribute [rw] page_token
|
103
|
+
# @return [::String]
|
104
|
+
# The `nextPageToken` value returned from a previous list request, if any. If
|
105
|
+
# not set, defaults to an empty string.
|
106
|
+
# @!attribute [rw] filter
|
107
|
+
# @return [::String]
|
108
|
+
# Filters the data policies by policy tags that they
|
109
|
+
# are associated with. Currently filter only supports
|
110
|
+
# "policy<span></span>_tag" based filtering and OR based predicates. Sample
|
111
|
+
# filter can be "policy<span></span>_tag:
|
112
|
+
# `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use
|
113
|
+
# wildcard such as "policy<span></span>_tag:
|
114
|
+
# `'projects/1/locations/us/taxonomies/2/*'`".
|
115
|
+
class ListDataPoliciesRequest
|
116
|
+
include ::Google::Protobuf::MessageExts
|
117
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
118
|
+
end
|
119
|
+
|
120
|
+
# Response message for the ListDataPolicies method.
|
121
|
+
# @!attribute [rw] data_policies
|
122
|
+
# @return [::Array<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>]
|
123
|
+
# Data policies that belong to the requested project.
|
124
|
+
# @!attribute [rw] next_page_token
|
125
|
+
# @return [::String]
|
126
|
+
# Token used to retrieve the next page of results, or empty if there are no
|
127
|
+
# more results.
|
128
|
+
class ListDataPoliciesResponse
|
129
|
+
include ::Google::Protobuf::MessageExts
|
130
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
131
|
+
end
|
132
|
+
|
133
|
+
# Represents the label-policy binding.
|
134
|
+
# @!attribute [rw] policy_tag
|
135
|
+
# @return [::String]
|
136
|
+
# Policy tag resource name, in the format of
|
137
|
+
# `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`.
|
138
|
+
# @!attribute [rw] data_masking_policy
|
139
|
+
# @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy]
|
140
|
+
# The data masking policy that specifies the data masking rule to use.
|
141
|
+
# @!attribute [r] name
|
142
|
+
# @return [::String]
|
143
|
+
# Output only. Resource name of this data policy, in the format of
|
144
|
+
# `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
|
145
|
+
# @!attribute [rw] data_policy_type
|
146
|
+
# @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy::DataPolicyType]
|
147
|
+
# Type of data policy.
|
148
|
+
# @!attribute [rw] data_policy_id
|
149
|
+
# @return [::String]
|
150
|
+
# User-assigned (human readable) ID of the data policy that needs to be
|
151
|
+
# unique within a project. Used as \\{data_policy_id} in part of the resource
|
152
|
+
# name.
|
153
|
+
class DataPolicy
|
154
|
+
include ::Google::Protobuf::MessageExts
|
155
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
156
|
+
|
157
|
+
# A list of supported data policy types.
|
158
|
+
module DataPolicyType
|
159
|
+
# Default value for the data policy type. This should not be used.
|
160
|
+
DATA_POLICY_TYPE_UNSPECIFIED = 0
|
161
|
+
|
162
|
+
# Used to create a data policy for column-level security, without data
|
163
|
+
# masking.
|
164
|
+
COLUMN_LEVEL_SECURITY_POLICY = 3
|
165
|
+
|
166
|
+
# Used to create a data policy for data masking.
|
167
|
+
DATA_MASKING_POLICY = 2
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# The data masking policy that is used to specify data masking rule.
|
172
|
+
# @!attribute [rw] predefined_expression
|
173
|
+
# @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression]
|
174
|
+
# A predefined masking expression.
|
175
|
+
class DataMaskingPolicy
|
176
|
+
include ::Google::Protobuf::MessageExts
|
177
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
178
|
+
|
179
|
+
# The available masking rules. Learn more here:
|
180
|
+
# https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options.
|
181
|
+
module PredefinedExpression
|
182
|
+
# Default, unspecified predefined expression. No masking will take place
|
183
|
+
# since no expression is specified.
|
184
|
+
PREDEFINED_EXPRESSION_UNSPECIFIED = 0
|
185
|
+
|
186
|
+
# Masking expression to replace data with SHA-256 hash.
|
187
|
+
SHA256 = 3
|
188
|
+
|
189
|
+
# Masking expression to replace data with NULLs.
|
190
|
+
ALWAYS_NULL = 5
|
191
|
+
|
192
|
+
# Masking expression to replace data with their default masking values.
|
193
|
+
# The default masking values for each type listed as below:
|
194
|
+
#
|
195
|
+
# * STRING: ""
|
196
|
+
# * BYTES: b''
|
197
|
+
# * INTEGER: 0
|
198
|
+
# * FLOAT: 0.0
|
199
|
+
# * NUMERIC: 0
|
200
|
+
# * BOOLEAN: FALSE
|
201
|
+
# * TIMESTAMP: 0001-01-01 00:00:00 UTC
|
202
|
+
# * DATE: 0001-01-01
|
203
|
+
# * TIME: 00:00:00
|
204
|
+
# * DATETIME: 0001-01-01T00:00:00
|
205
|
+
# * GEOGRAPHY: POINT(0 0)
|
206
|
+
# * BIGNUMERIC: 0
|
207
|
+
# * ARRAY: []
|
208
|
+
# * STRUCT: NOT_APPLICABLE
|
209
|
+
# * JSON: NULL
|
210
|
+
DEFAULT_MASKING_VALUE = 7
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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
|
+
# Request message for `SetIamPolicy` method.
|
24
|
+
# @!attribute [rw] resource
|
25
|
+
# @return [::String]
|
26
|
+
# REQUIRED: The resource for which the policy is being specified.
|
27
|
+
# See the operation documentation for the appropriate value for this field.
|
28
|
+
# @!attribute [rw] policy
|
29
|
+
# @return [::Google::Iam::V1::Policy]
|
30
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
31
|
+
# the policy is limited to a few 10s of KB. An empty policy is a
|
32
|
+
# valid policy but certain Cloud Platform services (such as Projects)
|
33
|
+
# might reject them.
|
34
|
+
# @!attribute [rw] update_mask
|
35
|
+
# @return [::Google::Protobuf::FieldMask]
|
36
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
37
|
+
# the fields in the mask will be modified. If no mask is provided, the
|
38
|
+
# following default mask is used:
|
39
|
+
#
|
40
|
+
# `paths: "bindings, etag"`
|
41
|
+
class SetIamPolicyRequest
|
42
|
+
include ::Google::Protobuf::MessageExts
|
43
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
44
|
+
end
|
45
|
+
|
46
|
+
# Request message for `GetIamPolicy` method.
|
47
|
+
# @!attribute [rw] resource
|
48
|
+
# @return [::String]
|
49
|
+
# REQUIRED: The resource for which the policy is being requested.
|
50
|
+
# See the operation documentation for the appropriate value for this field.
|
51
|
+
# @!attribute [rw] options
|
52
|
+
# @return [::Google::Iam::V1::GetPolicyOptions]
|
53
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
54
|
+
# `GetIamPolicy`.
|
55
|
+
class GetIamPolicyRequest
|
56
|
+
include ::Google::Protobuf::MessageExts
|
57
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
58
|
+
end
|
59
|
+
|
60
|
+
# Request message for `TestIamPermissions` method.
|
61
|
+
# @!attribute [rw] resource
|
62
|
+
# @return [::String]
|
63
|
+
# REQUIRED: The resource for which the policy detail is being requested.
|
64
|
+
# See the operation documentation for the appropriate value for this field.
|
65
|
+
# @!attribute [rw] permissions
|
66
|
+
# @return [::Array<::String>]
|
67
|
+
# The set of permissions to check for the `resource`. Permissions with
|
68
|
+
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
69
|
+
# information see
|
70
|
+
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
71
|
+
class TestIamPermissionsRequest
|
72
|
+
include ::Google::Protobuf::MessageExts
|
73
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
74
|
+
end
|
75
|
+
|
76
|
+
# Response message for `TestIamPermissions` method.
|
77
|
+
# @!attribute [rw] permissions
|
78
|
+
# @return [::Array<::String>]
|
79
|
+
# A subset of `TestPermissionsRequest.permissions` that the caller is
|
80
|
+
# allowed.
|
81
|
+
class TestIamPermissionsResponse
|
82
|
+
include ::Google::Protobuf::MessageExts
|
83
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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
|
+
# Encapsulates settings provided to GetIamPolicy.
|
24
|
+
# @!attribute [rw] requested_policy_version
|
25
|
+
# @return [::Integer]
|
26
|
+
# Optional. The maximum policy version that will be used to format the
|
27
|
+
# policy.
|
28
|
+
#
|
29
|
+
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
30
|
+
# rejected.
|
31
|
+
#
|
32
|
+
# Requests for policies with any conditional role bindings must specify
|
33
|
+
# version 3. Policies with no conditional role bindings may specify any valid
|
34
|
+
# value or leave the field unset.
|
35
|
+
#
|
36
|
+
# The policy in the response might use the policy version that you specified,
|
37
|
+
# or it might use a lower policy version. For example, if you specify version
|
38
|
+
# 3, but the policy has no conditional role bindings, the response uses
|
39
|
+
# version 1.
|
40
|
+
#
|
41
|
+
# To learn which resources support conditions in their IAM policies, see the
|
42
|
+
# [IAM
|
43
|
+
# documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
44
|
+
class GetPolicyOptions
|
45
|
+
include ::Google::Protobuf::MessageExts
|
46
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|