google-cloud-bigquery-data_policies-v1beta1 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,222 @@
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
+ # A simple descriptor of a resource type.
23
+ #
24
+ # ResourceDescriptor annotates a resource message (either by means of a
25
+ # protobuf annotation or use in the service config), and associates the
26
+ # resource's schema, the resource type, and the pattern of the resource name.
27
+ #
28
+ # Example:
29
+ #
30
+ # message Topic {
31
+ # // Indicates this message defines a resource schema.
32
+ # // Declares the resource type in the format of {service}/{kind}.
33
+ # // For Kubernetes resources, the format is {api group}/{kind}.
34
+ # option (google.api.resource) = {
35
+ # type: "pubsub.googleapis.com/Topic"
36
+ # pattern: "projects/{project}/topics/{topic}"
37
+ # };
38
+ # }
39
+ #
40
+ # The ResourceDescriptor Yaml config will look like:
41
+ #
42
+ # resources:
43
+ # - type: "pubsub.googleapis.com/Topic"
44
+ # pattern: "projects/{project}/topics/{topic}"
45
+ #
46
+ # Sometimes, resources have multiple patterns, typically because they can
47
+ # live under multiple parents.
48
+ #
49
+ # Example:
50
+ #
51
+ # message LogEntry {
52
+ # option (google.api.resource) = {
53
+ # type: "logging.googleapis.com/LogEntry"
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
58
+ # };
59
+ # }
60
+ #
61
+ # The ResourceDescriptor Yaml config will look like:
62
+ #
63
+ # resources:
64
+ # - type: 'logging.googleapis.com/LogEntry'
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
69
+ # @!attribute [rw] type
70
+ # @return [::String]
71
+ # The resource type. It must be in the format of
72
+ # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
73
+ # singular and must not include version numbers.
74
+ #
75
+ # Example: `storage.googleapis.com/Bucket`
76
+ #
77
+ # The value of the resource_type_kind must follow the regular expression
78
+ # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
79
+ # should use PascalCase (UpperCamelCase). The maximum number of
80
+ # characters allowed for the `resource_type_kind` is 100.
81
+ # @!attribute [rw] pattern
82
+ # @return [::Array<::String>]
83
+ # Optional. The relative resource name pattern associated with this resource
84
+ # type. The DNS prefix of the full resource name shouldn't be specified here.
85
+ #
86
+ # The path pattern must follow the syntax, which aligns with HTTP binding
87
+ # syntax:
88
+ #
89
+ # Template = Segment { "/" Segment } ;
90
+ # Segment = LITERAL | Variable ;
91
+ # Variable = "{" LITERAL "}" ;
92
+ #
93
+ # Examples:
94
+ #
95
+ # - "projects/\\{project}/topics/\\{topic}"
96
+ # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
97
+ #
98
+ # The components in braces correspond to the IDs for each resource in the
99
+ # hierarchy. It is expected that, if multiple patterns are provided,
100
+ # the same component name (e.g. "project") refers to IDs of the same
101
+ # type of resource.
102
+ # @!attribute [rw] name_field
103
+ # @return [::String]
104
+ # Optional. The field on the resource that designates the resource name
105
+ # field. If omitted, this is assumed to be "name".
106
+ # @!attribute [rw] history
107
+ # @return [::Google::Api::ResourceDescriptor::History]
108
+ # Optional. The historical or future-looking state of the resource pattern.
109
+ #
110
+ # Example:
111
+ #
112
+ # // The InspectTemplate message originally only supported resource
113
+ # // names with organization, and project was added later.
114
+ # message InspectTemplate {
115
+ # option (google.api.resource) = {
116
+ # type: "dlp.googleapis.com/InspectTemplate"
117
+ # pattern:
118
+ # "organizations/{organization}/inspectTemplates/{inspect_template}"
119
+ # pattern: "projects/{project}/inspectTemplates/{inspect_template}"
120
+ # history: ORIGINALLY_SINGLE_PATTERN
121
+ # };
122
+ # }
123
+ # @!attribute [rw] plural
124
+ # @return [::String]
125
+ # The plural name used in the resource name and permission names, such as
126
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
127
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
128
+ # concept of the `plural` field in k8s CRD spec
129
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
130
+ #
131
+ # Note: The plural form is required even for singleton resources. See
132
+ # https://aip.dev/156
133
+ # @!attribute [rw] singular
134
+ # @return [::String]
135
+ # The same concept of the `singular` field in k8s CRD spec
136
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
137
+ # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
138
+ # @!attribute [rw] style
139
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
140
+ # Style flag(s) for this resource.
141
+ # These indicate that a resource is expected to conform to a given
142
+ # style. See the specific style flags for additional information.
143
+ class ResourceDescriptor
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+
147
+ # A description of the historical or future-looking state of the
148
+ # resource pattern.
149
+ module History
150
+ # The "unset" value.
151
+ HISTORY_UNSPECIFIED = 0
152
+
153
+ # The resource originally had one pattern and launched as such, and
154
+ # additional patterns were added later.
155
+ ORIGINALLY_SINGLE_PATTERN = 1
156
+
157
+ # The resource has one pattern, but the API owner expects to add more
158
+ # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
159
+ # that from being necessary once there are multiple patterns.)
160
+ FUTURE_MULTI_PATTERN = 2
161
+ end
162
+
163
+ # A flag representing a specific style that a resource claims to conform to.
164
+ module Style
165
+ # The unspecified value. Do not use.
166
+ STYLE_UNSPECIFIED = 0
167
+
168
+ # This resource is intended to be "declarative-friendly".
169
+ #
170
+ # Declarative-friendly resources must be more strictly consistent, and
171
+ # setting this to true communicates to tools that this resource should
172
+ # adhere to declarative-friendly expectations.
173
+ #
174
+ # Note: This is used by the API linter (linter.aip.dev) to enable
175
+ # additional checks.
176
+ DECLARATIVE_FRIENDLY = 1
177
+ end
178
+ end
179
+
180
+ # Defines a proto annotation that describes a string field that refers to
181
+ # an API resource.
182
+ # @!attribute [rw] type
183
+ # @return [::String]
184
+ # The resource type that the annotated field references.
185
+ #
186
+ # Example:
187
+ #
188
+ # message Subscription {
189
+ # string topic = 2 [(google.api.resource_reference) = {
190
+ # type: "pubsub.googleapis.com/Topic"
191
+ # }];
192
+ # }
193
+ #
194
+ # Occasionally, a field may reference an arbitrary resource. In this case,
195
+ # APIs use the special value * in their resource reference.
196
+ #
197
+ # Example:
198
+ #
199
+ # message GetIamPolicyRequest {
200
+ # string resource = 2 [(google.api.resource_reference) = {
201
+ # type: "*"
202
+ # }];
203
+ # }
204
+ # @!attribute [rw] child_type
205
+ # @return [::String]
206
+ # The resource type of a child collection that the annotated field
207
+ # references. This is useful for annotating the `parent` field that
208
+ # doesn't have a fixed resource type.
209
+ #
210
+ # Example:
211
+ #
212
+ # message ListLogEntriesRequest {
213
+ # string parent = 1 [(google.api.resource_reference) = {
214
+ # child_type: "logging.googleapis.com/LogEntry"
215
+ # };
216
+ # }
217
+ class ResourceReference
218
+ include ::Google::Protobuf::MessageExts
219
+ extend ::Google::Protobuf::MessageExts::ClassMethods
220
+ end
221
+ end
222
+ end
@@ -0,0 +1,195 @@
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 Cloud
22
+ module Bigquery
23
+ module DataPolicies
24
+ module V1beta1
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. The
29
+ # format is `projects/{project_number}/locations/{location_id}`.
30
+ # @!attribute [rw] data_policy
31
+ # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::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::V1beta1::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 DeleteDataPolicy method.
60
+ # @!attribute [rw] name
61
+ # @return [::String]
62
+ # Required. Resource name of the data policy to delete. Format is
63
+ # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
64
+ class DeleteDataPolicyRequest
65
+ include ::Google::Protobuf::MessageExts
66
+ extend ::Google::Protobuf::MessageExts::ClassMethods
67
+ end
68
+
69
+ # Request message for the GetDataPolicy method.
70
+ # @!attribute [rw] name
71
+ # @return [::String]
72
+ # Required. Resource name of the requested data policy. Format is
73
+ # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
74
+ class GetDataPolicyRequest
75
+ include ::Google::Protobuf::MessageExts
76
+ extend ::Google::Protobuf::MessageExts::ClassMethods
77
+ end
78
+
79
+ # Request message for the ListDataPolicies method.
80
+ # @!attribute [rw] parent
81
+ # @return [::String]
82
+ # Required. Resource name of the project for which to list data policies. Format is
83
+ # `projects/{project_number}/locations/{location_id}`.
84
+ # @!attribute [rw] page_size
85
+ # @return [::Integer]
86
+ # The maximum number of data policies to return. Must be a value between 1
87
+ # and 1000.
88
+ # If not set, defaults to 50.
89
+ # @!attribute [rw] page_token
90
+ # @return [::String]
91
+ # The `nextPageToken` value returned from a previous list request, if any. If
92
+ # not set, defaults to an empty string.
93
+ class ListDataPoliciesRequest
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+
98
+ # Response message for the ListDataPolicies method.
99
+ # @!attribute [rw] data_policies
100
+ # @return [::Array<::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy>]
101
+ # Data policies that belong to the requested project.
102
+ # @!attribute [rw] next_page_token
103
+ # @return [::String]
104
+ # Token used to retrieve the next page of results, or empty if there are no
105
+ # more results.
106
+ class ListDataPoliciesResponse
107
+ include ::Google::Protobuf::MessageExts
108
+ extend ::Google::Protobuf::MessageExts::ClassMethods
109
+ end
110
+
111
+ # Represents the label-policy binding.
112
+ # @!attribute [rw] policy_tag
113
+ # @return [::String]
114
+ # Policy tag resource name, in the format of
115
+ # `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`.
116
+ # @!attribute [rw] data_masking_policy
117
+ # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataMaskingPolicy]
118
+ # The data masking policy that specifies the data masking rule to use.
119
+ # @!attribute [r] name
120
+ # @return [::String]
121
+ # Output only. Resource name of this data policy, in the format of
122
+ # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
123
+ # @!attribute [rw] data_policy_type
124
+ # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy::DataPolicyType]
125
+ # Type of data policy.
126
+ # @!attribute [rw] data_policy_id
127
+ # @return [::String]
128
+ # User-assigned (human readable) ID of the data policy that needs to be
129
+ # unique within a project. Used as \\{data_policy_id} in part of the resource
130
+ # name.
131
+ class DataPolicy
132
+ include ::Google::Protobuf::MessageExts
133
+ extend ::Google::Protobuf::MessageExts::ClassMethods
134
+
135
+ # A list of supported data policy types.
136
+ module DataPolicyType
137
+ # Default value for the data policy type. This should not be used.
138
+ DATA_POLICY_TYPE_UNSPECIFIED = 0
139
+
140
+ # Used to create a data policy for column-level security, without data
141
+ # masking.
142
+ COLUMN_LEVEL_SECURITY_POLICY = 3
143
+
144
+ # Used to create a data policy for data masking.
145
+ DATA_MASKING_POLICY = 2
146
+ end
147
+ end
148
+
149
+ # The data masking policy that is used to specify data masking rule.
150
+ # @!attribute [rw] predefined_expression
151
+ # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataMaskingPolicy::PredefinedExpression]
152
+ # A predefined masking expression.
153
+ class DataMaskingPolicy
154
+ include ::Google::Protobuf::MessageExts
155
+ extend ::Google::Protobuf::MessageExts::ClassMethods
156
+
157
+ # The available masking rules. Learn more here:
158
+ # https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options.
159
+ module PredefinedExpression
160
+ # Default, unspecified predefined expression. No masking will take place
161
+ # since no expression is specified.
162
+ PREDEFINED_EXPRESSION_UNSPECIFIED = 0
163
+
164
+ # Masking expression to replace data with SHA-256 hash.
165
+ SHA256 = 3
166
+
167
+ # Masking expression to replace data with NULLs.
168
+ ALWAYS_NULL = 5
169
+
170
+ # Masking expression to replace data with their default masking values.
171
+ # The default masking values for each type listed as below:
172
+ #
173
+ # * STRING: ""
174
+ # * BYTES: b''
175
+ # * INTEGER: 0
176
+ # * FLOAT: 0.0
177
+ # * NUMERIC: 0
178
+ # * BOOLEAN: FALSE
179
+ # * TIMESTAMP: 0001-01-01 00:00:00 UTC
180
+ # * DATE: 0001-01-01
181
+ # * TIME: 00:00:00
182
+ # * DATETIME: 0001-01-01T00:00:00
183
+ # * GEOGRAPHY: POINT(0 0)
184
+ # * BIGNUMERIC: 0
185
+ # * ARRAY: []
186
+ # * STRUCT: NOT_APPLICABLE
187
+ # * JSON: NULL
188
+ DEFAULT_MASKING_VALUE = 7
189
+ end
190
+ end
191
+ end
192
+ end
193
+ end
194
+ end
195
+ end
@@ -0,0 +1,87 @@
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
+ # 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 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
+ # 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