#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Predicate {
#[prost(oneof = "predicate::Predicate", tags = "2, 4")]
pub predicate: ::core::option::Option<predicate::Predicate>,
}
pub mod predicate {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Predicate {
#[prost(message, tag = "2")]
AndPredicate(super::AndPredicate),
#[prost(message, tag = "4")]
FieldValuePredicate(super::FieldValuePredicate),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndPredicate {
#[prost(message, repeated, tag = "1")]
pub predicate: ::prost::alloc::vec::Vec<Predicate>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldValuePredicate {
#[prost(string, tag = "1")]
pub field_path: ::prost::alloc::string::String,
#[prost(oneof = "field_value_predicate::Value", tags = "3, 8, 9")]
pub value: ::core::option::Option<field_value_predicate::Value>,
}
pub mod field_value_predicate {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(string, tag = "3")]
Exact(::prost::alloc::string::String),
#[prost(string, tag = "8")]
Prefix(::prost::alloc::string::String),
#[prost(string, tag = "9")]
Suffix(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Trigger {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "6")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "8")]
pub rule: ::core::option::Option<trigger::Rule>,
#[prost(enumeration = "trigger::Status", tag = "9")]
pub status: i32,
}
pub mod trigger {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Rule {
#[prost(oneof = "rule::Rule", tags = "2, 3, 4, 14, 5, 6, 9, 10, 11, 12, 13")]
pub rule: ::core::option::Option<rule::Rule>,
}
pub mod rule {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Rule {
#[prost(message, tag = "2")]
Timer(super::Timer),
#[prost(message, tag = "3")]
MessageQueue(super::MessageQueue),
#[prost(message, tag = "4")]
IotMessage(super::IoTMessage),
#[prost(message, tag = "14")]
IotBrokerMessage(super::IoTBrokerMessage),
#[prost(message, tag = "5")]
ObjectStorage(super::ObjectStorage),
#[prost(message, tag = "6")]
ContainerRegistry(super::ContainerRegistry),
#[prost(message, tag = "9")]
CloudLogs(super::CloudLogs),
#[prost(message, tag = "10")]
Logging(super::Logging),
#[prost(message, tag = "11")]
BillingBudget(super::super::BillingBudget),
#[prost(message, tag = "12")]
DataStream(super::super::DataStream),
#[prost(message, tag = "13")]
Mail(super::super::Mail),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Timer {
#[prost(string, tag = "1")]
pub cron_expression: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub payload: ::prost::alloc::string::String,
#[prost(oneof = "timer::Action", tags = "101, 103, 104, 105")]
pub action: ::core::option::Option<timer::Action>,
}
pub mod timer {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::super::InvokeFunctionOnce),
#[prost(message, tag = "103")]
InvokeFunctionWithRetry(super::super::InvokeFunctionWithRetry),
#[prost(message, tag = "104")]
InvokeContainerWithRetry(super::super::InvokeContainerWithRetry),
#[prost(message, tag = "105")]
GatewayWebsocketBroadcast(super::super::GatewayWebsocketBroadcast),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageQueue {
#[prost(string, tag = "11")]
pub queue_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub service_account_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub batch_settings: ::core::option::Option<super::BatchSettings>,
#[prost(message, optional, tag = "5")]
pub visibility_timeout: ::core::option::Option<::prost_types::Duration>,
#[prost(oneof = "message_queue::Action", tags = "101, 102, 103")]
pub action: ::core::option::Option<message_queue::Action>,
}
pub mod message_queue {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::super::InvokeFunctionOnce),
#[prost(message, tag = "102")]
InvokeContainer(super::super::InvokeContainerOnce),
#[prost(message, tag = "103")]
GatewayWebsocketBroadcast(super::super::GatewayWebsocketBroadcast),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IoTMessage {
#[prost(string, tag = "1")]
pub registry_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub device_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub mqtt_topic: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub batch_settings: ::core::option::Option<super::BatchSettings>,
#[prost(oneof = "io_t_message::Action", tags = "101, 102, 103")]
pub action: ::core::option::Option<io_t_message::Action>,
}
pub mod io_t_message {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::super::InvokeFunctionWithRetry),
#[prost(message, tag = "102")]
InvokeContainer(super::super::InvokeContainerWithRetry),
#[prost(message, tag = "103")]
GatewayWebsocketBroadcast(super::super::GatewayWebsocketBroadcast),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IoTBrokerMessage {
#[prost(string, tag = "1")]
pub broker_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub mqtt_topic: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub batch_settings: ::core::option::Option<super::BatchSettings>,
#[prost(oneof = "io_t_broker_message::Action", tags = "101, 102, 103")]
pub action: ::core::option::Option<io_t_broker_message::Action>,
}
pub mod io_t_broker_message {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::super::InvokeFunctionWithRetry),
#[prost(message, tag = "102")]
InvokeContainer(super::super::InvokeContainerWithRetry),
#[prost(message, tag = "103")]
GatewayWebsocketBroadcast(super::super::GatewayWebsocketBroadcast),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectStorage {
#[prost(
enumeration = "ObjectStorageEventType",
repeated,
packed = "false",
tag = "3"
)]
pub event_type: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag = "4")]
pub bucket_id: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub prefix: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub suffix: ::prost::alloc::string::String,
#[prost(message, optional, tag = "8")]
pub batch_settings: ::core::option::Option<super::BatchSettings>,
#[prost(oneof = "object_storage::Action", tags = "101, 102, 103")]
pub action: ::core::option::Option<object_storage::Action>,
}
pub mod object_storage {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::super::InvokeFunctionWithRetry),
#[prost(message, tag = "102")]
InvokeContainer(super::super::InvokeContainerWithRetry),
#[prost(message, tag = "103")]
GatewayWebsocketBroadcast(super::super::GatewayWebsocketBroadcast),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContainerRegistry {
#[prost(
enumeration = "ContainerRegistryEventType",
repeated,
packed = "false",
tag = "3"
)]
pub event_type: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag = "4")]
pub registry_id: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub image_name: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub tag: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub batch_settings: ::core::option::Option<super::BatchSettings>,
#[prost(oneof = "container_registry::Action", tags = "101, 102, 103")]
pub action: ::core::option::Option<container_registry::Action>,
}
pub mod container_registry {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::super::InvokeFunctionWithRetry),
#[prost(message, tag = "102")]
InvokeContainer(super::super::InvokeContainerWithRetry),
#[prost(message, tag = "103")]
GatewayWebsocketBroadcast(super::super::GatewayWebsocketBroadcast),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudLogs {
#[prost(string, repeated, tag = "1")]
pub log_group_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub batch_settings: ::core::option::Option<super::CloudLogsBatchSettings>,
#[prost(oneof = "cloud_logs::Action", tags = "101, 102")]
pub action: ::core::option::Option<cloud_logs::Action>,
}
pub mod cloud_logs {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::super::InvokeFunctionWithRetry),
#[prost(message, tag = "102")]
InvokeContainer(super::super::InvokeContainerWithRetry),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Logging {
#[prost(string, tag = "1")]
pub log_group_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub resource_type: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub resource_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "7")]
pub stream_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(
enumeration = "super::super::super::super::logging::v1::log_level::Level",
repeated,
packed = "false",
tag = "5"
)]
pub levels: ::prost::alloc::vec::Vec<i32>,
#[prost(message, optional, tag = "6")]
pub batch_settings: ::core::option::Option<super::LoggingBatchSettings>,
#[prost(oneof = "logging::Action", tags = "101, 103, 104")]
pub action: ::core::option::Option<logging::Action>,
}
pub mod logging {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::super::InvokeFunctionWithRetry),
#[prost(message, tag = "103")]
InvokeContainer(super::super::InvokeContainerWithRetry),
#[prost(message, tag = "104")]
GatewayWebsocketBroadcast(super::super::GatewayWebsocketBroadcast),
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ObjectStorageEventType {
Unspecified = 0,
CreateObject = 1,
UpdateObject = 2,
DeleteObject = 3,
}
impl ObjectStorageEventType {
pub fn as_str_name(&self) -> &'static str {
match self {
ObjectStorageEventType::Unspecified => {
"OBJECT_STORAGE_EVENT_TYPE_UNSPECIFIED"
}
ObjectStorageEventType::CreateObject => {
"OBJECT_STORAGE_EVENT_TYPE_CREATE_OBJECT"
}
ObjectStorageEventType::UpdateObject => {
"OBJECT_STORAGE_EVENT_TYPE_UPDATE_OBJECT"
}
ObjectStorageEventType::DeleteObject => {
"OBJECT_STORAGE_EVENT_TYPE_DELETE_OBJECT"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OBJECT_STORAGE_EVENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"OBJECT_STORAGE_EVENT_TYPE_CREATE_OBJECT" => Some(Self::CreateObject),
"OBJECT_STORAGE_EVENT_TYPE_UPDATE_OBJECT" => Some(Self::UpdateObject),
"OBJECT_STORAGE_EVENT_TYPE_DELETE_OBJECT" => Some(Self::DeleteObject),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ContainerRegistryEventType {
Unspecified = 0,
CreateImage = 1,
DeleteImage = 2,
CreateImageTag = 3,
DeleteImageTag = 4,
}
impl ContainerRegistryEventType {
pub fn as_str_name(&self) -> &'static str {
match self {
ContainerRegistryEventType::Unspecified => {
"CONTAINER_REGISTRY_EVENT_TYPE_UNSPECIFIED"
}
ContainerRegistryEventType::CreateImage => {
"CONTAINER_REGISTRY_EVENT_TYPE_CREATE_IMAGE"
}
ContainerRegistryEventType::DeleteImage => {
"CONTAINER_REGISTRY_EVENT_TYPE_DELETE_IMAGE"
}
ContainerRegistryEventType::CreateImageTag => {
"CONTAINER_REGISTRY_EVENT_TYPE_CREATE_IMAGE_TAG"
}
ContainerRegistryEventType::DeleteImageTag => {
"CONTAINER_REGISTRY_EVENT_TYPE_DELETE_IMAGE_TAG"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTAINER_REGISTRY_EVENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"CONTAINER_REGISTRY_EVENT_TYPE_CREATE_IMAGE" => Some(Self::CreateImage),
"CONTAINER_REGISTRY_EVENT_TYPE_DELETE_IMAGE" => Some(Self::DeleteImage),
"CONTAINER_REGISTRY_EVENT_TYPE_CREATE_IMAGE_TAG" => {
Some(Self::CreateImageTag)
}
"CONTAINER_REGISTRY_EVENT_TYPE_DELETE_IMAGE_TAG" => {
Some(Self::DeleteImageTag)
}
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Active = 1,
Paused = 2,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Active => "ACTIVE",
Status::Paused => "PAUSED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"ACTIVE" => Some(Self::Active),
"PAUSED" => Some(Self::Paused),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InvokeFunctionOnce {
#[prost(string, tag = "1")]
pub function_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub function_tag: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub service_account_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InvokeFunctionWithRetry {
#[prost(string, tag = "1")]
pub function_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub function_tag: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub service_account_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub retry_settings: ::core::option::Option<RetrySettings>,
#[prost(message, optional, tag = "5")]
pub dead_letter_queue: ::core::option::Option<PutQueueMessage>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InvokeContainerOnce {
#[prost(string, tag = "1")]
pub container_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub path: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub service_account_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InvokeContainerWithRetry {
#[prost(string, tag = "1")]
pub container_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub path: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub service_account_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub retry_settings: ::core::option::Option<RetrySettings>,
#[prost(message, optional, tag = "6")]
pub dead_letter_queue: ::core::option::Option<PutQueueMessage>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GatewayWebsocketBroadcast {
#[prost(string, tag = "1")]
pub gateway_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub path: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub service_account_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutQueueMessage {
#[prost(string, tag = "11")]
pub queue_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub service_account_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchSettings {
#[prost(int64, tag = "1")]
pub size: i64,
#[prost(message, optional, tag = "2")]
pub cutoff: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudLogsBatchSettings {
#[prost(int64, tag = "1")]
pub size: i64,
#[prost(message, optional, tag = "2")]
pub cutoff: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoggingBatchSettings {
#[prost(int64, tag = "1")]
pub size: i64,
#[prost(message, optional, tag = "2")]
pub cutoff: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrySettings {
#[prost(int64, tag = "1")]
pub retry_attempts: i64,
#[prost(message, optional, tag = "2")]
pub interval: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BillingBudget {
#[prost(string, tag = "1")]
pub billing_account_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub budget_id: ::prost::alloc::string::String,
#[prost(oneof = "billing_budget::Action", tags = "101, 103, 104")]
pub action: ::core::option::Option<billing_budget::Action>,
}
pub mod billing_budget {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::InvokeFunctionWithRetry),
#[prost(message, tag = "103")]
InvokeContainer(super::InvokeContainerWithRetry),
#[prost(message, tag = "104")]
GatewayWebsocketBroadcast(super::GatewayWebsocketBroadcast),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataStreamBatchSettings {
#[prost(int64, tag = "1")]
pub size: i64,
#[prost(message, optional, tag = "2")]
pub cutoff: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataStream {
#[prost(string, tag = "1")]
pub endpoint: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub database: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub stream: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub service_account_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub batch_settings: ::core::option::Option<DataStreamBatchSettings>,
#[prost(oneof = "data_stream::Action", tags = "13, 15, 16")]
pub action: ::core::option::Option<data_stream::Action>,
}
pub mod data_stream {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "13")]
InvokeFunction(super::InvokeFunctionWithRetry),
#[prost(message, tag = "15")]
InvokeContainer(super::InvokeContainerWithRetry),
#[prost(message, tag = "16")]
GatewayWebsocketBroadcast(super::GatewayWebsocketBroadcast),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectStorageBucketSettings {
#[prost(string, tag = "1")]
pub bucket_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub service_account_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mail {
#[prost(string, tag = "2")]
pub email: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub batch_settings: ::core::option::Option<BatchSettings>,
#[prost(message, optional, tag = "4")]
pub attachments_bucket: ::core::option::Option<ObjectStorageBucketSettings>,
#[prost(oneof = "mail::Action", tags = "101, 103, 104")]
pub action: ::core::option::Option<mail::Action>,
}
pub mod mail {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "101")]
InvokeFunction(super::InvokeFunctionWithRetry),
#[prost(message, tag = "103")]
InvokeContainer(super::InvokeContainerWithRetry),
#[prost(message, tag = "104")]
GatewayWebsocketBroadcast(super::GatewayWebsocketBroadcast),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TriggerType {
Unspecified = 0,
Timer = 2,
MessageQueue = 3,
IotMessage = 4,
IotBrokerMessage = 12,
ObjectStorage = 5,
ContainerRegistry = 6,
CloudLogs = 7,
Logging = 8,
BillingBudget = 9,
Yds = 10,
Mail = 11,
}
impl TriggerType {
pub fn as_str_name(&self) -> &'static str {
match self {
TriggerType::Unspecified => "TRIGGER_TYPE_UNSPECIFIED",
TriggerType::Timer => "TIMER",
TriggerType::MessageQueue => "MESSAGE_QUEUE",
TriggerType::IotMessage => "IOT_MESSAGE",
TriggerType::IotBrokerMessage => "IOT_BROKER_MESSAGE",
TriggerType::ObjectStorage => "OBJECT_STORAGE",
TriggerType::ContainerRegistry => "CONTAINER_REGISTRY",
TriggerType::CloudLogs => "CLOUD_LOGS",
TriggerType::Logging => "LOGGING",
TriggerType::BillingBudget => "BILLING_BUDGET",
TriggerType::Yds => "YDS",
TriggerType::Mail => "MAIL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRIGGER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TIMER" => Some(Self::Timer),
"MESSAGE_QUEUE" => Some(Self::MessageQueue),
"IOT_MESSAGE" => Some(Self::IotMessage),
"IOT_BROKER_MESSAGE" => Some(Self::IotBrokerMessage),
"OBJECT_STORAGE" => Some(Self::ObjectStorage),
"CONTAINER_REGISTRY" => Some(Self::ContainerRegistry),
"CLOUD_LOGS" => Some(Self::CloudLogs),
"LOGGING" => Some(Self::Logging),
"BILLING_BUDGET" => Some(Self::BillingBudget),
"YDS" => Some(Self::Yds),
"MAIL" => Some(Self::Mail),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTriggerRequest {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTriggersRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTriggersResponse {
#[prost(message, repeated, tag = "1")]
pub triggers: ::prost::alloc::vec::Vec<Trigger>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTriggerRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "5")]
pub rule: ::core::option::Option<trigger::Rule>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTriggerMetadata {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTriggerRequest {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "5")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "6")]
pub rule: ::core::option::Option<trigger::Rule>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTriggerMetadata {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTriggerRequest {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTriggerMetadata {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PauseTriggerRequest {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PauseTriggerMetadata {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResumeTriggerRequest {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResumeTriggerMetadata {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTriggerOperationsRequest {
#[prost(string, tag = "1")]
pub trigger_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTriggerOperationsResponse {
#[prost(message, repeated, tag = "1")]
pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
pub mod trigger_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct TriggerServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl TriggerServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> TriggerServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> TriggerServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
TriggerServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetTriggerRequest>,
) -> std::result::Result<tonic::Response<super::Trigger>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.serverless.triggers.v1.TriggerService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.serverless.triggers.v1.TriggerService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListTriggersRequest>,
) -> std::result::Result<
tonic::Response<super::ListTriggersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.serverless.triggers.v1.TriggerService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.serverless.triggers.v1.TriggerService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateTriggerRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.serverless.triggers.v1.TriggerService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.serverless.triggers.v1.TriggerService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateTriggerRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.serverless.triggers.v1.TriggerService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.serverless.triggers.v1.TriggerService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteTriggerRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.serverless.triggers.v1.TriggerService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.serverless.triggers.v1.TriggerService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn pause(
&mut self,
request: impl tonic::IntoRequest<super::PauseTriggerRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.serverless.triggers.v1.TriggerService/Pause",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.serverless.triggers.v1.TriggerService",
"Pause",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn resume(
&mut self,
request: impl tonic::IntoRequest<super::ResumeTriggerRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.serverless.triggers.v1.TriggerService/Resume",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.serverless.triggers.v1.TriggerService",
"Resume",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_operations(
&mut self,
request: impl tonic::IntoRequest<super::ListTriggerOperationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListTriggerOperationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.serverless.triggers.v1.TriggerService/ListOperations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.serverless.triggers.v1.TriggerService",
"ListOperations",
),
);
self.inner.unary(req, path, codec).await
}
}
}