google_cloud_beyondcorp_clientgateways_v1/
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 location;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41/// Message describing ClientGateway object.
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct ClientGateway {
45    /// Required. name of resource. The name is ignored during creation.
46    pub name: std::string::String,
47
48    /// Output only. [Output only] Create time stamp.
49    pub create_time: std::option::Option<wkt::Timestamp>,
50
51    /// Output only. [Output only] Update time stamp.
52    pub update_time: std::option::Option<wkt::Timestamp>,
53
54    /// Output only. The operational state of the gateway.
55    pub state: crate::model::client_gateway::State,
56
57    /// Output only. A unique identifier for the instance generated by the system.
58    pub id: std::string::String,
59
60    /// Output only. The client connector service name that the client gateway is
61    /// associated to. Client Connector Services, named as follows:
62    /// `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`.
63    pub client_connector_service: std::string::String,
64
65    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66}
67
68impl ClientGateway {
69    pub fn new() -> Self {
70        std::default::Default::default()
71    }
72
73    /// Sets the value of [name][crate::model::ClientGateway::name].
74    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75        self.name = v.into();
76        self
77    }
78
79    /// Sets the value of [create_time][crate::model::ClientGateway::create_time].
80    pub fn set_create_time<T>(mut self, v: T) -> Self
81    where
82        T: std::convert::Into<wkt::Timestamp>,
83    {
84        self.create_time = std::option::Option::Some(v.into());
85        self
86    }
87
88    /// Sets or clears the value of [create_time][crate::model::ClientGateway::create_time].
89    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
90    where
91        T: std::convert::Into<wkt::Timestamp>,
92    {
93        self.create_time = v.map(|x| x.into());
94        self
95    }
96
97    /// Sets the value of [update_time][crate::model::ClientGateway::update_time].
98    pub fn set_update_time<T>(mut self, v: T) -> Self
99    where
100        T: std::convert::Into<wkt::Timestamp>,
101    {
102        self.update_time = std::option::Option::Some(v.into());
103        self
104    }
105
106    /// Sets or clears the value of [update_time][crate::model::ClientGateway::update_time].
107    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
108    where
109        T: std::convert::Into<wkt::Timestamp>,
110    {
111        self.update_time = v.map(|x| x.into());
112        self
113    }
114
115    /// Sets the value of [state][crate::model::ClientGateway::state].
116    pub fn set_state<T: std::convert::Into<crate::model::client_gateway::State>>(
117        mut self,
118        v: T,
119    ) -> Self {
120        self.state = v.into();
121        self
122    }
123
124    /// Sets the value of [id][crate::model::ClientGateway::id].
125    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
126        self.id = v.into();
127        self
128    }
129
130    /// Sets the value of [client_connector_service][crate::model::ClientGateway::client_connector_service].
131    pub fn set_client_connector_service<T: std::convert::Into<std::string::String>>(
132        mut self,
133        v: T,
134    ) -> Self {
135        self.client_connector_service = v.into();
136        self
137    }
138}
139
140impl wkt::message::Message for ClientGateway {
141    fn typename() -> &'static str {
142        "type.googleapis.com/google.cloud.beyondcorp.clientgateways.v1.ClientGateway"
143    }
144}
145
146/// Defines additional types related to [ClientGateway].
147pub mod client_gateway {
148    #[allow(unused_imports)]
149    use super::*;
150
151    /// Represents the different states of a gateway.
152    ///
153    /// # Working with unknown values
154    ///
155    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
156    /// additional enum variants at any time. Adding new variants is not considered
157    /// a breaking change. Applications should write their code in anticipation of:
158    ///
159    /// - New values appearing in future releases of the client library, **and**
160    /// - New values received dynamically, without application changes.
161    ///
162    /// Please consult the [Working with enums] section in the user guide for some
163    /// guidelines.
164    ///
165    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
166    #[derive(Clone, Debug, PartialEq)]
167    #[non_exhaustive]
168    pub enum State {
169        /// Default value. This value is unused.
170        Unspecified,
171        /// Gateway is being created.
172        Creating,
173        /// Gateway is being updated.
174        Updating,
175        /// Gateway is being deleted.
176        Deleting,
177        /// Gateway is running.
178        Running,
179        /// Gateway is down and may be restored in the future.
180        /// This happens when CCFE sends ProjectState = OFF.
181        Down,
182        /// ClientGateway encountered an error and is in indeterministic state.
183        Error,
184        /// If set, the enum was initialized with an unknown value.
185        ///
186        /// Applications can examine the value using [State::value] or
187        /// [State::name].
188        UnknownValue(state::UnknownValue),
189    }
190
191    #[doc(hidden)]
192    pub mod state {
193        #[allow(unused_imports)]
194        use super::*;
195        #[derive(Clone, Debug, PartialEq)]
196        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
197    }
198
199    impl State {
200        /// Gets the enum value.
201        ///
202        /// Returns `None` if the enum contains an unknown value deserialized from
203        /// the string representation of enums.
204        pub fn value(&self) -> std::option::Option<i32> {
205            match self {
206                Self::Unspecified => std::option::Option::Some(0),
207                Self::Creating => std::option::Option::Some(1),
208                Self::Updating => std::option::Option::Some(2),
209                Self::Deleting => std::option::Option::Some(3),
210                Self::Running => std::option::Option::Some(4),
211                Self::Down => std::option::Option::Some(5),
212                Self::Error => std::option::Option::Some(6),
213                Self::UnknownValue(u) => u.0.value(),
214            }
215        }
216
217        /// Gets the enum value as a string.
218        ///
219        /// Returns `None` if the enum contains an unknown value deserialized from
220        /// the integer representation of enums.
221        pub fn name(&self) -> std::option::Option<&str> {
222            match self {
223                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
224                Self::Creating => std::option::Option::Some("CREATING"),
225                Self::Updating => std::option::Option::Some("UPDATING"),
226                Self::Deleting => std::option::Option::Some("DELETING"),
227                Self::Running => std::option::Option::Some("RUNNING"),
228                Self::Down => std::option::Option::Some("DOWN"),
229                Self::Error => std::option::Option::Some("ERROR"),
230                Self::UnknownValue(u) => u.0.name(),
231            }
232        }
233    }
234
235    impl std::default::Default for State {
236        fn default() -> Self {
237            use std::convert::From;
238            Self::from(0)
239        }
240    }
241
242    impl std::fmt::Display for State {
243        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
244            wkt::internal::display_enum(f, self.name(), self.value())
245        }
246    }
247
248    impl std::convert::From<i32> for State {
249        fn from(value: i32) -> Self {
250            match value {
251                0 => Self::Unspecified,
252                1 => Self::Creating,
253                2 => Self::Updating,
254                3 => Self::Deleting,
255                4 => Self::Running,
256                5 => Self::Down,
257                6 => Self::Error,
258                _ => Self::UnknownValue(state::UnknownValue(
259                    wkt::internal::UnknownEnumValue::Integer(value),
260                )),
261            }
262        }
263    }
264
265    impl std::convert::From<&str> for State {
266        fn from(value: &str) -> Self {
267            use std::string::ToString;
268            match value {
269                "STATE_UNSPECIFIED" => Self::Unspecified,
270                "CREATING" => Self::Creating,
271                "UPDATING" => Self::Updating,
272                "DELETING" => Self::Deleting,
273                "RUNNING" => Self::Running,
274                "DOWN" => Self::Down,
275                "ERROR" => Self::Error,
276                _ => Self::UnknownValue(state::UnknownValue(
277                    wkt::internal::UnknownEnumValue::String(value.to_string()),
278                )),
279            }
280        }
281    }
282
283    impl serde::ser::Serialize for State {
284        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
285        where
286            S: serde::Serializer,
287        {
288            match self {
289                Self::Unspecified => serializer.serialize_i32(0),
290                Self::Creating => serializer.serialize_i32(1),
291                Self::Updating => serializer.serialize_i32(2),
292                Self::Deleting => serializer.serialize_i32(3),
293                Self::Running => serializer.serialize_i32(4),
294                Self::Down => serializer.serialize_i32(5),
295                Self::Error => serializer.serialize_i32(6),
296                Self::UnknownValue(u) => u.0.serialize(serializer),
297            }
298        }
299    }
300
301    impl<'de> serde::de::Deserialize<'de> for State {
302        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
303        where
304            D: serde::Deserializer<'de>,
305        {
306            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
307                ".google.cloud.beyondcorp.clientgateways.v1.ClientGateway.State",
308            ))
309        }
310    }
311}
312
313/// Message for requesting list of ClientGateways.
314#[derive(Clone, Default, PartialEq)]
315#[non_exhaustive]
316pub struct ListClientGatewaysRequest {
317    /// Required. Parent value for ListClientGatewaysRequest.
318    pub parent: std::string::String,
319
320    /// Optional. Requested page size. Server may return fewer items than
321    /// requested. If unspecified, server will pick an appropriate default.
322    pub page_size: i32,
323
324    /// Optional. A token identifying a page of results the server should return.
325    pub page_token: std::string::String,
326
327    /// Optional. Filtering results.
328    pub filter: std::string::String,
329
330    /// Optional. Hint for how to order the results.
331    pub order_by: std::string::String,
332
333    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
334}
335
336impl ListClientGatewaysRequest {
337    pub fn new() -> Self {
338        std::default::Default::default()
339    }
340
341    /// Sets the value of [parent][crate::model::ListClientGatewaysRequest::parent].
342    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
343        self.parent = v.into();
344        self
345    }
346
347    /// Sets the value of [page_size][crate::model::ListClientGatewaysRequest::page_size].
348    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
349        self.page_size = v.into();
350        self
351    }
352
353    /// Sets the value of [page_token][crate::model::ListClientGatewaysRequest::page_token].
354    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
355        self.page_token = v.into();
356        self
357    }
358
359    /// Sets the value of [filter][crate::model::ListClientGatewaysRequest::filter].
360    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
361        self.filter = v.into();
362        self
363    }
364
365    /// Sets the value of [order_by][crate::model::ListClientGatewaysRequest::order_by].
366    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
367        self.order_by = v.into();
368        self
369    }
370}
371
372impl wkt::message::Message for ListClientGatewaysRequest {
373    fn typename() -> &'static str {
374        "type.googleapis.com/google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest"
375    }
376}
377
378/// Message for response to listing ClientGateways.
379#[derive(Clone, Default, PartialEq)]
380#[non_exhaustive]
381pub struct ListClientGatewaysResponse {
382    /// The list of ClientGateway.
383    pub client_gateways: std::vec::Vec<crate::model::ClientGateway>,
384
385    /// A token identifying a page of results the server should return.
386    pub next_page_token: std::string::String,
387
388    /// Locations that could not be reached.
389    pub unreachable: std::vec::Vec<std::string::String>,
390
391    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
392}
393
394impl ListClientGatewaysResponse {
395    pub fn new() -> Self {
396        std::default::Default::default()
397    }
398
399    /// Sets the value of [client_gateways][crate::model::ListClientGatewaysResponse::client_gateways].
400    pub fn set_client_gateways<T, V>(mut self, v: T) -> Self
401    where
402        T: std::iter::IntoIterator<Item = V>,
403        V: std::convert::Into<crate::model::ClientGateway>,
404    {
405        use std::iter::Iterator;
406        self.client_gateways = v.into_iter().map(|i| i.into()).collect();
407        self
408    }
409
410    /// Sets the value of [next_page_token][crate::model::ListClientGatewaysResponse::next_page_token].
411    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
412        self.next_page_token = v.into();
413        self
414    }
415
416    /// Sets the value of [unreachable][crate::model::ListClientGatewaysResponse::unreachable].
417    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
418    where
419        T: std::iter::IntoIterator<Item = V>,
420        V: std::convert::Into<std::string::String>,
421    {
422        use std::iter::Iterator;
423        self.unreachable = v.into_iter().map(|i| i.into()).collect();
424        self
425    }
426}
427
428impl wkt::message::Message for ListClientGatewaysResponse {
429    fn typename() -> &'static str {
430        "type.googleapis.com/google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysResponse"
431    }
432}
433
434#[doc(hidden)]
435impl gax::paginator::internal::PageableResponse for ListClientGatewaysResponse {
436    type PageItem = crate::model::ClientGateway;
437
438    fn items(self) -> std::vec::Vec<Self::PageItem> {
439        self.client_gateways
440    }
441
442    fn next_page_token(&self) -> std::string::String {
443        use std::clone::Clone;
444        self.next_page_token.clone()
445    }
446}
447
448/// Message for getting a ClientGateway.
449#[derive(Clone, Default, PartialEq)]
450#[non_exhaustive]
451pub struct GetClientGatewayRequest {
452    /// Required. Name of the resource
453    pub name: std::string::String,
454
455    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
456}
457
458impl GetClientGatewayRequest {
459    pub fn new() -> Self {
460        std::default::Default::default()
461    }
462
463    /// Sets the value of [name][crate::model::GetClientGatewayRequest::name].
464    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
465        self.name = v.into();
466        self
467    }
468}
469
470impl wkt::message::Message for GetClientGatewayRequest {
471    fn typename() -> &'static str {
472        "type.googleapis.com/google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest"
473    }
474}
475
476/// Message for creating a ClientGateway.
477#[derive(Clone, Default, PartialEq)]
478#[non_exhaustive]
479pub struct CreateClientGatewayRequest {
480    /// Required. Value for parent.
481    pub parent: std::string::String,
482
483    /// Optional. User-settable client gateway resource ID.
484    ///
485    /// * Must start with a letter.
486    /// * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
487    /// * Must end with a number or a letter.
488    pub client_gateway_id: std::string::String,
489
490    /// Required. The resource being created.
491    pub client_gateway: std::option::Option<crate::model::ClientGateway>,
492
493    /// Optional. An optional request ID to identify requests. Specify a unique
494    /// request ID so that if you must retry your request, the server will know to
495    /// ignore the request if it has already been completed. The server will
496    /// guarantee that for at least 60 minutes since the first request.
497    ///
498    /// For example, consider a situation where you make an initial request and t
499    /// he request times out. If you make the request again with the same request
500    /// ID, the server can check if original operation with the same request ID
501    /// was received, and if so, will ignore the second request. This prevents
502    /// clients from accidentally creating duplicate commitments.
503    ///
504    /// The request ID must be a valid UUID with the exception that zero UUID is
505    /// not supported (00000000-0000-0000-0000-000000000000).
506    pub request_id: std::string::String,
507
508    /// Optional. If set, validates request by executing a dry-run which would not
509    /// alter the resource in any way.
510    pub validate_only: bool,
511
512    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
513}
514
515impl CreateClientGatewayRequest {
516    pub fn new() -> Self {
517        std::default::Default::default()
518    }
519
520    /// Sets the value of [parent][crate::model::CreateClientGatewayRequest::parent].
521    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
522        self.parent = v.into();
523        self
524    }
525
526    /// Sets the value of [client_gateway_id][crate::model::CreateClientGatewayRequest::client_gateway_id].
527    pub fn set_client_gateway_id<T: std::convert::Into<std::string::String>>(
528        mut self,
529        v: T,
530    ) -> Self {
531        self.client_gateway_id = v.into();
532        self
533    }
534
535    /// Sets the value of [client_gateway][crate::model::CreateClientGatewayRequest::client_gateway].
536    pub fn set_client_gateway<T>(mut self, v: T) -> Self
537    where
538        T: std::convert::Into<crate::model::ClientGateway>,
539    {
540        self.client_gateway = std::option::Option::Some(v.into());
541        self
542    }
543
544    /// Sets or clears the value of [client_gateway][crate::model::CreateClientGatewayRequest::client_gateway].
545    pub fn set_or_clear_client_gateway<T>(mut self, v: std::option::Option<T>) -> Self
546    where
547        T: std::convert::Into<crate::model::ClientGateway>,
548    {
549        self.client_gateway = v.map(|x| x.into());
550        self
551    }
552
553    /// Sets the value of [request_id][crate::model::CreateClientGatewayRequest::request_id].
554    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
555        self.request_id = v.into();
556        self
557    }
558
559    /// Sets the value of [validate_only][crate::model::CreateClientGatewayRequest::validate_only].
560    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
561        self.validate_only = v.into();
562        self
563    }
564}
565
566impl wkt::message::Message for CreateClientGatewayRequest {
567    fn typename() -> &'static str {
568        "type.googleapis.com/google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest"
569    }
570}
571
572/// Message for deleting a ClientGateway
573#[derive(Clone, Default, PartialEq)]
574#[non_exhaustive]
575pub struct DeleteClientGatewayRequest {
576    /// Required. Name of the resource
577    pub name: std::string::String,
578
579    /// Optional. An optional request ID to identify requests. Specify a unique
580    /// request ID so that if you must retry your request, the server will know to
581    /// ignore the request if it has already been completed. The server will
582    /// guarantee that for at least 60 minutes after the first request.
583    ///
584    /// For example, consider a situation where you make an initial request and t
585    /// he request times out. If you make the request again with the same request
586    /// ID, the server can check if original operation with the same request ID
587    /// was received, and if so, will ignore the second request. This prevents
588    /// clients from accidentally creating duplicate commitments.
589    ///
590    /// The request ID must be a valid UUID with the exception that zero UUID is
591    /// not supported (00000000-0000-0000-0000-000000000000).
592    pub request_id: std::string::String,
593
594    /// Optional. If set, validates request by executing a dry-run which would not
595    /// alter the resource in any way.
596    pub validate_only: bool,
597
598    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
599}
600
601impl DeleteClientGatewayRequest {
602    pub fn new() -> Self {
603        std::default::Default::default()
604    }
605
606    /// Sets the value of [name][crate::model::DeleteClientGatewayRequest::name].
607    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
608        self.name = v.into();
609        self
610    }
611
612    /// Sets the value of [request_id][crate::model::DeleteClientGatewayRequest::request_id].
613    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
614        self.request_id = v.into();
615        self
616    }
617
618    /// Sets the value of [validate_only][crate::model::DeleteClientGatewayRequest::validate_only].
619    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
620        self.validate_only = v.into();
621        self
622    }
623}
624
625impl wkt::message::Message for DeleteClientGatewayRequest {
626    fn typename() -> &'static str {
627        "type.googleapis.com/google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest"
628    }
629}
630
631/// Represents the metadata of the long-running operation.
632#[derive(Clone, Default, PartialEq)]
633#[non_exhaustive]
634pub struct ClientGatewayOperationMetadata {
635    /// Output only. The time the operation was created.
636    pub create_time: std::option::Option<wkt::Timestamp>,
637
638    /// Output only. The time the operation finished running.
639    pub end_time: std::option::Option<wkt::Timestamp>,
640
641    /// Output only. Server-defined resource path for the target of the operation.
642    pub target: std::string::String,
643
644    /// Output only. Name of the verb executed by the operation.
645    pub verb: std::string::String,
646
647    /// Output only. Human-readable status of the operation, if any.
648    pub status_message: std::string::String,
649
650    /// Output only. Identifies whether the user has requested cancellation
651    /// of the operation. Operations that have been cancelled successfully
652    /// have [Operation.error][] value with a
653    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
654    /// `Code.CANCELLED`.
655    ///
656    /// [google.rpc.Status.code]: rpc::model::Status::code
657    pub requested_cancellation: bool,
658
659    /// Output only. API version used to start the operation.
660    pub api_version: std::string::String,
661
662    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
663}
664
665impl ClientGatewayOperationMetadata {
666    pub fn new() -> Self {
667        std::default::Default::default()
668    }
669
670    /// Sets the value of [create_time][crate::model::ClientGatewayOperationMetadata::create_time].
671    pub fn set_create_time<T>(mut self, v: T) -> Self
672    where
673        T: std::convert::Into<wkt::Timestamp>,
674    {
675        self.create_time = std::option::Option::Some(v.into());
676        self
677    }
678
679    /// Sets or clears the value of [create_time][crate::model::ClientGatewayOperationMetadata::create_time].
680    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
681    where
682        T: std::convert::Into<wkt::Timestamp>,
683    {
684        self.create_time = v.map(|x| x.into());
685        self
686    }
687
688    /// Sets the value of [end_time][crate::model::ClientGatewayOperationMetadata::end_time].
689    pub fn set_end_time<T>(mut self, v: T) -> Self
690    where
691        T: std::convert::Into<wkt::Timestamp>,
692    {
693        self.end_time = std::option::Option::Some(v.into());
694        self
695    }
696
697    /// Sets or clears the value of [end_time][crate::model::ClientGatewayOperationMetadata::end_time].
698    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
699    where
700        T: std::convert::Into<wkt::Timestamp>,
701    {
702        self.end_time = v.map(|x| x.into());
703        self
704    }
705
706    /// Sets the value of [target][crate::model::ClientGatewayOperationMetadata::target].
707    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
708        self.target = v.into();
709        self
710    }
711
712    /// Sets the value of [verb][crate::model::ClientGatewayOperationMetadata::verb].
713    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
714        self.verb = v.into();
715        self
716    }
717
718    /// Sets the value of [status_message][crate::model::ClientGatewayOperationMetadata::status_message].
719    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
720        self.status_message = v.into();
721        self
722    }
723
724    /// Sets the value of [requested_cancellation][crate::model::ClientGatewayOperationMetadata::requested_cancellation].
725    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
726        self.requested_cancellation = v.into();
727        self
728    }
729
730    /// Sets the value of [api_version][crate::model::ClientGatewayOperationMetadata::api_version].
731    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
732        self.api_version = v.into();
733        self
734    }
735}
736
737impl wkt::message::Message for ClientGatewayOperationMetadata {
738    fn typename() -> &'static str {
739        "type.googleapis.com/google.cloud.beyondcorp.clientgateways.v1.ClientGatewayOperationMetadata"
740    }
741}