pub struct SubscriptionCreateConfig {Show 13 fields
pub project_id: String,
pub subscription_name: String,
pub topic_name: String,
pub ack_deadline_seconds: i64,
pub message_retention_duration: Option<i64>,
pub retain_acked_messages: bool,
pub enable_message_ordering: bool,
pub expiration_policy: Option<ExpirationPolicy>,
pub dead_letter_policy: Option<DeadLetterPolicy>,
pub retry_policy: Option<RetryPolicy>,
pub labels: HashMap<String, String>,
pub filter: Option<String>,
pub endpoint: Option<String>,
}Expand description
Subscription configuration for creation/updates.
Fields§
§project_id: StringProject ID.
subscription_name: StringSubscription name.
topic_name: StringTopic name to subscribe to.
ack_deadline_seconds: i64Acknowledgment deadline in seconds.
message_retention_duration: Option<i64>Message retention duration in seconds.
retain_acked_messages: boolRetain acknowledged messages.
enable_message_ordering: boolEnable message ordering.
expiration_policy: Option<ExpirationPolicy>Expiration policy.
dead_letter_policy: Option<DeadLetterPolicy>Dead letter policy.
retry_policy: Option<RetryPolicy>Retry policy.
labels: HashMap<String, String>Labels.
filter: Option<String>Filter expression.
endpoint: Option<String>Custom endpoint.
Implementations§
Source§impl SubscriptionCreateConfig
impl SubscriptionCreateConfig
Sourcepub fn new(
project_id: impl Into<String>,
subscription_name: impl Into<String>,
topic_name: impl Into<String>,
) -> Self
pub fn new( project_id: impl Into<String>, subscription_name: impl Into<String>, topic_name: impl Into<String>, ) -> Self
Creates a new subscription configuration.
Sourcepub fn with_ack_deadline(self, seconds: i64) -> Self
pub fn with_ack_deadline(self, seconds: i64) -> Self
Sets the acknowledgment deadline.
Sourcepub fn with_message_retention(self, seconds: i64) -> Self
pub fn with_message_retention(self, seconds: i64) -> Self
Sets message retention duration.
Sourcepub fn with_retain_acked_messages(self, retain: bool) -> Self
pub fn with_retain_acked_messages(self, retain: bool) -> Self
Sets whether to retain acknowledged messages.
Sourcepub fn with_message_ordering(self, enable: bool) -> Self
pub fn with_message_ordering(self, enable: bool) -> Self
Enables message ordering.
Sourcepub fn with_expiration_policy(self, policy: ExpirationPolicy) -> Self
pub fn with_expiration_policy(self, policy: ExpirationPolicy) -> Self
Sets the expiration policy.
Sourcepub fn with_dead_letter_policy(self, policy: DeadLetterPolicy) -> Self
pub fn with_dead_letter_policy(self, policy: DeadLetterPolicy) -> Self
Sets the dead letter policy.
Sourcepub fn with_retry_policy(self, policy: RetryPolicy) -> Self
pub fn with_retry_policy(self, policy: RetryPolicy) -> Self
Sets the retry policy.
Sourcepub fn with_label(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_label( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Adds a label.
Sourcepub fn with_labels(self, labels: HashMap<String, String>) -> Self
pub fn with_labels(self, labels: HashMap<String, String>) -> Self
Adds multiple labels.
Sourcepub fn with_filter(self, filter: impl Into<String>) -> Self
pub fn with_filter(self, filter: impl Into<String>) -> Self
Sets a filter expression.
Sourcepub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
Sets a custom endpoint.
Trait Implementations§
Source§impl Clone for SubscriptionCreateConfig
impl Clone for SubscriptionCreateConfig
Source§fn clone(&self) -> SubscriptionCreateConfig
fn clone(&self) -> SubscriptionCreateConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubscriptionCreateConfig
impl Debug for SubscriptionCreateConfig
Source§impl<'de> Deserialize<'de> for SubscriptionCreateConfig
impl<'de> Deserialize<'de> for SubscriptionCreateConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SubscriptionCreateConfig
impl RefUnwindSafe for SubscriptionCreateConfig
impl Send for SubscriptionCreateConfig
impl Sync for SubscriptionCreateConfig
impl Unpin for SubscriptionCreateConfig
impl UnsafeUnpin for SubscriptionCreateConfig
impl UnwindSafe for SubscriptionCreateConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request