#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Channel {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub create_time: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(string, tag = "7")]
pub provider: ::prost::alloc::string::String,
#[prost(enumeration = "channel::State", tag = "9")]
pub state: i32,
#[prost(string, tag = "10")]
pub activation_token: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub crypto_key_name: ::prost::alloc::string::String,
#[prost(oneof = "channel::Transport", tags = "8")]
pub transport: ::core::option::Option<channel::Transport>,
}
pub mod channel {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Pending = 1,
Active = 2,
Inactive = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Pending => "PENDING",
Self::Active => "ACTIVE",
Self::Inactive => "INACTIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"ACTIVE" => Some(Self::Active),
"INACTIVE" => Some(Self::Inactive),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Transport {
#[prost(string, tag = "8")]
PubsubTopic(::prost::alloc::string::String),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelConnection {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uid: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub channel: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub update_time: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Trigger {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub create_time: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, repeated, tag = "8")]
pub event_filters: ::prost::alloc::vec::Vec<EventFilter>,
#[prost(string, tag = "9")]
pub service_account: ::prost::alloc::string::String,
#[prost(message, optional, tag = "10")]
pub destination: ::core::option::Option<Destination>,
#[prost(message, optional, tag = "11")]
pub transport: ::core::option::Option<Transport>,
#[prost(map = "string, string", tag = "12")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "13")]
pub channel: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "15")]
pub conditions: ::std::collections::HashMap<
::prost::alloc::string::String,
StateCondition,
>,
#[prost(string, tag = "16")]
pub event_data_content_type: ::prost::alloc::string::String,
#[prost(string, tag = "99")]
pub etag: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventFilter {
#[prost(string, tag = "1")]
pub attribute: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub operator: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StateCondition {
#[prost(enumeration = "super::super::super::super::rpc::Code", tag = "1")]
pub code: i32,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Destination {
#[prost(oneof = "destination::Descriptor", tags = "1, 2, 3, 4")]
pub descriptor: ::core::option::Option<destination::Descriptor>,
}
pub mod destination {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Descriptor {
#[prost(message, tag = "1")]
CloudRun(super::CloudRun),
#[prost(string, tag = "2")]
CloudFunction(::prost::alloc::string::String),
#[prost(message, tag = "3")]
Gke(super::Gke),
#[prost(string, tag = "4")]
Workflow(::prost::alloc::string::String),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Transport {
#[prost(oneof = "transport::Intermediary", tags = "1")]
pub intermediary: ::core::option::Option<transport::Intermediary>,
}
pub mod transport {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Intermediary {
#[prost(message, tag = "1")]
Pubsub(super::Pubsub),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudRun {
#[prost(string, tag = "1")]
pub service: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub path: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub region: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Gke {
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub location: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub namespace: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub service: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub path: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Pubsub {
#[prost(string, tag = "1")]
pub topic: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subscription: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerEventData {
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Trigger>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelEventData {
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Channel>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelConnectionEventData {
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<ChannelConnection>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerCreatedEvent {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<TriggerEventData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerUpdatedEvent {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<TriggerEventData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerDeletedEvent {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<TriggerEventData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelCreatedEvent {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ChannelEventData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelUpdatedEvent {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ChannelEventData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelDeletedEvent {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ChannelEventData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelConnectionCreatedEvent {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ChannelConnectionEventData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(default)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelConnectionDeletedEvent {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ChannelConnectionEventData>,
}