google_cloud_eventarc_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 rpc;
31extern crate serde;
32extern crate serde_json;
33extern crate serde_with;
34extern crate std;
35extern crate tracing;
36extern crate wkt;
37
38mod debug;
39mod deserialize;
40mod serialize;
41
42/// A representation of the Channel resource.
43/// A Channel is a resource on which event providers publish their events.
44/// The published events are delivered through the transport associated with the
45/// channel. Note that a channel is associated with exactly one event provider.
46#[derive(Clone, Default, PartialEq)]
47#[non_exhaustive]
48pub struct Channel {
49    /// Required. The resource name of the channel. Must be unique within the
50    /// location on the project and must be in
51    /// `projects/{project}/locations/{location}/channels/{channel_id}` format.
52    pub name: std::string::String,
53
54    /// Output only. Server assigned unique identifier for the channel. The value
55    /// is a UUID4 string and guaranteed to remain unchanged until the resource is
56    /// deleted.
57    pub uid: std::string::String,
58
59    /// Output only. The creation time.
60    pub create_time: std::option::Option<wkt::Timestamp>,
61
62    /// Output only. The last-modified time.
63    pub update_time: std::option::Option<wkt::Timestamp>,
64
65    /// The name of the event provider (e.g. Eventarc SaaS partner) associated
66    /// with the channel. This provider will be granted permissions to publish
67    /// events to the channel. Format:
68    /// `projects/{project}/locations/{location}/providers/{provider_id}`.
69    pub provider: std::string::String,
70
71    /// Output only. The state of a Channel.
72    pub state: crate::model::channel::State,
73
74    /// Output only. The activation token for the channel. The token must be used
75    /// by the provider to register the channel for publishing.
76    pub activation_token: std::string::String,
77
78    /// Optional. Resource name of a KMS crypto key (managed by the user) used to
79    /// encrypt/decrypt their event data.
80    ///
81    /// It must match the pattern
82    /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
83    pub crypto_key_name: std::string::String,
84
85    /// Output only. Whether or not this Channel satisfies the requirements of
86    /// physical zone separation
87    pub satisfies_pzs: bool,
88
89    /// Optional. Resource labels.
90    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
91
92    pub transport: std::option::Option<crate::model::channel::Transport>,
93
94    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95}
96
97impl Channel {
98    pub fn new() -> Self {
99        std::default::Default::default()
100    }
101
102    /// Sets the value of [name][crate::model::Channel::name].
103    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104        self.name = v.into();
105        self
106    }
107
108    /// Sets the value of [uid][crate::model::Channel::uid].
109    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110        self.uid = v.into();
111        self
112    }
113
114    /// Sets the value of [create_time][crate::model::Channel::create_time].
115    pub fn set_create_time<T>(mut self, v: T) -> Self
116    where
117        T: std::convert::Into<wkt::Timestamp>,
118    {
119        self.create_time = std::option::Option::Some(v.into());
120        self
121    }
122
123    /// Sets or clears the value of [create_time][crate::model::Channel::create_time].
124    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
125    where
126        T: std::convert::Into<wkt::Timestamp>,
127    {
128        self.create_time = v.map(|x| x.into());
129        self
130    }
131
132    /// Sets the value of [update_time][crate::model::Channel::update_time].
133    pub fn set_update_time<T>(mut self, v: T) -> Self
134    where
135        T: std::convert::Into<wkt::Timestamp>,
136    {
137        self.update_time = std::option::Option::Some(v.into());
138        self
139    }
140
141    /// Sets or clears the value of [update_time][crate::model::Channel::update_time].
142    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
143    where
144        T: std::convert::Into<wkt::Timestamp>,
145    {
146        self.update_time = v.map(|x| x.into());
147        self
148    }
149
150    /// Sets the value of [provider][crate::model::Channel::provider].
151    pub fn set_provider<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
152        self.provider = v.into();
153        self
154    }
155
156    /// Sets the value of [state][crate::model::Channel::state].
157    pub fn set_state<T: std::convert::Into<crate::model::channel::State>>(mut self, v: T) -> Self {
158        self.state = v.into();
159        self
160    }
161
162    /// Sets the value of [activation_token][crate::model::Channel::activation_token].
163    pub fn set_activation_token<T: std::convert::Into<std::string::String>>(
164        mut self,
165        v: T,
166    ) -> Self {
167        self.activation_token = v.into();
168        self
169    }
170
171    /// Sets the value of [crypto_key_name][crate::model::Channel::crypto_key_name].
172    pub fn set_crypto_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
173        self.crypto_key_name = v.into();
174        self
175    }
176
177    /// Sets the value of [satisfies_pzs][crate::model::Channel::satisfies_pzs].
178    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
179        self.satisfies_pzs = v.into();
180        self
181    }
182
183    /// Sets the value of [labels][crate::model::Channel::labels].
184    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
185    where
186        T: std::iter::IntoIterator<Item = (K, V)>,
187        K: std::convert::Into<std::string::String>,
188        V: std::convert::Into<std::string::String>,
189    {
190        use std::iter::Iterator;
191        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
192        self
193    }
194
195    /// Sets the value of [transport][crate::model::Channel::transport].
196    ///
197    /// Note that all the setters affecting `transport` are mutually
198    /// exclusive.
199    pub fn set_transport<
200        T: std::convert::Into<std::option::Option<crate::model::channel::Transport>>,
201    >(
202        mut self,
203        v: T,
204    ) -> Self {
205        self.transport = v.into();
206        self
207    }
208
209    /// The value of [transport][crate::model::Channel::transport]
210    /// if it holds a `PubsubTopic`, `None` if the field is not set or
211    /// holds a different branch.
212    pub fn pubsub_topic(&self) -> std::option::Option<&std::string::String> {
213        #[allow(unreachable_patterns)]
214        self.transport.as_ref().and_then(|v| match v {
215            crate::model::channel::Transport::PubsubTopic(v) => std::option::Option::Some(v),
216            _ => std::option::Option::None,
217        })
218    }
219
220    /// Sets the value of [transport][crate::model::Channel::transport]
221    /// to hold a `PubsubTopic`.
222    ///
223    /// Note that all the setters affecting `transport` are
224    /// mutually exclusive.
225    pub fn set_pubsub_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
226        self.transport =
227            std::option::Option::Some(crate::model::channel::Transport::PubsubTopic(v.into()));
228        self
229    }
230}
231
232impl wkt::message::Message for Channel {
233    fn typename() -> &'static str {
234        "type.googleapis.com/google.cloud.eventarc.v1.Channel"
235    }
236}
237
238/// Defines additional types related to [Channel].
239pub mod channel {
240    #[allow(unused_imports)]
241    use super::*;
242
243    /// State lists all the possible states of a Channel
244    ///
245    /// # Working with unknown values
246    ///
247    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
248    /// additional enum variants at any time. Adding new variants is not considered
249    /// a breaking change. Applications should write their code in anticipation of:
250    ///
251    /// - New values appearing in future releases of the client library, **and**
252    /// - New values received dynamically, without application changes.
253    ///
254    /// Please consult the [Working with enums] section in the user guide for some
255    /// guidelines.
256    ///
257    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
258    #[derive(Clone, Debug, PartialEq)]
259    #[non_exhaustive]
260    pub enum State {
261        /// Default value. This value is unused.
262        Unspecified,
263        /// The PENDING state indicates that a Channel has been created successfully
264        /// and there is a new activation token available for the subscriber to use
265        /// to convey the Channel to the provider in order to create a Connection.
266        Pending,
267        /// The ACTIVE state indicates that a Channel has been successfully
268        /// connected with the event provider.
269        /// An ACTIVE Channel is ready to receive and route events from the
270        /// event provider.
271        Active,
272        /// The INACTIVE state indicates that the Channel cannot receive events
273        /// permanently. There are two possible cases this state can happen:
274        ///
275        /// 1. The SaaS provider disconnected from this Channel.
276        /// 1. The Channel activation token has expired but the SaaS provider
277        ///    wasn't connected.
278        ///
279        /// To re-establish a Connection with a provider, the subscriber
280        /// should create a new Channel and give it to the provider.
281        Inactive,
282        /// If set, the enum was initialized with an unknown value.
283        ///
284        /// Applications can examine the value using [State::value] or
285        /// [State::name].
286        UnknownValue(state::UnknownValue),
287    }
288
289    #[doc(hidden)]
290    pub mod state {
291        #[allow(unused_imports)]
292        use super::*;
293        #[derive(Clone, Debug, PartialEq)]
294        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
295    }
296
297    impl State {
298        /// Gets the enum value.
299        ///
300        /// Returns `None` if the enum contains an unknown value deserialized from
301        /// the string representation of enums.
302        pub fn value(&self) -> std::option::Option<i32> {
303            match self {
304                Self::Unspecified => std::option::Option::Some(0),
305                Self::Pending => std::option::Option::Some(1),
306                Self::Active => std::option::Option::Some(2),
307                Self::Inactive => std::option::Option::Some(3),
308                Self::UnknownValue(u) => u.0.value(),
309            }
310        }
311
312        /// Gets the enum value as a string.
313        ///
314        /// Returns `None` if the enum contains an unknown value deserialized from
315        /// the integer representation of enums.
316        pub fn name(&self) -> std::option::Option<&str> {
317            match self {
318                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
319                Self::Pending => std::option::Option::Some("PENDING"),
320                Self::Active => std::option::Option::Some("ACTIVE"),
321                Self::Inactive => std::option::Option::Some("INACTIVE"),
322                Self::UnknownValue(u) => u.0.name(),
323            }
324        }
325    }
326
327    impl std::default::Default for State {
328        fn default() -> Self {
329            use std::convert::From;
330            Self::from(0)
331        }
332    }
333
334    impl std::fmt::Display for State {
335        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
336            wkt::internal::display_enum(f, self.name(), self.value())
337        }
338    }
339
340    impl std::convert::From<i32> for State {
341        fn from(value: i32) -> Self {
342            match value {
343                0 => Self::Unspecified,
344                1 => Self::Pending,
345                2 => Self::Active,
346                3 => Self::Inactive,
347                _ => Self::UnknownValue(state::UnknownValue(
348                    wkt::internal::UnknownEnumValue::Integer(value),
349                )),
350            }
351        }
352    }
353
354    impl std::convert::From<&str> for State {
355        fn from(value: &str) -> Self {
356            use std::string::ToString;
357            match value {
358                "STATE_UNSPECIFIED" => Self::Unspecified,
359                "PENDING" => Self::Pending,
360                "ACTIVE" => Self::Active,
361                "INACTIVE" => Self::Inactive,
362                _ => Self::UnknownValue(state::UnknownValue(
363                    wkt::internal::UnknownEnumValue::String(value.to_string()),
364                )),
365            }
366        }
367    }
368
369    impl serde::ser::Serialize for State {
370        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
371        where
372            S: serde::Serializer,
373        {
374            match self {
375                Self::Unspecified => serializer.serialize_i32(0),
376                Self::Pending => serializer.serialize_i32(1),
377                Self::Active => serializer.serialize_i32(2),
378                Self::Inactive => serializer.serialize_i32(3),
379                Self::UnknownValue(u) => u.0.serialize(serializer),
380            }
381        }
382    }
383
384    impl<'de> serde::de::Deserialize<'de> for State {
385        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
386        where
387            D: serde::Deserializer<'de>,
388        {
389            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
390                ".google.cloud.eventarc.v1.Channel.State",
391            ))
392        }
393    }
394
395    #[derive(Clone, Debug, PartialEq)]
396    #[non_exhaustive]
397    pub enum Transport {
398        /// Output only. The name of the Pub/Sub topic created and managed by
399        /// Eventarc system as a transport for the event delivery. Format:
400        /// `projects/{project}/topics/{topic_id}`.
401        PubsubTopic(std::string::String),
402    }
403}
404
405/// A representation of the ChannelConnection resource.
406/// A ChannelConnection is a resource which event providers create during the
407/// activation process to establish a connection between the provider and the
408/// subscriber channel.
409#[derive(Clone, Default, PartialEq)]
410#[non_exhaustive]
411pub struct ChannelConnection {
412    /// Required. The name of the connection.
413    pub name: std::string::String,
414
415    /// Output only. Server assigned ID of the resource.
416    /// The server guarantees uniqueness and immutability until deleted.
417    pub uid: std::string::String,
418
419    /// Required. The name of the connected subscriber Channel.
420    /// This is a weak reference to avoid cross project and cross accounts
421    /// references. This must be in
422    /// `projects/{project}/location/{location}/channels/{channel_id}` format.
423    pub channel: std::string::String,
424
425    /// Output only. The creation time.
426    pub create_time: std::option::Option<wkt::Timestamp>,
427
428    /// Output only. The last-modified time.
429    pub update_time: std::option::Option<wkt::Timestamp>,
430
431    /// Input only. Activation token for the channel. The token will be used
432    /// during the creation of ChannelConnection to bind the channel with the
433    /// provider project. This field will not be stored in the provider resource.
434    pub activation_token: std::string::String,
435
436    /// Optional. Resource labels.
437    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
438
439    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
440}
441
442impl ChannelConnection {
443    pub fn new() -> Self {
444        std::default::Default::default()
445    }
446
447    /// Sets the value of [name][crate::model::ChannelConnection::name].
448    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
449        self.name = v.into();
450        self
451    }
452
453    /// Sets the value of [uid][crate::model::ChannelConnection::uid].
454    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
455        self.uid = v.into();
456        self
457    }
458
459    /// Sets the value of [channel][crate::model::ChannelConnection::channel].
460    pub fn set_channel<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
461        self.channel = v.into();
462        self
463    }
464
465    /// Sets the value of [create_time][crate::model::ChannelConnection::create_time].
466    pub fn set_create_time<T>(mut self, v: T) -> Self
467    where
468        T: std::convert::Into<wkt::Timestamp>,
469    {
470        self.create_time = std::option::Option::Some(v.into());
471        self
472    }
473
474    /// Sets or clears the value of [create_time][crate::model::ChannelConnection::create_time].
475    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
476    where
477        T: std::convert::Into<wkt::Timestamp>,
478    {
479        self.create_time = v.map(|x| x.into());
480        self
481    }
482
483    /// Sets the value of [update_time][crate::model::ChannelConnection::update_time].
484    pub fn set_update_time<T>(mut self, v: T) -> Self
485    where
486        T: std::convert::Into<wkt::Timestamp>,
487    {
488        self.update_time = std::option::Option::Some(v.into());
489        self
490    }
491
492    /// Sets or clears the value of [update_time][crate::model::ChannelConnection::update_time].
493    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
494    where
495        T: std::convert::Into<wkt::Timestamp>,
496    {
497        self.update_time = v.map(|x| x.into());
498        self
499    }
500
501    /// Sets the value of [activation_token][crate::model::ChannelConnection::activation_token].
502    pub fn set_activation_token<T: std::convert::Into<std::string::String>>(
503        mut self,
504        v: T,
505    ) -> Self {
506        self.activation_token = v.into();
507        self
508    }
509
510    /// Sets the value of [labels][crate::model::ChannelConnection::labels].
511    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
512    where
513        T: std::iter::IntoIterator<Item = (K, V)>,
514        K: std::convert::Into<std::string::String>,
515        V: std::convert::Into<std::string::String>,
516    {
517        use std::iter::Iterator;
518        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
519        self
520    }
521}
522
523impl wkt::message::Message for ChannelConnection {
524    fn typename() -> &'static str {
525        "type.googleapis.com/google.cloud.eventarc.v1.ChannelConnection"
526    }
527}
528
529/// A representation of the Provider resource.
530#[derive(Clone, Default, PartialEq)]
531#[non_exhaustive]
532pub struct Provider {
533    /// Output only. In
534    /// `projects/{project}/locations/{location}/providers/{provider_id}` format.
535    pub name: std::string::String,
536
537    /// Output only. Human friendly name for the Provider. For example "Cloud
538    /// Storage".
539    pub display_name: std::string::String,
540
541    /// Output only. Event types for this provider.
542    pub event_types: std::vec::Vec<crate::model::EventType>,
543
544    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
545}
546
547impl Provider {
548    pub fn new() -> Self {
549        std::default::Default::default()
550    }
551
552    /// Sets the value of [name][crate::model::Provider::name].
553    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
554        self.name = v.into();
555        self
556    }
557
558    /// Sets the value of [display_name][crate::model::Provider::display_name].
559    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
560        self.display_name = v.into();
561        self
562    }
563
564    /// Sets the value of [event_types][crate::model::Provider::event_types].
565    pub fn set_event_types<T, V>(mut self, v: T) -> Self
566    where
567        T: std::iter::IntoIterator<Item = V>,
568        V: std::convert::Into<crate::model::EventType>,
569    {
570        use std::iter::Iterator;
571        self.event_types = v.into_iter().map(|i| i.into()).collect();
572        self
573    }
574}
575
576impl wkt::message::Message for Provider {
577    fn typename() -> &'static str {
578        "type.googleapis.com/google.cloud.eventarc.v1.Provider"
579    }
580}
581
582/// A representation of the event type resource.
583#[derive(Clone, Default, PartialEq)]
584#[non_exhaustive]
585pub struct EventType {
586    /// Output only. The full name of the event type (for example,
587    /// "google.cloud.storage.object.v1.finalized"). In the form of
588    /// {provider-specific-prefix}.{resource}.{version}.{verb}. Types MUST be
589    /// versioned and event schemas are guaranteed to remain backward compatible
590    /// within one version. Note that event type versions and API versions do not
591    /// need to match.
592    pub r#type: std::string::String,
593
594    /// Output only. Human friendly description of what the event type is about.
595    /// For example "Bucket created in Cloud Storage".
596    pub description: std::string::String,
597
598    /// Output only. Filtering attributes for the event type.
599    pub filtering_attributes: std::vec::Vec<crate::model::FilteringAttribute>,
600
601    /// Output only. URI for the event schema.
602    /// For example
603    /// `https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto`
604    pub event_schema_uri: std::string::String,
605
606    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
607}
608
609impl EventType {
610    pub fn new() -> Self {
611        std::default::Default::default()
612    }
613
614    /// Sets the value of [r#type][crate::model::EventType::type].
615    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
616        self.r#type = v.into();
617        self
618    }
619
620    /// Sets the value of [description][crate::model::EventType::description].
621    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
622        self.description = v.into();
623        self
624    }
625
626    /// Sets the value of [filtering_attributes][crate::model::EventType::filtering_attributes].
627    pub fn set_filtering_attributes<T, V>(mut self, v: T) -> Self
628    where
629        T: std::iter::IntoIterator<Item = V>,
630        V: std::convert::Into<crate::model::FilteringAttribute>,
631    {
632        use std::iter::Iterator;
633        self.filtering_attributes = v.into_iter().map(|i| i.into()).collect();
634        self
635    }
636
637    /// Sets the value of [event_schema_uri][crate::model::EventType::event_schema_uri].
638    pub fn set_event_schema_uri<T: std::convert::Into<std::string::String>>(
639        mut self,
640        v: T,
641    ) -> Self {
642        self.event_schema_uri = v.into();
643        self
644    }
645}
646
647impl wkt::message::Message for EventType {
648    fn typename() -> &'static str {
649        "type.googleapis.com/google.cloud.eventarc.v1.EventType"
650    }
651}
652
653/// A representation of the FilteringAttribute resource.
654/// Filtering attributes are per event type.
655#[derive(Clone, Default, PartialEq)]
656#[non_exhaustive]
657pub struct FilteringAttribute {
658    /// Output only. Attribute used for filtering the event type.
659    pub attribute: std::string::String,
660
661    /// Output only. Description of the purpose of the attribute.
662    pub description: std::string::String,
663
664    /// Output only. If true, the triggers for this provider should always specify
665    /// a filter on these attributes. Trigger creation will fail otherwise.
666    pub required: bool,
667
668    /// Output only. If true, the attribute accepts matching expressions in the
669    /// Eventarc PathPattern format.
670    pub path_pattern_supported: bool,
671
672    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
673}
674
675impl FilteringAttribute {
676    pub fn new() -> Self {
677        std::default::Default::default()
678    }
679
680    /// Sets the value of [attribute][crate::model::FilteringAttribute::attribute].
681    pub fn set_attribute<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
682        self.attribute = v.into();
683        self
684    }
685
686    /// Sets the value of [description][crate::model::FilteringAttribute::description].
687    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
688        self.description = v.into();
689        self
690    }
691
692    /// Sets the value of [required][crate::model::FilteringAttribute::required].
693    pub fn set_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
694        self.required = v.into();
695        self
696    }
697
698    /// Sets the value of [path_pattern_supported][crate::model::FilteringAttribute::path_pattern_supported].
699    pub fn set_path_pattern_supported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
700        self.path_pattern_supported = v.into();
701        self
702    }
703}
704
705impl wkt::message::Message for FilteringAttribute {
706    fn typename() -> &'static str {
707        "type.googleapis.com/google.cloud.eventarc.v1.FilteringAttribute"
708    }
709}
710
711/// An enrollment represents a subscription for messages on a particular message
712/// bus. It defines a matching criteria for messages on the bus and the
713/// subscriber endpoint where matched messages should be delivered.
714#[derive(Clone, Default, PartialEq)]
715#[non_exhaustive]
716pub struct Enrollment {
717    /// Identifier. Resource name of the form
718    /// projects/{project}/locations/{location}/enrollments/{enrollment}
719    pub name: std::string::String,
720
721    /// Output only. Server assigned unique identifier for the channel. The value
722    /// is a UUID4 string and guaranteed to remain unchanged until the resource is
723    /// deleted.
724    pub uid: std::string::String,
725
726    /// Output only. This checksum is computed by the server based on the value of
727    /// other fields, and might be sent only on update and delete requests to
728    /// ensure that the client has an up-to-date value before proceeding.
729    pub etag: std::string::String,
730
731    /// Output only. The creation time.
732    pub create_time: std::option::Option<wkt::Timestamp>,
733
734    /// Output only. The last-modified time.
735    pub update_time: std::option::Option<wkt::Timestamp>,
736
737    /// Optional. Resource labels.
738    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
739
740    /// Optional. Resource annotations.
741    pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
742
743    /// Optional. Resource display name.
744    pub display_name: std::string::String,
745
746    /// Required. A CEL expression identifying which messages this enrollment
747    /// applies to.
748    pub cel_match: std::string::String,
749
750    /// Required. Immutable. Resource name of the message bus identifying the
751    /// source of the messages. It matches the form
752    /// projects/{project}/locations/{location}/messageBuses/{messageBus}.
753    pub message_bus: std::string::String,
754
755    /// Required. Destination is the Pipeline that the Enrollment is delivering to.
756    /// It must point to the full resource name of a Pipeline. Format:
757    /// "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"
758    pub destination: std::string::String,
759
760    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
761}
762
763impl Enrollment {
764    pub fn new() -> Self {
765        std::default::Default::default()
766    }
767
768    /// Sets the value of [name][crate::model::Enrollment::name].
769    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
770        self.name = v.into();
771        self
772    }
773
774    /// Sets the value of [uid][crate::model::Enrollment::uid].
775    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
776        self.uid = v.into();
777        self
778    }
779
780    /// Sets the value of [etag][crate::model::Enrollment::etag].
781    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
782        self.etag = v.into();
783        self
784    }
785
786    /// Sets the value of [create_time][crate::model::Enrollment::create_time].
787    pub fn set_create_time<T>(mut self, v: T) -> Self
788    where
789        T: std::convert::Into<wkt::Timestamp>,
790    {
791        self.create_time = std::option::Option::Some(v.into());
792        self
793    }
794
795    /// Sets or clears the value of [create_time][crate::model::Enrollment::create_time].
796    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
797    where
798        T: std::convert::Into<wkt::Timestamp>,
799    {
800        self.create_time = v.map(|x| x.into());
801        self
802    }
803
804    /// Sets the value of [update_time][crate::model::Enrollment::update_time].
805    pub fn set_update_time<T>(mut self, v: T) -> Self
806    where
807        T: std::convert::Into<wkt::Timestamp>,
808    {
809        self.update_time = std::option::Option::Some(v.into());
810        self
811    }
812
813    /// Sets or clears the value of [update_time][crate::model::Enrollment::update_time].
814    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
815    where
816        T: std::convert::Into<wkt::Timestamp>,
817    {
818        self.update_time = v.map(|x| x.into());
819        self
820    }
821
822    /// Sets the value of [labels][crate::model::Enrollment::labels].
823    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
824    where
825        T: std::iter::IntoIterator<Item = (K, V)>,
826        K: std::convert::Into<std::string::String>,
827        V: std::convert::Into<std::string::String>,
828    {
829        use std::iter::Iterator;
830        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
831        self
832    }
833
834    /// Sets the value of [annotations][crate::model::Enrollment::annotations].
835    pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
836    where
837        T: std::iter::IntoIterator<Item = (K, V)>,
838        K: std::convert::Into<std::string::String>,
839        V: std::convert::Into<std::string::String>,
840    {
841        use std::iter::Iterator;
842        self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
843        self
844    }
845
846    /// Sets the value of [display_name][crate::model::Enrollment::display_name].
847    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
848        self.display_name = v.into();
849        self
850    }
851
852    /// Sets the value of [cel_match][crate::model::Enrollment::cel_match].
853    pub fn set_cel_match<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
854        self.cel_match = v.into();
855        self
856    }
857
858    /// Sets the value of [message_bus][crate::model::Enrollment::message_bus].
859    pub fn set_message_bus<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
860        self.message_bus = v.into();
861        self
862    }
863
864    /// Sets the value of [destination][crate::model::Enrollment::destination].
865    pub fn set_destination<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
866        self.destination = v.into();
867        self
868    }
869}
870
871impl wkt::message::Message for Enrollment {
872    fn typename() -> &'static str {
873        "type.googleapis.com/google.cloud.eventarc.v1.Enrollment"
874    }
875}
876
877/// The request message for the GetTrigger method.
878#[derive(Clone, Default, PartialEq)]
879#[non_exhaustive]
880pub struct GetTriggerRequest {
881    /// Required. The name of the trigger to get.
882    pub name: std::string::String,
883
884    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
885}
886
887impl GetTriggerRequest {
888    pub fn new() -> Self {
889        std::default::Default::default()
890    }
891
892    /// Sets the value of [name][crate::model::GetTriggerRequest::name].
893    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
894        self.name = v.into();
895        self
896    }
897}
898
899impl wkt::message::Message for GetTriggerRequest {
900    fn typename() -> &'static str {
901        "type.googleapis.com/google.cloud.eventarc.v1.GetTriggerRequest"
902    }
903}
904
905/// The request message for the ListTriggers method.
906#[derive(Clone, Default, PartialEq)]
907#[non_exhaustive]
908pub struct ListTriggersRequest {
909    /// Required. The parent collection to list triggers on.
910    pub parent: std::string::String,
911
912    /// The maximum number of triggers to return on each page.
913    ///
914    /// Note: The service may send fewer.
915    pub page_size: i32,
916
917    /// The page token; provide the value from the `next_page_token` field in a
918    /// previous `ListTriggers` call to retrieve the subsequent page.
919    ///
920    /// When paginating, all other parameters provided to `ListTriggers` must match
921    /// the call that provided the page token.
922    pub page_token: std::string::String,
923
924    /// The sorting order of the resources returned. Value should be a
925    /// comma-separated list of fields. The default sorting order is ascending. To
926    /// specify descending order for a field, append a `desc` suffix; for example:
927    /// `name desc, trigger_id`.
928    pub order_by: std::string::String,
929
930    /// Filter field. Used to filter the Triggers to be listed. Possible filters
931    /// are described in <https://google.aip.dev/160>. For example, using
932    /// "?filter=destination:gke" would list only Triggers with a gke destination.
933    pub filter: std::string::String,
934
935    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
936}
937
938impl ListTriggersRequest {
939    pub fn new() -> Self {
940        std::default::Default::default()
941    }
942
943    /// Sets the value of [parent][crate::model::ListTriggersRequest::parent].
944    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
945        self.parent = v.into();
946        self
947    }
948
949    /// Sets the value of [page_size][crate::model::ListTriggersRequest::page_size].
950    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
951        self.page_size = v.into();
952        self
953    }
954
955    /// Sets the value of [page_token][crate::model::ListTriggersRequest::page_token].
956    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
957        self.page_token = v.into();
958        self
959    }
960
961    /// Sets the value of [order_by][crate::model::ListTriggersRequest::order_by].
962    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
963        self.order_by = v.into();
964        self
965    }
966
967    /// Sets the value of [filter][crate::model::ListTriggersRequest::filter].
968    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
969        self.filter = v.into();
970        self
971    }
972}
973
974impl wkt::message::Message for ListTriggersRequest {
975    fn typename() -> &'static str {
976        "type.googleapis.com/google.cloud.eventarc.v1.ListTriggersRequest"
977    }
978}
979
980/// The response message for the `ListTriggers` method.
981#[derive(Clone, Default, PartialEq)]
982#[non_exhaustive]
983pub struct ListTriggersResponse {
984    /// The requested triggers, up to the number specified in `page_size`.
985    pub triggers: std::vec::Vec<crate::model::Trigger>,
986
987    /// A page token that can be sent to `ListTriggers` to request the next page.
988    /// If this is empty, then there are no more pages.
989    pub next_page_token: std::string::String,
990
991    /// Unreachable resources, if any.
992    pub unreachable: std::vec::Vec<std::string::String>,
993
994    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
995}
996
997impl ListTriggersResponse {
998    pub fn new() -> Self {
999        std::default::Default::default()
1000    }
1001
1002    /// Sets the value of [triggers][crate::model::ListTriggersResponse::triggers].
1003    pub fn set_triggers<T, V>(mut self, v: T) -> Self
1004    where
1005        T: std::iter::IntoIterator<Item = V>,
1006        V: std::convert::Into<crate::model::Trigger>,
1007    {
1008        use std::iter::Iterator;
1009        self.triggers = v.into_iter().map(|i| i.into()).collect();
1010        self
1011    }
1012
1013    /// Sets the value of [next_page_token][crate::model::ListTriggersResponse::next_page_token].
1014    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1015        self.next_page_token = v.into();
1016        self
1017    }
1018
1019    /// Sets the value of [unreachable][crate::model::ListTriggersResponse::unreachable].
1020    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1021    where
1022        T: std::iter::IntoIterator<Item = V>,
1023        V: std::convert::Into<std::string::String>,
1024    {
1025        use std::iter::Iterator;
1026        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1027        self
1028    }
1029}
1030
1031impl wkt::message::Message for ListTriggersResponse {
1032    fn typename() -> &'static str {
1033        "type.googleapis.com/google.cloud.eventarc.v1.ListTriggersResponse"
1034    }
1035}
1036
1037#[doc(hidden)]
1038impl gax::paginator::internal::PageableResponse for ListTriggersResponse {
1039    type PageItem = crate::model::Trigger;
1040
1041    fn items(self) -> std::vec::Vec<Self::PageItem> {
1042        self.triggers
1043    }
1044
1045    fn next_page_token(&self) -> std::string::String {
1046        use std::clone::Clone;
1047        self.next_page_token.clone()
1048    }
1049}
1050
1051/// The request message for the CreateTrigger method.
1052#[derive(Clone, Default, PartialEq)]
1053#[non_exhaustive]
1054pub struct CreateTriggerRequest {
1055    /// Required. The parent collection in which to add this trigger.
1056    pub parent: std::string::String,
1057
1058    /// Required. The trigger to create.
1059    pub trigger: std::option::Option<crate::model::Trigger>,
1060
1061    /// Required. The user-provided ID to be assigned to the trigger.
1062    pub trigger_id: std::string::String,
1063
1064    /// Optional. If set, validate the request and preview the review, but do not
1065    /// post it.
1066    pub validate_only: bool,
1067
1068    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1069}
1070
1071impl CreateTriggerRequest {
1072    pub fn new() -> Self {
1073        std::default::Default::default()
1074    }
1075
1076    /// Sets the value of [parent][crate::model::CreateTriggerRequest::parent].
1077    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1078        self.parent = v.into();
1079        self
1080    }
1081
1082    /// Sets the value of [trigger][crate::model::CreateTriggerRequest::trigger].
1083    pub fn set_trigger<T>(mut self, v: T) -> Self
1084    where
1085        T: std::convert::Into<crate::model::Trigger>,
1086    {
1087        self.trigger = std::option::Option::Some(v.into());
1088        self
1089    }
1090
1091    /// Sets or clears the value of [trigger][crate::model::CreateTriggerRequest::trigger].
1092    pub fn set_or_clear_trigger<T>(mut self, v: std::option::Option<T>) -> Self
1093    where
1094        T: std::convert::Into<crate::model::Trigger>,
1095    {
1096        self.trigger = v.map(|x| x.into());
1097        self
1098    }
1099
1100    /// Sets the value of [trigger_id][crate::model::CreateTriggerRequest::trigger_id].
1101    pub fn set_trigger_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1102        self.trigger_id = v.into();
1103        self
1104    }
1105
1106    /// Sets the value of [validate_only][crate::model::CreateTriggerRequest::validate_only].
1107    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1108        self.validate_only = v.into();
1109        self
1110    }
1111}
1112
1113impl wkt::message::Message for CreateTriggerRequest {
1114    fn typename() -> &'static str {
1115        "type.googleapis.com/google.cloud.eventarc.v1.CreateTriggerRequest"
1116    }
1117}
1118
1119/// The request message for the UpdateTrigger method.
1120#[derive(Clone, Default, PartialEq)]
1121#[non_exhaustive]
1122pub struct UpdateTriggerRequest {
1123    /// The trigger to be updated.
1124    pub trigger: std::option::Option<crate::model::Trigger>,
1125
1126    /// The fields to be updated; only fields explicitly provided are updated.
1127    /// If no field mask is provided, all provided fields in the request are
1128    /// updated. To update all fields, provide a field mask of "*".
1129    pub update_mask: std::option::Option<wkt::FieldMask>,
1130
1131    /// If set to true, and the trigger is not found, a new trigger will be
1132    /// created. In this situation, `update_mask` is ignored.
1133    pub allow_missing: bool,
1134
1135    /// Optional. If set, validate the request and preview the review, but do not
1136    /// post it.
1137    pub validate_only: bool,
1138
1139    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1140}
1141
1142impl UpdateTriggerRequest {
1143    pub fn new() -> Self {
1144        std::default::Default::default()
1145    }
1146
1147    /// Sets the value of [trigger][crate::model::UpdateTriggerRequest::trigger].
1148    pub fn set_trigger<T>(mut self, v: T) -> Self
1149    where
1150        T: std::convert::Into<crate::model::Trigger>,
1151    {
1152        self.trigger = std::option::Option::Some(v.into());
1153        self
1154    }
1155
1156    /// Sets or clears the value of [trigger][crate::model::UpdateTriggerRequest::trigger].
1157    pub fn set_or_clear_trigger<T>(mut self, v: std::option::Option<T>) -> Self
1158    where
1159        T: std::convert::Into<crate::model::Trigger>,
1160    {
1161        self.trigger = v.map(|x| x.into());
1162        self
1163    }
1164
1165    /// Sets the value of [update_mask][crate::model::UpdateTriggerRequest::update_mask].
1166    pub fn set_update_mask<T>(mut self, v: T) -> Self
1167    where
1168        T: std::convert::Into<wkt::FieldMask>,
1169    {
1170        self.update_mask = std::option::Option::Some(v.into());
1171        self
1172    }
1173
1174    /// Sets or clears the value of [update_mask][crate::model::UpdateTriggerRequest::update_mask].
1175    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1176    where
1177        T: std::convert::Into<wkt::FieldMask>,
1178    {
1179        self.update_mask = v.map(|x| x.into());
1180        self
1181    }
1182
1183    /// Sets the value of [allow_missing][crate::model::UpdateTriggerRequest::allow_missing].
1184    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1185        self.allow_missing = v.into();
1186        self
1187    }
1188
1189    /// Sets the value of [validate_only][crate::model::UpdateTriggerRequest::validate_only].
1190    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1191        self.validate_only = v.into();
1192        self
1193    }
1194}
1195
1196impl wkt::message::Message for UpdateTriggerRequest {
1197    fn typename() -> &'static str {
1198        "type.googleapis.com/google.cloud.eventarc.v1.UpdateTriggerRequest"
1199    }
1200}
1201
1202/// The request message for the DeleteTrigger method.
1203#[derive(Clone, Default, PartialEq)]
1204#[non_exhaustive]
1205pub struct DeleteTriggerRequest {
1206    /// Required. The name of the trigger to be deleted.
1207    pub name: std::string::String,
1208
1209    /// If provided, the trigger will only be deleted if the etag matches the
1210    /// current etag on the resource.
1211    pub etag: std::string::String,
1212
1213    /// If set to true, and the trigger is not found, the request will succeed
1214    /// but no action will be taken on the server.
1215    pub allow_missing: bool,
1216
1217    /// Optional. If set, validate the request and preview the review, but do not
1218    /// post it.
1219    pub validate_only: bool,
1220
1221    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1222}
1223
1224impl DeleteTriggerRequest {
1225    pub fn new() -> Self {
1226        std::default::Default::default()
1227    }
1228
1229    /// Sets the value of [name][crate::model::DeleteTriggerRequest::name].
1230    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1231        self.name = v.into();
1232        self
1233    }
1234
1235    /// Sets the value of [etag][crate::model::DeleteTriggerRequest::etag].
1236    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1237        self.etag = v.into();
1238        self
1239    }
1240
1241    /// Sets the value of [allow_missing][crate::model::DeleteTriggerRequest::allow_missing].
1242    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1243        self.allow_missing = v.into();
1244        self
1245    }
1246
1247    /// Sets the value of [validate_only][crate::model::DeleteTriggerRequest::validate_only].
1248    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1249        self.validate_only = v.into();
1250        self
1251    }
1252}
1253
1254impl wkt::message::Message for DeleteTriggerRequest {
1255    fn typename() -> &'static str {
1256        "type.googleapis.com/google.cloud.eventarc.v1.DeleteTriggerRequest"
1257    }
1258}
1259
1260/// The request message for the GetChannel method.
1261#[derive(Clone, Default, PartialEq)]
1262#[non_exhaustive]
1263pub struct GetChannelRequest {
1264    /// Required. The name of the channel to get.
1265    pub name: std::string::String,
1266
1267    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1268}
1269
1270impl GetChannelRequest {
1271    pub fn new() -> Self {
1272        std::default::Default::default()
1273    }
1274
1275    /// Sets the value of [name][crate::model::GetChannelRequest::name].
1276    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1277        self.name = v.into();
1278        self
1279    }
1280}
1281
1282impl wkt::message::Message for GetChannelRequest {
1283    fn typename() -> &'static str {
1284        "type.googleapis.com/google.cloud.eventarc.v1.GetChannelRequest"
1285    }
1286}
1287
1288/// The request message for the ListChannels method.
1289#[derive(Clone, Default, PartialEq)]
1290#[non_exhaustive]
1291pub struct ListChannelsRequest {
1292    /// Required. The parent collection to list channels on.
1293    pub parent: std::string::String,
1294
1295    /// The maximum number of channels to return on each page.
1296    ///
1297    /// Note: The service may send fewer.
1298    pub page_size: i32,
1299
1300    /// The page token; provide the value from the `next_page_token` field in a
1301    /// previous `ListChannels` call to retrieve the subsequent page.
1302    ///
1303    /// When paginating, all other parameters provided to `ListChannels` must
1304    /// match the call that provided the page token.
1305    pub page_token: std::string::String,
1306
1307    /// The sorting order of the resources returned. Value should be a
1308    /// comma-separated list of fields. The default sorting order is ascending. To
1309    /// specify descending order for a field, append a `desc` suffix; for example:
1310    /// `name desc, channel_id`.
1311    pub order_by: std::string::String,
1312
1313    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1314}
1315
1316impl ListChannelsRequest {
1317    pub fn new() -> Self {
1318        std::default::Default::default()
1319    }
1320
1321    /// Sets the value of [parent][crate::model::ListChannelsRequest::parent].
1322    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1323        self.parent = v.into();
1324        self
1325    }
1326
1327    /// Sets the value of [page_size][crate::model::ListChannelsRequest::page_size].
1328    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1329        self.page_size = v.into();
1330        self
1331    }
1332
1333    /// Sets the value of [page_token][crate::model::ListChannelsRequest::page_token].
1334    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1335        self.page_token = v.into();
1336        self
1337    }
1338
1339    /// Sets the value of [order_by][crate::model::ListChannelsRequest::order_by].
1340    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1341        self.order_by = v.into();
1342        self
1343    }
1344}
1345
1346impl wkt::message::Message for ListChannelsRequest {
1347    fn typename() -> &'static str {
1348        "type.googleapis.com/google.cloud.eventarc.v1.ListChannelsRequest"
1349    }
1350}
1351
1352/// The response message for the `ListChannels` method.
1353#[derive(Clone, Default, PartialEq)]
1354#[non_exhaustive]
1355pub struct ListChannelsResponse {
1356    /// The requested channels, up to the number specified in `page_size`.
1357    pub channels: std::vec::Vec<crate::model::Channel>,
1358
1359    /// A page token that can be sent to `ListChannels` to request the next page.
1360    /// If this is empty, then there are no more pages.
1361    pub next_page_token: std::string::String,
1362
1363    /// Unreachable resources, if any.
1364    pub unreachable: std::vec::Vec<std::string::String>,
1365
1366    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1367}
1368
1369impl ListChannelsResponse {
1370    pub fn new() -> Self {
1371        std::default::Default::default()
1372    }
1373
1374    /// Sets the value of [channels][crate::model::ListChannelsResponse::channels].
1375    pub fn set_channels<T, V>(mut self, v: T) -> Self
1376    where
1377        T: std::iter::IntoIterator<Item = V>,
1378        V: std::convert::Into<crate::model::Channel>,
1379    {
1380        use std::iter::Iterator;
1381        self.channels = v.into_iter().map(|i| i.into()).collect();
1382        self
1383    }
1384
1385    /// Sets the value of [next_page_token][crate::model::ListChannelsResponse::next_page_token].
1386    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1387        self.next_page_token = v.into();
1388        self
1389    }
1390
1391    /// Sets the value of [unreachable][crate::model::ListChannelsResponse::unreachable].
1392    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1393    where
1394        T: std::iter::IntoIterator<Item = V>,
1395        V: std::convert::Into<std::string::String>,
1396    {
1397        use std::iter::Iterator;
1398        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1399        self
1400    }
1401}
1402
1403impl wkt::message::Message for ListChannelsResponse {
1404    fn typename() -> &'static str {
1405        "type.googleapis.com/google.cloud.eventarc.v1.ListChannelsResponse"
1406    }
1407}
1408
1409#[doc(hidden)]
1410impl gax::paginator::internal::PageableResponse for ListChannelsResponse {
1411    type PageItem = crate::model::Channel;
1412
1413    fn items(self) -> std::vec::Vec<Self::PageItem> {
1414        self.channels
1415    }
1416
1417    fn next_page_token(&self) -> std::string::String {
1418        use std::clone::Clone;
1419        self.next_page_token.clone()
1420    }
1421}
1422
1423/// The request message for the CreateChannel method.
1424#[derive(Clone, Default, PartialEq)]
1425#[non_exhaustive]
1426pub struct CreateChannelRequest {
1427    /// Required. The parent collection in which to add this channel.
1428    pub parent: std::string::String,
1429
1430    /// Required. The channel to create.
1431    pub channel: std::option::Option<crate::model::Channel>,
1432
1433    /// Required. The user-provided ID to be assigned to the channel.
1434    pub channel_id: std::string::String,
1435
1436    /// Optional. If set, validate the request and preview the review, but do not
1437    /// post it.
1438    pub validate_only: bool,
1439
1440    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1441}
1442
1443impl CreateChannelRequest {
1444    pub fn new() -> Self {
1445        std::default::Default::default()
1446    }
1447
1448    /// Sets the value of [parent][crate::model::CreateChannelRequest::parent].
1449    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1450        self.parent = v.into();
1451        self
1452    }
1453
1454    /// Sets the value of [channel][crate::model::CreateChannelRequest::channel].
1455    pub fn set_channel<T>(mut self, v: T) -> Self
1456    where
1457        T: std::convert::Into<crate::model::Channel>,
1458    {
1459        self.channel = std::option::Option::Some(v.into());
1460        self
1461    }
1462
1463    /// Sets or clears the value of [channel][crate::model::CreateChannelRequest::channel].
1464    pub fn set_or_clear_channel<T>(mut self, v: std::option::Option<T>) -> Self
1465    where
1466        T: std::convert::Into<crate::model::Channel>,
1467    {
1468        self.channel = v.map(|x| x.into());
1469        self
1470    }
1471
1472    /// Sets the value of [channel_id][crate::model::CreateChannelRequest::channel_id].
1473    pub fn set_channel_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1474        self.channel_id = v.into();
1475        self
1476    }
1477
1478    /// Sets the value of [validate_only][crate::model::CreateChannelRequest::validate_only].
1479    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1480        self.validate_only = v.into();
1481        self
1482    }
1483}
1484
1485impl wkt::message::Message for CreateChannelRequest {
1486    fn typename() -> &'static str {
1487        "type.googleapis.com/google.cloud.eventarc.v1.CreateChannelRequest"
1488    }
1489}
1490
1491/// The request message for the UpdateChannel method.
1492#[derive(Clone, Default, PartialEq)]
1493#[non_exhaustive]
1494pub struct UpdateChannelRequest {
1495    /// The channel to be updated.
1496    pub channel: std::option::Option<crate::model::Channel>,
1497
1498    /// The fields to be updated; only fields explicitly provided are updated.
1499    /// If no field mask is provided, all provided fields in the request are
1500    /// updated. To update all fields, provide a field mask of "*".
1501    pub update_mask: std::option::Option<wkt::FieldMask>,
1502
1503    /// Optional. If set, validate the request and preview the review, but do not
1504    /// post it.
1505    pub validate_only: bool,
1506
1507    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1508}
1509
1510impl UpdateChannelRequest {
1511    pub fn new() -> Self {
1512        std::default::Default::default()
1513    }
1514
1515    /// Sets the value of [channel][crate::model::UpdateChannelRequest::channel].
1516    pub fn set_channel<T>(mut self, v: T) -> Self
1517    where
1518        T: std::convert::Into<crate::model::Channel>,
1519    {
1520        self.channel = std::option::Option::Some(v.into());
1521        self
1522    }
1523
1524    /// Sets or clears the value of [channel][crate::model::UpdateChannelRequest::channel].
1525    pub fn set_or_clear_channel<T>(mut self, v: std::option::Option<T>) -> Self
1526    where
1527        T: std::convert::Into<crate::model::Channel>,
1528    {
1529        self.channel = v.map(|x| x.into());
1530        self
1531    }
1532
1533    /// Sets the value of [update_mask][crate::model::UpdateChannelRequest::update_mask].
1534    pub fn set_update_mask<T>(mut self, v: T) -> Self
1535    where
1536        T: std::convert::Into<wkt::FieldMask>,
1537    {
1538        self.update_mask = std::option::Option::Some(v.into());
1539        self
1540    }
1541
1542    /// Sets or clears the value of [update_mask][crate::model::UpdateChannelRequest::update_mask].
1543    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1544    where
1545        T: std::convert::Into<wkt::FieldMask>,
1546    {
1547        self.update_mask = v.map(|x| x.into());
1548        self
1549    }
1550
1551    /// Sets the value of [validate_only][crate::model::UpdateChannelRequest::validate_only].
1552    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1553        self.validate_only = v.into();
1554        self
1555    }
1556}
1557
1558impl wkt::message::Message for UpdateChannelRequest {
1559    fn typename() -> &'static str {
1560        "type.googleapis.com/google.cloud.eventarc.v1.UpdateChannelRequest"
1561    }
1562}
1563
1564/// The request message for the DeleteChannel method.
1565#[derive(Clone, Default, PartialEq)]
1566#[non_exhaustive]
1567pub struct DeleteChannelRequest {
1568    /// Required. The name of the channel to be deleted.
1569    pub name: std::string::String,
1570
1571    /// Optional. If set, validate the request and preview the review, but do not
1572    /// post it.
1573    pub validate_only: bool,
1574
1575    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1576}
1577
1578impl DeleteChannelRequest {
1579    pub fn new() -> Self {
1580        std::default::Default::default()
1581    }
1582
1583    /// Sets the value of [name][crate::model::DeleteChannelRequest::name].
1584    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1585        self.name = v.into();
1586        self
1587    }
1588
1589    /// Sets the value of [validate_only][crate::model::DeleteChannelRequest::validate_only].
1590    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1591        self.validate_only = v.into();
1592        self
1593    }
1594}
1595
1596impl wkt::message::Message for DeleteChannelRequest {
1597    fn typename() -> &'static str {
1598        "type.googleapis.com/google.cloud.eventarc.v1.DeleteChannelRequest"
1599    }
1600}
1601
1602/// The request message for the GetProvider method.
1603#[derive(Clone, Default, PartialEq)]
1604#[non_exhaustive]
1605pub struct GetProviderRequest {
1606    /// Required. The name of the provider to get.
1607    pub name: std::string::String,
1608
1609    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1610}
1611
1612impl GetProviderRequest {
1613    pub fn new() -> Self {
1614        std::default::Default::default()
1615    }
1616
1617    /// Sets the value of [name][crate::model::GetProviderRequest::name].
1618    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1619        self.name = v.into();
1620        self
1621    }
1622}
1623
1624impl wkt::message::Message for GetProviderRequest {
1625    fn typename() -> &'static str {
1626        "type.googleapis.com/google.cloud.eventarc.v1.GetProviderRequest"
1627    }
1628}
1629
1630/// The request message for the ListProviders method.
1631#[derive(Clone, Default, PartialEq)]
1632#[non_exhaustive]
1633pub struct ListProvidersRequest {
1634    /// Required. The parent of the provider to get.
1635    pub parent: std::string::String,
1636
1637    /// The maximum number of providers to return on each page.
1638    pub page_size: i32,
1639
1640    /// The page token; provide the value from the `next_page_token` field in a
1641    /// previous `ListProviders` call to retrieve the subsequent page.
1642    ///
1643    /// When paginating, all other parameters provided to `ListProviders` must
1644    /// match the call that provided the page token.
1645    pub page_token: std::string::String,
1646
1647    /// The sorting order of the resources returned. Value should be a
1648    /// comma-separated list of fields. The default sorting oder is ascending. To
1649    /// specify descending order for a field, append a `desc` suffix; for example:
1650    /// `name desc, _id`.
1651    pub order_by: std::string::String,
1652
1653    /// The filter field that the list request will filter on.
1654    pub filter: std::string::String,
1655
1656    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1657}
1658
1659impl ListProvidersRequest {
1660    pub fn new() -> Self {
1661        std::default::Default::default()
1662    }
1663
1664    /// Sets the value of [parent][crate::model::ListProvidersRequest::parent].
1665    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1666        self.parent = v.into();
1667        self
1668    }
1669
1670    /// Sets the value of [page_size][crate::model::ListProvidersRequest::page_size].
1671    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1672        self.page_size = v.into();
1673        self
1674    }
1675
1676    /// Sets the value of [page_token][crate::model::ListProvidersRequest::page_token].
1677    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1678        self.page_token = v.into();
1679        self
1680    }
1681
1682    /// Sets the value of [order_by][crate::model::ListProvidersRequest::order_by].
1683    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1684        self.order_by = v.into();
1685        self
1686    }
1687
1688    /// Sets the value of [filter][crate::model::ListProvidersRequest::filter].
1689    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1690        self.filter = v.into();
1691        self
1692    }
1693}
1694
1695impl wkt::message::Message for ListProvidersRequest {
1696    fn typename() -> &'static str {
1697        "type.googleapis.com/google.cloud.eventarc.v1.ListProvidersRequest"
1698    }
1699}
1700
1701/// The response message for the `ListProviders` method.
1702#[derive(Clone, Default, PartialEq)]
1703#[non_exhaustive]
1704pub struct ListProvidersResponse {
1705    /// The requested providers, up to the number specified in `page_size`.
1706    pub providers: std::vec::Vec<crate::model::Provider>,
1707
1708    /// A page token that can be sent to `ListProviders` to request the next page.
1709    /// If this is empty, then there are no more pages.
1710    pub next_page_token: std::string::String,
1711
1712    /// Unreachable resources, if any.
1713    pub unreachable: std::vec::Vec<std::string::String>,
1714
1715    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1716}
1717
1718impl ListProvidersResponse {
1719    pub fn new() -> Self {
1720        std::default::Default::default()
1721    }
1722
1723    /// Sets the value of [providers][crate::model::ListProvidersResponse::providers].
1724    pub fn set_providers<T, V>(mut self, v: T) -> Self
1725    where
1726        T: std::iter::IntoIterator<Item = V>,
1727        V: std::convert::Into<crate::model::Provider>,
1728    {
1729        use std::iter::Iterator;
1730        self.providers = v.into_iter().map(|i| i.into()).collect();
1731        self
1732    }
1733
1734    /// Sets the value of [next_page_token][crate::model::ListProvidersResponse::next_page_token].
1735    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1736        self.next_page_token = v.into();
1737        self
1738    }
1739
1740    /// Sets the value of [unreachable][crate::model::ListProvidersResponse::unreachable].
1741    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1742    where
1743        T: std::iter::IntoIterator<Item = V>,
1744        V: std::convert::Into<std::string::String>,
1745    {
1746        use std::iter::Iterator;
1747        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1748        self
1749    }
1750}
1751
1752impl wkt::message::Message for ListProvidersResponse {
1753    fn typename() -> &'static str {
1754        "type.googleapis.com/google.cloud.eventarc.v1.ListProvidersResponse"
1755    }
1756}
1757
1758#[doc(hidden)]
1759impl gax::paginator::internal::PageableResponse for ListProvidersResponse {
1760    type PageItem = crate::model::Provider;
1761
1762    fn items(self) -> std::vec::Vec<Self::PageItem> {
1763        self.providers
1764    }
1765
1766    fn next_page_token(&self) -> std::string::String {
1767        use std::clone::Clone;
1768        self.next_page_token.clone()
1769    }
1770}
1771
1772/// The request message for the GetChannelConnection method.
1773#[derive(Clone, Default, PartialEq)]
1774#[non_exhaustive]
1775pub struct GetChannelConnectionRequest {
1776    /// Required. The name of the channel connection to get.
1777    pub name: std::string::String,
1778
1779    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1780}
1781
1782impl GetChannelConnectionRequest {
1783    pub fn new() -> Self {
1784        std::default::Default::default()
1785    }
1786
1787    /// Sets the value of [name][crate::model::GetChannelConnectionRequest::name].
1788    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1789        self.name = v.into();
1790        self
1791    }
1792}
1793
1794impl wkt::message::Message for GetChannelConnectionRequest {
1795    fn typename() -> &'static str {
1796        "type.googleapis.com/google.cloud.eventarc.v1.GetChannelConnectionRequest"
1797    }
1798}
1799
1800/// The request message for the ListChannelConnections method.
1801#[derive(Clone, Default, PartialEq)]
1802#[non_exhaustive]
1803pub struct ListChannelConnectionsRequest {
1804    /// Required. The parent collection from which to list channel connections.
1805    pub parent: std::string::String,
1806
1807    /// The maximum number of channel connections to return on each page.
1808    ///
1809    /// Note: The service may send fewer responses.
1810    pub page_size: i32,
1811
1812    /// The page token; provide the value from the `next_page_token` field in a
1813    /// previous `ListChannelConnections` call to retrieve the subsequent page.
1814    ///
1815    /// When paginating, all other parameters provided to `ListChannelConnetions`
1816    /// match the call that provided the page token.
1817    pub page_token: std::string::String,
1818
1819    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1820}
1821
1822impl ListChannelConnectionsRequest {
1823    pub fn new() -> Self {
1824        std::default::Default::default()
1825    }
1826
1827    /// Sets the value of [parent][crate::model::ListChannelConnectionsRequest::parent].
1828    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1829        self.parent = v.into();
1830        self
1831    }
1832
1833    /// Sets the value of [page_size][crate::model::ListChannelConnectionsRequest::page_size].
1834    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1835        self.page_size = v.into();
1836        self
1837    }
1838
1839    /// Sets the value of [page_token][crate::model::ListChannelConnectionsRequest::page_token].
1840    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1841        self.page_token = v.into();
1842        self
1843    }
1844}
1845
1846impl wkt::message::Message for ListChannelConnectionsRequest {
1847    fn typename() -> &'static str {
1848        "type.googleapis.com/google.cloud.eventarc.v1.ListChannelConnectionsRequest"
1849    }
1850}
1851
1852/// The response message for the `ListChannelConnections` method.
1853#[derive(Clone, Default, PartialEq)]
1854#[non_exhaustive]
1855pub struct ListChannelConnectionsResponse {
1856    /// The requested channel connections, up to the number specified in
1857    /// `page_size`.
1858    pub channel_connections: std::vec::Vec<crate::model::ChannelConnection>,
1859
1860    /// A page token that can be sent to `ListChannelConnections` to request the
1861    /// next page.
1862    /// If this is empty, then there are no more pages.
1863    pub next_page_token: std::string::String,
1864
1865    /// Unreachable resources, if any.
1866    pub unreachable: std::vec::Vec<std::string::String>,
1867
1868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1869}
1870
1871impl ListChannelConnectionsResponse {
1872    pub fn new() -> Self {
1873        std::default::Default::default()
1874    }
1875
1876    /// Sets the value of [channel_connections][crate::model::ListChannelConnectionsResponse::channel_connections].
1877    pub fn set_channel_connections<T, V>(mut self, v: T) -> Self
1878    where
1879        T: std::iter::IntoIterator<Item = V>,
1880        V: std::convert::Into<crate::model::ChannelConnection>,
1881    {
1882        use std::iter::Iterator;
1883        self.channel_connections = v.into_iter().map(|i| i.into()).collect();
1884        self
1885    }
1886
1887    /// Sets the value of [next_page_token][crate::model::ListChannelConnectionsResponse::next_page_token].
1888    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1889        self.next_page_token = v.into();
1890        self
1891    }
1892
1893    /// Sets the value of [unreachable][crate::model::ListChannelConnectionsResponse::unreachable].
1894    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1895    where
1896        T: std::iter::IntoIterator<Item = V>,
1897        V: std::convert::Into<std::string::String>,
1898    {
1899        use std::iter::Iterator;
1900        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1901        self
1902    }
1903}
1904
1905impl wkt::message::Message for ListChannelConnectionsResponse {
1906    fn typename() -> &'static str {
1907        "type.googleapis.com/google.cloud.eventarc.v1.ListChannelConnectionsResponse"
1908    }
1909}
1910
1911#[doc(hidden)]
1912impl gax::paginator::internal::PageableResponse for ListChannelConnectionsResponse {
1913    type PageItem = crate::model::ChannelConnection;
1914
1915    fn items(self) -> std::vec::Vec<Self::PageItem> {
1916        self.channel_connections
1917    }
1918
1919    fn next_page_token(&self) -> std::string::String {
1920        use std::clone::Clone;
1921        self.next_page_token.clone()
1922    }
1923}
1924
1925/// The request message for the CreateChannelConnection method.
1926#[derive(Clone, Default, PartialEq)]
1927#[non_exhaustive]
1928pub struct CreateChannelConnectionRequest {
1929    /// Required. The parent collection in which to add this channel connection.
1930    pub parent: std::string::String,
1931
1932    /// Required. Channel connection to create.
1933    pub channel_connection: std::option::Option<crate::model::ChannelConnection>,
1934
1935    /// Required. The user-provided ID to be assigned to the channel connection.
1936    pub channel_connection_id: std::string::String,
1937
1938    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1939}
1940
1941impl CreateChannelConnectionRequest {
1942    pub fn new() -> Self {
1943        std::default::Default::default()
1944    }
1945
1946    /// Sets the value of [parent][crate::model::CreateChannelConnectionRequest::parent].
1947    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1948        self.parent = v.into();
1949        self
1950    }
1951
1952    /// Sets the value of [channel_connection][crate::model::CreateChannelConnectionRequest::channel_connection].
1953    pub fn set_channel_connection<T>(mut self, v: T) -> Self
1954    where
1955        T: std::convert::Into<crate::model::ChannelConnection>,
1956    {
1957        self.channel_connection = std::option::Option::Some(v.into());
1958        self
1959    }
1960
1961    /// Sets or clears the value of [channel_connection][crate::model::CreateChannelConnectionRequest::channel_connection].
1962    pub fn set_or_clear_channel_connection<T>(mut self, v: std::option::Option<T>) -> Self
1963    where
1964        T: std::convert::Into<crate::model::ChannelConnection>,
1965    {
1966        self.channel_connection = v.map(|x| x.into());
1967        self
1968    }
1969
1970    /// Sets the value of [channel_connection_id][crate::model::CreateChannelConnectionRequest::channel_connection_id].
1971    pub fn set_channel_connection_id<T: std::convert::Into<std::string::String>>(
1972        mut self,
1973        v: T,
1974    ) -> Self {
1975        self.channel_connection_id = v.into();
1976        self
1977    }
1978}
1979
1980impl wkt::message::Message for CreateChannelConnectionRequest {
1981    fn typename() -> &'static str {
1982        "type.googleapis.com/google.cloud.eventarc.v1.CreateChannelConnectionRequest"
1983    }
1984}
1985
1986/// The request message for the DeleteChannelConnection method.
1987#[derive(Clone, Default, PartialEq)]
1988#[non_exhaustive]
1989pub struct DeleteChannelConnectionRequest {
1990    /// Required. The name of the channel connection to delete.
1991    pub name: std::string::String,
1992
1993    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1994}
1995
1996impl DeleteChannelConnectionRequest {
1997    pub fn new() -> Self {
1998        std::default::Default::default()
1999    }
2000
2001    /// Sets the value of [name][crate::model::DeleteChannelConnectionRequest::name].
2002    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2003        self.name = v.into();
2004        self
2005    }
2006}
2007
2008impl wkt::message::Message for DeleteChannelConnectionRequest {
2009    fn typename() -> &'static str {
2010        "type.googleapis.com/google.cloud.eventarc.v1.DeleteChannelConnectionRequest"
2011    }
2012}
2013
2014/// The request message for the UpdateGoogleChannelConfig method.
2015#[derive(Clone, Default, PartialEq)]
2016#[non_exhaustive]
2017pub struct UpdateGoogleChannelConfigRequest {
2018    /// Required. The config to be updated.
2019    pub google_channel_config: std::option::Option<crate::model::GoogleChannelConfig>,
2020
2021    /// The fields to be updated; only fields explicitly provided are updated.
2022    /// If no field mask is provided, all provided fields in the request are
2023    /// updated. To update all fields, provide a field mask of "*".
2024    pub update_mask: std::option::Option<wkt::FieldMask>,
2025
2026    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2027}
2028
2029impl UpdateGoogleChannelConfigRequest {
2030    pub fn new() -> Self {
2031        std::default::Default::default()
2032    }
2033
2034    /// Sets the value of [google_channel_config][crate::model::UpdateGoogleChannelConfigRequest::google_channel_config].
2035    pub fn set_google_channel_config<T>(mut self, v: T) -> Self
2036    where
2037        T: std::convert::Into<crate::model::GoogleChannelConfig>,
2038    {
2039        self.google_channel_config = std::option::Option::Some(v.into());
2040        self
2041    }
2042
2043    /// Sets or clears the value of [google_channel_config][crate::model::UpdateGoogleChannelConfigRequest::google_channel_config].
2044    pub fn set_or_clear_google_channel_config<T>(mut self, v: std::option::Option<T>) -> Self
2045    where
2046        T: std::convert::Into<crate::model::GoogleChannelConfig>,
2047    {
2048        self.google_channel_config = v.map(|x| x.into());
2049        self
2050    }
2051
2052    /// Sets the value of [update_mask][crate::model::UpdateGoogleChannelConfigRequest::update_mask].
2053    pub fn set_update_mask<T>(mut self, v: T) -> Self
2054    where
2055        T: std::convert::Into<wkt::FieldMask>,
2056    {
2057        self.update_mask = std::option::Option::Some(v.into());
2058        self
2059    }
2060
2061    /// Sets or clears the value of [update_mask][crate::model::UpdateGoogleChannelConfigRequest::update_mask].
2062    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2063    where
2064        T: std::convert::Into<wkt::FieldMask>,
2065    {
2066        self.update_mask = v.map(|x| x.into());
2067        self
2068    }
2069}
2070
2071impl wkt::message::Message for UpdateGoogleChannelConfigRequest {
2072    fn typename() -> &'static str {
2073        "type.googleapis.com/google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest"
2074    }
2075}
2076
2077/// The request message for the GetGoogleChannelConfig method.
2078#[derive(Clone, Default, PartialEq)]
2079#[non_exhaustive]
2080pub struct GetGoogleChannelConfigRequest {
2081    /// Required. The name of the config to get.
2082    pub name: std::string::String,
2083
2084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2085}
2086
2087impl GetGoogleChannelConfigRequest {
2088    pub fn new() -> Self {
2089        std::default::Default::default()
2090    }
2091
2092    /// Sets the value of [name][crate::model::GetGoogleChannelConfigRequest::name].
2093    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2094        self.name = v.into();
2095        self
2096    }
2097}
2098
2099impl wkt::message::Message for GetGoogleChannelConfigRequest {
2100    fn typename() -> &'static str {
2101        "type.googleapis.com/google.cloud.eventarc.v1.GetGoogleChannelConfigRequest"
2102    }
2103}
2104
2105/// The request message for the GetMessageBus method.
2106#[derive(Clone, Default, PartialEq)]
2107#[non_exhaustive]
2108pub struct GetMessageBusRequest {
2109    /// Required. The name of the message bus to get.
2110    pub name: std::string::String,
2111
2112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2113}
2114
2115impl GetMessageBusRequest {
2116    pub fn new() -> Self {
2117        std::default::Default::default()
2118    }
2119
2120    /// Sets the value of [name][crate::model::GetMessageBusRequest::name].
2121    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2122        self.name = v.into();
2123        self
2124    }
2125}
2126
2127impl wkt::message::Message for GetMessageBusRequest {
2128    fn typename() -> &'static str {
2129        "type.googleapis.com/google.cloud.eventarc.v1.GetMessageBusRequest"
2130    }
2131}
2132
2133/// The request message for the ListMessageBuses method.
2134#[derive(Clone, Default, PartialEq)]
2135#[non_exhaustive]
2136pub struct ListMessageBusesRequest {
2137    /// Required. The parent collection to list message buses on.
2138    pub parent: std::string::String,
2139
2140    /// Optional. The maximum number of results to return on each page.
2141    ///
2142    /// Note: The service may send fewer.
2143    pub page_size: i32,
2144
2145    /// Optional. The page token; provide the value from the `next_page_token`
2146    /// field in a previous call to retrieve the subsequent page.
2147    ///
2148    /// When paginating, all other parameters provided must match
2149    /// the previous call that provided the page token.
2150    pub page_token: std::string::String,
2151
2152    /// Optional. The sorting order of the resources returned. Value should be a
2153    /// comma-separated list of fields. The default sorting order is ascending. To
2154    /// specify descending order for a field, append a `desc` suffix; for example:
2155    /// `name desc, update_time`.
2156    pub order_by: std::string::String,
2157
2158    /// Optional. The filter field that the list request will filter on.
2159    /// Possible filtersare described in <https://google.aip.dev/160>.
2160    pub filter: std::string::String,
2161
2162    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2163}
2164
2165impl ListMessageBusesRequest {
2166    pub fn new() -> Self {
2167        std::default::Default::default()
2168    }
2169
2170    /// Sets the value of [parent][crate::model::ListMessageBusesRequest::parent].
2171    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2172        self.parent = v.into();
2173        self
2174    }
2175
2176    /// Sets the value of [page_size][crate::model::ListMessageBusesRequest::page_size].
2177    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2178        self.page_size = v.into();
2179        self
2180    }
2181
2182    /// Sets the value of [page_token][crate::model::ListMessageBusesRequest::page_token].
2183    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2184        self.page_token = v.into();
2185        self
2186    }
2187
2188    /// Sets the value of [order_by][crate::model::ListMessageBusesRequest::order_by].
2189    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2190        self.order_by = v.into();
2191        self
2192    }
2193
2194    /// Sets the value of [filter][crate::model::ListMessageBusesRequest::filter].
2195    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2196        self.filter = v.into();
2197        self
2198    }
2199}
2200
2201impl wkt::message::Message for ListMessageBusesRequest {
2202    fn typename() -> &'static str {
2203        "type.googleapis.com/google.cloud.eventarc.v1.ListMessageBusesRequest"
2204    }
2205}
2206
2207/// The response message for the `ListMessageBuses` method.
2208#[derive(Clone, Default, PartialEq)]
2209#[non_exhaustive]
2210pub struct ListMessageBusesResponse {
2211    /// The requested message buses, up to the number specified in `page_size`.
2212    pub message_buses: std::vec::Vec<crate::model::MessageBus>,
2213
2214    /// A page token that can be sent to `ListMessageBuses` to request the next
2215    /// page. If this is empty, then there are no more pages.
2216    pub next_page_token: std::string::String,
2217
2218    /// Unreachable resources, if any.
2219    pub unreachable: std::vec::Vec<std::string::String>,
2220
2221    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2222}
2223
2224impl ListMessageBusesResponse {
2225    pub fn new() -> Self {
2226        std::default::Default::default()
2227    }
2228
2229    /// Sets the value of [message_buses][crate::model::ListMessageBusesResponse::message_buses].
2230    pub fn set_message_buses<T, V>(mut self, v: T) -> Self
2231    where
2232        T: std::iter::IntoIterator<Item = V>,
2233        V: std::convert::Into<crate::model::MessageBus>,
2234    {
2235        use std::iter::Iterator;
2236        self.message_buses = v.into_iter().map(|i| i.into()).collect();
2237        self
2238    }
2239
2240    /// Sets the value of [next_page_token][crate::model::ListMessageBusesResponse::next_page_token].
2241    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2242        self.next_page_token = v.into();
2243        self
2244    }
2245
2246    /// Sets the value of [unreachable][crate::model::ListMessageBusesResponse::unreachable].
2247    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2248    where
2249        T: std::iter::IntoIterator<Item = V>,
2250        V: std::convert::Into<std::string::String>,
2251    {
2252        use std::iter::Iterator;
2253        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2254        self
2255    }
2256}
2257
2258impl wkt::message::Message for ListMessageBusesResponse {
2259    fn typename() -> &'static str {
2260        "type.googleapis.com/google.cloud.eventarc.v1.ListMessageBusesResponse"
2261    }
2262}
2263
2264#[doc(hidden)]
2265impl gax::paginator::internal::PageableResponse for ListMessageBusesResponse {
2266    type PageItem = crate::model::MessageBus;
2267
2268    fn items(self) -> std::vec::Vec<Self::PageItem> {
2269        self.message_buses
2270    }
2271
2272    fn next_page_token(&self) -> std::string::String {
2273        use std::clone::Clone;
2274        self.next_page_token.clone()
2275    }
2276}
2277
2278/// The request message for the `ListMessageBusEnrollments` method.
2279#[derive(Clone, Default, PartialEq)]
2280#[non_exhaustive]
2281pub struct ListMessageBusEnrollmentsRequest {
2282    /// Required. The parent message bus to list enrollments on.
2283    pub parent: std::string::String,
2284
2285    /// Optional. The maximum number of results to return on each page.
2286    ///
2287    /// Note: The service may send fewer.
2288    pub page_size: i32,
2289
2290    /// Optional. The page token; provide the value from the `next_page_token`
2291    /// field in a previous call to retrieve the subsequent page.
2292    ///
2293    /// When paginating, all other parameters provided must match
2294    /// the previous call that provided the page token.
2295    pub page_token: std::string::String,
2296
2297    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2298}
2299
2300impl ListMessageBusEnrollmentsRequest {
2301    pub fn new() -> Self {
2302        std::default::Default::default()
2303    }
2304
2305    /// Sets the value of [parent][crate::model::ListMessageBusEnrollmentsRequest::parent].
2306    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2307        self.parent = v.into();
2308        self
2309    }
2310
2311    /// Sets the value of [page_size][crate::model::ListMessageBusEnrollmentsRequest::page_size].
2312    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2313        self.page_size = v.into();
2314        self
2315    }
2316
2317    /// Sets the value of [page_token][crate::model::ListMessageBusEnrollmentsRequest::page_token].
2318    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2319        self.page_token = v.into();
2320        self
2321    }
2322}
2323
2324impl wkt::message::Message for ListMessageBusEnrollmentsRequest {
2325    fn typename() -> &'static str {
2326        "type.googleapis.com/google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest"
2327    }
2328}
2329
2330/// The response message for the `ListMessageBusEnrollments` method.`
2331#[derive(Clone, Default, PartialEq)]
2332#[non_exhaustive]
2333pub struct ListMessageBusEnrollmentsResponse {
2334    /// The requested enrollments, up to the number specified in `page_size`.
2335    pub enrollments: std::vec::Vec<std::string::String>,
2336
2337    /// A page token that can be sent to `ListMessageBusEnrollments` to request the
2338    /// next page. If this is empty, then there are no more pages.
2339    pub next_page_token: std::string::String,
2340
2341    /// Unreachable resources, if any.
2342    pub unreachable: std::vec::Vec<std::string::String>,
2343
2344    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2345}
2346
2347impl ListMessageBusEnrollmentsResponse {
2348    pub fn new() -> Self {
2349        std::default::Default::default()
2350    }
2351
2352    /// Sets the value of [enrollments][crate::model::ListMessageBusEnrollmentsResponse::enrollments].
2353    pub fn set_enrollments<T, V>(mut self, v: T) -> Self
2354    where
2355        T: std::iter::IntoIterator<Item = V>,
2356        V: std::convert::Into<std::string::String>,
2357    {
2358        use std::iter::Iterator;
2359        self.enrollments = v.into_iter().map(|i| i.into()).collect();
2360        self
2361    }
2362
2363    /// Sets the value of [next_page_token][crate::model::ListMessageBusEnrollmentsResponse::next_page_token].
2364    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2365        self.next_page_token = v.into();
2366        self
2367    }
2368
2369    /// Sets the value of [unreachable][crate::model::ListMessageBusEnrollmentsResponse::unreachable].
2370    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2371    where
2372        T: std::iter::IntoIterator<Item = V>,
2373        V: std::convert::Into<std::string::String>,
2374    {
2375        use std::iter::Iterator;
2376        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2377        self
2378    }
2379}
2380
2381impl wkt::message::Message for ListMessageBusEnrollmentsResponse {
2382    fn typename() -> &'static str {
2383        "type.googleapis.com/google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse"
2384    }
2385}
2386
2387/// The request message for the CreateMessageBus method.
2388#[derive(Clone, Default, PartialEq)]
2389#[non_exhaustive]
2390pub struct CreateMessageBusRequest {
2391    /// Required. The parent collection in which to add this message bus.
2392    pub parent: std::string::String,
2393
2394    /// Required. The message bus to create.
2395    pub message_bus: std::option::Option<crate::model::MessageBus>,
2396
2397    /// Required. The user-provided ID to be assigned to the MessageBus. It should
2398    /// match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
2399    pub message_bus_id: std::string::String,
2400
2401    /// Optional. If set, validate the request and preview the review, but do not
2402    /// post it.
2403    pub validate_only: bool,
2404
2405    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2406}
2407
2408impl CreateMessageBusRequest {
2409    pub fn new() -> Self {
2410        std::default::Default::default()
2411    }
2412
2413    /// Sets the value of [parent][crate::model::CreateMessageBusRequest::parent].
2414    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2415        self.parent = v.into();
2416        self
2417    }
2418
2419    /// Sets the value of [message_bus][crate::model::CreateMessageBusRequest::message_bus].
2420    pub fn set_message_bus<T>(mut self, v: T) -> Self
2421    where
2422        T: std::convert::Into<crate::model::MessageBus>,
2423    {
2424        self.message_bus = std::option::Option::Some(v.into());
2425        self
2426    }
2427
2428    /// Sets or clears the value of [message_bus][crate::model::CreateMessageBusRequest::message_bus].
2429    pub fn set_or_clear_message_bus<T>(mut self, v: std::option::Option<T>) -> Self
2430    where
2431        T: std::convert::Into<crate::model::MessageBus>,
2432    {
2433        self.message_bus = v.map(|x| x.into());
2434        self
2435    }
2436
2437    /// Sets the value of [message_bus_id][crate::model::CreateMessageBusRequest::message_bus_id].
2438    pub fn set_message_bus_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2439        self.message_bus_id = v.into();
2440        self
2441    }
2442
2443    /// Sets the value of [validate_only][crate::model::CreateMessageBusRequest::validate_only].
2444    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2445        self.validate_only = v.into();
2446        self
2447    }
2448}
2449
2450impl wkt::message::Message for CreateMessageBusRequest {
2451    fn typename() -> &'static str {
2452        "type.googleapis.com/google.cloud.eventarc.v1.CreateMessageBusRequest"
2453    }
2454}
2455
2456/// The request message for the UpdateMessageBus method.
2457#[derive(Clone, Default, PartialEq)]
2458#[non_exhaustive]
2459pub struct UpdateMessageBusRequest {
2460    /// Required. The MessageBus to be updated.
2461    pub message_bus: std::option::Option<crate::model::MessageBus>,
2462
2463    /// Optional. The fields to be updated; only fields explicitly provided are
2464    /// updated. If no field mask is provided, all provided fields in the request
2465    /// are updated. To update all fields, provide a field mask of "*".
2466    pub update_mask: std::option::Option<wkt::FieldMask>,
2467
2468    /// Optional. If set to true, and the MessageBus is not found, a new MessageBus
2469    /// will be created. In this situation, `update_mask` is ignored.
2470    pub allow_missing: bool,
2471
2472    /// Optional. If set, validate the request and preview the review, but do not
2473    /// post it.
2474    pub validate_only: bool,
2475
2476    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2477}
2478
2479impl UpdateMessageBusRequest {
2480    pub fn new() -> Self {
2481        std::default::Default::default()
2482    }
2483
2484    /// Sets the value of [message_bus][crate::model::UpdateMessageBusRequest::message_bus].
2485    pub fn set_message_bus<T>(mut self, v: T) -> Self
2486    where
2487        T: std::convert::Into<crate::model::MessageBus>,
2488    {
2489        self.message_bus = std::option::Option::Some(v.into());
2490        self
2491    }
2492
2493    /// Sets or clears the value of [message_bus][crate::model::UpdateMessageBusRequest::message_bus].
2494    pub fn set_or_clear_message_bus<T>(mut self, v: std::option::Option<T>) -> Self
2495    where
2496        T: std::convert::Into<crate::model::MessageBus>,
2497    {
2498        self.message_bus = v.map(|x| x.into());
2499        self
2500    }
2501
2502    /// Sets the value of [update_mask][crate::model::UpdateMessageBusRequest::update_mask].
2503    pub fn set_update_mask<T>(mut self, v: T) -> Self
2504    where
2505        T: std::convert::Into<wkt::FieldMask>,
2506    {
2507        self.update_mask = std::option::Option::Some(v.into());
2508        self
2509    }
2510
2511    /// Sets or clears the value of [update_mask][crate::model::UpdateMessageBusRequest::update_mask].
2512    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2513    where
2514        T: std::convert::Into<wkt::FieldMask>,
2515    {
2516        self.update_mask = v.map(|x| x.into());
2517        self
2518    }
2519
2520    /// Sets the value of [allow_missing][crate::model::UpdateMessageBusRequest::allow_missing].
2521    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2522        self.allow_missing = v.into();
2523        self
2524    }
2525
2526    /// Sets the value of [validate_only][crate::model::UpdateMessageBusRequest::validate_only].
2527    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2528        self.validate_only = v.into();
2529        self
2530    }
2531}
2532
2533impl wkt::message::Message for UpdateMessageBusRequest {
2534    fn typename() -> &'static str {
2535        "type.googleapis.com/google.cloud.eventarc.v1.UpdateMessageBusRequest"
2536    }
2537}
2538
2539/// The request message for the DeleteMessageBus method.
2540#[derive(Clone, Default, PartialEq)]
2541#[non_exhaustive]
2542pub struct DeleteMessageBusRequest {
2543    /// Required. The name of the MessageBus to be deleted.
2544    pub name: std::string::String,
2545
2546    /// Optional. If provided, the MessageBus will only be deleted if the etag
2547    /// matches the current etag on the resource.
2548    pub etag: std::string::String,
2549
2550    /// Optional. If set to true, and the MessageBus is not found, the request will
2551    /// succeed but no action will be taken on the server.
2552    pub allow_missing: bool,
2553
2554    /// Optional. If set, validate the request and preview the review, but do not
2555    /// post it.
2556    pub validate_only: bool,
2557
2558    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2559}
2560
2561impl DeleteMessageBusRequest {
2562    pub fn new() -> Self {
2563        std::default::Default::default()
2564    }
2565
2566    /// Sets the value of [name][crate::model::DeleteMessageBusRequest::name].
2567    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2568        self.name = v.into();
2569        self
2570    }
2571
2572    /// Sets the value of [etag][crate::model::DeleteMessageBusRequest::etag].
2573    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2574        self.etag = v.into();
2575        self
2576    }
2577
2578    /// Sets the value of [allow_missing][crate::model::DeleteMessageBusRequest::allow_missing].
2579    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2580        self.allow_missing = v.into();
2581        self
2582    }
2583
2584    /// Sets the value of [validate_only][crate::model::DeleteMessageBusRequest::validate_only].
2585    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2586        self.validate_only = v.into();
2587        self
2588    }
2589}
2590
2591impl wkt::message::Message for DeleteMessageBusRequest {
2592    fn typename() -> &'static str {
2593        "type.googleapis.com/google.cloud.eventarc.v1.DeleteMessageBusRequest"
2594    }
2595}
2596
2597/// The request message for the GetEnrollment method.
2598#[derive(Clone, Default, PartialEq)]
2599#[non_exhaustive]
2600pub struct GetEnrollmentRequest {
2601    /// Required. The name of the Enrollment to get.
2602    pub name: std::string::String,
2603
2604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2605}
2606
2607impl GetEnrollmentRequest {
2608    pub fn new() -> Self {
2609        std::default::Default::default()
2610    }
2611
2612    /// Sets the value of [name][crate::model::GetEnrollmentRequest::name].
2613    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2614        self.name = v.into();
2615        self
2616    }
2617}
2618
2619impl wkt::message::Message for GetEnrollmentRequest {
2620    fn typename() -> &'static str {
2621        "type.googleapis.com/google.cloud.eventarc.v1.GetEnrollmentRequest"
2622    }
2623}
2624
2625/// The request message for the ListEnrollments method.
2626#[derive(Clone, Default, PartialEq)]
2627#[non_exhaustive]
2628pub struct ListEnrollmentsRequest {
2629    /// Required. The parent collection to list triggers on.
2630    pub parent: std::string::String,
2631
2632    /// Optional. The maximum number of results to return on each page.
2633    ///
2634    /// Note: The service may send fewer.
2635    pub page_size: i32,
2636
2637    /// Optional. The page token; provide the value from the `next_page_token`
2638    /// field in a previous call to retrieve the subsequent page.
2639    ///
2640    /// When paginating, all other parameters provided must match
2641    /// the previous call that provided the page token.
2642    pub page_token: std::string::String,
2643
2644    /// Optional. The sorting order of the resources returned. Value should be a
2645    /// comma-separated list of fields. The default sorting order is ascending. To
2646    /// specify descending order for a field, append a `desc` suffix; for example:
2647    /// `name desc, update_time`.
2648    pub order_by: std::string::String,
2649
2650    /// Optional. The filter field that the list request will filter on.
2651    /// Possible filtersare described in <https://google.aip.dev/160>.
2652    pub filter: std::string::String,
2653
2654    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2655}
2656
2657impl ListEnrollmentsRequest {
2658    pub fn new() -> Self {
2659        std::default::Default::default()
2660    }
2661
2662    /// Sets the value of [parent][crate::model::ListEnrollmentsRequest::parent].
2663    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2664        self.parent = v.into();
2665        self
2666    }
2667
2668    /// Sets the value of [page_size][crate::model::ListEnrollmentsRequest::page_size].
2669    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2670        self.page_size = v.into();
2671        self
2672    }
2673
2674    /// Sets the value of [page_token][crate::model::ListEnrollmentsRequest::page_token].
2675    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2676        self.page_token = v.into();
2677        self
2678    }
2679
2680    /// Sets the value of [order_by][crate::model::ListEnrollmentsRequest::order_by].
2681    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2682        self.order_by = v.into();
2683        self
2684    }
2685
2686    /// Sets the value of [filter][crate::model::ListEnrollmentsRequest::filter].
2687    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2688        self.filter = v.into();
2689        self
2690    }
2691}
2692
2693impl wkt::message::Message for ListEnrollmentsRequest {
2694    fn typename() -> &'static str {
2695        "type.googleapis.com/google.cloud.eventarc.v1.ListEnrollmentsRequest"
2696    }
2697}
2698
2699/// The response message for the `ListEnrollments` method.
2700#[derive(Clone, Default, PartialEq)]
2701#[non_exhaustive]
2702pub struct ListEnrollmentsResponse {
2703    /// The requested Enrollments, up to the number specified in `page_size`.
2704    pub enrollments: std::vec::Vec<crate::model::Enrollment>,
2705
2706    /// A page token that can be sent to `ListEnrollments` to request the next
2707    /// page. If this is empty, then there are no more pages.
2708    pub next_page_token: std::string::String,
2709
2710    /// Unreachable resources, if any.
2711    pub unreachable: std::vec::Vec<std::string::String>,
2712
2713    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2714}
2715
2716impl ListEnrollmentsResponse {
2717    pub fn new() -> Self {
2718        std::default::Default::default()
2719    }
2720
2721    /// Sets the value of [enrollments][crate::model::ListEnrollmentsResponse::enrollments].
2722    pub fn set_enrollments<T, V>(mut self, v: T) -> Self
2723    where
2724        T: std::iter::IntoIterator<Item = V>,
2725        V: std::convert::Into<crate::model::Enrollment>,
2726    {
2727        use std::iter::Iterator;
2728        self.enrollments = v.into_iter().map(|i| i.into()).collect();
2729        self
2730    }
2731
2732    /// Sets the value of [next_page_token][crate::model::ListEnrollmentsResponse::next_page_token].
2733    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2734        self.next_page_token = v.into();
2735        self
2736    }
2737
2738    /// Sets the value of [unreachable][crate::model::ListEnrollmentsResponse::unreachable].
2739    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2740    where
2741        T: std::iter::IntoIterator<Item = V>,
2742        V: std::convert::Into<std::string::String>,
2743    {
2744        use std::iter::Iterator;
2745        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2746        self
2747    }
2748}
2749
2750impl wkt::message::Message for ListEnrollmentsResponse {
2751    fn typename() -> &'static str {
2752        "type.googleapis.com/google.cloud.eventarc.v1.ListEnrollmentsResponse"
2753    }
2754}
2755
2756#[doc(hidden)]
2757impl gax::paginator::internal::PageableResponse for ListEnrollmentsResponse {
2758    type PageItem = crate::model::Enrollment;
2759
2760    fn items(self) -> std::vec::Vec<Self::PageItem> {
2761        self.enrollments
2762    }
2763
2764    fn next_page_token(&self) -> std::string::String {
2765        use std::clone::Clone;
2766        self.next_page_token.clone()
2767    }
2768}
2769
2770/// The request message for the CreateEnrollment method.
2771#[derive(Clone, Default, PartialEq)]
2772#[non_exhaustive]
2773pub struct CreateEnrollmentRequest {
2774    /// Required. The parent collection in which to add this enrollment.
2775    pub parent: std::string::String,
2776
2777    /// Required. The enrollment to create.
2778    pub enrollment: std::option::Option<crate::model::Enrollment>,
2779
2780    /// Required. The user-provided ID to be assigned to the Enrollment. It should
2781    /// match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
2782    pub enrollment_id: std::string::String,
2783
2784    /// Optional. If set, validate the request and preview the review, but do not
2785    /// post it.
2786    pub validate_only: bool,
2787
2788    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2789}
2790
2791impl CreateEnrollmentRequest {
2792    pub fn new() -> Self {
2793        std::default::Default::default()
2794    }
2795
2796    /// Sets the value of [parent][crate::model::CreateEnrollmentRequest::parent].
2797    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2798        self.parent = v.into();
2799        self
2800    }
2801
2802    /// Sets the value of [enrollment][crate::model::CreateEnrollmentRequest::enrollment].
2803    pub fn set_enrollment<T>(mut self, v: T) -> Self
2804    where
2805        T: std::convert::Into<crate::model::Enrollment>,
2806    {
2807        self.enrollment = std::option::Option::Some(v.into());
2808        self
2809    }
2810
2811    /// Sets or clears the value of [enrollment][crate::model::CreateEnrollmentRequest::enrollment].
2812    pub fn set_or_clear_enrollment<T>(mut self, v: std::option::Option<T>) -> Self
2813    where
2814        T: std::convert::Into<crate::model::Enrollment>,
2815    {
2816        self.enrollment = v.map(|x| x.into());
2817        self
2818    }
2819
2820    /// Sets the value of [enrollment_id][crate::model::CreateEnrollmentRequest::enrollment_id].
2821    pub fn set_enrollment_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2822        self.enrollment_id = v.into();
2823        self
2824    }
2825
2826    /// Sets the value of [validate_only][crate::model::CreateEnrollmentRequest::validate_only].
2827    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2828        self.validate_only = v.into();
2829        self
2830    }
2831}
2832
2833impl wkt::message::Message for CreateEnrollmentRequest {
2834    fn typename() -> &'static str {
2835        "type.googleapis.com/google.cloud.eventarc.v1.CreateEnrollmentRequest"
2836    }
2837}
2838
2839/// The request message for the UpdateEnrollment method.
2840#[derive(Clone, Default, PartialEq)]
2841#[non_exhaustive]
2842pub struct UpdateEnrollmentRequest {
2843    /// Required. The Enrollment to be updated.
2844    pub enrollment: std::option::Option<crate::model::Enrollment>,
2845
2846    /// Optional. The fields to be updated; only fields explicitly provided are
2847    /// updated. If no field mask is provided, all provided fields in the request
2848    /// are updated. To update all fields, provide a field mask of "*".
2849    pub update_mask: std::option::Option<wkt::FieldMask>,
2850
2851    /// Optional. If set to true, and the Enrollment is not found, a new Enrollment
2852    /// will be created. In this situation, `update_mask` is ignored.
2853    pub allow_missing: bool,
2854
2855    /// Optional. If set, validate the request and preview the review, but do not
2856    /// post it.
2857    pub validate_only: bool,
2858
2859    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2860}
2861
2862impl UpdateEnrollmentRequest {
2863    pub fn new() -> Self {
2864        std::default::Default::default()
2865    }
2866
2867    /// Sets the value of [enrollment][crate::model::UpdateEnrollmentRequest::enrollment].
2868    pub fn set_enrollment<T>(mut self, v: T) -> Self
2869    where
2870        T: std::convert::Into<crate::model::Enrollment>,
2871    {
2872        self.enrollment = std::option::Option::Some(v.into());
2873        self
2874    }
2875
2876    /// Sets or clears the value of [enrollment][crate::model::UpdateEnrollmentRequest::enrollment].
2877    pub fn set_or_clear_enrollment<T>(mut self, v: std::option::Option<T>) -> Self
2878    where
2879        T: std::convert::Into<crate::model::Enrollment>,
2880    {
2881        self.enrollment = v.map(|x| x.into());
2882        self
2883    }
2884
2885    /// Sets the value of [update_mask][crate::model::UpdateEnrollmentRequest::update_mask].
2886    pub fn set_update_mask<T>(mut self, v: T) -> Self
2887    where
2888        T: std::convert::Into<wkt::FieldMask>,
2889    {
2890        self.update_mask = std::option::Option::Some(v.into());
2891        self
2892    }
2893
2894    /// Sets or clears the value of [update_mask][crate::model::UpdateEnrollmentRequest::update_mask].
2895    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2896    where
2897        T: std::convert::Into<wkt::FieldMask>,
2898    {
2899        self.update_mask = v.map(|x| x.into());
2900        self
2901    }
2902
2903    /// Sets the value of [allow_missing][crate::model::UpdateEnrollmentRequest::allow_missing].
2904    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2905        self.allow_missing = v.into();
2906        self
2907    }
2908
2909    /// Sets the value of [validate_only][crate::model::UpdateEnrollmentRequest::validate_only].
2910    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2911        self.validate_only = v.into();
2912        self
2913    }
2914}
2915
2916impl wkt::message::Message for UpdateEnrollmentRequest {
2917    fn typename() -> &'static str {
2918        "type.googleapis.com/google.cloud.eventarc.v1.UpdateEnrollmentRequest"
2919    }
2920}
2921
2922/// The request message for the DeleteEnrollment method.
2923#[derive(Clone, Default, PartialEq)]
2924#[non_exhaustive]
2925pub struct DeleteEnrollmentRequest {
2926    /// Required. The name of the Enrollment to be deleted.
2927    pub name: std::string::String,
2928
2929    /// Optional. If provided, the Enrollment will only be deleted if the etag
2930    /// matches the current etag on the resource.
2931    pub etag: std::string::String,
2932
2933    /// Optional. If set to true, and the Enrollment is not found, the request will
2934    /// succeed but no action will be taken on the server.
2935    pub allow_missing: bool,
2936
2937    /// Optional. If set, validate the request and preview the review, but do not
2938    /// post it.
2939    pub validate_only: bool,
2940
2941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2942}
2943
2944impl DeleteEnrollmentRequest {
2945    pub fn new() -> Self {
2946        std::default::Default::default()
2947    }
2948
2949    /// Sets the value of [name][crate::model::DeleteEnrollmentRequest::name].
2950    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2951        self.name = v.into();
2952        self
2953    }
2954
2955    /// Sets the value of [etag][crate::model::DeleteEnrollmentRequest::etag].
2956    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2957        self.etag = v.into();
2958        self
2959    }
2960
2961    /// Sets the value of [allow_missing][crate::model::DeleteEnrollmentRequest::allow_missing].
2962    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2963        self.allow_missing = v.into();
2964        self
2965    }
2966
2967    /// Sets the value of [validate_only][crate::model::DeleteEnrollmentRequest::validate_only].
2968    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2969        self.validate_only = v.into();
2970        self
2971    }
2972}
2973
2974impl wkt::message::Message for DeleteEnrollmentRequest {
2975    fn typename() -> &'static str {
2976        "type.googleapis.com/google.cloud.eventarc.v1.DeleteEnrollmentRequest"
2977    }
2978}
2979
2980/// The request message for the GetPipeline method.
2981#[derive(Clone, Default, PartialEq)]
2982#[non_exhaustive]
2983pub struct GetPipelineRequest {
2984    /// Required. The name of the pipeline to get.
2985    pub name: std::string::String,
2986
2987    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2988}
2989
2990impl GetPipelineRequest {
2991    pub fn new() -> Self {
2992        std::default::Default::default()
2993    }
2994
2995    /// Sets the value of [name][crate::model::GetPipelineRequest::name].
2996    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2997        self.name = v.into();
2998        self
2999    }
3000}
3001
3002impl wkt::message::Message for GetPipelineRequest {
3003    fn typename() -> &'static str {
3004        "type.googleapis.com/google.cloud.eventarc.v1.GetPipelineRequest"
3005    }
3006}
3007
3008/// The request message for the ListPipelines method.
3009#[derive(Clone, Default, PartialEq)]
3010#[non_exhaustive]
3011pub struct ListPipelinesRequest {
3012    /// Required. The parent collection to list pipelines on.
3013    pub parent: std::string::String,
3014
3015    /// Optional. The maximum number of results to return on each page.
3016    ///
3017    /// Note: The service may send fewer.
3018    pub page_size: i32,
3019
3020    /// Optional. The page token; provide the value from the `next_page_token`
3021    /// field in a previous call to retrieve the subsequent page.
3022    ///
3023    /// When paginating, all other parameters provided must match
3024    /// the previous call that provided the page token.
3025    pub page_token: std::string::String,
3026
3027    /// Optional. The sorting order of the resources returned. Value should be a
3028    /// comma-separated list of fields. The default sorting order is ascending. To
3029    /// specify descending order for a field, append a `desc` suffix; for example:
3030    /// `name desc, update_time`.
3031    pub order_by: std::string::String,
3032
3033    /// Optional. The filter field that the list request will filter on.
3034    /// Possible filters are described in <https://google.aip.dev/160>.
3035    pub filter: std::string::String,
3036
3037    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3038}
3039
3040impl ListPipelinesRequest {
3041    pub fn new() -> Self {
3042        std::default::Default::default()
3043    }
3044
3045    /// Sets the value of [parent][crate::model::ListPipelinesRequest::parent].
3046    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3047        self.parent = v.into();
3048        self
3049    }
3050
3051    /// Sets the value of [page_size][crate::model::ListPipelinesRequest::page_size].
3052    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3053        self.page_size = v.into();
3054        self
3055    }
3056
3057    /// Sets the value of [page_token][crate::model::ListPipelinesRequest::page_token].
3058    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3059        self.page_token = v.into();
3060        self
3061    }
3062
3063    /// Sets the value of [order_by][crate::model::ListPipelinesRequest::order_by].
3064    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3065        self.order_by = v.into();
3066        self
3067    }
3068
3069    /// Sets the value of [filter][crate::model::ListPipelinesRequest::filter].
3070    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3071        self.filter = v.into();
3072        self
3073    }
3074}
3075
3076impl wkt::message::Message for ListPipelinesRequest {
3077    fn typename() -> &'static str {
3078        "type.googleapis.com/google.cloud.eventarc.v1.ListPipelinesRequest"
3079    }
3080}
3081
3082/// The response message for the ListPipelines method.
3083#[derive(Clone, Default, PartialEq)]
3084#[non_exhaustive]
3085pub struct ListPipelinesResponse {
3086    /// The requested pipelines, up to the number specified in `page_size`.
3087    pub pipelines: std::vec::Vec<crate::model::Pipeline>,
3088
3089    /// A page token that can be sent to `ListPipelines` to request the next
3090    /// page. If this is empty, then there are no more pages.
3091    pub next_page_token: std::string::String,
3092
3093    /// Unreachable resources, if any.
3094    pub unreachable: std::vec::Vec<std::string::String>,
3095
3096    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3097}
3098
3099impl ListPipelinesResponse {
3100    pub fn new() -> Self {
3101        std::default::Default::default()
3102    }
3103
3104    /// Sets the value of [pipelines][crate::model::ListPipelinesResponse::pipelines].
3105    pub fn set_pipelines<T, V>(mut self, v: T) -> Self
3106    where
3107        T: std::iter::IntoIterator<Item = V>,
3108        V: std::convert::Into<crate::model::Pipeline>,
3109    {
3110        use std::iter::Iterator;
3111        self.pipelines = v.into_iter().map(|i| i.into()).collect();
3112        self
3113    }
3114
3115    /// Sets the value of [next_page_token][crate::model::ListPipelinesResponse::next_page_token].
3116    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3117        self.next_page_token = v.into();
3118        self
3119    }
3120
3121    /// Sets the value of [unreachable][crate::model::ListPipelinesResponse::unreachable].
3122    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3123    where
3124        T: std::iter::IntoIterator<Item = V>,
3125        V: std::convert::Into<std::string::String>,
3126    {
3127        use std::iter::Iterator;
3128        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3129        self
3130    }
3131}
3132
3133impl wkt::message::Message for ListPipelinesResponse {
3134    fn typename() -> &'static str {
3135        "type.googleapis.com/google.cloud.eventarc.v1.ListPipelinesResponse"
3136    }
3137}
3138
3139#[doc(hidden)]
3140impl gax::paginator::internal::PageableResponse for ListPipelinesResponse {
3141    type PageItem = crate::model::Pipeline;
3142
3143    fn items(self) -> std::vec::Vec<Self::PageItem> {
3144        self.pipelines
3145    }
3146
3147    fn next_page_token(&self) -> std::string::String {
3148        use std::clone::Clone;
3149        self.next_page_token.clone()
3150    }
3151}
3152
3153/// The request message for the CreatePipeline method.
3154#[derive(Clone, Default, PartialEq)]
3155#[non_exhaustive]
3156pub struct CreatePipelineRequest {
3157    /// Required. The parent collection in which to add this pipeline.
3158    pub parent: std::string::String,
3159
3160    /// Required. The pipeline to create.
3161    pub pipeline: std::option::Option<crate::model::Pipeline>,
3162
3163    /// Required. The user-provided ID to be assigned to the Pipeline. It should
3164    /// match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
3165    pub pipeline_id: std::string::String,
3166
3167    /// Optional. If set, validate the request and preview the review, but do not
3168    /// post it.
3169    pub validate_only: bool,
3170
3171    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3172}
3173
3174impl CreatePipelineRequest {
3175    pub fn new() -> Self {
3176        std::default::Default::default()
3177    }
3178
3179    /// Sets the value of [parent][crate::model::CreatePipelineRequest::parent].
3180    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3181        self.parent = v.into();
3182        self
3183    }
3184
3185    /// Sets the value of [pipeline][crate::model::CreatePipelineRequest::pipeline].
3186    pub fn set_pipeline<T>(mut self, v: T) -> Self
3187    where
3188        T: std::convert::Into<crate::model::Pipeline>,
3189    {
3190        self.pipeline = std::option::Option::Some(v.into());
3191        self
3192    }
3193
3194    /// Sets or clears the value of [pipeline][crate::model::CreatePipelineRequest::pipeline].
3195    pub fn set_or_clear_pipeline<T>(mut self, v: std::option::Option<T>) -> Self
3196    where
3197        T: std::convert::Into<crate::model::Pipeline>,
3198    {
3199        self.pipeline = v.map(|x| x.into());
3200        self
3201    }
3202
3203    /// Sets the value of [pipeline_id][crate::model::CreatePipelineRequest::pipeline_id].
3204    pub fn set_pipeline_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3205        self.pipeline_id = v.into();
3206        self
3207    }
3208
3209    /// Sets the value of [validate_only][crate::model::CreatePipelineRequest::validate_only].
3210    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3211        self.validate_only = v.into();
3212        self
3213    }
3214}
3215
3216impl wkt::message::Message for CreatePipelineRequest {
3217    fn typename() -> &'static str {
3218        "type.googleapis.com/google.cloud.eventarc.v1.CreatePipelineRequest"
3219    }
3220}
3221
3222/// The request message for the UpdatePipeline method.
3223#[derive(Clone, Default, PartialEq)]
3224#[non_exhaustive]
3225pub struct UpdatePipelineRequest {
3226    /// Required. The Pipeline to be updated.
3227    pub pipeline: std::option::Option<crate::model::Pipeline>,
3228
3229    /// Optional. The fields to be updated; only fields explicitly provided are
3230    /// updated. If no field mask is provided, all provided fields in the request
3231    /// are updated. To update all fields, provide a field mask of "*".
3232    pub update_mask: std::option::Option<wkt::FieldMask>,
3233
3234    /// Optional. If set to true, and the Pipeline is not found, a new Pipeline
3235    /// will be created. In this situation, `update_mask` is ignored.
3236    pub allow_missing: bool,
3237
3238    /// Optional. If set, validate the request and preview the review, but do not
3239    /// post it.
3240    pub validate_only: bool,
3241
3242    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3243}
3244
3245impl UpdatePipelineRequest {
3246    pub fn new() -> Self {
3247        std::default::Default::default()
3248    }
3249
3250    /// Sets the value of [pipeline][crate::model::UpdatePipelineRequest::pipeline].
3251    pub fn set_pipeline<T>(mut self, v: T) -> Self
3252    where
3253        T: std::convert::Into<crate::model::Pipeline>,
3254    {
3255        self.pipeline = std::option::Option::Some(v.into());
3256        self
3257    }
3258
3259    /// Sets or clears the value of [pipeline][crate::model::UpdatePipelineRequest::pipeline].
3260    pub fn set_or_clear_pipeline<T>(mut self, v: std::option::Option<T>) -> Self
3261    where
3262        T: std::convert::Into<crate::model::Pipeline>,
3263    {
3264        self.pipeline = v.map(|x| x.into());
3265        self
3266    }
3267
3268    /// Sets the value of [update_mask][crate::model::UpdatePipelineRequest::update_mask].
3269    pub fn set_update_mask<T>(mut self, v: T) -> Self
3270    where
3271        T: std::convert::Into<wkt::FieldMask>,
3272    {
3273        self.update_mask = std::option::Option::Some(v.into());
3274        self
3275    }
3276
3277    /// Sets or clears the value of [update_mask][crate::model::UpdatePipelineRequest::update_mask].
3278    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3279    where
3280        T: std::convert::Into<wkt::FieldMask>,
3281    {
3282        self.update_mask = v.map(|x| x.into());
3283        self
3284    }
3285
3286    /// Sets the value of [allow_missing][crate::model::UpdatePipelineRequest::allow_missing].
3287    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3288        self.allow_missing = v.into();
3289        self
3290    }
3291
3292    /// Sets the value of [validate_only][crate::model::UpdatePipelineRequest::validate_only].
3293    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3294        self.validate_only = v.into();
3295        self
3296    }
3297}
3298
3299impl wkt::message::Message for UpdatePipelineRequest {
3300    fn typename() -> &'static str {
3301        "type.googleapis.com/google.cloud.eventarc.v1.UpdatePipelineRequest"
3302    }
3303}
3304
3305/// The request message for the DeletePipeline method.
3306#[derive(Clone, Default, PartialEq)]
3307#[non_exhaustive]
3308pub struct DeletePipelineRequest {
3309    /// Required. The name of the Pipeline to be deleted.
3310    pub name: std::string::String,
3311
3312    /// Optional. If provided, the Pipeline will only be deleted if the etag
3313    /// matches the current etag on the resource.
3314    pub etag: std::string::String,
3315
3316    /// Optional. If set to true, and the Pipeline is not found, the request will
3317    /// succeed but no action will be taken on the server.
3318    pub allow_missing: bool,
3319
3320    /// Optional. If set, validate the request and preview the review, but do not
3321    /// post it.
3322    pub validate_only: bool,
3323
3324    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3325}
3326
3327impl DeletePipelineRequest {
3328    pub fn new() -> Self {
3329        std::default::Default::default()
3330    }
3331
3332    /// Sets the value of [name][crate::model::DeletePipelineRequest::name].
3333    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3334        self.name = v.into();
3335        self
3336    }
3337
3338    /// Sets the value of [etag][crate::model::DeletePipelineRequest::etag].
3339    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3340        self.etag = v.into();
3341        self
3342    }
3343
3344    /// Sets the value of [allow_missing][crate::model::DeletePipelineRequest::allow_missing].
3345    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3346        self.allow_missing = v.into();
3347        self
3348    }
3349
3350    /// Sets the value of [validate_only][crate::model::DeletePipelineRequest::validate_only].
3351    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3352        self.validate_only = v.into();
3353        self
3354    }
3355}
3356
3357impl wkt::message::Message for DeletePipelineRequest {
3358    fn typename() -> &'static str {
3359        "type.googleapis.com/google.cloud.eventarc.v1.DeletePipelineRequest"
3360    }
3361}
3362
3363/// The request message for the GetGoogleApiSource method.
3364#[derive(Clone, Default, PartialEq)]
3365#[non_exhaustive]
3366pub struct GetGoogleApiSourceRequest {
3367    /// Required. The name of the google api source to get.
3368    pub name: std::string::String,
3369
3370    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3371}
3372
3373impl GetGoogleApiSourceRequest {
3374    pub fn new() -> Self {
3375        std::default::Default::default()
3376    }
3377
3378    /// Sets the value of [name][crate::model::GetGoogleApiSourceRequest::name].
3379    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3380        self.name = v.into();
3381        self
3382    }
3383}
3384
3385impl wkt::message::Message for GetGoogleApiSourceRequest {
3386    fn typename() -> &'static str {
3387        "type.googleapis.com/google.cloud.eventarc.v1.GetGoogleApiSourceRequest"
3388    }
3389}
3390
3391/// The request message for the ListGoogleApiSources method.
3392#[derive(Clone, Default, PartialEq)]
3393#[non_exhaustive]
3394pub struct ListGoogleApiSourcesRequest {
3395    /// Required. The parent collection to list GoogleApiSources on.
3396    pub parent: std::string::String,
3397
3398    /// Optional. The maximum number of results to return on each page.
3399    ///
3400    /// Note: The service may send fewer.
3401    pub page_size: i32,
3402
3403    /// Optional. The page token; provide the value from the `next_page_token`
3404    /// field in a previous call to retrieve the subsequent page.
3405    ///
3406    /// When paginating, all other parameters provided must match
3407    /// the previous call that provided the page token.
3408    pub page_token: std::string::String,
3409
3410    /// Optional. The sorting order of the resources returned. Value should be a
3411    /// comma-separated list of fields. The default sorting order is ascending. To
3412    /// specify descending order for a field, append a `desc` suffix; for example:
3413    /// `name desc, update_time`.
3414    pub order_by: std::string::String,
3415
3416    /// Optional. The filter field that the list request will filter on.
3417    /// Possible filtersare described in <https://google.aip.dev/160>.
3418    pub filter: std::string::String,
3419
3420    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3421}
3422
3423impl ListGoogleApiSourcesRequest {
3424    pub fn new() -> Self {
3425        std::default::Default::default()
3426    }
3427
3428    /// Sets the value of [parent][crate::model::ListGoogleApiSourcesRequest::parent].
3429    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3430        self.parent = v.into();
3431        self
3432    }
3433
3434    /// Sets the value of [page_size][crate::model::ListGoogleApiSourcesRequest::page_size].
3435    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3436        self.page_size = v.into();
3437        self
3438    }
3439
3440    /// Sets the value of [page_token][crate::model::ListGoogleApiSourcesRequest::page_token].
3441    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3442        self.page_token = v.into();
3443        self
3444    }
3445
3446    /// Sets the value of [order_by][crate::model::ListGoogleApiSourcesRequest::order_by].
3447    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3448        self.order_by = v.into();
3449        self
3450    }
3451
3452    /// Sets the value of [filter][crate::model::ListGoogleApiSourcesRequest::filter].
3453    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3454        self.filter = v.into();
3455        self
3456    }
3457}
3458
3459impl wkt::message::Message for ListGoogleApiSourcesRequest {
3460    fn typename() -> &'static str {
3461        "type.googleapis.com/google.cloud.eventarc.v1.ListGoogleApiSourcesRequest"
3462    }
3463}
3464
3465/// The response message for the `ListGoogleApiSources` method.
3466#[derive(Clone, Default, PartialEq)]
3467#[non_exhaustive]
3468pub struct ListGoogleApiSourcesResponse {
3469    /// The requested GoogleApiSources, up to the number specified in `page_size`.
3470    pub google_api_sources: std::vec::Vec<crate::model::GoogleApiSource>,
3471
3472    /// A page token that can be sent to `ListMessageBusEnrollments` to request the
3473    /// next page. If this is empty, then there are no more pages.
3474    pub next_page_token: std::string::String,
3475
3476    /// Unreachable resources, if any.
3477    pub unreachable: std::vec::Vec<std::string::String>,
3478
3479    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3480}
3481
3482impl ListGoogleApiSourcesResponse {
3483    pub fn new() -> Self {
3484        std::default::Default::default()
3485    }
3486
3487    /// Sets the value of [google_api_sources][crate::model::ListGoogleApiSourcesResponse::google_api_sources].
3488    pub fn set_google_api_sources<T, V>(mut self, v: T) -> Self
3489    where
3490        T: std::iter::IntoIterator<Item = V>,
3491        V: std::convert::Into<crate::model::GoogleApiSource>,
3492    {
3493        use std::iter::Iterator;
3494        self.google_api_sources = v.into_iter().map(|i| i.into()).collect();
3495        self
3496    }
3497
3498    /// Sets the value of [next_page_token][crate::model::ListGoogleApiSourcesResponse::next_page_token].
3499    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3500        self.next_page_token = v.into();
3501        self
3502    }
3503
3504    /// Sets the value of [unreachable][crate::model::ListGoogleApiSourcesResponse::unreachable].
3505    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3506    where
3507        T: std::iter::IntoIterator<Item = V>,
3508        V: std::convert::Into<std::string::String>,
3509    {
3510        use std::iter::Iterator;
3511        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3512        self
3513    }
3514}
3515
3516impl wkt::message::Message for ListGoogleApiSourcesResponse {
3517    fn typename() -> &'static str {
3518        "type.googleapis.com/google.cloud.eventarc.v1.ListGoogleApiSourcesResponse"
3519    }
3520}
3521
3522#[doc(hidden)]
3523impl gax::paginator::internal::PageableResponse for ListGoogleApiSourcesResponse {
3524    type PageItem = crate::model::GoogleApiSource;
3525
3526    fn items(self) -> std::vec::Vec<Self::PageItem> {
3527        self.google_api_sources
3528    }
3529
3530    fn next_page_token(&self) -> std::string::String {
3531        use std::clone::Clone;
3532        self.next_page_token.clone()
3533    }
3534}
3535
3536/// The request message for the CreateGoogleApiSource method.
3537#[derive(Clone, Default, PartialEq)]
3538#[non_exhaustive]
3539pub struct CreateGoogleApiSourceRequest {
3540    /// Required. The parent collection in which to add this google api source.
3541    pub parent: std::string::String,
3542
3543    /// Required. The google api source to create.
3544    pub google_api_source: std::option::Option<crate::model::GoogleApiSource>,
3545
3546    /// Required. The user-provided ID to be assigned to the GoogleApiSource. It
3547    /// should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
3548    pub google_api_source_id: std::string::String,
3549
3550    /// Optional. If set, validate the request and preview the review, but do not
3551    /// post it.
3552    pub validate_only: bool,
3553
3554    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3555}
3556
3557impl CreateGoogleApiSourceRequest {
3558    pub fn new() -> Self {
3559        std::default::Default::default()
3560    }
3561
3562    /// Sets the value of [parent][crate::model::CreateGoogleApiSourceRequest::parent].
3563    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3564        self.parent = v.into();
3565        self
3566    }
3567
3568    /// Sets the value of [google_api_source][crate::model::CreateGoogleApiSourceRequest::google_api_source].
3569    pub fn set_google_api_source<T>(mut self, v: T) -> Self
3570    where
3571        T: std::convert::Into<crate::model::GoogleApiSource>,
3572    {
3573        self.google_api_source = std::option::Option::Some(v.into());
3574        self
3575    }
3576
3577    /// Sets or clears the value of [google_api_source][crate::model::CreateGoogleApiSourceRequest::google_api_source].
3578    pub fn set_or_clear_google_api_source<T>(mut self, v: std::option::Option<T>) -> Self
3579    where
3580        T: std::convert::Into<crate::model::GoogleApiSource>,
3581    {
3582        self.google_api_source = v.map(|x| x.into());
3583        self
3584    }
3585
3586    /// Sets the value of [google_api_source_id][crate::model::CreateGoogleApiSourceRequest::google_api_source_id].
3587    pub fn set_google_api_source_id<T: std::convert::Into<std::string::String>>(
3588        mut self,
3589        v: T,
3590    ) -> Self {
3591        self.google_api_source_id = v.into();
3592        self
3593    }
3594
3595    /// Sets the value of [validate_only][crate::model::CreateGoogleApiSourceRequest::validate_only].
3596    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3597        self.validate_only = v.into();
3598        self
3599    }
3600}
3601
3602impl wkt::message::Message for CreateGoogleApiSourceRequest {
3603    fn typename() -> &'static str {
3604        "type.googleapis.com/google.cloud.eventarc.v1.CreateGoogleApiSourceRequest"
3605    }
3606}
3607
3608/// The request message for the UpdateGoogleApiSource method.
3609#[derive(Clone, Default, PartialEq)]
3610#[non_exhaustive]
3611pub struct UpdateGoogleApiSourceRequest {
3612    /// Required. The GoogleApiSource to be updated.
3613    pub google_api_source: std::option::Option<crate::model::GoogleApiSource>,
3614
3615    /// Optional. The fields to be updated; only fields explicitly provided are
3616    /// updated. If no field mask is provided, all provided fields in the request
3617    /// are updated. To update all fields, provide a field mask of "*".
3618    pub update_mask: std::option::Option<wkt::FieldMask>,
3619
3620    /// Optional. If set to true, and the GoogleApiSource is not found, a new
3621    /// GoogleApiSource will be created. In this situation, `update_mask` is
3622    /// ignored.
3623    pub allow_missing: bool,
3624
3625    /// Optional. If set, validate the request and preview the review, but do not
3626    /// post it.
3627    pub validate_only: bool,
3628
3629    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3630}
3631
3632impl UpdateGoogleApiSourceRequest {
3633    pub fn new() -> Self {
3634        std::default::Default::default()
3635    }
3636
3637    /// Sets the value of [google_api_source][crate::model::UpdateGoogleApiSourceRequest::google_api_source].
3638    pub fn set_google_api_source<T>(mut self, v: T) -> Self
3639    where
3640        T: std::convert::Into<crate::model::GoogleApiSource>,
3641    {
3642        self.google_api_source = std::option::Option::Some(v.into());
3643        self
3644    }
3645
3646    /// Sets or clears the value of [google_api_source][crate::model::UpdateGoogleApiSourceRequest::google_api_source].
3647    pub fn set_or_clear_google_api_source<T>(mut self, v: std::option::Option<T>) -> Self
3648    where
3649        T: std::convert::Into<crate::model::GoogleApiSource>,
3650    {
3651        self.google_api_source = v.map(|x| x.into());
3652        self
3653    }
3654
3655    /// Sets the value of [update_mask][crate::model::UpdateGoogleApiSourceRequest::update_mask].
3656    pub fn set_update_mask<T>(mut self, v: T) -> Self
3657    where
3658        T: std::convert::Into<wkt::FieldMask>,
3659    {
3660        self.update_mask = std::option::Option::Some(v.into());
3661        self
3662    }
3663
3664    /// Sets or clears the value of [update_mask][crate::model::UpdateGoogleApiSourceRequest::update_mask].
3665    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3666    where
3667        T: std::convert::Into<wkt::FieldMask>,
3668    {
3669        self.update_mask = v.map(|x| x.into());
3670        self
3671    }
3672
3673    /// Sets the value of [allow_missing][crate::model::UpdateGoogleApiSourceRequest::allow_missing].
3674    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3675        self.allow_missing = v.into();
3676        self
3677    }
3678
3679    /// Sets the value of [validate_only][crate::model::UpdateGoogleApiSourceRequest::validate_only].
3680    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3681        self.validate_only = v.into();
3682        self
3683    }
3684}
3685
3686impl wkt::message::Message for UpdateGoogleApiSourceRequest {
3687    fn typename() -> &'static str {
3688        "type.googleapis.com/google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest"
3689    }
3690}
3691
3692/// The request message for the DeleteGoogleApiSource method.
3693#[derive(Clone, Default, PartialEq)]
3694#[non_exhaustive]
3695pub struct DeleteGoogleApiSourceRequest {
3696    /// Required. The name of the GoogleApiSource to be deleted.
3697    pub name: std::string::String,
3698
3699    /// Optional. If provided, the MessageBus will only be deleted if the etag
3700    /// matches the current etag on the resource.
3701    pub etag: std::string::String,
3702
3703    /// Optional. If set to true, and the MessageBus is not found, the request will
3704    /// succeed but no action will be taken on the server.
3705    pub allow_missing: bool,
3706
3707    /// Optional. If set, validate the request and preview the review, but do not
3708    /// post it.
3709    pub validate_only: bool,
3710
3711    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3712}
3713
3714impl DeleteGoogleApiSourceRequest {
3715    pub fn new() -> Self {
3716        std::default::Default::default()
3717    }
3718
3719    /// Sets the value of [name][crate::model::DeleteGoogleApiSourceRequest::name].
3720    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3721        self.name = v.into();
3722        self
3723    }
3724
3725    /// Sets the value of [etag][crate::model::DeleteGoogleApiSourceRequest::etag].
3726    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3727        self.etag = v.into();
3728        self
3729    }
3730
3731    /// Sets the value of [allow_missing][crate::model::DeleteGoogleApiSourceRequest::allow_missing].
3732    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3733        self.allow_missing = v.into();
3734        self
3735    }
3736
3737    /// Sets the value of [validate_only][crate::model::DeleteGoogleApiSourceRequest::validate_only].
3738    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3739        self.validate_only = v.into();
3740        self
3741    }
3742}
3743
3744impl wkt::message::Message for DeleteGoogleApiSourceRequest {
3745    fn typename() -> &'static str {
3746        "type.googleapis.com/google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest"
3747    }
3748}
3749
3750/// Represents the metadata of the long-running operation.
3751#[derive(Clone, Default, PartialEq)]
3752#[non_exhaustive]
3753pub struct OperationMetadata {
3754    /// Output only. The time the operation was created.
3755    pub create_time: std::option::Option<wkt::Timestamp>,
3756
3757    /// Output only. The time the operation finished running.
3758    pub end_time: std::option::Option<wkt::Timestamp>,
3759
3760    /// Output only. Server-defined resource path for the target of the operation.
3761    pub target: std::string::String,
3762
3763    /// Output only. Name of the verb executed by the operation.
3764    pub verb: std::string::String,
3765
3766    /// Output only. Human-readable status of the operation, if any.
3767    pub status_message: std::string::String,
3768
3769    /// Output only. Identifies whether the user has requested cancellation
3770    /// of the operation. Operations that have successfully been cancelled
3771    /// have [Operation.error][] value with a
3772    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
3773    /// `Code.CANCELLED`.
3774    ///
3775    /// [google.rpc.Status.code]: rpc::model::Status::code
3776    pub requested_cancellation: bool,
3777
3778    /// Output only. API version used to start the operation.
3779    pub api_version: std::string::String,
3780
3781    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3782}
3783
3784impl OperationMetadata {
3785    pub fn new() -> Self {
3786        std::default::Default::default()
3787    }
3788
3789    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
3790    pub fn set_create_time<T>(mut self, v: T) -> Self
3791    where
3792        T: std::convert::Into<wkt::Timestamp>,
3793    {
3794        self.create_time = std::option::Option::Some(v.into());
3795        self
3796    }
3797
3798    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
3799    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3800    where
3801        T: std::convert::Into<wkt::Timestamp>,
3802    {
3803        self.create_time = v.map(|x| x.into());
3804        self
3805    }
3806
3807    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
3808    pub fn set_end_time<T>(mut self, v: T) -> Self
3809    where
3810        T: std::convert::Into<wkt::Timestamp>,
3811    {
3812        self.end_time = std::option::Option::Some(v.into());
3813        self
3814    }
3815
3816    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
3817    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3818    where
3819        T: std::convert::Into<wkt::Timestamp>,
3820    {
3821        self.end_time = v.map(|x| x.into());
3822        self
3823    }
3824
3825    /// Sets the value of [target][crate::model::OperationMetadata::target].
3826    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3827        self.target = v.into();
3828        self
3829    }
3830
3831    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
3832    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3833        self.verb = v.into();
3834        self
3835    }
3836
3837    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
3838    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3839        self.status_message = v.into();
3840        self
3841    }
3842
3843    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
3844    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3845        self.requested_cancellation = v.into();
3846        self
3847    }
3848
3849    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
3850    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3851        self.api_version = v.into();
3852        self
3853    }
3854}
3855
3856impl wkt::message::Message for OperationMetadata {
3857    fn typename() -> &'static str {
3858        "type.googleapis.com/google.cloud.eventarc.v1.OperationMetadata"
3859    }
3860}
3861
3862/// A GoogleApiSource represents a subscription of 1P events from a MessageBus.
3863#[derive(Clone, Default, PartialEq)]
3864#[non_exhaustive]
3865pub struct GoogleApiSource {
3866    /// Identifier. Resource name of the form
3867    /// projects/{project}/locations/{location}/googleApiSources/{google_api_source}
3868    pub name: std::string::String,
3869
3870    /// Output only. Server assigned unique identifier for the channel. The value
3871    /// is a UUID4 string and guaranteed to remain unchanged until the resource is
3872    /// deleted.
3873    pub uid: std::string::String,
3874
3875    /// Output only. This checksum is computed by the server based on the value of
3876    /// other fields, and might be sent only on update and delete requests to
3877    /// ensure that the client has an up-to-date value before proceeding.
3878    pub etag: std::string::String,
3879
3880    /// Output only. The creation time.
3881    pub create_time: std::option::Option<wkt::Timestamp>,
3882
3883    /// Output only. The last-modified time.
3884    pub update_time: std::option::Option<wkt::Timestamp>,
3885
3886    /// Optional. Resource labels.
3887    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3888
3889    /// Optional. Resource annotations.
3890    pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
3891
3892    /// Optional. Resource display name.
3893    pub display_name: std::string::String,
3894
3895    /// Required. Destination is the message bus that the GoogleApiSource is
3896    /// delivering to. It must be point to the full resource name of a MessageBus.
3897    /// Format:
3898    /// "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID)
3899    pub destination: std::string::String,
3900
3901    /// Optional. Resource name of a KMS crypto key (managed by the user) used to
3902    /// encrypt/decrypt their event data.
3903    ///
3904    /// It must match the pattern
3905    /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
3906    pub crypto_key_name: std::string::String,
3907
3908    /// Optional. Config to control Platform logging for the GoogleApiSource.
3909    pub logging_config: std::option::Option<crate::model::LoggingConfig>,
3910
3911    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3912}
3913
3914impl GoogleApiSource {
3915    pub fn new() -> Self {
3916        std::default::Default::default()
3917    }
3918
3919    /// Sets the value of [name][crate::model::GoogleApiSource::name].
3920    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3921        self.name = v.into();
3922        self
3923    }
3924
3925    /// Sets the value of [uid][crate::model::GoogleApiSource::uid].
3926    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3927        self.uid = v.into();
3928        self
3929    }
3930
3931    /// Sets the value of [etag][crate::model::GoogleApiSource::etag].
3932    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3933        self.etag = v.into();
3934        self
3935    }
3936
3937    /// Sets the value of [create_time][crate::model::GoogleApiSource::create_time].
3938    pub fn set_create_time<T>(mut self, v: T) -> Self
3939    where
3940        T: std::convert::Into<wkt::Timestamp>,
3941    {
3942        self.create_time = std::option::Option::Some(v.into());
3943        self
3944    }
3945
3946    /// Sets or clears the value of [create_time][crate::model::GoogleApiSource::create_time].
3947    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3948    where
3949        T: std::convert::Into<wkt::Timestamp>,
3950    {
3951        self.create_time = v.map(|x| x.into());
3952        self
3953    }
3954
3955    /// Sets the value of [update_time][crate::model::GoogleApiSource::update_time].
3956    pub fn set_update_time<T>(mut self, v: T) -> Self
3957    where
3958        T: std::convert::Into<wkt::Timestamp>,
3959    {
3960        self.update_time = std::option::Option::Some(v.into());
3961        self
3962    }
3963
3964    /// Sets or clears the value of [update_time][crate::model::GoogleApiSource::update_time].
3965    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
3966    where
3967        T: std::convert::Into<wkt::Timestamp>,
3968    {
3969        self.update_time = v.map(|x| x.into());
3970        self
3971    }
3972
3973    /// Sets the value of [labels][crate::model::GoogleApiSource::labels].
3974    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3975    where
3976        T: std::iter::IntoIterator<Item = (K, V)>,
3977        K: std::convert::Into<std::string::String>,
3978        V: std::convert::Into<std::string::String>,
3979    {
3980        use std::iter::Iterator;
3981        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3982        self
3983    }
3984
3985    /// Sets the value of [annotations][crate::model::GoogleApiSource::annotations].
3986    pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
3987    where
3988        T: std::iter::IntoIterator<Item = (K, V)>,
3989        K: std::convert::Into<std::string::String>,
3990        V: std::convert::Into<std::string::String>,
3991    {
3992        use std::iter::Iterator;
3993        self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3994        self
3995    }
3996
3997    /// Sets the value of [display_name][crate::model::GoogleApiSource::display_name].
3998    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3999        self.display_name = v.into();
4000        self
4001    }
4002
4003    /// Sets the value of [destination][crate::model::GoogleApiSource::destination].
4004    pub fn set_destination<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4005        self.destination = v.into();
4006        self
4007    }
4008
4009    /// Sets the value of [crypto_key_name][crate::model::GoogleApiSource::crypto_key_name].
4010    pub fn set_crypto_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4011        self.crypto_key_name = v.into();
4012        self
4013    }
4014
4015    /// Sets the value of [logging_config][crate::model::GoogleApiSource::logging_config].
4016    pub fn set_logging_config<T>(mut self, v: T) -> Self
4017    where
4018        T: std::convert::Into<crate::model::LoggingConfig>,
4019    {
4020        self.logging_config = std::option::Option::Some(v.into());
4021        self
4022    }
4023
4024    /// Sets or clears the value of [logging_config][crate::model::GoogleApiSource::logging_config].
4025    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
4026    where
4027        T: std::convert::Into<crate::model::LoggingConfig>,
4028    {
4029        self.logging_config = v.map(|x| x.into());
4030        self
4031    }
4032}
4033
4034impl wkt::message::Message for GoogleApiSource {
4035    fn typename() -> &'static str {
4036        "type.googleapis.com/google.cloud.eventarc.v1.GoogleApiSource"
4037    }
4038}
4039
4040/// A GoogleChannelConfig is a resource that stores the custom settings
4041/// respected by Eventarc first-party triggers in the matching region.
4042/// Once configured, first-party event data will be protected
4043/// using the specified custom managed encryption key instead of Google-managed
4044/// encryption keys.
4045#[derive(Clone, Default, PartialEq)]
4046#[non_exhaustive]
4047pub struct GoogleChannelConfig {
4048    /// Required. The resource name of the config. Must be in the format of,
4049    /// `projects/{project}/locations/{location}/googleChannelConfig`.
4050    /// In API responses, the config name always includes the projectID, regardless
4051    /// of whether the projectID or projectNumber was provided.
4052    pub name: std::string::String,
4053
4054    /// Output only. The last-modified time.
4055    pub update_time: std::option::Option<wkt::Timestamp>,
4056
4057    /// Optional. Resource name of a KMS crypto key (managed by the user) used to
4058    /// encrypt/decrypt their event data.
4059    ///
4060    /// It must match the pattern
4061    /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
4062    pub crypto_key_name: std::string::String,
4063
4064    /// Optional. Resource labels.
4065    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4066
4067    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4068}
4069
4070impl GoogleChannelConfig {
4071    pub fn new() -> Self {
4072        std::default::Default::default()
4073    }
4074
4075    /// Sets the value of [name][crate::model::GoogleChannelConfig::name].
4076    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4077        self.name = v.into();
4078        self
4079    }
4080
4081    /// Sets the value of [update_time][crate::model::GoogleChannelConfig::update_time].
4082    pub fn set_update_time<T>(mut self, v: T) -> Self
4083    where
4084        T: std::convert::Into<wkt::Timestamp>,
4085    {
4086        self.update_time = std::option::Option::Some(v.into());
4087        self
4088    }
4089
4090    /// Sets or clears the value of [update_time][crate::model::GoogleChannelConfig::update_time].
4091    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4092    where
4093        T: std::convert::Into<wkt::Timestamp>,
4094    {
4095        self.update_time = v.map(|x| x.into());
4096        self
4097    }
4098
4099    /// Sets the value of [crypto_key_name][crate::model::GoogleChannelConfig::crypto_key_name].
4100    pub fn set_crypto_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4101        self.crypto_key_name = v.into();
4102        self
4103    }
4104
4105    /// Sets the value of [labels][crate::model::GoogleChannelConfig::labels].
4106    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4107    where
4108        T: std::iter::IntoIterator<Item = (K, V)>,
4109        K: std::convert::Into<std::string::String>,
4110        V: std::convert::Into<std::string::String>,
4111    {
4112        use std::iter::Iterator;
4113        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4114        self
4115    }
4116}
4117
4118impl wkt::message::Message for GoogleChannelConfig {
4119    fn typename() -> &'static str {
4120        "type.googleapis.com/google.cloud.eventarc.v1.GoogleChannelConfig"
4121    }
4122}
4123
4124/// The configuration for Platform Telemetry logging for Eventarc Advanced
4125/// resources.
4126#[derive(Clone, Default, PartialEq)]
4127#[non_exhaustive]
4128pub struct LoggingConfig {
4129    /// Optional. The minimum severity of logs that will be sent to
4130    /// Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be
4131    /// sent, unless it is NONE.
4132    pub log_severity: crate::model::logging_config::LogSeverity,
4133
4134    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4135}
4136
4137impl LoggingConfig {
4138    pub fn new() -> Self {
4139        std::default::Default::default()
4140    }
4141
4142    /// Sets the value of [log_severity][crate::model::LoggingConfig::log_severity].
4143    pub fn set_log_severity<T: std::convert::Into<crate::model::logging_config::LogSeverity>>(
4144        mut self,
4145        v: T,
4146    ) -> Self {
4147        self.log_severity = v.into();
4148        self
4149    }
4150}
4151
4152impl wkt::message::Message for LoggingConfig {
4153    fn typename() -> &'static str {
4154        "type.googleapis.com/google.cloud.eventarc.v1.LoggingConfig"
4155    }
4156}
4157
4158/// Defines additional types related to [LoggingConfig].
4159pub mod logging_config {
4160    #[allow(unused_imports)]
4161    use super::*;
4162
4163    /// The different severities for logging supported by Eventarc Advanced
4164    /// resources.
4165    /// This enum is an exhaustive list of log severities and is FROZEN. Do not
4166    /// expect new values to be added.
4167    ///
4168    /// # Working with unknown values
4169    ///
4170    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4171    /// additional enum variants at any time. Adding new variants is not considered
4172    /// a breaking change. Applications should write their code in anticipation of:
4173    ///
4174    /// - New values appearing in future releases of the client library, **and**
4175    /// - New values received dynamically, without application changes.
4176    ///
4177    /// Please consult the [Working with enums] section in the user guide for some
4178    /// guidelines.
4179    ///
4180    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4181    #[derive(Clone, Debug, PartialEq)]
4182    #[non_exhaustive]
4183    pub enum LogSeverity {
4184        /// Log severity is not specified. This value is treated the same as NONE,
4185        /// but is used to distinguish between no update and update to NONE in
4186        /// update_masks.
4187        Unspecified,
4188        /// Default value at resource creation, presence of this value must be
4189        /// treated as no logging/disable logging.
4190        None,
4191        /// Debug or trace level logging.
4192        Debug,
4193        /// Routine information, such as ongoing status or performance.
4194        Info,
4195        /// Normal but significant events, such as start up, shut down, or a
4196        /// configuration change.
4197        Notice,
4198        /// Warning events might cause problems.
4199        Warning,
4200        /// Error events are likely to cause problems.
4201        Error,
4202        /// Critical events cause more severe problems or outages.
4203        Critical,
4204        /// A person must take action immediately.
4205        Alert,
4206        /// One or more systems are unusable.
4207        Emergency,
4208        /// If set, the enum was initialized with an unknown value.
4209        ///
4210        /// Applications can examine the value using [LogSeverity::value] or
4211        /// [LogSeverity::name].
4212        UnknownValue(log_severity::UnknownValue),
4213    }
4214
4215    #[doc(hidden)]
4216    pub mod log_severity {
4217        #[allow(unused_imports)]
4218        use super::*;
4219        #[derive(Clone, Debug, PartialEq)]
4220        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4221    }
4222
4223    impl LogSeverity {
4224        /// Gets the enum value.
4225        ///
4226        /// Returns `None` if the enum contains an unknown value deserialized from
4227        /// the string representation of enums.
4228        pub fn value(&self) -> std::option::Option<i32> {
4229            match self {
4230                Self::Unspecified => std::option::Option::Some(0),
4231                Self::None => std::option::Option::Some(1),
4232                Self::Debug => std::option::Option::Some(2),
4233                Self::Info => std::option::Option::Some(3),
4234                Self::Notice => std::option::Option::Some(4),
4235                Self::Warning => std::option::Option::Some(5),
4236                Self::Error => std::option::Option::Some(6),
4237                Self::Critical => std::option::Option::Some(7),
4238                Self::Alert => std::option::Option::Some(8),
4239                Self::Emergency => std::option::Option::Some(9),
4240                Self::UnknownValue(u) => u.0.value(),
4241            }
4242        }
4243
4244        /// Gets the enum value as a string.
4245        ///
4246        /// Returns `None` if the enum contains an unknown value deserialized from
4247        /// the integer representation of enums.
4248        pub fn name(&self) -> std::option::Option<&str> {
4249            match self {
4250                Self::Unspecified => std::option::Option::Some("LOG_SEVERITY_UNSPECIFIED"),
4251                Self::None => std::option::Option::Some("NONE"),
4252                Self::Debug => std::option::Option::Some("DEBUG"),
4253                Self::Info => std::option::Option::Some("INFO"),
4254                Self::Notice => std::option::Option::Some("NOTICE"),
4255                Self::Warning => std::option::Option::Some("WARNING"),
4256                Self::Error => std::option::Option::Some("ERROR"),
4257                Self::Critical => std::option::Option::Some("CRITICAL"),
4258                Self::Alert => std::option::Option::Some("ALERT"),
4259                Self::Emergency => std::option::Option::Some("EMERGENCY"),
4260                Self::UnknownValue(u) => u.0.name(),
4261            }
4262        }
4263    }
4264
4265    impl std::default::Default for LogSeverity {
4266        fn default() -> Self {
4267            use std::convert::From;
4268            Self::from(0)
4269        }
4270    }
4271
4272    impl std::fmt::Display for LogSeverity {
4273        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4274            wkt::internal::display_enum(f, self.name(), self.value())
4275        }
4276    }
4277
4278    impl std::convert::From<i32> for LogSeverity {
4279        fn from(value: i32) -> Self {
4280            match value {
4281                0 => Self::Unspecified,
4282                1 => Self::None,
4283                2 => Self::Debug,
4284                3 => Self::Info,
4285                4 => Self::Notice,
4286                5 => Self::Warning,
4287                6 => Self::Error,
4288                7 => Self::Critical,
4289                8 => Self::Alert,
4290                9 => Self::Emergency,
4291                _ => Self::UnknownValue(log_severity::UnknownValue(
4292                    wkt::internal::UnknownEnumValue::Integer(value),
4293                )),
4294            }
4295        }
4296    }
4297
4298    impl std::convert::From<&str> for LogSeverity {
4299        fn from(value: &str) -> Self {
4300            use std::string::ToString;
4301            match value {
4302                "LOG_SEVERITY_UNSPECIFIED" => Self::Unspecified,
4303                "NONE" => Self::None,
4304                "DEBUG" => Self::Debug,
4305                "INFO" => Self::Info,
4306                "NOTICE" => Self::Notice,
4307                "WARNING" => Self::Warning,
4308                "ERROR" => Self::Error,
4309                "CRITICAL" => Self::Critical,
4310                "ALERT" => Self::Alert,
4311                "EMERGENCY" => Self::Emergency,
4312                _ => Self::UnknownValue(log_severity::UnknownValue(
4313                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4314                )),
4315            }
4316        }
4317    }
4318
4319    impl serde::ser::Serialize for LogSeverity {
4320        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4321        where
4322            S: serde::Serializer,
4323        {
4324            match self {
4325                Self::Unspecified => serializer.serialize_i32(0),
4326                Self::None => serializer.serialize_i32(1),
4327                Self::Debug => serializer.serialize_i32(2),
4328                Self::Info => serializer.serialize_i32(3),
4329                Self::Notice => serializer.serialize_i32(4),
4330                Self::Warning => serializer.serialize_i32(5),
4331                Self::Error => serializer.serialize_i32(6),
4332                Self::Critical => serializer.serialize_i32(7),
4333                Self::Alert => serializer.serialize_i32(8),
4334                Self::Emergency => serializer.serialize_i32(9),
4335                Self::UnknownValue(u) => u.0.serialize(serializer),
4336            }
4337        }
4338    }
4339
4340    impl<'de> serde::de::Deserialize<'de> for LogSeverity {
4341        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4342        where
4343            D: serde::Deserializer<'de>,
4344        {
4345            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LogSeverity>::new(
4346                ".google.cloud.eventarc.v1.LoggingConfig.LogSeverity",
4347            ))
4348        }
4349    }
4350}
4351
4352/// MessageBus for the messages flowing through the system. The admin has
4353/// visibility and control over the messages being published and consumed and can
4354/// restrict publishers and subscribers to only a subset of data available in the
4355/// system by defining authorization policies.
4356#[derive(Clone, Default, PartialEq)]
4357#[non_exhaustive]
4358pub struct MessageBus {
4359    /// Identifier. Resource name of the form
4360    /// projects/{project}/locations/{location}/messageBuses/{message_bus}
4361    pub name: std::string::String,
4362
4363    /// Output only. Server assigned unique identifier for the channel. The value
4364    /// is a UUID4 string and guaranteed to remain unchanged until the resource is
4365    /// deleted.
4366    pub uid: std::string::String,
4367
4368    /// Output only. This checksum is computed by the server based on the value of
4369    /// other fields, and might be sent only on update and delete requests to
4370    /// ensure that the client has an up-to-date value before proceeding.
4371    pub etag: std::string::String,
4372
4373    /// Output only. The creation time.
4374    pub create_time: std::option::Option<wkt::Timestamp>,
4375
4376    /// Output only. The last-modified time.
4377    pub update_time: std::option::Option<wkt::Timestamp>,
4378
4379    /// Optional. Resource labels.
4380    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4381
4382    /// Optional. Resource annotations.
4383    pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
4384
4385    /// Optional. Resource display name.
4386    pub display_name: std::string::String,
4387
4388    /// Optional. Resource name of a KMS crypto key (managed by the user) used to
4389    /// encrypt/decrypt their event data.
4390    ///
4391    /// It must match the pattern
4392    /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
4393    pub crypto_key_name: std::string::String,
4394
4395    /// Optional. Config to control Platform logging for the Message Bus. This log
4396    /// configuration is applied to the Message Bus itself, and all the Enrollments
4397    /// attached to it.
4398    pub logging_config: std::option::Option<crate::model::LoggingConfig>,
4399
4400    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4401}
4402
4403impl MessageBus {
4404    pub fn new() -> Self {
4405        std::default::Default::default()
4406    }
4407
4408    /// Sets the value of [name][crate::model::MessageBus::name].
4409    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4410        self.name = v.into();
4411        self
4412    }
4413
4414    /// Sets the value of [uid][crate::model::MessageBus::uid].
4415    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4416        self.uid = v.into();
4417        self
4418    }
4419
4420    /// Sets the value of [etag][crate::model::MessageBus::etag].
4421    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4422        self.etag = v.into();
4423        self
4424    }
4425
4426    /// Sets the value of [create_time][crate::model::MessageBus::create_time].
4427    pub fn set_create_time<T>(mut self, v: T) -> Self
4428    where
4429        T: std::convert::Into<wkt::Timestamp>,
4430    {
4431        self.create_time = std::option::Option::Some(v.into());
4432        self
4433    }
4434
4435    /// Sets or clears the value of [create_time][crate::model::MessageBus::create_time].
4436    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4437    where
4438        T: std::convert::Into<wkt::Timestamp>,
4439    {
4440        self.create_time = v.map(|x| x.into());
4441        self
4442    }
4443
4444    /// Sets the value of [update_time][crate::model::MessageBus::update_time].
4445    pub fn set_update_time<T>(mut self, v: T) -> Self
4446    where
4447        T: std::convert::Into<wkt::Timestamp>,
4448    {
4449        self.update_time = std::option::Option::Some(v.into());
4450        self
4451    }
4452
4453    /// Sets or clears the value of [update_time][crate::model::MessageBus::update_time].
4454    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4455    where
4456        T: std::convert::Into<wkt::Timestamp>,
4457    {
4458        self.update_time = v.map(|x| x.into());
4459        self
4460    }
4461
4462    /// Sets the value of [labels][crate::model::MessageBus::labels].
4463    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4464    where
4465        T: std::iter::IntoIterator<Item = (K, V)>,
4466        K: std::convert::Into<std::string::String>,
4467        V: std::convert::Into<std::string::String>,
4468    {
4469        use std::iter::Iterator;
4470        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4471        self
4472    }
4473
4474    /// Sets the value of [annotations][crate::model::MessageBus::annotations].
4475    pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
4476    where
4477        T: std::iter::IntoIterator<Item = (K, V)>,
4478        K: std::convert::Into<std::string::String>,
4479        V: std::convert::Into<std::string::String>,
4480    {
4481        use std::iter::Iterator;
4482        self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4483        self
4484    }
4485
4486    /// Sets the value of [display_name][crate::model::MessageBus::display_name].
4487    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4488        self.display_name = v.into();
4489        self
4490    }
4491
4492    /// Sets the value of [crypto_key_name][crate::model::MessageBus::crypto_key_name].
4493    pub fn set_crypto_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4494        self.crypto_key_name = v.into();
4495        self
4496    }
4497
4498    /// Sets the value of [logging_config][crate::model::MessageBus::logging_config].
4499    pub fn set_logging_config<T>(mut self, v: T) -> Self
4500    where
4501        T: std::convert::Into<crate::model::LoggingConfig>,
4502    {
4503        self.logging_config = std::option::Option::Some(v.into());
4504        self
4505    }
4506
4507    /// Sets or clears the value of [logging_config][crate::model::MessageBus::logging_config].
4508    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
4509    where
4510        T: std::convert::Into<crate::model::LoggingConfig>,
4511    {
4512        self.logging_config = v.map(|x| x.into());
4513        self
4514    }
4515}
4516
4517impl wkt::message::Message for MessageBus {
4518    fn typename() -> &'static str {
4519        "type.googleapis.com/google.cloud.eventarc.v1.MessageBus"
4520    }
4521}
4522
4523/// Network Configuration that can be inherited by other protos.
4524#[derive(Clone, Default, PartialEq)]
4525#[non_exhaustive]
4526pub struct NetworkConfig {
4527    /// Required. Name of the NetworkAttachment that allows access to the
4528    /// customer's VPC. Format:
4529    /// `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
4530    pub network_attachment: std::string::String,
4531
4532    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4533}
4534
4535impl NetworkConfig {
4536    pub fn new() -> Self {
4537        std::default::Default::default()
4538    }
4539
4540    /// Sets the value of [network_attachment][crate::model::NetworkConfig::network_attachment].
4541    pub fn set_network_attachment<T: std::convert::Into<std::string::String>>(
4542        mut self,
4543        v: T,
4544    ) -> Self {
4545        self.network_attachment = v.into();
4546        self
4547    }
4548}
4549
4550impl wkt::message::Message for NetworkConfig {
4551    fn typename() -> &'static str {
4552        "type.googleapis.com/google.cloud.eventarc.v1.NetworkConfig"
4553    }
4554}
4555
4556/// A representation of the Pipeline resource.
4557#[derive(Clone, Default, PartialEq)]
4558#[non_exhaustive]
4559pub struct Pipeline {
4560    /// Identifier. The resource name of the Pipeline. Must be unique within the
4561    /// location of the project and must be in
4562    /// `projects/{project}/locations/{location}/pipelines/{pipeline}` format.
4563    pub name: std::string::String,
4564
4565    /// Output only. The creation time.
4566    /// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
4567    /// to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
4568    /// "2014-10-02T15:01:23.045123456Z".
4569    pub create_time: std::option::Option<wkt::Timestamp>,
4570
4571    /// Output only. The last-modified time.
4572    /// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
4573    /// to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
4574    /// "2014-10-02T15:01:23.045123456Z".
4575    pub update_time: std::option::Option<wkt::Timestamp>,
4576
4577    /// Optional. User labels attached to the Pipeline that can be used to group
4578    /// resources. An object containing a list of "key": value pairs. Example: {
4579    /// "name": "wrench", "mass": "1.3kg", "count": "3" }.
4580    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4581
4582    /// Output only. Server-assigned unique identifier for the Pipeline. The value
4583    /// is a UUID4 string and guaranteed to remain unchanged until the resource is
4584    /// deleted.
4585    pub uid: std::string::String,
4586
4587    /// Optional. User-defined annotations. See
4588    /// <https://google.aip.dev/128#annotations>.
4589    pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
4590
4591    /// Optional. Display name of resource.
4592    pub display_name: std::string::String,
4593
4594    /// Required. List of destinations to which messages will be forwarded.
4595    /// Currently, exactly one destination is supported per Pipeline.
4596    pub destinations: std::vec::Vec<crate::model::pipeline::Destination>,
4597
4598    /// Optional. List of mediation operations to be performed on the message.
4599    /// Currently, only one Transformation operation is allowed in each Pipeline.
4600    pub mediations: std::vec::Vec<crate::model::pipeline::Mediation>,
4601
4602    /// Optional. Resource name of a KMS crypto key (managed by the user) used to
4603    /// encrypt/decrypt the event data. If not set, an internal Google-owned key
4604    /// will be used to encrypt messages. It must match the pattern
4605    /// "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}".
4606    pub crypto_key_name: std::string::String,
4607
4608    /// Optional. The payload format expected for the messages received by the
4609    /// Pipeline. If input_payload_format is set then any messages not matching
4610    /// this format will be treated as persistent errors. If input_payload_format
4611    /// is not set, then the message data will be treated as an opaque binary and
4612    /// no output format can be set on the Pipeline through the
4613    /// Pipeline.Destination.output_payload_format field. Any Mediations on the
4614    /// Pipeline that involve access to the data field will fail as persistent
4615    /// errors.
4616    pub input_payload_format: std::option::Option<crate::model::pipeline::MessagePayloadFormat>,
4617
4618    /// Optional. Config to control Platform Logging for Pipelines.
4619    pub logging_config: std::option::Option<crate::model::LoggingConfig>,
4620
4621    /// Optional. The retry policy to use in the pipeline.
4622    pub retry_policy: std::option::Option<crate::model::pipeline::RetryPolicy>,
4623
4624    /// Output only. This checksum is computed by the server based on the value of
4625    /// other fields, and might be sent only on create requests to ensure that the
4626    /// client has an up-to-date value before proceeding.
4627    pub etag: std::string::String,
4628
4629    /// Output only. Whether or not this Pipeline satisfies the requirements of
4630    /// physical zone separation
4631    pub satisfies_pzs: bool,
4632
4633    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4634}
4635
4636impl Pipeline {
4637    pub fn new() -> Self {
4638        std::default::Default::default()
4639    }
4640
4641    /// Sets the value of [name][crate::model::Pipeline::name].
4642    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4643        self.name = v.into();
4644        self
4645    }
4646
4647    /// Sets the value of [create_time][crate::model::Pipeline::create_time].
4648    pub fn set_create_time<T>(mut self, v: T) -> Self
4649    where
4650        T: std::convert::Into<wkt::Timestamp>,
4651    {
4652        self.create_time = std::option::Option::Some(v.into());
4653        self
4654    }
4655
4656    /// Sets or clears the value of [create_time][crate::model::Pipeline::create_time].
4657    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4658    where
4659        T: std::convert::Into<wkt::Timestamp>,
4660    {
4661        self.create_time = v.map(|x| x.into());
4662        self
4663    }
4664
4665    /// Sets the value of [update_time][crate::model::Pipeline::update_time].
4666    pub fn set_update_time<T>(mut self, v: T) -> Self
4667    where
4668        T: std::convert::Into<wkt::Timestamp>,
4669    {
4670        self.update_time = std::option::Option::Some(v.into());
4671        self
4672    }
4673
4674    /// Sets or clears the value of [update_time][crate::model::Pipeline::update_time].
4675    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4676    where
4677        T: std::convert::Into<wkt::Timestamp>,
4678    {
4679        self.update_time = v.map(|x| x.into());
4680        self
4681    }
4682
4683    /// Sets the value of [labels][crate::model::Pipeline::labels].
4684    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4685    where
4686        T: std::iter::IntoIterator<Item = (K, V)>,
4687        K: std::convert::Into<std::string::String>,
4688        V: std::convert::Into<std::string::String>,
4689    {
4690        use std::iter::Iterator;
4691        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4692        self
4693    }
4694
4695    /// Sets the value of [uid][crate::model::Pipeline::uid].
4696    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4697        self.uid = v.into();
4698        self
4699    }
4700
4701    /// Sets the value of [annotations][crate::model::Pipeline::annotations].
4702    pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
4703    where
4704        T: std::iter::IntoIterator<Item = (K, V)>,
4705        K: std::convert::Into<std::string::String>,
4706        V: std::convert::Into<std::string::String>,
4707    {
4708        use std::iter::Iterator;
4709        self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4710        self
4711    }
4712
4713    /// Sets the value of [display_name][crate::model::Pipeline::display_name].
4714    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4715        self.display_name = v.into();
4716        self
4717    }
4718
4719    /// Sets the value of [destinations][crate::model::Pipeline::destinations].
4720    pub fn set_destinations<T, V>(mut self, v: T) -> Self
4721    where
4722        T: std::iter::IntoIterator<Item = V>,
4723        V: std::convert::Into<crate::model::pipeline::Destination>,
4724    {
4725        use std::iter::Iterator;
4726        self.destinations = v.into_iter().map(|i| i.into()).collect();
4727        self
4728    }
4729
4730    /// Sets the value of [mediations][crate::model::Pipeline::mediations].
4731    pub fn set_mediations<T, V>(mut self, v: T) -> Self
4732    where
4733        T: std::iter::IntoIterator<Item = V>,
4734        V: std::convert::Into<crate::model::pipeline::Mediation>,
4735    {
4736        use std::iter::Iterator;
4737        self.mediations = v.into_iter().map(|i| i.into()).collect();
4738        self
4739    }
4740
4741    /// Sets the value of [crypto_key_name][crate::model::Pipeline::crypto_key_name].
4742    pub fn set_crypto_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4743        self.crypto_key_name = v.into();
4744        self
4745    }
4746
4747    /// Sets the value of [input_payload_format][crate::model::Pipeline::input_payload_format].
4748    pub fn set_input_payload_format<T>(mut self, v: T) -> Self
4749    where
4750        T: std::convert::Into<crate::model::pipeline::MessagePayloadFormat>,
4751    {
4752        self.input_payload_format = std::option::Option::Some(v.into());
4753        self
4754    }
4755
4756    /// Sets or clears the value of [input_payload_format][crate::model::Pipeline::input_payload_format].
4757    pub fn set_or_clear_input_payload_format<T>(mut self, v: std::option::Option<T>) -> Self
4758    where
4759        T: std::convert::Into<crate::model::pipeline::MessagePayloadFormat>,
4760    {
4761        self.input_payload_format = v.map(|x| x.into());
4762        self
4763    }
4764
4765    /// Sets the value of [logging_config][crate::model::Pipeline::logging_config].
4766    pub fn set_logging_config<T>(mut self, v: T) -> Self
4767    where
4768        T: std::convert::Into<crate::model::LoggingConfig>,
4769    {
4770        self.logging_config = std::option::Option::Some(v.into());
4771        self
4772    }
4773
4774    /// Sets or clears the value of [logging_config][crate::model::Pipeline::logging_config].
4775    pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
4776    where
4777        T: std::convert::Into<crate::model::LoggingConfig>,
4778    {
4779        self.logging_config = v.map(|x| x.into());
4780        self
4781    }
4782
4783    /// Sets the value of [retry_policy][crate::model::Pipeline::retry_policy].
4784    pub fn set_retry_policy<T>(mut self, v: T) -> Self
4785    where
4786        T: std::convert::Into<crate::model::pipeline::RetryPolicy>,
4787    {
4788        self.retry_policy = std::option::Option::Some(v.into());
4789        self
4790    }
4791
4792    /// Sets or clears the value of [retry_policy][crate::model::Pipeline::retry_policy].
4793    pub fn set_or_clear_retry_policy<T>(mut self, v: std::option::Option<T>) -> Self
4794    where
4795        T: std::convert::Into<crate::model::pipeline::RetryPolicy>,
4796    {
4797        self.retry_policy = v.map(|x| x.into());
4798        self
4799    }
4800
4801    /// Sets the value of [etag][crate::model::Pipeline::etag].
4802    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4803        self.etag = v.into();
4804        self
4805    }
4806
4807    /// Sets the value of [satisfies_pzs][crate::model::Pipeline::satisfies_pzs].
4808    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4809        self.satisfies_pzs = v.into();
4810        self
4811    }
4812}
4813
4814impl wkt::message::Message for Pipeline {
4815    fn typename() -> &'static str {
4816        "type.googleapis.com/google.cloud.eventarc.v1.Pipeline"
4817    }
4818}
4819
4820/// Defines additional types related to [Pipeline].
4821pub mod pipeline {
4822    #[allow(unused_imports)]
4823    use super::*;
4824
4825    /// Represents the format of message data.
4826    #[derive(Clone, Default, PartialEq)]
4827    #[non_exhaustive]
4828    pub struct MessagePayloadFormat {
4829        /// The kind of message format.
4830        /// One of Protobuf, Avro, and JSON supported.
4831        /// This allows specification of what specific format
4832        /// messages are sent and received.
4833        pub kind: std::option::Option<crate::model::pipeline::message_payload_format::Kind>,
4834
4835        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4836    }
4837
4838    impl MessagePayloadFormat {
4839        pub fn new() -> Self {
4840            std::default::Default::default()
4841        }
4842
4843        /// Sets the value of [kind][crate::model::pipeline::MessagePayloadFormat::kind].
4844        ///
4845        /// Note that all the setters affecting `kind` are mutually
4846        /// exclusive.
4847        pub fn set_kind<
4848            T: std::convert::Into<
4849                    std::option::Option<crate::model::pipeline::message_payload_format::Kind>,
4850                >,
4851        >(
4852            mut self,
4853            v: T,
4854        ) -> Self {
4855            self.kind = v.into();
4856            self
4857        }
4858
4859        /// The value of [kind][crate::model::pipeline::MessagePayloadFormat::kind]
4860        /// if it holds a `Protobuf`, `None` if the field is not set or
4861        /// holds a different branch.
4862        pub fn protobuf(
4863            &self,
4864        ) -> std::option::Option<
4865            &std::boxed::Box<crate::model::pipeline::message_payload_format::ProtobufFormat>,
4866        > {
4867            #[allow(unreachable_patterns)]
4868            self.kind.as_ref().and_then(|v| match v {
4869                crate::model::pipeline::message_payload_format::Kind::Protobuf(v) => {
4870                    std::option::Option::Some(v)
4871                }
4872                _ => std::option::Option::None,
4873            })
4874        }
4875
4876        /// Sets the value of [kind][crate::model::pipeline::MessagePayloadFormat::kind]
4877        /// to hold a `Protobuf`.
4878        ///
4879        /// Note that all the setters affecting `kind` are
4880        /// mutually exclusive.
4881        pub fn set_protobuf<
4882            T: std::convert::Into<
4883                    std::boxed::Box<crate::model::pipeline::message_payload_format::ProtobufFormat>,
4884                >,
4885        >(
4886            mut self,
4887            v: T,
4888        ) -> Self {
4889            self.kind = std::option::Option::Some(
4890                crate::model::pipeline::message_payload_format::Kind::Protobuf(v.into()),
4891            );
4892            self
4893        }
4894
4895        /// The value of [kind][crate::model::pipeline::MessagePayloadFormat::kind]
4896        /// if it holds a `Avro`, `None` if the field is not set or
4897        /// holds a different branch.
4898        pub fn avro(
4899            &self,
4900        ) -> std::option::Option<
4901            &std::boxed::Box<crate::model::pipeline::message_payload_format::AvroFormat>,
4902        > {
4903            #[allow(unreachable_patterns)]
4904            self.kind.as_ref().and_then(|v| match v {
4905                crate::model::pipeline::message_payload_format::Kind::Avro(v) => {
4906                    std::option::Option::Some(v)
4907                }
4908                _ => std::option::Option::None,
4909            })
4910        }
4911
4912        /// Sets the value of [kind][crate::model::pipeline::MessagePayloadFormat::kind]
4913        /// to hold a `Avro`.
4914        ///
4915        /// Note that all the setters affecting `kind` are
4916        /// mutually exclusive.
4917        pub fn set_avro<
4918            T: std::convert::Into<
4919                    std::boxed::Box<crate::model::pipeline::message_payload_format::AvroFormat>,
4920                >,
4921        >(
4922            mut self,
4923            v: T,
4924        ) -> Self {
4925            self.kind = std::option::Option::Some(
4926                crate::model::pipeline::message_payload_format::Kind::Avro(v.into()),
4927            );
4928            self
4929        }
4930
4931        /// The value of [kind][crate::model::pipeline::MessagePayloadFormat::kind]
4932        /// if it holds a `Json`, `None` if the field is not set or
4933        /// holds a different branch.
4934        pub fn json(
4935            &self,
4936        ) -> std::option::Option<
4937            &std::boxed::Box<crate::model::pipeline::message_payload_format::JsonFormat>,
4938        > {
4939            #[allow(unreachable_patterns)]
4940            self.kind.as_ref().and_then(|v| match v {
4941                crate::model::pipeline::message_payload_format::Kind::Json(v) => {
4942                    std::option::Option::Some(v)
4943                }
4944                _ => std::option::Option::None,
4945            })
4946        }
4947
4948        /// Sets the value of [kind][crate::model::pipeline::MessagePayloadFormat::kind]
4949        /// to hold a `Json`.
4950        ///
4951        /// Note that all the setters affecting `kind` are
4952        /// mutually exclusive.
4953        pub fn set_json<
4954            T: std::convert::Into<
4955                    std::boxed::Box<crate::model::pipeline::message_payload_format::JsonFormat>,
4956                >,
4957        >(
4958            mut self,
4959            v: T,
4960        ) -> Self {
4961            self.kind = std::option::Option::Some(
4962                crate::model::pipeline::message_payload_format::Kind::Json(v.into()),
4963            );
4964            self
4965        }
4966    }
4967
4968    impl wkt::message::Message for MessagePayloadFormat {
4969        fn typename() -> &'static str {
4970            "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat"
4971        }
4972    }
4973
4974    /// Defines additional types related to [MessagePayloadFormat].
4975    pub mod message_payload_format {
4976        #[allow(unused_imports)]
4977        use super::*;
4978
4979        /// The format of a JSON message payload.
4980        #[derive(Clone, Default, PartialEq)]
4981        #[non_exhaustive]
4982        pub struct JsonFormat {
4983            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4984        }
4985
4986        impl JsonFormat {
4987            pub fn new() -> Self {
4988                std::default::Default::default()
4989            }
4990        }
4991
4992        impl wkt::message::Message for JsonFormat {
4993            fn typename() -> &'static str {
4994                "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat"
4995            }
4996        }
4997
4998        /// The format of a Protobuf message payload.
4999        #[derive(Clone, Default, PartialEq)]
5000        #[non_exhaustive]
5001        pub struct ProtobufFormat {
5002            /// Optional. The entire schema definition is stored in this field.
5003            pub schema_definition: std::string::String,
5004
5005            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5006        }
5007
5008        impl ProtobufFormat {
5009            pub fn new() -> Self {
5010                std::default::Default::default()
5011            }
5012
5013            /// Sets the value of [schema_definition][crate::model::pipeline::message_payload_format::ProtobufFormat::schema_definition].
5014            pub fn set_schema_definition<T: std::convert::Into<std::string::String>>(
5015                mut self,
5016                v: T,
5017            ) -> Self {
5018                self.schema_definition = v.into();
5019                self
5020            }
5021        }
5022
5023        impl wkt::message::Message for ProtobufFormat {
5024            fn typename() -> &'static str {
5025                "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat"
5026            }
5027        }
5028
5029        /// The format of an AVRO message payload.
5030        #[derive(Clone, Default, PartialEq)]
5031        #[non_exhaustive]
5032        pub struct AvroFormat {
5033            /// Optional. The entire schema definition is stored in this field.
5034            pub schema_definition: std::string::String,
5035
5036            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5037        }
5038
5039        impl AvroFormat {
5040            pub fn new() -> Self {
5041                std::default::Default::default()
5042            }
5043
5044            /// Sets the value of [schema_definition][crate::model::pipeline::message_payload_format::AvroFormat::schema_definition].
5045            pub fn set_schema_definition<T: std::convert::Into<std::string::String>>(
5046                mut self,
5047                v: T,
5048            ) -> Self {
5049                self.schema_definition = v.into();
5050                self
5051            }
5052        }
5053
5054        impl wkt::message::Message for AvroFormat {
5055            fn typename() -> &'static str {
5056                "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat"
5057            }
5058        }
5059
5060        /// The kind of message format.
5061        /// One of Protobuf, Avro, and JSON supported.
5062        /// This allows specification of what specific format
5063        /// messages are sent and received.
5064        #[derive(Clone, Debug, PartialEq)]
5065        #[non_exhaustive]
5066        pub enum Kind {
5067            /// Optional. Protobuf format.
5068            Protobuf(
5069                std::boxed::Box<crate::model::pipeline::message_payload_format::ProtobufFormat>,
5070            ),
5071            /// Optional. Avro format.
5072            Avro(std::boxed::Box<crate::model::pipeline::message_payload_format::AvroFormat>),
5073            /// Optional. JSON format.
5074            Json(std::boxed::Box<crate::model::pipeline::message_payload_format::JsonFormat>),
5075        }
5076    }
5077
5078    /// Represents a target of an invocation over HTTP.
5079    #[derive(Clone, Default, PartialEq)]
5080    #[non_exhaustive]
5081    pub struct Destination {
5082        /// Optional. Network config is used to configure how Pipeline resolves and
5083        /// connects to a destination.
5084        pub network_config: std::option::Option<crate::model::pipeline::destination::NetworkConfig>,
5085
5086        /// Optional. An authentication config used to authenticate message requests,
5087        /// such that destinations can verify the source. For example, this can be
5088        /// used with private Google Cloud destinations that require Google Cloud
5089        /// credentials for access like Cloud Run. This field is optional and should
5090        /// be set only by users interested in authenticated push.
5091        pub authentication_config:
5092            std::option::Option<crate::model::pipeline::destination::AuthenticationConfig>,
5093
5094        /// Optional. The message format before it is delivered to the destination.
5095        /// If not set, the message will be delivered in the format it was originally
5096        /// delivered to the Pipeline. This field can only be set if
5097        /// Pipeline.input_payload_format is also set.
5098        pub output_payload_format:
5099            std::option::Option<crate::model::pipeline::MessagePayloadFormat>,
5100
5101        /// The destination identifier to which the request should be routed to.
5102        pub destination_descriptor:
5103            std::option::Option<crate::model::pipeline::destination::DestinationDescriptor>,
5104
5105        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5106    }
5107
5108    impl Destination {
5109        pub fn new() -> Self {
5110            std::default::Default::default()
5111        }
5112
5113        /// Sets the value of [network_config][crate::model::pipeline::Destination::network_config].
5114        pub fn set_network_config<T>(mut self, v: T) -> Self
5115        where
5116            T: std::convert::Into<crate::model::pipeline::destination::NetworkConfig>,
5117        {
5118            self.network_config = std::option::Option::Some(v.into());
5119            self
5120        }
5121
5122        /// Sets or clears the value of [network_config][crate::model::pipeline::Destination::network_config].
5123        pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
5124        where
5125            T: std::convert::Into<crate::model::pipeline::destination::NetworkConfig>,
5126        {
5127            self.network_config = v.map(|x| x.into());
5128            self
5129        }
5130
5131        /// Sets the value of [authentication_config][crate::model::pipeline::Destination::authentication_config].
5132        pub fn set_authentication_config<T>(mut self, v: T) -> Self
5133        where
5134            T: std::convert::Into<crate::model::pipeline::destination::AuthenticationConfig>,
5135        {
5136            self.authentication_config = std::option::Option::Some(v.into());
5137            self
5138        }
5139
5140        /// Sets or clears the value of [authentication_config][crate::model::pipeline::Destination::authentication_config].
5141        pub fn set_or_clear_authentication_config<T>(mut self, v: std::option::Option<T>) -> Self
5142        where
5143            T: std::convert::Into<crate::model::pipeline::destination::AuthenticationConfig>,
5144        {
5145            self.authentication_config = v.map(|x| x.into());
5146            self
5147        }
5148
5149        /// Sets the value of [output_payload_format][crate::model::pipeline::Destination::output_payload_format].
5150        pub fn set_output_payload_format<T>(mut self, v: T) -> Self
5151        where
5152            T: std::convert::Into<crate::model::pipeline::MessagePayloadFormat>,
5153        {
5154            self.output_payload_format = std::option::Option::Some(v.into());
5155            self
5156        }
5157
5158        /// Sets or clears the value of [output_payload_format][crate::model::pipeline::Destination::output_payload_format].
5159        pub fn set_or_clear_output_payload_format<T>(mut self, v: std::option::Option<T>) -> Self
5160        where
5161            T: std::convert::Into<crate::model::pipeline::MessagePayloadFormat>,
5162        {
5163            self.output_payload_format = v.map(|x| x.into());
5164            self
5165        }
5166
5167        /// Sets the value of [destination_descriptor][crate::model::pipeline::Destination::destination_descriptor].
5168        ///
5169        /// Note that all the setters affecting `destination_descriptor` are mutually
5170        /// exclusive.
5171        pub fn set_destination_descriptor<
5172            T: std::convert::Into<
5173                    std::option::Option<crate::model::pipeline::destination::DestinationDescriptor>,
5174                >,
5175        >(
5176            mut self,
5177            v: T,
5178        ) -> Self {
5179            self.destination_descriptor = v.into();
5180            self
5181        }
5182
5183        /// The value of [destination_descriptor][crate::model::pipeline::Destination::destination_descriptor]
5184        /// if it holds a `HttpEndpoint`, `None` if the field is not set or
5185        /// holds a different branch.
5186        pub fn http_endpoint(
5187            &self,
5188        ) -> std::option::Option<&std::boxed::Box<crate::model::pipeline::destination::HttpEndpoint>>
5189        {
5190            #[allow(unreachable_patterns)]
5191            self.destination_descriptor.as_ref().and_then(|v| match v {
5192                crate::model::pipeline::destination::DestinationDescriptor::HttpEndpoint(v) => {
5193                    std::option::Option::Some(v)
5194                }
5195                _ => std::option::Option::None,
5196            })
5197        }
5198
5199        /// Sets the value of [destination_descriptor][crate::model::pipeline::Destination::destination_descriptor]
5200        /// to hold a `HttpEndpoint`.
5201        ///
5202        /// Note that all the setters affecting `destination_descriptor` are
5203        /// mutually exclusive.
5204        pub fn set_http_endpoint<
5205            T: std::convert::Into<std::boxed::Box<crate::model::pipeline::destination::HttpEndpoint>>,
5206        >(
5207            mut self,
5208            v: T,
5209        ) -> Self {
5210            self.destination_descriptor = std::option::Option::Some(
5211                crate::model::pipeline::destination::DestinationDescriptor::HttpEndpoint(v.into()),
5212            );
5213            self
5214        }
5215
5216        /// The value of [destination_descriptor][crate::model::pipeline::Destination::destination_descriptor]
5217        /// if it holds a `Workflow`, `None` if the field is not set or
5218        /// holds a different branch.
5219        pub fn workflow(&self) -> std::option::Option<&std::string::String> {
5220            #[allow(unreachable_patterns)]
5221            self.destination_descriptor.as_ref().and_then(|v| match v {
5222                crate::model::pipeline::destination::DestinationDescriptor::Workflow(v) => {
5223                    std::option::Option::Some(v)
5224                }
5225                _ => std::option::Option::None,
5226            })
5227        }
5228
5229        /// Sets the value of [destination_descriptor][crate::model::pipeline::Destination::destination_descriptor]
5230        /// to hold a `Workflow`.
5231        ///
5232        /// Note that all the setters affecting `destination_descriptor` are
5233        /// mutually exclusive.
5234        pub fn set_workflow<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5235            self.destination_descriptor = std::option::Option::Some(
5236                crate::model::pipeline::destination::DestinationDescriptor::Workflow(v.into()),
5237            );
5238            self
5239        }
5240
5241        /// The value of [destination_descriptor][crate::model::pipeline::Destination::destination_descriptor]
5242        /// if it holds a `MessageBus`, `None` if the field is not set or
5243        /// holds a different branch.
5244        pub fn message_bus(&self) -> std::option::Option<&std::string::String> {
5245            #[allow(unreachable_patterns)]
5246            self.destination_descriptor.as_ref().and_then(|v| match v {
5247                crate::model::pipeline::destination::DestinationDescriptor::MessageBus(v) => {
5248                    std::option::Option::Some(v)
5249                }
5250                _ => std::option::Option::None,
5251            })
5252        }
5253
5254        /// Sets the value of [destination_descriptor][crate::model::pipeline::Destination::destination_descriptor]
5255        /// to hold a `MessageBus`.
5256        ///
5257        /// Note that all the setters affecting `destination_descriptor` are
5258        /// mutually exclusive.
5259        pub fn set_message_bus<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5260            self.destination_descriptor = std::option::Option::Some(
5261                crate::model::pipeline::destination::DestinationDescriptor::MessageBus(v.into()),
5262            );
5263            self
5264        }
5265
5266        /// The value of [destination_descriptor][crate::model::pipeline::Destination::destination_descriptor]
5267        /// if it holds a `Topic`, `None` if the field is not set or
5268        /// holds a different branch.
5269        pub fn topic(&self) -> std::option::Option<&std::string::String> {
5270            #[allow(unreachable_patterns)]
5271            self.destination_descriptor.as_ref().and_then(|v| match v {
5272                crate::model::pipeline::destination::DestinationDescriptor::Topic(v) => {
5273                    std::option::Option::Some(v)
5274                }
5275                _ => std::option::Option::None,
5276            })
5277        }
5278
5279        /// Sets the value of [destination_descriptor][crate::model::pipeline::Destination::destination_descriptor]
5280        /// to hold a `Topic`.
5281        ///
5282        /// Note that all the setters affecting `destination_descriptor` are
5283        /// mutually exclusive.
5284        pub fn set_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5285            self.destination_descriptor = std::option::Option::Some(
5286                crate::model::pipeline::destination::DestinationDescriptor::Topic(v.into()),
5287            );
5288            self
5289        }
5290    }
5291
5292    impl wkt::message::Message for Destination {
5293        fn typename() -> &'static str {
5294            "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.Destination"
5295        }
5296    }
5297
5298    /// Defines additional types related to [Destination].
5299    pub mod destination {
5300        #[allow(unused_imports)]
5301        use super::*;
5302
5303        /// Represents a network config to be used for destination resolution and
5304        /// connectivity.
5305        #[derive(Clone, Default, PartialEq)]
5306        #[non_exhaustive]
5307        pub struct NetworkConfig {
5308            /// Required. Name of the NetworkAttachment that allows access to the
5309            /// consumer VPC. Format:
5310            /// `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
5311            pub network_attachment: std::string::String,
5312
5313            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5314        }
5315
5316        impl NetworkConfig {
5317            pub fn new() -> Self {
5318                std::default::Default::default()
5319            }
5320
5321            /// Sets the value of [network_attachment][crate::model::pipeline::destination::NetworkConfig::network_attachment].
5322            pub fn set_network_attachment<T: std::convert::Into<std::string::String>>(
5323                mut self,
5324                v: T,
5325            ) -> Self {
5326                self.network_attachment = v.into();
5327                self
5328            }
5329        }
5330
5331        impl wkt::message::Message for NetworkConfig {
5332            fn typename() -> &'static str {
5333                "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig"
5334            }
5335        }
5336
5337        /// Represents a HTTP endpoint destination.
5338        #[derive(Clone, Default, PartialEq)]
5339        #[non_exhaustive]
5340        pub struct HttpEndpoint {
5341            /// Required. The URI of the HTTP endpoint.
5342            ///
5343            /// The value must be a RFC2396 URI string.
5344            /// Examples: `<https://svc.us-central1.p.local>:8080/route`.
5345            /// Only the HTTPS protocol is supported.
5346            pub uri: std::string::String,
5347
5348            /// Optional. The CEL expression used to modify how the destination-bound
5349            /// HTTP request is constructed.
5350            ///
5351            /// If a binding expression is not specified here, the message
5352            /// is treated as a CloudEvent and is mapped to the HTTP request according
5353            /// to the CloudEvent HTTP Protocol Binding Binary Content Mode
5354            /// (<https://github.com/cloudevents/spec/blob/main/cloudevents/bindings/http-protocol-binding.md#31-binary-content-mode>).
5355            /// In this representation, all fields except the `data` and
5356            /// `datacontenttype` field on the message are mapped to HTTP request
5357            /// headers with a prefix of `ce-`.
5358            ///
5359            /// To construct the HTTP request payload and the value of the content-type
5360            /// HTTP header, the payload format is defined as follows:
5361            ///
5362            /// 1. Use the output_payload_format_type on the Pipeline.Destination if it
5363            ///    is set, else:
5364            /// 1. Use the input_payload_format_type on the Pipeline if it is set,
5365            ///    else:
5366            /// 1. Treat the payload as opaque binary data.
5367            ///
5368            /// The `data` field of the message is converted to the payload format or
5369            /// left as-is for case 3) and then attached as the payload of the HTTP
5370            /// request. The `content-type` header on the HTTP request is set to the
5371            /// payload format type or left empty for case 3). However, if a mediation
5372            /// has updated the `datacontenttype` field on the message so that it is
5373            /// not the same as the payload format type but it is still a prefix of the
5374            /// payload format type, then the `content-type` header on the HTTP request
5375            /// is set to this `datacontenttype` value. For example, if the
5376            /// `datacontenttype` is "application/json" and the payload format type is
5377            /// "application/json; charset=utf-8", then the `content-type` header on
5378            /// the HTTP request is set to "application/json; charset=utf-8".
5379            ///
5380            /// If a non-empty binding expression is specified then this expression is
5381            /// used to modify the default CloudEvent HTTP Protocol Binding Binary
5382            /// Content representation.
5383            /// The result of the CEL expression must be a map of key/value pairs
5384            /// which is used as follows:
5385            ///
5386            /// - If a map named `headers` exists on the result of the expression,
5387            ///   then its key/value pairs are directly mapped to the HTTP request
5388            ///   headers. The headers values are constructed from the corresponding
5389            ///   value type's canonical representation. If the `headers` field doesn't
5390            ///   exist then the resulting HTTP request will be the headers of the
5391            ///   CloudEvent HTTP Binding Binary Content Mode representation of the final
5392            ///   message. Note: If the specified binding expression, has updated the
5393            ///   `datacontenttype` field on the message so that it is not the same as
5394            ///   the payload format type but it is still a prefix of the payload format
5395            ///   type, then the `content-type` header in the `headers` map is set to
5396            ///   this `datacontenttype` value.
5397            /// - If a field named `body` exists on the result of the expression then
5398            ///   its value is directly mapped to the body of the request. If the value
5399            ///   of the `body` field is of type bytes or string then it is used for
5400            ///   the HTTP request body as-is, with no conversion. If the body field is
5401            ///   of any other type then it is converted to a JSON string. If the body
5402            ///   field does not exist then the resulting payload of the HTTP request
5403            ///   will be data value of the CloudEvent HTTP Binding Binary Content Mode
5404            ///   representation of the final message as described earlier.
5405            /// - Any other fields in the resulting expression will be ignored.
5406            ///
5407            /// The CEL expression may access the incoming CloudEvent message in its
5408            /// definition, as follows:
5409            ///
5410            /// - The `data` field of the incoming CloudEvent message can be accessed
5411            ///   using the `message.data` value. Subfields of `message.data` may also be
5412            ///   accessed if an input_payload_format has been specified on the Pipeline.
5413            /// - Each attribute of the incoming CloudEvent message can be accessed
5414            ///   using the `message.\<key\>` value, where \<key\> is replaced with the
5415            ///   name of the attribute.
5416            /// - Existing headers can be accessed in the CEL expression using the
5417            ///   `headers` variable. The `headers` variable defines a map of key/value
5418            ///   pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding
5419            ///   Binary Content Mode representation of the final message as described
5420            ///   earlier. For example, the following CEL expression can be used to
5421            ///   construct an HTTP request by adding an additional header to the HTTP
5422            ///   headers of the CloudEvent HTTP Binding Binary Content Mode
5423            ///   representation of the final message and by overwriting the body of the
5424            ///   request:
5425            ///
5426            /// ```norust
5427            /// {
5428            ///   "headers": headers.merge({"new-header-key": "new-header-value"}),
5429            ///   "body": "new-body"
5430            /// }
5431            /// ```
5432            ///
5433            /// - The default binding for the message payload can be accessed using the
5434            ///   `body` variable. It conatins a string representation of the message
5435            ///   payload in the format specified by the `output_payload_format` field.
5436            ///   If the `input_payload_format` field is not set, the `body`
5437            ///   variable contains the same message payload bytes that were published.
5438            ///
5439            /// Additionally, the following CEL extension functions are provided for
5440            /// use in this CEL expression:
5441            ///
5442            /// - toBase64Url:
5443            ///   map.toBase64Url() -> string
5444            ///   - Converts a CelValue to a base64url encoded string
5445            /// - toJsonString: map.toJsonString() -> string
5446            ///   - Converts a CelValue to a JSON string
5447            /// - merge:
5448            ///   map1.merge(map2) -> map3
5449            ///   - Merges the passed CEL map with the existing CEL map the
5450            ///     function is applied to.
5451            ///   - If the same key exists in both maps, if the key's value is type
5452            ///     map both maps are merged else the value from the passed map is
5453            ///     used.
5454            /// - denormalize:
5455            ///   map.denormalize() -> map
5456            ///   - Denormalizes a CEL map such that every value of type map or key
5457            ///     in the map is expanded to return a single level map.
5458            ///   - The resulting keys are "." separated indices of the map keys.
5459            ///   - For example:
5460            ///     {
5461            ///     "a": 1,
5462            ///     "b": {
5463            ///     "c": 2,
5464            ///     "d": 3
5465            ///     }
5466            ///     "e": [4, 5]
5467            ///     }
5468            ///     .denormalize()
5469            ///     -> {
5470            ///     "a": 1,
5471            ///     "b.c": 2,
5472            ///     "b.d": 3,
5473            ///     "e.0": 4,
5474            ///     "e.1": 5
5475            ///     }
5476            /// - setField:
5477            ///   map.setField(key, value) -> message
5478            ///   - Sets the field of the message with the given key to the
5479            ///     given value.
5480            ///   - If the field is not present it will be added.
5481            ///   - If the field is present it will be overwritten.
5482            ///   - The key can be a dot separated path to set a field in a nested
5483            ///     message.
5484            ///   - Key must be of type string.
5485            ///   - Value may be any valid type.
5486            /// - removeFields:
5487            ///   map.removeFields([key1, key2, ...]) -> message
5488            ///   - Removes the fields of the map with the given keys.
5489            ///   - The keys can be a dot separated path to remove a field in a
5490            ///     nested message.
5491            ///   - If a key is not found it will be ignored.
5492            ///   - Keys must be of type string.
5493            /// - toMap:
5494            ///   [map1, map2, ...].toMap() -> map
5495            ///   - Converts a CEL list of CEL maps to a single CEL map
5496            /// - toCloudEventJsonWithPayloadFormat:
5497            ///   message.toCloudEventJsonWithPayloadFormat() -> map
5498            ///   - Converts a message to the corresponding structure of JSON
5499            ///     format for CloudEvents.
5500            ///   - It converts `data` to destination payload format
5501            ///     specified in `output_payload_format`. If `output_payload_format` is
5502            ///     not set, the data will remain unchanged.
5503            ///   - It also sets the corresponding datacontenttype of
5504            ///     the CloudEvent, as indicated by
5505            ///     `output_payload_format`. If no
5506            ///     `output_payload_format` is set it will use the value of the
5507            ///     "datacontenttype" attribute on the CloudEvent if present, else
5508            ///     remove "datacontenttype" attribute.
5509            ///   - This function expects that the content of the message will
5510            ///     adhere to the standard CloudEvent format. If it doesn't then this
5511            ///     function will fail.
5512            ///   - The result is a CEL map that corresponds to the JSON
5513            ///     representation of the CloudEvent. To convert that data to a JSON
5514            ///     string it can be chained with the toJsonString function.
5515            ///
5516            /// The Pipeline expects that the message it receives adheres to the
5517            /// standard CloudEvent format. If it doesn't then the outgoing message
5518            /// request may fail with a persistent error.
5519            pub message_binding_template: std::string::String,
5520
5521            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5522        }
5523
5524        impl HttpEndpoint {
5525            pub fn new() -> Self {
5526                std::default::Default::default()
5527            }
5528
5529            /// Sets the value of [uri][crate::model::pipeline::destination::HttpEndpoint::uri].
5530            pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5531                self.uri = v.into();
5532                self
5533            }
5534
5535            /// Sets the value of [message_binding_template][crate::model::pipeline::destination::HttpEndpoint::message_binding_template].
5536            pub fn set_message_binding_template<T: std::convert::Into<std::string::String>>(
5537                mut self,
5538                v: T,
5539            ) -> Self {
5540                self.message_binding_template = v.into();
5541                self
5542            }
5543        }
5544
5545        impl wkt::message::Message for HttpEndpoint {
5546            fn typename() -> &'static str {
5547                "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint"
5548            }
5549        }
5550
5551        /// Represents a config used to authenticate message requests.
5552        #[derive(Clone, Default, PartialEq)]
5553        #[non_exhaustive]
5554        pub struct AuthenticationConfig {
5555
5556            /// The type of authentication method.
5557            pub authentication_method_descriptor: std::option::Option<crate::model::pipeline::destination::authentication_config::AuthenticationMethodDescriptor>,
5558
5559            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5560        }
5561
5562        impl AuthenticationConfig {
5563            pub fn new() -> Self {
5564                std::default::Default::default()
5565            }
5566
5567            /// Sets the value of [authentication_method_descriptor][crate::model::pipeline::destination::AuthenticationConfig::authentication_method_descriptor].
5568            ///
5569            /// Note that all the setters affecting `authentication_method_descriptor` are mutually
5570            /// exclusive.
5571            pub fn set_authentication_method_descriptor<T: std::convert::Into<std::option::Option<crate::model::pipeline::destination::authentication_config::AuthenticationMethodDescriptor>>>(mut self, v: T) -> Self
5572            {
5573                self.authentication_method_descriptor = v.into();
5574                self
5575            }
5576
5577            /// The value of [authentication_method_descriptor][crate::model::pipeline::destination::AuthenticationConfig::authentication_method_descriptor]
5578            /// if it holds a `GoogleOidc`, `None` if the field is not set or
5579            /// holds a different branch.
5580            pub fn google_oidc(
5581                &self,
5582            ) -> std::option::Option<
5583                &std::boxed::Box<
5584                    crate::model::pipeline::destination::authentication_config::OidcToken,
5585                >,
5586            > {
5587                #[allow(unreachable_patterns)]
5588                self.authentication_method_descriptor.as_ref().and_then(|v| match v {
5589                    crate::model::pipeline::destination::authentication_config::AuthenticationMethodDescriptor::GoogleOidc(v) => std::option::Option::Some(v),
5590                    _ => std::option::Option::None,
5591                })
5592            }
5593
5594            /// Sets the value of [authentication_method_descriptor][crate::model::pipeline::destination::AuthenticationConfig::authentication_method_descriptor]
5595            /// to hold a `GoogleOidc`.
5596            ///
5597            /// Note that all the setters affecting `authentication_method_descriptor` are
5598            /// mutually exclusive.
5599            pub fn set_google_oidc<
5600                T: std::convert::Into<
5601                        std::boxed::Box<
5602                            crate::model::pipeline::destination::authentication_config::OidcToken,
5603                        >,
5604                    >,
5605            >(
5606                mut self,
5607                v: T,
5608            ) -> Self {
5609                self.authentication_method_descriptor = std::option::Option::Some(
5610                    crate::model::pipeline::destination::authentication_config::AuthenticationMethodDescriptor::GoogleOidc(
5611                        v.into()
5612                    )
5613                );
5614                self
5615            }
5616
5617            /// The value of [authentication_method_descriptor][crate::model::pipeline::destination::AuthenticationConfig::authentication_method_descriptor]
5618            /// if it holds a `OauthToken`, `None` if the field is not set or
5619            /// holds a different branch.
5620            pub fn oauth_token(
5621                &self,
5622            ) -> std::option::Option<
5623                &std::boxed::Box<
5624                    crate::model::pipeline::destination::authentication_config::OAuthToken,
5625                >,
5626            > {
5627                #[allow(unreachable_patterns)]
5628                self.authentication_method_descriptor.as_ref().and_then(|v| match v {
5629                    crate::model::pipeline::destination::authentication_config::AuthenticationMethodDescriptor::OauthToken(v) => std::option::Option::Some(v),
5630                    _ => std::option::Option::None,
5631                })
5632            }
5633
5634            /// Sets the value of [authentication_method_descriptor][crate::model::pipeline::destination::AuthenticationConfig::authentication_method_descriptor]
5635            /// to hold a `OauthToken`.
5636            ///
5637            /// Note that all the setters affecting `authentication_method_descriptor` are
5638            /// mutually exclusive.
5639            pub fn set_oauth_token<
5640                T: std::convert::Into<
5641                        std::boxed::Box<
5642                            crate::model::pipeline::destination::authentication_config::OAuthToken,
5643                        >,
5644                    >,
5645            >(
5646                mut self,
5647                v: T,
5648            ) -> Self {
5649                self.authentication_method_descriptor = std::option::Option::Some(
5650                    crate::model::pipeline::destination::authentication_config::AuthenticationMethodDescriptor::OauthToken(
5651                        v.into()
5652                    )
5653                );
5654                self
5655            }
5656        }
5657
5658        impl wkt::message::Message for AuthenticationConfig {
5659            fn typename() -> &'static str {
5660                "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig"
5661            }
5662        }
5663
5664        /// Defines additional types related to [AuthenticationConfig].
5665        pub mod authentication_config {
5666            #[allow(unused_imports)]
5667            use super::*;
5668
5669            /// Represents a config used to authenticate with a Google OIDC token using
5670            /// a Google Cloud service account. Use this authentication method to
5671            /// invoke your Cloud Run and Cloud Functions destinations or HTTP
5672            /// endpoints that support Google OIDC.
5673            #[derive(Clone, Default, PartialEq)]
5674            #[non_exhaustive]
5675            pub struct OidcToken {
5676                /// Required. Service account email used to generate the OIDC Token.
5677                /// The principal who calls this API must have
5678                /// iam.serviceAccounts.actAs permission in the service account. See
5679                /// <https://cloud.google.com/iam/docs/understanding-service-accounts>
5680                /// for more information. Eventarc service agents must have
5681                /// roles/roles/iam.serviceAccountTokenCreator role to allow the
5682                /// Pipeline to create OpenID tokens for authenticated requests.
5683                pub service_account: std::string::String,
5684
5685                /// Optional. Audience to be used to generate the OIDC Token. The
5686                /// audience claim identifies the recipient that the JWT is intended for.
5687                /// If unspecified, the destination URI will be used.
5688                pub audience: std::string::String,
5689
5690                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5691            }
5692
5693            impl OidcToken {
5694                pub fn new() -> Self {
5695                    std::default::Default::default()
5696                }
5697
5698                /// Sets the value of [service_account][crate::model::pipeline::destination::authentication_config::OidcToken::service_account].
5699                pub fn set_service_account<T: std::convert::Into<std::string::String>>(
5700                    mut self,
5701                    v: T,
5702                ) -> Self {
5703                    self.service_account = v.into();
5704                    self
5705                }
5706
5707                /// Sets the value of [audience][crate::model::pipeline::destination::authentication_config::OidcToken::audience].
5708                pub fn set_audience<T: std::convert::Into<std::string::String>>(
5709                    mut self,
5710                    v: T,
5711                ) -> Self {
5712                    self.audience = v.into();
5713                    self
5714                }
5715            }
5716
5717            impl wkt::message::Message for OidcToken {
5718                fn typename() -> &'static str {
5719                    "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken"
5720                }
5721            }
5722
5723            /// Contains information needed for generating an
5724            /// [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
5725            /// This type of authorization should generally only be used when calling
5726            /// Google APIs hosted on *.googleapis.com.
5727            #[derive(Clone, Default, PartialEq)]
5728            #[non_exhaustive]
5729            pub struct OAuthToken {
5730                /// Required. Service account email used to generate the [OAuth
5731                /// token](https://developers.google.com/identity/protocols/OAuth2).
5732                /// The principal who calls this API must have
5733                /// iam.serviceAccounts.actAs permission in the service account. See
5734                /// <https://cloud.google.com/iam/docs/understanding-service-accounts>
5735                /// for more information. Eventarc service agents must have
5736                /// roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline
5737                /// to create OAuth2 tokens for authenticated requests.
5738                pub service_account: std::string::String,
5739
5740                /// Optional. OAuth scope to be used for generating OAuth access token.
5741                /// If not specified, `https://www.googleapis.com/auth/cloud-platform`
5742                /// will be used.
5743                pub scope: std::string::String,
5744
5745                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5746            }
5747
5748            impl OAuthToken {
5749                pub fn new() -> Self {
5750                    std::default::Default::default()
5751                }
5752
5753                /// Sets the value of [service_account][crate::model::pipeline::destination::authentication_config::OAuthToken::service_account].
5754                pub fn set_service_account<T: std::convert::Into<std::string::String>>(
5755                    mut self,
5756                    v: T,
5757                ) -> Self {
5758                    self.service_account = v.into();
5759                    self
5760                }
5761
5762                /// Sets the value of [scope][crate::model::pipeline::destination::authentication_config::OAuthToken::scope].
5763                pub fn set_scope<T: std::convert::Into<std::string::String>>(
5764                    mut self,
5765                    v: T,
5766                ) -> Self {
5767                    self.scope = v.into();
5768                    self
5769                }
5770            }
5771
5772            impl wkt::message::Message for OAuthToken {
5773                fn typename() -> &'static str {
5774                    "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken"
5775                }
5776            }
5777
5778            /// The type of authentication method.
5779            #[derive(Clone, Debug, PartialEq)]
5780            #[non_exhaustive]
5781            pub enum AuthenticationMethodDescriptor {
5782                /// Optional. This authenticate method will apply Google OIDC tokens
5783                /// signed by a Google Cloud service account to the requests.
5784                GoogleOidc(
5785                    std::boxed::Box<
5786                        crate::model::pipeline::destination::authentication_config::OidcToken,
5787                    >,
5788                ),
5789                /// Optional. If specified, an [OAuth
5790                /// token](https://developers.google.com/identity/protocols/OAuth2) will
5791                /// be generated and attached as an `Authorization` header in the HTTP
5792                /// request.
5793                ///
5794                /// This type of authorization should generally only be used when calling
5795                /// Google APIs hosted on *.googleapis.com.
5796                OauthToken(
5797                    std::boxed::Box<
5798                        crate::model::pipeline::destination::authentication_config::OAuthToken,
5799                    >,
5800                ),
5801            }
5802        }
5803
5804        /// The destination identifier to which the request should be routed to.
5805        #[derive(Clone, Debug, PartialEq)]
5806        #[non_exhaustive]
5807        pub enum DestinationDescriptor {
5808            /// Optional. An HTTP endpoint destination described by an URI.
5809            /// If a DNS FQDN is provided as the endpoint, Pipeline will create a
5810            /// peering zone to the consumer VPC and forward DNS requests to the VPC
5811            /// specified by network config to resolve the service endpoint. See:
5812            /// <https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones>
5813            HttpEndpoint(std::boxed::Box<crate::model::pipeline::destination::HttpEndpoint>),
5814            /// Optional. The resource name of the Workflow whose Executions are
5815            /// triggered by the events. The Workflow resource should be deployed in
5816            /// the same project as the Pipeline. Format:
5817            /// `projects/{project}/locations/{location}/workflows/{workflow}`
5818            Workflow(std::string::String),
5819            /// Optional. The resource name of the Message Bus to which events should
5820            /// be published. The Message Bus resource should exist in the same project
5821            /// as the Pipeline. Format:
5822            /// `projects/{project}/locations/{location}/messageBuses/{message_bus}`
5823            MessageBus(std::string::String),
5824            /// Optional. The resource name of the Pub/Sub topic to which events should
5825            /// be published. Format:
5826            /// `projects/{project}/locations/{location}/topics/{topic}`
5827            Topic(std::string::String),
5828        }
5829    }
5830
5831    /// Mediation defines different ways to modify the Pipeline.
5832    #[derive(Clone, Default, PartialEq)]
5833    #[non_exhaustive]
5834    pub struct Mediation {
5835        /// The config of mediation.
5836        pub mediation_descriptor:
5837            std::option::Option<crate::model::pipeline::mediation::MediationDescriptor>,
5838
5839        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5840    }
5841
5842    impl Mediation {
5843        pub fn new() -> Self {
5844            std::default::Default::default()
5845        }
5846
5847        /// Sets the value of [mediation_descriptor][crate::model::pipeline::Mediation::mediation_descriptor].
5848        ///
5849        /// Note that all the setters affecting `mediation_descriptor` are mutually
5850        /// exclusive.
5851        pub fn set_mediation_descriptor<
5852            T: std::convert::Into<
5853                    std::option::Option<crate::model::pipeline::mediation::MediationDescriptor>,
5854                >,
5855        >(
5856            mut self,
5857            v: T,
5858        ) -> Self {
5859            self.mediation_descriptor = v.into();
5860            self
5861        }
5862
5863        /// The value of [mediation_descriptor][crate::model::pipeline::Mediation::mediation_descriptor]
5864        /// if it holds a `Transformation`, `None` if the field is not set or
5865        /// holds a different branch.
5866        pub fn transformation(
5867            &self,
5868        ) -> std::option::Option<&std::boxed::Box<crate::model::pipeline::mediation::Transformation>>
5869        {
5870            #[allow(unreachable_patterns)]
5871            self.mediation_descriptor.as_ref().and_then(|v| match v {
5872                crate::model::pipeline::mediation::MediationDescriptor::Transformation(v) => {
5873                    std::option::Option::Some(v)
5874                }
5875                _ => std::option::Option::None,
5876            })
5877        }
5878
5879        /// Sets the value of [mediation_descriptor][crate::model::pipeline::Mediation::mediation_descriptor]
5880        /// to hold a `Transformation`.
5881        ///
5882        /// Note that all the setters affecting `mediation_descriptor` are
5883        /// mutually exclusive.
5884        pub fn set_transformation<
5885            T: std::convert::Into<std::boxed::Box<crate::model::pipeline::mediation::Transformation>>,
5886        >(
5887            mut self,
5888            v: T,
5889        ) -> Self {
5890            self.mediation_descriptor = std::option::Option::Some(
5891                crate::model::pipeline::mediation::MediationDescriptor::Transformation(v.into()),
5892            );
5893            self
5894        }
5895    }
5896
5897    impl wkt::message::Message for Mediation {
5898        fn typename() -> &'static str {
5899            "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.Mediation"
5900        }
5901    }
5902
5903    /// Defines additional types related to [Mediation].
5904    pub mod mediation {
5905        #[allow(unused_imports)]
5906        use super::*;
5907
5908        /// Transformation defines the way to transform an incoming message.
5909        #[derive(Clone, Default, PartialEq)]
5910        #[non_exhaustive]
5911        pub struct Transformation {
5912            /// Optional. The CEL expression template to apply to transform messages.
5913            /// The following CEL extension functions are provided for
5914            /// use in this CEL expression:
5915            ///
5916            /// - merge:
5917            ///   map1.merge(map2) -> map3
5918            ///   - Merges the passed CEL map with the existing CEL map the
5919            ///     function is applied to.
5920            ///   - If the same key exists in both maps, if the key's value is type
5921            ///     map both maps are merged else the value from the passed map is
5922            ///     used.
5923            /// - denormalize:
5924            ///   map.denormalize() -> map
5925            ///   - Denormalizes a CEL map such that every value of type map or key
5926            ///     in the map is expanded to return a single level map.
5927            ///   - The resulting keys are "." separated indices of the map keys.
5928            ///   - For example:
5929            ///     {
5930            ///     "a": 1,
5931            ///     "b": {
5932            ///     "c": 2,
5933            ///     "d": 3
5934            ///     }
5935            ///     "e": [4, 5]
5936            ///     }
5937            ///     .denormalize()
5938            ///     -> {
5939            ///     "a": 1,
5940            ///     "b.c": 2,
5941            ///     "b.d": 3,
5942            ///     "e.0": 4,
5943            ///     "e.1": 5
5944            ///     }
5945            /// - setField:
5946            ///   map.setField(key, value) -> message
5947            ///   - Sets the field of the message with the given key to the
5948            ///     given value.
5949            ///   - If the field is not present it will be added.
5950            ///   - If the field is present it will be overwritten.
5951            ///   - The key can be a dot separated path to set a field in a nested
5952            ///     message.
5953            ///   - Key must be of type string.
5954            ///   - Value may be any valid type.
5955            /// - removeFields:
5956            ///   map.removeFields([key1, key2, ...]) -> message
5957            ///   - Removes the fields of the map with the given keys.
5958            ///   - The keys can be a dot separated path to remove a field in a
5959            ///     nested message.
5960            ///   - If a key is not found it will be ignored.
5961            ///   - Keys must be of type string.
5962            /// - toMap:
5963            ///   [map1, map2, ...].toMap() -> map
5964            ///   - Converts a CEL list of CEL maps to a single CEL map
5965            /// - toDestinationPayloadFormat():
5966            ///   message.data.toDestinationPayloadFormat() -> string or bytes
5967            ///   - Converts the message data to the destination payload format
5968            ///     specified in Pipeline.Destination.output_payload_format
5969            ///   - This function is meant to be applied to the message.data field.
5970            ///   - If the destination payload format is not set, the function will
5971            ///     return the message data unchanged.
5972            /// - toCloudEventJsonWithPayloadFormat:
5973            ///   message.toCloudEventJsonWithPayloadFormat() -> map
5974            ///   - Converts a message to the corresponding structure of JSON
5975            ///     format for CloudEvents
5976            ///   - This function applies toDestinationPayloadFormat() to the
5977            ///     message data. It also sets the corresponding datacontenttype of
5978            ///     the CloudEvent, as indicated by
5979            ///     Pipeline.Destination.output_payload_format. If no
5980            ///     output_payload_format is set it will use the existing
5981            ///     datacontenttype on the CloudEvent if present, else leave
5982            ///     datacontenttype absent.
5983            ///   - This function expects that the content of the message will
5984            ///     adhere to the standard CloudEvent format. If it doesn't then this
5985            ///     function will fail.
5986            ///   - The result is a CEL map that corresponds to the JSON
5987            ///     representation of the CloudEvent. To convert that data to a JSON
5988            ///     string it can be chained with the toJsonString function.
5989            pub transformation_template: std::string::String,
5990
5991            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5992        }
5993
5994        impl Transformation {
5995            pub fn new() -> Self {
5996                std::default::Default::default()
5997            }
5998
5999            /// Sets the value of [transformation_template][crate::model::pipeline::mediation::Transformation::transformation_template].
6000            pub fn set_transformation_template<T: std::convert::Into<std::string::String>>(
6001                mut self,
6002                v: T,
6003            ) -> Self {
6004                self.transformation_template = v.into();
6005                self
6006            }
6007        }
6008
6009        impl wkt::message::Message for Transformation {
6010            fn typename() -> &'static str {
6011                "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.Mediation.Transformation"
6012            }
6013        }
6014
6015        /// The config of mediation.
6016        #[derive(Clone, Debug, PartialEq)]
6017        #[non_exhaustive]
6018        pub enum MediationDescriptor {
6019            /// Optional. How the Pipeline is to transform messages
6020            Transformation(std::boxed::Box<crate::model::pipeline::mediation::Transformation>),
6021        }
6022    }
6023
6024    /// The retry policy configuration for the Pipeline. The pipeline
6025    /// exponentially backs off in case the destination is non responsive or
6026    /// returns a retryable error code. The default semantics are as follows:
6027    /// The backoff starts with a 5 second delay and doubles the
6028    /// delay after each failed attempt (10 seconds, 20 seconds, 40 seconds, etc.).
6029    /// The delay is capped at 60 seconds by default.
6030    /// Please note that if you set the min_retry_delay and max_retry_delay fields
6031    /// to the same value this will make the duration between retries constant.
6032    #[derive(Clone, Default, PartialEq)]
6033    #[non_exhaustive]
6034    pub struct RetryPolicy {
6035        /// Optional. The maximum number of delivery attempts for any message. The
6036        /// value must be between 1 and 100. The default value for this field is 5.
6037        pub max_attempts: i32,
6038
6039        /// Optional. The minimum amount of seconds to wait between retry attempts.
6040        /// The value must be between 1 and 600. The default value for this field
6041        /// is 5.
6042        pub min_retry_delay: std::option::Option<wkt::Duration>,
6043
6044        /// Optional. The maximum amount of seconds to wait between retry attempts.
6045        /// The value must be between 1 and 600. The default value for this field
6046        /// is 60.
6047        pub max_retry_delay: std::option::Option<wkt::Duration>,
6048
6049        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6050    }
6051
6052    impl RetryPolicy {
6053        pub fn new() -> Self {
6054            std::default::Default::default()
6055        }
6056
6057        /// Sets the value of [max_attempts][crate::model::pipeline::RetryPolicy::max_attempts].
6058        pub fn set_max_attempts<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6059            self.max_attempts = v.into();
6060            self
6061        }
6062
6063        /// Sets the value of [min_retry_delay][crate::model::pipeline::RetryPolicy::min_retry_delay].
6064        pub fn set_min_retry_delay<T>(mut self, v: T) -> Self
6065        where
6066            T: std::convert::Into<wkt::Duration>,
6067        {
6068            self.min_retry_delay = std::option::Option::Some(v.into());
6069            self
6070        }
6071
6072        /// Sets or clears the value of [min_retry_delay][crate::model::pipeline::RetryPolicy::min_retry_delay].
6073        pub fn set_or_clear_min_retry_delay<T>(mut self, v: std::option::Option<T>) -> Self
6074        where
6075            T: std::convert::Into<wkt::Duration>,
6076        {
6077            self.min_retry_delay = v.map(|x| x.into());
6078            self
6079        }
6080
6081        /// Sets the value of [max_retry_delay][crate::model::pipeline::RetryPolicy::max_retry_delay].
6082        pub fn set_max_retry_delay<T>(mut self, v: T) -> Self
6083        where
6084            T: std::convert::Into<wkt::Duration>,
6085        {
6086            self.max_retry_delay = std::option::Option::Some(v.into());
6087            self
6088        }
6089
6090        /// Sets or clears the value of [max_retry_delay][crate::model::pipeline::RetryPolicy::max_retry_delay].
6091        pub fn set_or_clear_max_retry_delay<T>(mut self, v: std::option::Option<T>) -> Self
6092        where
6093            T: std::convert::Into<wkt::Duration>,
6094        {
6095            self.max_retry_delay = v.map(|x| x.into());
6096            self
6097        }
6098    }
6099
6100    impl wkt::message::Message for RetryPolicy {
6101        fn typename() -> &'static str {
6102            "type.googleapis.com/google.cloud.eventarc.v1.Pipeline.RetryPolicy"
6103        }
6104    }
6105}
6106
6107/// A representation of the trigger resource.
6108#[derive(Clone, Default, PartialEq)]
6109#[non_exhaustive]
6110pub struct Trigger {
6111    /// Required. The resource name of the trigger. Must be unique within the
6112    /// location of the project and must be in
6113    /// `projects/{project}/locations/{location}/triggers/{trigger}` format.
6114    pub name: std::string::String,
6115
6116    /// Output only. Server-assigned unique identifier for the trigger. The value
6117    /// is a UUID4 string and guaranteed to remain unchanged until the resource is
6118    /// deleted.
6119    pub uid: std::string::String,
6120
6121    /// Output only. The creation time.
6122    pub create_time: std::option::Option<wkt::Timestamp>,
6123
6124    /// Output only. The last-modified time.
6125    pub update_time: std::option::Option<wkt::Timestamp>,
6126
6127    /// Required. Unordered list. The list of filters that applies to event
6128    /// attributes. Only events that match all the provided filters are sent to the
6129    /// destination.
6130    pub event_filters: std::vec::Vec<crate::model::EventFilter>,
6131
6132    /// Optional. The IAM service account email associated with the trigger. The
6133    /// service account represents the identity of the trigger.
6134    ///
6135    /// The `iam.serviceAccounts.actAs` permission must be granted on the service
6136    /// account to allow a principal to impersonate the service account. For more
6137    /// information, see the
6138    /// [Roles and permissions](/eventarc/docs/all-roles-permissions) page specific
6139    /// to the trigger destination.
6140    pub service_account: std::string::String,
6141
6142    /// Required. Destination specifies where the events should be sent to.
6143    pub destination: std::option::Option<crate::model::Destination>,
6144
6145    /// Optional. To deliver messages, Eventarc might use other Google Cloud
6146    /// products as a transport intermediary. This field contains a reference to
6147    /// that transport intermediary. This information can be used for debugging
6148    /// purposes.
6149    pub transport: std::option::Option<crate::model::Transport>,
6150
6151    /// Optional. User labels attached to the triggers that can be used to group
6152    /// resources.
6153    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6154
6155    /// Optional. The name of the channel associated with the trigger in
6156    /// `projects/{project}/locations/{location}/channels/{channel}` format.
6157    /// You must provide a channel to receive events from Eventarc SaaS partners.
6158    pub channel: std::string::String,
6159
6160    /// Output only. The reason(s) why a trigger is in FAILED state.
6161    pub conditions: std::collections::HashMap<std::string::String, crate::model::StateCondition>,
6162
6163    /// Optional. EventDataContentType specifies the type of payload in MIME
6164    /// format that is expected from the CloudEvent data field. This is set to
6165    /// `application/json` if the value is not defined.
6166    pub event_data_content_type: std::string::String,
6167
6168    /// Output only. Whether or not this Trigger satisfies the requirements of
6169    /// physical zone separation
6170    pub satisfies_pzs: bool,
6171
6172    /// Output only. This checksum is computed by the server based on the value of
6173    /// other fields, and might be sent only on create requests to ensure that the
6174    /// client has an up-to-date value before proceeding.
6175    pub etag: std::string::String,
6176
6177    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6178}
6179
6180impl Trigger {
6181    pub fn new() -> Self {
6182        std::default::Default::default()
6183    }
6184
6185    /// Sets the value of [name][crate::model::Trigger::name].
6186    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6187        self.name = v.into();
6188        self
6189    }
6190
6191    /// Sets the value of [uid][crate::model::Trigger::uid].
6192    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6193        self.uid = v.into();
6194        self
6195    }
6196
6197    /// Sets the value of [create_time][crate::model::Trigger::create_time].
6198    pub fn set_create_time<T>(mut self, v: T) -> Self
6199    where
6200        T: std::convert::Into<wkt::Timestamp>,
6201    {
6202        self.create_time = std::option::Option::Some(v.into());
6203        self
6204    }
6205
6206    /// Sets or clears the value of [create_time][crate::model::Trigger::create_time].
6207    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6208    where
6209        T: std::convert::Into<wkt::Timestamp>,
6210    {
6211        self.create_time = v.map(|x| x.into());
6212        self
6213    }
6214
6215    /// Sets the value of [update_time][crate::model::Trigger::update_time].
6216    pub fn set_update_time<T>(mut self, v: T) -> Self
6217    where
6218        T: std::convert::Into<wkt::Timestamp>,
6219    {
6220        self.update_time = std::option::Option::Some(v.into());
6221        self
6222    }
6223
6224    /// Sets or clears the value of [update_time][crate::model::Trigger::update_time].
6225    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6226    where
6227        T: std::convert::Into<wkt::Timestamp>,
6228    {
6229        self.update_time = v.map(|x| x.into());
6230        self
6231    }
6232
6233    /// Sets the value of [event_filters][crate::model::Trigger::event_filters].
6234    pub fn set_event_filters<T, V>(mut self, v: T) -> Self
6235    where
6236        T: std::iter::IntoIterator<Item = V>,
6237        V: std::convert::Into<crate::model::EventFilter>,
6238    {
6239        use std::iter::Iterator;
6240        self.event_filters = v.into_iter().map(|i| i.into()).collect();
6241        self
6242    }
6243
6244    /// Sets the value of [service_account][crate::model::Trigger::service_account].
6245    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6246        self.service_account = v.into();
6247        self
6248    }
6249
6250    /// Sets the value of [destination][crate::model::Trigger::destination].
6251    pub fn set_destination<T>(mut self, v: T) -> Self
6252    where
6253        T: std::convert::Into<crate::model::Destination>,
6254    {
6255        self.destination = std::option::Option::Some(v.into());
6256        self
6257    }
6258
6259    /// Sets or clears the value of [destination][crate::model::Trigger::destination].
6260    pub fn set_or_clear_destination<T>(mut self, v: std::option::Option<T>) -> Self
6261    where
6262        T: std::convert::Into<crate::model::Destination>,
6263    {
6264        self.destination = v.map(|x| x.into());
6265        self
6266    }
6267
6268    /// Sets the value of [transport][crate::model::Trigger::transport].
6269    pub fn set_transport<T>(mut self, v: T) -> Self
6270    where
6271        T: std::convert::Into<crate::model::Transport>,
6272    {
6273        self.transport = std::option::Option::Some(v.into());
6274        self
6275    }
6276
6277    /// Sets or clears the value of [transport][crate::model::Trigger::transport].
6278    pub fn set_or_clear_transport<T>(mut self, v: std::option::Option<T>) -> Self
6279    where
6280        T: std::convert::Into<crate::model::Transport>,
6281    {
6282        self.transport = v.map(|x| x.into());
6283        self
6284    }
6285
6286    /// Sets the value of [labels][crate::model::Trigger::labels].
6287    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6288    where
6289        T: std::iter::IntoIterator<Item = (K, V)>,
6290        K: std::convert::Into<std::string::String>,
6291        V: std::convert::Into<std::string::String>,
6292    {
6293        use std::iter::Iterator;
6294        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6295        self
6296    }
6297
6298    /// Sets the value of [channel][crate::model::Trigger::channel].
6299    pub fn set_channel<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6300        self.channel = v.into();
6301        self
6302    }
6303
6304    /// Sets the value of [conditions][crate::model::Trigger::conditions].
6305    pub fn set_conditions<T, K, V>(mut self, v: T) -> Self
6306    where
6307        T: std::iter::IntoIterator<Item = (K, V)>,
6308        K: std::convert::Into<std::string::String>,
6309        V: std::convert::Into<crate::model::StateCondition>,
6310    {
6311        use std::iter::Iterator;
6312        self.conditions = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6313        self
6314    }
6315
6316    /// Sets the value of [event_data_content_type][crate::model::Trigger::event_data_content_type].
6317    pub fn set_event_data_content_type<T: std::convert::Into<std::string::String>>(
6318        mut self,
6319        v: T,
6320    ) -> Self {
6321        self.event_data_content_type = v.into();
6322        self
6323    }
6324
6325    /// Sets the value of [satisfies_pzs][crate::model::Trigger::satisfies_pzs].
6326    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6327        self.satisfies_pzs = v.into();
6328        self
6329    }
6330
6331    /// Sets the value of [etag][crate::model::Trigger::etag].
6332    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6333        self.etag = v.into();
6334        self
6335    }
6336}
6337
6338impl wkt::message::Message for Trigger {
6339    fn typename() -> &'static str {
6340        "type.googleapis.com/google.cloud.eventarc.v1.Trigger"
6341    }
6342}
6343
6344/// Filters events based on exact matches on the CloudEvents attributes.
6345#[derive(Clone, Default, PartialEq)]
6346#[non_exhaustive]
6347pub struct EventFilter {
6348    /// Required. The name of a CloudEvents attribute. Currently, only a subset of
6349    /// attributes are supported for filtering. You can [retrieve a specific
6350    /// provider's supported event
6351    /// types](/eventarc/docs/list-providers#describe-provider).
6352    ///
6353    /// All triggers MUST provide a filter for the 'type' attribute.
6354    pub attribute: std::string::String,
6355
6356    /// Required. The value for the attribute.
6357    pub value: std::string::String,
6358
6359    /// Optional. The operator used for matching the events with the value of the
6360    /// filter. If not specified, only events that have an exact key-value pair
6361    /// specified in the filter are matched. The allowed values are `path_pattern`
6362    /// and `match-path-pattern`. `path_pattern` is only allowed for GCFv1
6363    /// triggers.
6364    pub operator: std::string::String,
6365
6366    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6367}
6368
6369impl EventFilter {
6370    pub fn new() -> Self {
6371        std::default::Default::default()
6372    }
6373
6374    /// Sets the value of [attribute][crate::model::EventFilter::attribute].
6375    pub fn set_attribute<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6376        self.attribute = v.into();
6377        self
6378    }
6379
6380    /// Sets the value of [value][crate::model::EventFilter::value].
6381    pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6382        self.value = v.into();
6383        self
6384    }
6385
6386    /// Sets the value of [operator][crate::model::EventFilter::operator].
6387    pub fn set_operator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6388        self.operator = v.into();
6389        self
6390    }
6391}
6392
6393impl wkt::message::Message for EventFilter {
6394    fn typename() -> &'static str {
6395        "type.googleapis.com/google.cloud.eventarc.v1.EventFilter"
6396    }
6397}
6398
6399/// A condition that is part of the trigger state computation.
6400#[derive(Clone, Default, PartialEq)]
6401#[non_exhaustive]
6402pub struct StateCondition {
6403    /// The canonical code of the condition.
6404    pub code: rpc::model::Code,
6405
6406    /// Human-readable message.
6407    pub message: std::string::String,
6408
6409    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6410}
6411
6412impl StateCondition {
6413    pub fn new() -> Self {
6414        std::default::Default::default()
6415    }
6416
6417    /// Sets the value of [code][crate::model::StateCondition::code].
6418    pub fn set_code<T: std::convert::Into<rpc::model::Code>>(mut self, v: T) -> Self {
6419        self.code = v.into();
6420        self
6421    }
6422
6423    /// Sets the value of [message][crate::model::StateCondition::message].
6424    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6425        self.message = v.into();
6426        self
6427    }
6428}
6429
6430impl wkt::message::Message for StateCondition {
6431    fn typename() -> &'static str {
6432        "type.googleapis.com/google.cloud.eventarc.v1.StateCondition"
6433    }
6434}
6435
6436/// Represents a target of an invocation over HTTP.
6437#[derive(Clone, Default, PartialEq)]
6438#[non_exhaustive]
6439pub struct Destination {
6440    /// Optional. Network config is used to configure how Eventarc resolves and
6441    /// connect to a destination.
6442    /// This should only be used with HttpEndpoint destination type.
6443    pub network_config: std::option::Option<crate::model::NetworkConfig>,
6444
6445    pub descriptor: std::option::Option<crate::model::destination::Descriptor>,
6446
6447    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6448}
6449
6450impl Destination {
6451    pub fn new() -> Self {
6452        std::default::Default::default()
6453    }
6454
6455    /// Sets the value of [network_config][crate::model::Destination::network_config].
6456    pub fn set_network_config<T>(mut self, v: T) -> Self
6457    where
6458        T: std::convert::Into<crate::model::NetworkConfig>,
6459    {
6460        self.network_config = std::option::Option::Some(v.into());
6461        self
6462    }
6463
6464    /// Sets or clears the value of [network_config][crate::model::Destination::network_config].
6465    pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
6466    where
6467        T: std::convert::Into<crate::model::NetworkConfig>,
6468    {
6469        self.network_config = v.map(|x| x.into());
6470        self
6471    }
6472
6473    /// Sets the value of [descriptor][crate::model::Destination::descriptor].
6474    ///
6475    /// Note that all the setters affecting `descriptor` are mutually
6476    /// exclusive.
6477    pub fn set_descriptor<
6478        T: std::convert::Into<std::option::Option<crate::model::destination::Descriptor>>,
6479    >(
6480        mut self,
6481        v: T,
6482    ) -> Self {
6483        self.descriptor = v.into();
6484        self
6485    }
6486
6487    /// The value of [descriptor][crate::model::Destination::descriptor]
6488    /// if it holds a `CloudRun`, `None` if the field is not set or
6489    /// holds a different branch.
6490    pub fn cloud_run(&self) -> std::option::Option<&std::boxed::Box<crate::model::CloudRun>> {
6491        #[allow(unreachable_patterns)]
6492        self.descriptor.as_ref().and_then(|v| match v {
6493            crate::model::destination::Descriptor::CloudRun(v) => std::option::Option::Some(v),
6494            _ => std::option::Option::None,
6495        })
6496    }
6497
6498    /// Sets the value of [descriptor][crate::model::Destination::descriptor]
6499    /// to hold a `CloudRun`.
6500    ///
6501    /// Note that all the setters affecting `descriptor` are
6502    /// mutually exclusive.
6503    pub fn set_cloud_run<T: std::convert::Into<std::boxed::Box<crate::model::CloudRun>>>(
6504        mut self,
6505        v: T,
6506    ) -> Self {
6507        self.descriptor =
6508            std::option::Option::Some(crate::model::destination::Descriptor::CloudRun(v.into()));
6509        self
6510    }
6511
6512    /// The value of [descriptor][crate::model::Destination::descriptor]
6513    /// if it holds a `CloudFunction`, `None` if the field is not set or
6514    /// holds a different branch.
6515    pub fn cloud_function(&self) -> std::option::Option<&std::string::String> {
6516        #[allow(unreachable_patterns)]
6517        self.descriptor.as_ref().and_then(|v| match v {
6518            crate::model::destination::Descriptor::CloudFunction(v) => std::option::Option::Some(v),
6519            _ => std::option::Option::None,
6520        })
6521    }
6522
6523    /// Sets the value of [descriptor][crate::model::Destination::descriptor]
6524    /// to hold a `CloudFunction`.
6525    ///
6526    /// Note that all the setters affecting `descriptor` are
6527    /// mutually exclusive.
6528    pub fn set_cloud_function<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6529        self.descriptor = std::option::Option::Some(
6530            crate::model::destination::Descriptor::CloudFunction(v.into()),
6531        );
6532        self
6533    }
6534
6535    /// The value of [descriptor][crate::model::Destination::descriptor]
6536    /// if it holds a `Gke`, `None` if the field is not set or
6537    /// holds a different branch.
6538    pub fn gke(&self) -> std::option::Option<&std::boxed::Box<crate::model::Gke>> {
6539        #[allow(unreachable_patterns)]
6540        self.descriptor.as_ref().and_then(|v| match v {
6541            crate::model::destination::Descriptor::Gke(v) => std::option::Option::Some(v),
6542            _ => std::option::Option::None,
6543        })
6544    }
6545
6546    /// Sets the value of [descriptor][crate::model::Destination::descriptor]
6547    /// to hold a `Gke`.
6548    ///
6549    /// Note that all the setters affecting `descriptor` are
6550    /// mutually exclusive.
6551    pub fn set_gke<T: std::convert::Into<std::boxed::Box<crate::model::Gke>>>(
6552        mut self,
6553        v: T,
6554    ) -> Self {
6555        self.descriptor =
6556            std::option::Option::Some(crate::model::destination::Descriptor::Gke(v.into()));
6557        self
6558    }
6559
6560    /// The value of [descriptor][crate::model::Destination::descriptor]
6561    /// if it holds a `Workflow`, `None` if the field is not set or
6562    /// holds a different branch.
6563    pub fn workflow(&self) -> std::option::Option<&std::string::String> {
6564        #[allow(unreachable_patterns)]
6565        self.descriptor.as_ref().and_then(|v| match v {
6566            crate::model::destination::Descriptor::Workflow(v) => std::option::Option::Some(v),
6567            _ => std::option::Option::None,
6568        })
6569    }
6570
6571    /// Sets the value of [descriptor][crate::model::Destination::descriptor]
6572    /// to hold a `Workflow`.
6573    ///
6574    /// Note that all the setters affecting `descriptor` are
6575    /// mutually exclusive.
6576    pub fn set_workflow<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6577        self.descriptor =
6578            std::option::Option::Some(crate::model::destination::Descriptor::Workflow(v.into()));
6579        self
6580    }
6581
6582    /// The value of [descriptor][crate::model::Destination::descriptor]
6583    /// if it holds a `HttpEndpoint`, `None` if the field is not set or
6584    /// holds a different branch.
6585    pub fn http_endpoint(
6586        &self,
6587    ) -> std::option::Option<&std::boxed::Box<crate::model::HttpEndpoint>> {
6588        #[allow(unreachable_patterns)]
6589        self.descriptor.as_ref().and_then(|v| match v {
6590            crate::model::destination::Descriptor::HttpEndpoint(v) => std::option::Option::Some(v),
6591            _ => std::option::Option::None,
6592        })
6593    }
6594
6595    /// Sets the value of [descriptor][crate::model::Destination::descriptor]
6596    /// to hold a `HttpEndpoint`.
6597    ///
6598    /// Note that all the setters affecting `descriptor` are
6599    /// mutually exclusive.
6600    pub fn set_http_endpoint<T: std::convert::Into<std::boxed::Box<crate::model::HttpEndpoint>>>(
6601        mut self,
6602        v: T,
6603    ) -> Self {
6604        self.descriptor = std::option::Option::Some(
6605            crate::model::destination::Descriptor::HttpEndpoint(v.into()),
6606        );
6607        self
6608    }
6609}
6610
6611impl wkt::message::Message for Destination {
6612    fn typename() -> &'static str {
6613        "type.googleapis.com/google.cloud.eventarc.v1.Destination"
6614    }
6615}
6616
6617/// Defines additional types related to [Destination].
6618pub mod destination {
6619    #[allow(unused_imports)]
6620    use super::*;
6621
6622    #[derive(Clone, Debug, PartialEq)]
6623    #[non_exhaustive]
6624    pub enum Descriptor {
6625        /// Cloud Run fully-managed resource that receives the events. The resource
6626        /// should be in the same project as the trigger.
6627        CloudRun(std::boxed::Box<crate::model::CloudRun>),
6628        /// The Cloud Function resource name. Cloud Functions V1 and V2 are
6629        /// supported.
6630        /// Format: `projects/{project}/locations/{location}/functions/{function}`
6631        ///
6632        /// This is a read-only field. Creating Cloud Functions V1/V2 triggers is
6633        /// only supported via the Cloud Functions product. An error will be returned
6634        /// if the user sets this value.
6635        CloudFunction(std::string::String),
6636        /// A GKE service capable of receiving events. The service should be running
6637        /// in the same project as the trigger.
6638        Gke(std::boxed::Box<crate::model::Gke>),
6639        /// The resource name of the Workflow whose Executions are triggered by
6640        /// the events. The Workflow resource should be deployed in the same project
6641        /// as the trigger.
6642        /// Format: `projects/{project}/locations/{location}/workflows/{workflow}`
6643        Workflow(std::string::String),
6644        /// An HTTP endpoint destination described by an URI.
6645        HttpEndpoint(std::boxed::Box<crate::model::HttpEndpoint>),
6646    }
6647}
6648
6649/// Represents the transport intermediaries created for the trigger to
6650/// deliver events.
6651#[derive(Clone, Default, PartialEq)]
6652#[non_exhaustive]
6653pub struct Transport {
6654    pub intermediary: std::option::Option<crate::model::transport::Intermediary>,
6655
6656    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6657}
6658
6659impl Transport {
6660    pub fn new() -> Self {
6661        std::default::Default::default()
6662    }
6663
6664    /// Sets the value of [intermediary][crate::model::Transport::intermediary].
6665    ///
6666    /// Note that all the setters affecting `intermediary` are mutually
6667    /// exclusive.
6668    pub fn set_intermediary<
6669        T: std::convert::Into<std::option::Option<crate::model::transport::Intermediary>>,
6670    >(
6671        mut self,
6672        v: T,
6673    ) -> Self {
6674        self.intermediary = v.into();
6675        self
6676    }
6677
6678    /// The value of [intermediary][crate::model::Transport::intermediary]
6679    /// if it holds a `Pubsub`, `None` if the field is not set or
6680    /// holds a different branch.
6681    pub fn pubsub(&self) -> std::option::Option<&std::boxed::Box<crate::model::Pubsub>> {
6682        #[allow(unreachable_patterns)]
6683        self.intermediary.as_ref().and_then(|v| match v {
6684            crate::model::transport::Intermediary::Pubsub(v) => std::option::Option::Some(v),
6685            _ => std::option::Option::None,
6686        })
6687    }
6688
6689    /// Sets the value of [intermediary][crate::model::Transport::intermediary]
6690    /// to hold a `Pubsub`.
6691    ///
6692    /// Note that all the setters affecting `intermediary` are
6693    /// mutually exclusive.
6694    pub fn set_pubsub<T: std::convert::Into<std::boxed::Box<crate::model::Pubsub>>>(
6695        mut self,
6696        v: T,
6697    ) -> Self {
6698        self.intermediary =
6699            std::option::Option::Some(crate::model::transport::Intermediary::Pubsub(v.into()));
6700        self
6701    }
6702}
6703
6704impl wkt::message::Message for Transport {
6705    fn typename() -> &'static str {
6706        "type.googleapis.com/google.cloud.eventarc.v1.Transport"
6707    }
6708}
6709
6710/// Defines additional types related to [Transport].
6711pub mod transport {
6712    #[allow(unused_imports)]
6713    use super::*;
6714
6715    #[derive(Clone, Debug, PartialEq)]
6716    #[non_exhaustive]
6717    pub enum Intermediary {
6718        /// The Pub/Sub topic and subscription used by Eventarc as a transport
6719        /// intermediary.
6720        Pubsub(std::boxed::Box<crate::model::Pubsub>),
6721    }
6722}
6723
6724/// Represents a Cloud Run destination.
6725#[derive(Clone, Default, PartialEq)]
6726#[non_exhaustive]
6727pub struct CloudRun {
6728    /// Required. The name of the Cloud Run service being addressed. See
6729    /// <https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services>.
6730    ///
6731    /// Only services located in the same project as the trigger object
6732    /// can be addressed.
6733    pub service: std::string::String,
6734
6735    /// Optional. The relative path on the Cloud Run service the events should be
6736    /// sent to.
6737    ///
6738    /// The value must conform to the definition of a URI path segment (section 3.3
6739    /// of RFC2396). Examples: "/route", "route", "route/subroute".
6740    pub path: std::string::String,
6741
6742    /// Required. The region the Cloud Run service is deployed in.
6743    pub region: std::string::String,
6744
6745    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6746}
6747
6748impl CloudRun {
6749    pub fn new() -> Self {
6750        std::default::Default::default()
6751    }
6752
6753    /// Sets the value of [service][crate::model::CloudRun::service].
6754    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6755        self.service = v.into();
6756        self
6757    }
6758
6759    /// Sets the value of [path][crate::model::CloudRun::path].
6760    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6761        self.path = v.into();
6762        self
6763    }
6764
6765    /// Sets the value of [region][crate::model::CloudRun::region].
6766    pub fn set_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6767        self.region = v.into();
6768        self
6769    }
6770}
6771
6772impl wkt::message::Message for CloudRun {
6773    fn typename() -> &'static str {
6774        "type.googleapis.com/google.cloud.eventarc.v1.CloudRun"
6775    }
6776}
6777
6778/// Represents a GKE destination.
6779#[derive(Clone, Default, PartialEq)]
6780#[non_exhaustive]
6781pub struct Gke {
6782    /// Required. The name of the cluster the GKE service is running in. The
6783    /// cluster must be running in the same project as the trigger being created.
6784    pub cluster: std::string::String,
6785
6786    /// Required. The name of the Google Compute Engine in which the cluster
6787    /// resides, which can either be compute zone (for example, us-central1-a) for
6788    /// the zonal clusters or region (for example, us-central1) for regional
6789    /// clusters.
6790    pub location: std::string::String,
6791
6792    /// Required. The namespace the GKE service is running in.
6793    pub namespace: std::string::String,
6794
6795    /// Required. Name of the GKE service.
6796    pub service: std::string::String,
6797
6798    /// Optional. The relative path on the GKE service the events should be sent
6799    /// to.
6800    ///
6801    /// The value must conform to the definition of a URI path segment (section 3.3
6802    /// of RFC2396). Examples: "/route", "route", "route/subroute".
6803    pub path: std::string::String,
6804
6805    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6806}
6807
6808impl Gke {
6809    pub fn new() -> Self {
6810        std::default::Default::default()
6811    }
6812
6813    /// Sets the value of [cluster][crate::model::Gke::cluster].
6814    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6815        self.cluster = v.into();
6816        self
6817    }
6818
6819    /// Sets the value of [location][crate::model::Gke::location].
6820    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6821        self.location = v.into();
6822        self
6823    }
6824
6825    /// Sets the value of [namespace][crate::model::Gke::namespace].
6826    pub fn set_namespace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6827        self.namespace = v.into();
6828        self
6829    }
6830
6831    /// Sets the value of [service][crate::model::Gke::service].
6832    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6833        self.service = v.into();
6834        self
6835    }
6836
6837    /// Sets the value of [path][crate::model::Gke::path].
6838    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6839        self.path = v.into();
6840        self
6841    }
6842}
6843
6844impl wkt::message::Message for Gke {
6845    fn typename() -> &'static str {
6846        "type.googleapis.com/google.cloud.eventarc.v1.GKE"
6847    }
6848}
6849
6850/// Represents a Pub/Sub transport.
6851#[derive(Clone, Default, PartialEq)]
6852#[non_exhaustive]
6853pub struct Pubsub {
6854    /// Optional. The name of the Pub/Sub topic created and managed by Eventarc as
6855    /// a transport for the event delivery. Format:
6856    /// `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`.
6857    ///
6858    /// You can set an existing topic for triggers of the type
6859    /// `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide
6860    /// here is not deleted by Eventarc at trigger deletion.
6861    pub topic: std::string::String,
6862
6863    /// Output only. The name of the Pub/Sub subscription created and managed by
6864    /// Eventarc as a transport for the event delivery. Format:
6865    /// `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`.
6866    pub subscription: std::string::String,
6867
6868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6869}
6870
6871impl Pubsub {
6872    pub fn new() -> Self {
6873        std::default::Default::default()
6874    }
6875
6876    /// Sets the value of [topic][crate::model::Pubsub::topic].
6877    pub fn set_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6878        self.topic = v.into();
6879        self
6880    }
6881
6882    /// Sets the value of [subscription][crate::model::Pubsub::subscription].
6883    pub fn set_subscription<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6884        self.subscription = v.into();
6885        self
6886    }
6887}
6888
6889impl wkt::message::Message for Pubsub {
6890    fn typename() -> &'static str {
6891        "type.googleapis.com/google.cloud.eventarc.v1.Pubsub"
6892    }
6893}
6894
6895/// Represents a HTTP endpoint destination.
6896#[derive(Clone, Default, PartialEq)]
6897#[non_exhaustive]
6898pub struct HttpEndpoint {
6899    /// Required. The URI of the HTTP endpoint.
6900    ///
6901    /// The value must be a RFC2396 URI string.
6902    /// Examples: `http://10.10.10.8:80/route`,
6903    /// `<http://svc.us-central1.p.local>:8080/`.
6904    /// Only HTTP and HTTPS protocols are supported. The host can be either a
6905    /// static IP addressable from the VPC specified by the network config, or
6906    /// an internal DNS hostname of the service resolvable via Cloud DNS.
6907    pub uri: std::string::String,
6908
6909    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6910}
6911
6912impl HttpEndpoint {
6913    pub fn new() -> Self {
6914        std::default::Default::default()
6915    }
6916
6917    /// Sets the value of [uri][crate::model::HttpEndpoint::uri].
6918    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6919        self.uri = v.into();
6920        self
6921    }
6922}
6923
6924impl wkt::message::Message for HttpEndpoint {
6925    fn typename() -> &'static str {
6926        "type.googleapis.com/google.cloud.eventarc.v1.HttpEndpoint"
6927    }
6928}