#[non_exhaustive]pub struct CreateSnapshotRequest {
pub name: String,
pub subscription: String,
pub labels: HashMap<String, String>,
pub tags: HashMap<String, String>,
/* private fields */
}Expand description
Request for the CreateSnapshot method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. User-provided name for this snapshot. If the name is not provided
in the request, the server will assign a random name for this snapshot on
the same project as the subscription. Note that for REST API requests, you
must specify a name. See the resource name
rules.
Format is projects/{project}/snapshots/{snap}.
subscription: StringRequired. The subscription whose backlog the snapshot retains.
Specifically, the created snapshot is guaranteed to retain:
(a) The existing backlog on the subscription. More precisely, this is
defined as the messages in the subscription’s backlog that are
unacknowledged upon the successful completion of the
CreateSnapshot request; as well as:
(b) Any messages published to the subscription’s topic following the
successful completion of the CreateSnapshot request.
Format is projects/{project}/subscriptions/{sub}.
labels: HashMap<String, String>Optional. See Creating and managing labels.
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: “123/environment”: “production”, “123/costCenter”: “marketing” See https://docs.cloud.google.com/pubsub/docs/tags for more information on using tags with Pub/Sub resources.
Implementations§
Source§impl CreateSnapshotRequest
impl CreateSnapshotRequest
pub fn new() -> Self
Sourcepub fn set_subscription<T: Into<String>>(self, v: T) -> Self
pub fn set_subscription<T: Into<String>>(self, v: T) -> Self
Sets the value of subscription.
§Example
let x = CreateSnapshotRequest::new().set_subscription("example");Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for CreateSnapshotRequest
impl Clone for CreateSnapshotRequest
Source§fn clone(&self) -> CreateSnapshotRequest
fn clone(&self) -> CreateSnapshotRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateSnapshotRequest
impl Debug for CreateSnapshotRequest
Source§impl Default for CreateSnapshotRequest
impl Default for CreateSnapshotRequest
Source§fn default() -> CreateSnapshotRequest
fn default() -> CreateSnapshotRequest
Source§impl Message for CreateSnapshotRequest
impl Message for CreateSnapshotRequest
Source§impl PartialEq for CreateSnapshotRequest
impl PartialEq for CreateSnapshotRequest
impl StructuralPartialEq for CreateSnapshotRequest
Auto Trait Implementations§
impl Freeze for CreateSnapshotRequest
impl RefUnwindSafe for CreateSnapshotRequest
impl Send for CreateSnapshotRequest
impl Sync for CreateSnapshotRequest
impl Unpin for CreateSnapshotRequest
impl UnwindSafe for CreateSnapshotRequest
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
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>
T in a tonic::Request