google_cloud_bigquery_datapolicies_v2/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate iam_v1;
25extern crate lazy_static;
26extern crate reqwest;
27extern crate serde;
28extern crate serde_json;
29extern crate serde_with;
30extern crate std;
31extern crate tracing;
32extern crate wkt;
33
34mod debug;
35mod deserialize;
36mod serialize;
37
38/// Request message for the CreateDataPolicy method.
39#[derive(Clone, Default, PartialEq)]
40#[non_exhaustive]
41pub struct CreateDataPolicyRequest {
42    /// Required. Resource name of the project that the data policy will belong to.
43    /// The format is `projects/{project_number}/locations/{location_id}`.
44    pub parent: std::string::String,
45
46    /// Required. User-assigned (human readable) ID of the data policy that needs
47    /// to be unique within a project. Used as {data_policy_id} in part of the
48    /// resource name.
49    pub data_policy_id: std::string::String,
50
51    /// Required. The data policy to create. The `name` field does not need to be
52    /// provided for the data policy creation.
53    pub data_policy: std::option::Option<crate::model::DataPolicy>,
54
55    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56}
57
58impl CreateDataPolicyRequest {
59    pub fn new() -> Self {
60        std::default::Default::default()
61    }
62
63    /// Sets the value of [parent][crate::model::CreateDataPolicyRequest::parent].
64    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
65        self.parent = v.into();
66        self
67    }
68
69    /// Sets the value of [data_policy_id][crate::model::CreateDataPolicyRequest::data_policy_id].
70    pub fn set_data_policy_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71        self.data_policy_id = v.into();
72        self
73    }
74
75    /// Sets the value of [data_policy][crate::model::CreateDataPolicyRequest::data_policy].
76    pub fn set_data_policy<T>(mut self, v: T) -> Self
77    where
78        T: std::convert::Into<crate::model::DataPolicy>,
79    {
80        self.data_policy = std::option::Option::Some(v.into());
81        self
82    }
83
84    /// Sets or clears the value of [data_policy][crate::model::CreateDataPolicyRequest::data_policy].
85    pub fn set_or_clear_data_policy<T>(mut self, v: std::option::Option<T>) -> Self
86    where
87        T: std::convert::Into<crate::model::DataPolicy>,
88    {
89        self.data_policy = v.map(|x| x.into());
90        self
91    }
92}
93
94impl wkt::message::Message for CreateDataPolicyRequest {
95    fn typename() -> &'static str {
96        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.CreateDataPolicyRequest"
97    }
98}
99
100/// Request message for the UpdateDataPolicy method.
101#[derive(Clone, Default, PartialEq)]
102#[non_exhaustive]
103pub struct UpdateDataPolicyRequest {
104    /// Required. Update the data policy's metadata.
105    ///
106    /// The target data policy is determined by the `name` field.
107    /// Other fields are updated to the specified values based on the field masks.
108    pub data_policy: std::option::Option<crate::model::DataPolicy>,
109
110    /// Optional. The update mask applies to the resource. For the `FieldMask`
111    /// definition, see
112    /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>
113    /// If not set, defaults to all of the fields that are allowed to update.
114    ///
115    /// Updates to the `name` and `dataPolicyId` fields are not allowed.
116    pub update_mask: std::option::Option<wkt::FieldMask>,
117
118    /// Optional. If set to true, and the data policy is not found, a new data
119    /// policy will be created. In this situation, update_mask is ignored.
120    pub allow_missing: bool,
121
122    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
123}
124
125impl UpdateDataPolicyRequest {
126    pub fn new() -> Self {
127        std::default::Default::default()
128    }
129
130    /// Sets the value of [data_policy][crate::model::UpdateDataPolicyRequest::data_policy].
131    pub fn set_data_policy<T>(mut self, v: T) -> Self
132    where
133        T: std::convert::Into<crate::model::DataPolicy>,
134    {
135        self.data_policy = std::option::Option::Some(v.into());
136        self
137    }
138
139    /// Sets or clears the value of [data_policy][crate::model::UpdateDataPolicyRequest::data_policy].
140    pub fn set_or_clear_data_policy<T>(mut self, v: std::option::Option<T>) -> Self
141    where
142        T: std::convert::Into<crate::model::DataPolicy>,
143    {
144        self.data_policy = v.map(|x| x.into());
145        self
146    }
147
148    /// Sets the value of [update_mask][crate::model::UpdateDataPolicyRequest::update_mask].
149    pub fn set_update_mask<T>(mut self, v: T) -> Self
150    where
151        T: std::convert::Into<wkt::FieldMask>,
152    {
153        self.update_mask = std::option::Option::Some(v.into());
154        self
155    }
156
157    /// Sets or clears the value of [update_mask][crate::model::UpdateDataPolicyRequest::update_mask].
158    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
159    where
160        T: std::convert::Into<wkt::FieldMask>,
161    {
162        self.update_mask = v.map(|x| x.into());
163        self
164    }
165
166    /// Sets the value of [allow_missing][crate::model::UpdateDataPolicyRequest::allow_missing].
167    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
168        self.allow_missing = v.into();
169        self
170    }
171}
172
173impl wkt::message::Message for UpdateDataPolicyRequest {
174    fn typename() -> &'static str {
175        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.UpdateDataPolicyRequest"
176    }
177}
178
179/// Request message for the AddGrantees method.
180#[derive(Clone, Default, PartialEq)]
181#[non_exhaustive]
182pub struct AddGranteesRequest {
183    /// Required. Resource name of this data policy, in the format of
184    /// `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
185    pub data_policy: std::string::String,
186
187    /// Required. IAM principal that should be granted Fine Grained Access to the
188    /// underlying data goverened by the data policy. The target data policy is
189    /// determined by the `data_policy` field.
190    ///
191    /// Uses the [IAM V2 principal
192    /// syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2).
193    /// Supported principal types:
194    ///
195    /// * User
196    /// * Group
197    /// * Service account
198    pub grantees: std::vec::Vec<std::string::String>,
199
200    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
201}
202
203impl AddGranteesRequest {
204    pub fn new() -> Self {
205        std::default::Default::default()
206    }
207
208    /// Sets the value of [data_policy][crate::model::AddGranteesRequest::data_policy].
209    pub fn set_data_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
210        self.data_policy = v.into();
211        self
212    }
213
214    /// Sets the value of [grantees][crate::model::AddGranteesRequest::grantees].
215    pub fn set_grantees<T, V>(mut self, v: T) -> Self
216    where
217        T: std::iter::IntoIterator<Item = V>,
218        V: std::convert::Into<std::string::String>,
219    {
220        use std::iter::Iterator;
221        self.grantees = v.into_iter().map(|i| i.into()).collect();
222        self
223    }
224}
225
226impl wkt::message::Message for AddGranteesRequest {
227    fn typename() -> &'static str {
228        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.AddGranteesRequest"
229    }
230}
231
232/// Request message for the RemoveGrantees method.
233#[derive(Clone, Default, PartialEq)]
234#[non_exhaustive]
235pub struct RemoveGranteesRequest {
236    /// Required. Resource name of this data policy, in the format of
237    /// `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
238    pub data_policy: std::string::String,
239
240    /// Required. IAM principal that should be revoked from Fine Grained Access to
241    /// the underlying data goverened by the data policy. The target data policy is
242    /// determined by the `data_policy` field.
243    ///
244    /// Uses the [IAM V2 principal
245    /// syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2).
246    /// Supported principal types:
247    ///
248    /// * User
249    /// * Group
250    /// * Service account
251    pub grantees: std::vec::Vec<std::string::String>,
252
253    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
254}
255
256impl RemoveGranteesRequest {
257    pub fn new() -> Self {
258        std::default::Default::default()
259    }
260
261    /// Sets the value of [data_policy][crate::model::RemoveGranteesRequest::data_policy].
262    pub fn set_data_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
263        self.data_policy = v.into();
264        self
265    }
266
267    /// Sets the value of [grantees][crate::model::RemoveGranteesRequest::grantees].
268    pub fn set_grantees<T, V>(mut self, v: T) -> Self
269    where
270        T: std::iter::IntoIterator<Item = V>,
271        V: std::convert::Into<std::string::String>,
272    {
273        use std::iter::Iterator;
274        self.grantees = v.into_iter().map(|i| i.into()).collect();
275        self
276    }
277}
278
279impl wkt::message::Message for RemoveGranteesRequest {
280    fn typename() -> &'static str {
281        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.RemoveGranteesRequest"
282    }
283}
284
285/// Request message for the DeleteDataPolicy method.
286#[derive(Clone, Default, PartialEq)]
287#[non_exhaustive]
288pub struct DeleteDataPolicyRequest {
289    /// Required. Resource name of the data policy to delete. Format is
290    /// `projects/{project_number}/locations/{location_id}/dataPolicies/{id}`.
291    pub name: std::string::String,
292
293    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
294}
295
296impl DeleteDataPolicyRequest {
297    pub fn new() -> Self {
298        std::default::Default::default()
299    }
300
301    /// Sets the value of [name][crate::model::DeleteDataPolicyRequest::name].
302    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
303        self.name = v.into();
304        self
305    }
306}
307
308impl wkt::message::Message for DeleteDataPolicyRequest {
309    fn typename() -> &'static str {
310        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.DeleteDataPolicyRequest"
311    }
312}
313
314/// Request message for the GetDataPolicy method.
315#[derive(Clone, Default, PartialEq)]
316#[non_exhaustive]
317pub struct GetDataPolicyRequest {
318    /// Required. Resource name of the requested data policy. Format is
319    /// `projects/{project_number}/locations/{location_id}/dataPolicies/{id}`.
320    pub name: std::string::String,
321
322    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
323}
324
325impl GetDataPolicyRequest {
326    pub fn new() -> Self {
327        std::default::Default::default()
328    }
329
330    /// Sets the value of [name][crate::model::GetDataPolicyRequest::name].
331    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
332        self.name = v.into();
333        self
334    }
335}
336
337impl wkt::message::Message for GetDataPolicyRequest {
338    fn typename() -> &'static str {
339        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.GetDataPolicyRequest"
340    }
341}
342
343/// Request message for the ListDataPolicies method.
344#[derive(Clone, Default, PartialEq)]
345#[non_exhaustive]
346pub struct ListDataPoliciesRequest {
347    /// Required. Resource name of the project for which to list data policies.
348    /// Format is `projects/{project_number}/locations/{location_id}`.
349    pub parent: std::string::String,
350
351    /// Optional. The maximum number of data policies to return. Must be a value
352    /// between 1 and 1000. If not set, defaults to 50.
353    pub page_size: i32,
354
355    /// Optional. The `nextPageToken` value returned from a previous list request,
356    /// if any. If not set, defaults to an empty string.
357    pub page_token: std::string::String,
358
359    /// Optional. Filters the data policies by policy tags that they
360    /// are associated with. Currently filter only supports
361    /// "policy_tag" based filtering and OR based predicates. Sample
362    /// filter can be "policy_tag:
363    /// projects/1/locations/us/taxonomies/2/policyTags/3".
364    /// You may also use wildcard such as "policy_tag:
365    /// projects/1/locations/us/taxonomies/2*". Please note that OR predicates
366    /// cannot be used with wildcard filters.
367    pub filter: std::string::String,
368
369    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
370}
371
372impl ListDataPoliciesRequest {
373    pub fn new() -> Self {
374        std::default::Default::default()
375    }
376
377    /// Sets the value of [parent][crate::model::ListDataPoliciesRequest::parent].
378    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
379        self.parent = v.into();
380        self
381    }
382
383    /// Sets the value of [page_size][crate::model::ListDataPoliciesRequest::page_size].
384    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
385        self.page_size = v.into();
386        self
387    }
388
389    /// Sets the value of [page_token][crate::model::ListDataPoliciesRequest::page_token].
390    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
391        self.page_token = v.into();
392        self
393    }
394
395    /// Sets the value of [filter][crate::model::ListDataPoliciesRequest::filter].
396    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
397        self.filter = v.into();
398        self
399    }
400}
401
402impl wkt::message::Message for ListDataPoliciesRequest {
403    fn typename() -> &'static str {
404        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.ListDataPoliciesRequest"
405    }
406}
407
408/// Response message for the ListDataPolicies method.
409#[derive(Clone, Default, PartialEq)]
410#[non_exhaustive]
411pub struct ListDataPoliciesResponse {
412    /// Data policies that belong to the requested project.
413    pub data_policies: std::vec::Vec<crate::model::DataPolicy>,
414
415    /// Token used to retrieve the next page of results, or empty if there are no
416    /// more results.
417    pub next_page_token: std::string::String,
418
419    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
420}
421
422impl ListDataPoliciesResponse {
423    pub fn new() -> Self {
424        std::default::Default::default()
425    }
426
427    /// Sets the value of [data_policies][crate::model::ListDataPoliciesResponse::data_policies].
428    pub fn set_data_policies<T, V>(mut self, v: T) -> Self
429    where
430        T: std::iter::IntoIterator<Item = V>,
431        V: std::convert::Into<crate::model::DataPolicy>,
432    {
433        use std::iter::Iterator;
434        self.data_policies = v.into_iter().map(|i| i.into()).collect();
435        self
436    }
437
438    /// Sets the value of [next_page_token][crate::model::ListDataPoliciesResponse::next_page_token].
439    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
440        self.next_page_token = v.into();
441        self
442    }
443}
444
445impl wkt::message::Message for ListDataPoliciesResponse {
446    fn typename() -> &'static str {
447        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.ListDataPoliciesResponse"
448    }
449}
450
451#[doc(hidden)]
452impl gax::paginator::internal::PageableResponse for ListDataPoliciesResponse {
453    type PageItem = crate::model::DataPolicy;
454
455    fn items(self) -> std::vec::Vec<Self::PageItem> {
456        self.data_policies
457    }
458
459    fn next_page_token(&self) -> std::string::String {
460        use std::clone::Clone;
461        self.next_page_token.clone()
462    }
463}
464
465/// Represents the label-policy binding.
466#[derive(Clone, Default, PartialEq)]
467#[non_exhaustive]
468pub struct DataPolicy {
469    /// Identifier. Resource name of this data policy, in the format of
470    /// `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
471    pub name: std::string::String,
472
473    /// Output only. User-assigned (human readable) ID of the data policy that
474    /// needs to be unique within a project. Used as {data_policy_id} in part of
475    /// the resource name.
476    pub data_policy_id: std::string::String,
477
478    /// The etag for this Data Policy.
479    /// This field is used for UpdateDataPolicy calls. If Data Policy exists, this
480    /// field is required and must match the server's etag. It will also be
481    /// populated in the response of GetDataPolicy, CreateDataPolicy, and
482    /// UpdateDataPolicy calls.
483    pub etag: std::option::Option<std::string::String>,
484
485    /// Required. Type of data policy.
486    pub data_policy_type: crate::model::data_policy::DataPolicyType,
487
488    /// Output only. Policy tag resource name, in the format of
489    /// `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`.
490    /// policy_tag is supported only for V1 data policies.
491    pub policy_tag: std::string::String,
492
493    /// Optional. The list of IAM principals that have Fine Grained Access to the
494    /// underlying data goverened by this data policy.
495    ///
496    /// Uses the [IAM V2 principal
497    /// syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2) Only
498    /// supports principal types users, groups, serviceaccounts, cloudidentity.
499    /// This field is supported in V2 Data Policy only. In case of V1 data policies
500    /// (i.e. verion = 1 and policy_tag is set), this field is not populated.
501    pub grantees: std::vec::Vec<std::string::String>,
502
503    /// Output only. The version of the Data Policy resource.
504    pub version: crate::model::data_policy::Version,
505
506    /// The policy that is bound to this data policy.
507    pub policy: std::option::Option<crate::model::data_policy::Policy>,
508
509    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
510}
511
512impl DataPolicy {
513    pub fn new() -> Self {
514        std::default::Default::default()
515    }
516
517    /// Sets the value of [name][crate::model::DataPolicy::name].
518    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
519        self.name = v.into();
520        self
521    }
522
523    /// Sets the value of [data_policy_id][crate::model::DataPolicy::data_policy_id].
524    pub fn set_data_policy_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
525        self.data_policy_id = v.into();
526        self
527    }
528
529    /// Sets the value of [etag][crate::model::DataPolicy::etag].
530    pub fn set_etag<T>(mut self, v: T) -> Self
531    where
532        T: std::convert::Into<std::string::String>,
533    {
534        self.etag = std::option::Option::Some(v.into());
535        self
536    }
537
538    /// Sets or clears the value of [etag][crate::model::DataPolicy::etag].
539    pub fn set_or_clear_etag<T>(mut self, v: std::option::Option<T>) -> Self
540    where
541        T: std::convert::Into<std::string::String>,
542    {
543        self.etag = v.map(|x| x.into());
544        self
545    }
546
547    /// Sets the value of [data_policy_type][crate::model::DataPolicy::data_policy_type].
548    pub fn set_data_policy_type<
549        T: std::convert::Into<crate::model::data_policy::DataPolicyType>,
550    >(
551        mut self,
552        v: T,
553    ) -> Self {
554        self.data_policy_type = v.into();
555        self
556    }
557
558    /// Sets the value of [policy_tag][crate::model::DataPolicy::policy_tag].
559    pub fn set_policy_tag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
560        self.policy_tag = v.into();
561        self
562    }
563
564    /// Sets the value of [grantees][crate::model::DataPolicy::grantees].
565    pub fn set_grantees<T, V>(mut self, v: T) -> Self
566    where
567        T: std::iter::IntoIterator<Item = V>,
568        V: std::convert::Into<std::string::String>,
569    {
570        use std::iter::Iterator;
571        self.grantees = v.into_iter().map(|i| i.into()).collect();
572        self
573    }
574
575    /// Sets the value of [version][crate::model::DataPolicy::version].
576    pub fn set_version<T: std::convert::Into<crate::model::data_policy::Version>>(
577        mut self,
578        v: T,
579    ) -> Self {
580        self.version = v.into();
581        self
582    }
583
584    /// Sets the value of [policy][crate::model::DataPolicy::policy].
585    ///
586    /// Note that all the setters affecting `policy` are mutually
587    /// exclusive.
588    pub fn set_policy<
589        T: std::convert::Into<std::option::Option<crate::model::data_policy::Policy>>,
590    >(
591        mut self,
592        v: T,
593    ) -> Self {
594        self.policy = v.into();
595        self
596    }
597
598    /// The value of [policy][crate::model::DataPolicy::policy]
599    /// if it holds a `DataMaskingPolicy`, `None` if the field is not set or
600    /// holds a different branch.
601    pub fn data_masking_policy(
602        &self,
603    ) -> std::option::Option<&std::boxed::Box<crate::model::DataMaskingPolicy>> {
604        #[allow(unreachable_patterns)]
605        self.policy.as_ref().and_then(|v| match v {
606            crate::model::data_policy::Policy::DataMaskingPolicy(v) => std::option::Option::Some(v),
607            _ => std::option::Option::None,
608        })
609    }
610
611    /// Sets the value of [policy][crate::model::DataPolicy::policy]
612    /// to hold a `DataMaskingPolicy`.
613    ///
614    /// Note that all the setters affecting `policy` are
615    /// mutually exclusive.
616    pub fn set_data_masking_policy<
617        T: std::convert::Into<std::boxed::Box<crate::model::DataMaskingPolicy>>,
618    >(
619        mut self,
620        v: T,
621    ) -> Self {
622        self.policy = std::option::Option::Some(
623            crate::model::data_policy::Policy::DataMaskingPolicy(v.into()),
624        );
625        self
626    }
627}
628
629impl wkt::message::Message for DataPolicy {
630    fn typename() -> &'static str {
631        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.DataPolicy"
632    }
633}
634
635/// Defines additional types related to [DataPolicy].
636pub mod data_policy {
637    #[allow(unused_imports)]
638    use super::*;
639
640    /// A list of supported data policy types.
641    ///
642    /// # Working with unknown values
643    ///
644    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
645    /// additional enum variants at any time. Adding new variants is not considered
646    /// a breaking change. Applications should write their code in anticipation of:
647    ///
648    /// - New values appearing in future releases of the client library, **and**
649    /// - New values received dynamically, without application changes.
650    ///
651    /// Please consult the [Working with enums] section in the user guide for some
652    /// guidelines.
653    ///
654    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
655    #[derive(Clone, Debug, PartialEq)]
656    #[non_exhaustive]
657    pub enum DataPolicyType {
658        /// Default value for the data policy type. This should not be used.
659        Unspecified,
660        /// Used to create a data policy for data masking.
661        DataMaskingPolicy,
662        /// Used to create a data policy for raw data access.
663        RawDataAccessPolicy,
664        /// Used to create a data policy for column-level security, without data
665        /// masking. This is deprecated in V2 api and only present to support GET and
666        /// LIST operations for V1 data policies in V2 api.
667        ColumnLevelSecurityPolicy,
668        /// If set, the enum was initialized with an unknown value.
669        ///
670        /// Applications can examine the value using [DataPolicyType::value] or
671        /// [DataPolicyType::name].
672        UnknownValue(data_policy_type::UnknownValue),
673    }
674
675    #[doc(hidden)]
676    pub mod data_policy_type {
677        #[allow(unused_imports)]
678        use super::*;
679        #[derive(Clone, Debug, PartialEq)]
680        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
681    }
682
683    impl DataPolicyType {
684        /// Gets the enum value.
685        ///
686        /// Returns `None` if the enum contains an unknown value deserialized from
687        /// the string representation of enums.
688        pub fn value(&self) -> std::option::Option<i32> {
689            match self {
690                Self::Unspecified => std::option::Option::Some(0),
691                Self::DataMaskingPolicy => std::option::Option::Some(1),
692                Self::RawDataAccessPolicy => std::option::Option::Some(2),
693                Self::ColumnLevelSecurityPolicy => std::option::Option::Some(3),
694                Self::UnknownValue(u) => u.0.value(),
695            }
696        }
697
698        /// Gets the enum value as a string.
699        ///
700        /// Returns `None` if the enum contains an unknown value deserialized from
701        /// the integer representation of enums.
702        pub fn name(&self) -> std::option::Option<&str> {
703            match self {
704                Self::Unspecified => std::option::Option::Some("DATA_POLICY_TYPE_UNSPECIFIED"),
705                Self::DataMaskingPolicy => std::option::Option::Some("DATA_MASKING_POLICY"),
706                Self::RawDataAccessPolicy => std::option::Option::Some("RAW_DATA_ACCESS_POLICY"),
707                Self::ColumnLevelSecurityPolicy => {
708                    std::option::Option::Some("COLUMN_LEVEL_SECURITY_POLICY")
709                }
710                Self::UnknownValue(u) => u.0.name(),
711            }
712        }
713    }
714
715    impl std::default::Default for DataPolicyType {
716        fn default() -> Self {
717            use std::convert::From;
718            Self::from(0)
719        }
720    }
721
722    impl std::fmt::Display for DataPolicyType {
723        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
724            wkt::internal::display_enum(f, self.name(), self.value())
725        }
726    }
727
728    impl std::convert::From<i32> for DataPolicyType {
729        fn from(value: i32) -> Self {
730            match value {
731                0 => Self::Unspecified,
732                1 => Self::DataMaskingPolicy,
733                2 => Self::RawDataAccessPolicy,
734                3 => Self::ColumnLevelSecurityPolicy,
735                _ => Self::UnknownValue(data_policy_type::UnknownValue(
736                    wkt::internal::UnknownEnumValue::Integer(value),
737                )),
738            }
739        }
740    }
741
742    impl std::convert::From<&str> for DataPolicyType {
743        fn from(value: &str) -> Self {
744            use std::string::ToString;
745            match value {
746                "DATA_POLICY_TYPE_UNSPECIFIED" => Self::Unspecified,
747                "DATA_MASKING_POLICY" => Self::DataMaskingPolicy,
748                "RAW_DATA_ACCESS_POLICY" => Self::RawDataAccessPolicy,
749                "COLUMN_LEVEL_SECURITY_POLICY" => Self::ColumnLevelSecurityPolicy,
750                _ => Self::UnknownValue(data_policy_type::UnknownValue(
751                    wkt::internal::UnknownEnumValue::String(value.to_string()),
752                )),
753            }
754        }
755    }
756
757    impl serde::ser::Serialize for DataPolicyType {
758        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
759        where
760            S: serde::Serializer,
761        {
762            match self {
763                Self::Unspecified => serializer.serialize_i32(0),
764                Self::DataMaskingPolicy => serializer.serialize_i32(1),
765                Self::RawDataAccessPolicy => serializer.serialize_i32(2),
766                Self::ColumnLevelSecurityPolicy => serializer.serialize_i32(3),
767                Self::UnknownValue(u) => u.0.serialize(serializer),
768            }
769        }
770    }
771
772    impl<'de> serde::de::Deserialize<'de> for DataPolicyType {
773        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
774        where
775            D: serde::Deserializer<'de>,
776        {
777            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataPolicyType>::new(
778                ".google.cloud.bigquery.datapolicies.v2.DataPolicy.DataPolicyType",
779            ))
780        }
781    }
782
783    /// The supported versions for the Data Policy resource.
784    ///
785    /// # Working with unknown values
786    ///
787    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
788    /// additional enum variants at any time. Adding new variants is not considered
789    /// a breaking change. Applications should write their code in anticipation of:
790    ///
791    /// - New values appearing in future releases of the client library, **and**
792    /// - New values received dynamically, without application changes.
793    ///
794    /// Please consult the [Working with enums] section in the user guide for some
795    /// guidelines.
796    ///
797    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
798    #[derive(Clone, Debug, PartialEq)]
799    #[non_exhaustive]
800    pub enum Version {
801        /// Default value for the data policy version. This should not be used.
802        Unspecified,
803        /// V1 data policy version. V1 Data Policies will be present in V2 List api
804        /// response, but can not be created/updated/deleted from V2 api.
805        V1,
806        /// V2 data policy version.
807        V2,
808        /// If set, the enum was initialized with an unknown value.
809        ///
810        /// Applications can examine the value using [Version::value] or
811        /// [Version::name].
812        UnknownValue(version::UnknownValue),
813    }
814
815    #[doc(hidden)]
816    pub mod version {
817        #[allow(unused_imports)]
818        use super::*;
819        #[derive(Clone, Debug, PartialEq)]
820        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
821    }
822
823    impl Version {
824        /// Gets the enum value.
825        ///
826        /// Returns `None` if the enum contains an unknown value deserialized from
827        /// the string representation of enums.
828        pub fn value(&self) -> std::option::Option<i32> {
829            match self {
830                Self::Unspecified => std::option::Option::Some(0),
831                Self::V1 => std::option::Option::Some(1),
832                Self::V2 => std::option::Option::Some(2),
833                Self::UnknownValue(u) => u.0.value(),
834            }
835        }
836
837        /// Gets the enum value as a string.
838        ///
839        /// Returns `None` if the enum contains an unknown value deserialized from
840        /// the integer representation of enums.
841        pub fn name(&self) -> std::option::Option<&str> {
842            match self {
843                Self::Unspecified => std::option::Option::Some("VERSION_UNSPECIFIED"),
844                Self::V1 => std::option::Option::Some("V1"),
845                Self::V2 => std::option::Option::Some("V2"),
846                Self::UnknownValue(u) => u.0.name(),
847            }
848        }
849    }
850
851    impl std::default::Default for Version {
852        fn default() -> Self {
853            use std::convert::From;
854            Self::from(0)
855        }
856    }
857
858    impl std::fmt::Display for Version {
859        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
860            wkt::internal::display_enum(f, self.name(), self.value())
861        }
862    }
863
864    impl std::convert::From<i32> for Version {
865        fn from(value: i32) -> Self {
866            match value {
867                0 => Self::Unspecified,
868                1 => Self::V1,
869                2 => Self::V2,
870                _ => Self::UnknownValue(version::UnknownValue(
871                    wkt::internal::UnknownEnumValue::Integer(value),
872                )),
873            }
874        }
875    }
876
877    impl std::convert::From<&str> for Version {
878        fn from(value: &str) -> Self {
879            use std::string::ToString;
880            match value {
881                "VERSION_UNSPECIFIED" => Self::Unspecified,
882                "V1" => Self::V1,
883                "V2" => Self::V2,
884                _ => Self::UnknownValue(version::UnknownValue(
885                    wkt::internal::UnknownEnumValue::String(value.to_string()),
886                )),
887            }
888        }
889    }
890
891    impl serde::ser::Serialize for Version {
892        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
893        where
894            S: serde::Serializer,
895        {
896            match self {
897                Self::Unspecified => serializer.serialize_i32(0),
898                Self::V1 => serializer.serialize_i32(1),
899                Self::V2 => serializer.serialize_i32(2),
900                Self::UnknownValue(u) => u.0.serialize(serializer),
901            }
902        }
903    }
904
905    impl<'de> serde::de::Deserialize<'de> for Version {
906        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
907        where
908            D: serde::Deserializer<'de>,
909        {
910            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Version>::new(
911                ".google.cloud.bigquery.datapolicies.v2.DataPolicy.Version",
912            ))
913        }
914    }
915
916    /// The policy that is bound to this data policy.
917    #[derive(Clone, Debug, PartialEq)]
918    #[non_exhaustive]
919    pub enum Policy {
920        /// Optional. The data masking policy that specifies the data masking rule to
921        /// use. It must be set if the data policy type is DATA_MASKING_POLICY.
922        DataMaskingPolicy(std::boxed::Box<crate::model::DataMaskingPolicy>),
923    }
924}
925
926/// The policy used to specify data masking rule.
927#[derive(Clone, Default, PartialEq)]
928#[non_exhaustive]
929pub struct DataMaskingPolicy {
930    /// A masking expression to bind to the data masking rule.
931    pub masking_expression:
932        std::option::Option<crate::model::data_masking_policy::MaskingExpression>,
933
934    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
935}
936
937impl DataMaskingPolicy {
938    pub fn new() -> Self {
939        std::default::Default::default()
940    }
941
942    /// Sets the value of [masking_expression][crate::model::DataMaskingPolicy::masking_expression].
943    ///
944    /// Note that all the setters affecting `masking_expression` are mutually
945    /// exclusive.
946    pub fn set_masking_expression<
947        T: std::convert::Into<
948                std::option::Option<crate::model::data_masking_policy::MaskingExpression>,
949            >,
950    >(
951        mut self,
952        v: T,
953    ) -> Self {
954        self.masking_expression = v.into();
955        self
956    }
957
958    /// The value of [masking_expression][crate::model::DataMaskingPolicy::masking_expression]
959    /// if it holds a `PredefinedExpression`, `None` if the field is not set or
960    /// holds a different branch.
961    pub fn predefined_expression(
962        &self,
963    ) -> std::option::Option<&crate::model::data_masking_policy::PredefinedExpression> {
964        #[allow(unreachable_patterns)]
965        self.masking_expression.as_ref().and_then(|v| match v {
966            crate::model::data_masking_policy::MaskingExpression::PredefinedExpression(v) => {
967                std::option::Option::Some(v)
968            }
969            _ => std::option::Option::None,
970        })
971    }
972
973    /// Sets the value of [masking_expression][crate::model::DataMaskingPolicy::masking_expression]
974    /// to hold a `PredefinedExpression`.
975    ///
976    /// Note that all the setters affecting `masking_expression` are
977    /// mutually exclusive.
978    pub fn set_predefined_expression<
979        T: std::convert::Into<crate::model::data_masking_policy::PredefinedExpression>,
980    >(
981        mut self,
982        v: T,
983    ) -> Self {
984        self.masking_expression = std::option::Option::Some(
985            crate::model::data_masking_policy::MaskingExpression::PredefinedExpression(v.into()),
986        );
987        self
988    }
989
990    /// The value of [masking_expression][crate::model::DataMaskingPolicy::masking_expression]
991    /// if it holds a `Routine`, `None` if the field is not set or
992    /// holds a different branch.
993    pub fn routine(&self) -> std::option::Option<&std::string::String> {
994        #[allow(unreachable_patterns)]
995        self.masking_expression.as_ref().and_then(|v| match v {
996            crate::model::data_masking_policy::MaskingExpression::Routine(v) => {
997                std::option::Option::Some(v)
998            }
999            _ => std::option::Option::None,
1000        })
1001    }
1002
1003    /// Sets the value of [masking_expression][crate::model::DataMaskingPolicy::masking_expression]
1004    /// to hold a `Routine`.
1005    ///
1006    /// Note that all the setters affecting `masking_expression` are
1007    /// mutually exclusive.
1008    pub fn set_routine<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1009        self.masking_expression = std::option::Option::Some(
1010            crate::model::data_masking_policy::MaskingExpression::Routine(v.into()),
1011        );
1012        self
1013    }
1014}
1015
1016impl wkt::message::Message for DataMaskingPolicy {
1017    fn typename() -> &'static str {
1018        "type.googleapis.com/google.cloud.bigquery.datapolicies.v2.DataMaskingPolicy"
1019    }
1020}
1021
1022/// Defines additional types related to [DataMaskingPolicy].
1023pub mod data_masking_policy {
1024    #[allow(unused_imports)]
1025    use super::*;
1026
1027    /// The available masking rules. Learn more here:
1028    /// <https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options>.
1029    ///
1030    /// # Working with unknown values
1031    ///
1032    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1033    /// additional enum variants at any time. Adding new variants is not considered
1034    /// a breaking change. Applications should write their code in anticipation of:
1035    ///
1036    /// - New values appearing in future releases of the client library, **and**
1037    /// - New values received dynamically, without application changes.
1038    ///
1039    /// Please consult the [Working with enums] section in the user guide for some
1040    /// guidelines.
1041    ///
1042    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1043    #[derive(Clone, Debug, PartialEq)]
1044    #[non_exhaustive]
1045    pub enum PredefinedExpression {
1046        /// Default, unspecified predefined expression. No masking will take place
1047        /// since no expression is specified.
1048        Unspecified,
1049        /// Masking expression to replace data with SHA-256 hash.
1050        Sha256,
1051        /// Masking expression to replace data with NULLs.
1052        AlwaysNull,
1053        /// Masking expression to replace data with their default masking values.
1054        /// The default masking values for each type listed as below:
1055        ///
1056        /// * STRING: ""
1057        /// * BYTES: b''
1058        /// * INTEGER: 0
1059        /// * FLOAT: 0.0
1060        /// * NUMERIC: 0
1061        /// * BOOLEAN: FALSE
1062        /// * TIMESTAMP: 1970-01-01 00:00:00 UTC
1063        /// * DATE: 1970-01-01
1064        /// * TIME: 00:00:00
1065        /// * DATETIME: 1970-01-01T00:00:00
1066        /// * GEOGRAPHY: POINT(0 0)
1067        /// * BIGNUMERIC: 0
1068        /// * ARRAY: []
1069        /// * STRUCT: NOT_APPLICABLE
1070        /// * JSON: NULL
1071        DefaultMaskingValue,
1072        /// Masking expression shows the last four characters of text.
1073        /// The masking behavior is as follows:
1074        ///
1075        /// * If text length > 4 characters: Replace text with XXXXX, append last
1076        ///   four characters of original text.
1077        /// * If text length <= 4 characters: Apply SHA-256 hash.
1078        LastFourCharacters,
1079        /// Masking expression shows the first four characters of text.
1080        /// The masking behavior is as follows:
1081        ///
1082        /// * If text length > 4 characters: Replace text with XXXXX, prepend first
1083        ///   four characters of original text.
1084        /// * If text length <= 4 characters: Apply SHA-256 hash.
1085        FirstFourCharacters,
1086        /// Masking expression for email addresses.
1087        /// The masking behavior is as follows:
1088        ///
1089        /// * Syntax-valid email address: Replace username with XXXXX. For example,
1090        ///   cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com.
1091        /// * Syntax-invalid email address: Apply SHA-256 hash.
1092        ///
1093        /// For more information, see [Email
1094        /// mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options).
1095        EmailMask,
1096        /// Masking expression to only show the \<i\>year\</i\> of `Date`,
1097        /// `DateTime` and `TimeStamp`. For example, with the
1098        /// year 2076:
1099        ///
1100        /// * DATE         :  2076-01-01
1101        /// * DATETIME     :  2076-01-01T00:00:00
1102        /// * TIMESTAMP    :  2076-01-01 00:00:00 UTC
1103        ///
1104        /// Truncation occurs according to the UTC time zone. To change this, adjust
1105        /// the default time zone using the `time_zone` system variable.
1106        /// For more information, see [System variables
1107        /// reference](https://cloud.google.com/bigquery/docs/reference/system-variables).
1108        DateYearMask,
1109        /// Masking expression that uses hashing to mask column data.
1110        /// It differs from SHA256 in that a unique random value is generated for
1111        /// each query and is added to the hash input, resulting in the hash / masked
1112        /// result to be different for each query. Hence the name "random hash".
1113        RandomHash,
1114        /// If set, the enum was initialized with an unknown value.
1115        ///
1116        /// Applications can examine the value using [PredefinedExpression::value] or
1117        /// [PredefinedExpression::name].
1118        UnknownValue(predefined_expression::UnknownValue),
1119    }
1120
1121    #[doc(hidden)]
1122    pub mod predefined_expression {
1123        #[allow(unused_imports)]
1124        use super::*;
1125        #[derive(Clone, Debug, PartialEq)]
1126        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1127    }
1128
1129    impl PredefinedExpression {
1130        /// Gets the enum value.
1131        ///
1132        /// Returns `None` if the enum contains an unknown value deserialized from
1133        /// the string representation of enums.
1134        pub fn value(&self) -> std::option::Option<i32> {
1135            match self {
1136                Self::Unspecified => std::option::Option::Some(0),
1137                Self::Sha256 => std::option::Option::Some(1),
1138                Self::AlwaysNull => std::option::Option::Some(2),
1139                Self::DefaultMaskingValue => std::option::Option::Some(3),
1140                Self::LastFourCharacters => std::option::Option::Some(4),
1141                Self::FirstFourCharacters => std::option::Option::Some(5),
1142                Self::EmailMask => std::option::Option::Some(6),
1143                Self::DateYearMask => std::option::Option::Some(7),
1144                Self::RandomHash => std::option::Option::Some(8),
1145                Self::UnknownValue(u) => u.0.value(),
1146            }
1147        }
1148
1149        /// Gets the enum value as a string.
1150        ///
1151        /// Returns `None` if the enum contains an unknown value deserialized from
1152        /// the integer representation of enums.
1153        pub fn name(&self) -> std::option::Option<&str> {
1154            match self {
1155                Self::Unspecified => std::option::Option::Some("PREDEFINED_EXPRESSION_UNSPECIFIED"),
1156                Self::Sha256 => std::option::Option::Some("SHA256"),
1157                Self::AlwaysNull => std::option::Option::Some("ALWAYS_NULL"),
1158                Self::DefaultMaskingValue => std::option::Option::Some("DEFAULT_MASKING_VALUE"),
1159                Self::LastFourCharacters => std::option::Option::Some("LAST_FOUR_CHARACTERS"),
1160                Self::FirstFourCharacters => std::option::Option::Some("FIRST_FOUR_CHARACTERS"),
1161                Self::EmailMask => std::option::Option::Some("EMAIL_MASK"),
1162                Self::DateYearMask => std::option::Option::Some("DATE_YEAR_MASK"),
1163                Self::RandomHash => std::option::Option::Some("RANDOM_HASH"),
1164                Self::UnknownValue(u) => u.0.name(),
1165            }
1166        }
1167    }
1168
1169    impl std::default::Default for PredefinedExpression {
1170        fn default() -> Self {
1171            use std::convert::From;
1172            Self::from(0)
1173        }
1174    }
1175
1176    impl std::fmt::Display for PredefinedExpression {
1177        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1178            wkt::internal::display_enum(f, self.name(), self.value())
1179        }
1180    }
1181
1182    impl std::convert::From<i32> for PredefinedExpression {
1183        fn from(value: i32) -> Self {
1184            match value {
1185                0 => Self::Unspecified,
1186                1 => Self::Sha256,
1187                2 => Self::AlwaysNull,
1188                3 => Self::DefaultMaskingValue,
1189                4 => Self::LastFourCharacters,
1190                5 => Self::FirstFourCharacters,
1191                6 => Self::EmailMask,
1192                7 => Self::DateYearMask,
1193                8 => Self::RandomHash,
1194                _ => Self::UnknownValue(predefined_expression::UnknownValue(
1195                    wkt::internal::UnknownEnumValue::Integer(value),
1196                )),
1197            }
1198        }
1199    }
1200
1201    impl std::convert::From<&str> for PredefinedExpression {
1202        fn from(value: &str) -> Self {
1203            use std::string::ToString;
1204            match value {
1205                "PREDEFINED_EXPRESSION_UNSPECIFIED" => Self::Unspecified,
1206                "SHA256" => Self::Sha256,
1207                "ALWAYS_NULL" => Self::AlwaysNull,
1208                "DEFAULT_MASKING_VALUE" => Self::DefaultMaskingValue,
1209                "LAST_FOUR_CHARACTERS" => Self::LastFourCharacters,
1210                "FIRST_FOUR_CHARACTERS" => Self::FirstFourCharacters,
1211                "EMAIL_MASK" => Self::EmailMask,
1212                "DATE_YEAR_MASK" => Self::DateYearMask,
1213                "RANDOM_HASH" => Self::RandomHash,
1214                _ => Self::UnknownValue(predefined_expression::UnknownValue(
1215                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1216                )),
1217            }
1218        }
1219    }
1220
1221    impl serde::ser::Serialize for PredefinedExpression {
1222        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1223        where
1224            S: serde::Serializer,
1225        {
1226            match self {
1227                Self::Unspecified => serializer.serialize_i32(0),
1228                Self::Sha256 => serializer.serialize_i32(1),
1229                Self::AlwaysNull => serializer.serialize_i32(2),
1230                Self::DefaultMaskingValue => serializer.serialize_i32(3),
1231                Self::LastFourCharacters => serializer.serialize_i32(4),
1232                Self::FirstFourCharacters => serializer.serialize_i32(5),
1233                Self::EmailMask => serializer.serialize_i32(6),
1234                Self::DateYearMask => serializer.serialize_i32(7),
1235                Self::RandomHash => serializer.serialize_i32(8),
1236                Self::UnknownValue(u) => u.0.serialize(serializer),
1237            }
1238        }
1239    }
1240
1241    impl<'de> serde::de::Deserialize<'de> for PredefinedExpression {
1242        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1243        where
1244            D: serde::Deserializer<'de>,
1245        {
1246            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PredefinedExpression>::new(
1247                ".google.cloud.bigquery.datapolicies.v2.DataMaskingPolicy.PredefinedExpression",
1248            ))
1249        }
1250    }
1251
1252    /// A masking expression to bind to the data masking rule.
1253    #[derive(Clone, Debug, PartialEq)]
1254    #[non_exhaustive]
1255    pub enum MaskingExpression {
1256        /// Optional. A predefined masking expression.
1257        PredefinedExpression(crate::model::data_masking_policy::PredefinedExpression),
1258        /// Optional. The name of the BigQuery routine that contains the custom
1259        /// masking routine, in the format of
1260        /// `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`.
1261        Routine(std::string::String),
1262    }
1263}