pub struct ProjectMethods<'a, S>
where S: 'a,
{ /* private fields */ }
Expand description

A builder providing access to all methods supported on project resources. It is not used directly, but through the Pubsub hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_pubsub1_beta2 as pubsub1_beta2;
 
use std::default::Default;
use pubsub1_beta2::{Pubsub, oauth2, hyper, hyper_rustls, chrono, FieldMask};
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
        secret,
        oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = Pubsub::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `subscriptions_acknowledge(...)`, `subscriptions_create(...)`, `subscriptions_delete(...)`, `subscriptions_get(...)`, `subscriptions_get_iam_policy(...)`, `subscriptions_list(...)`, `subscriptions_modify_ack_deadline(...)`, `subscriptions_modify_push_config(...)`, `subscriptions_pull(...)`, `subscriptions_set_iam_policy(...)`, `subscriptions_test_iam_permissions(...)`, `topics_create(...)`, `topics_delete(...)`, `topics_get(...)`, `topics_get_iam_policy(...)`, `topics_list(...)`, `topics_publish(...)`, `topics_set_iam_policy(...)`, `topics_subscriptions_list(...)` and `topics_test_iam_permissions(...)`
// to build up your call.
let rb = hub.projects();

Implementations§

source§

impl<'a, S> ProjectMethods<'a, S>

source

pub fn subscriptions_acknowledge( &self, request: AcknowledgeRequest, subscription: &str ) -> ProjectSubscriptionAcknowledgeCall<'a, S>

Create a builder to help you perform the following task:

Acknowledges the messages associated with the ack_ids in the AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.

§Arguments
  • request - No description provided.
  • subscription - The subscription whose message is being acknowledged.
source

pub fn subscriptions_create( &self, request: Subscription, name: &str ) -> ProjectSubscriptionCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a subscription to a given topic. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn’t exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. Note that for REST API requests, you must specify a name.

§Arguments
  • request - No description provided.
  • name - The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}". {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
source

pub fn subscriptions_delete( &self, subscription: &str ) -> ProjectSubscriptionDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.

§Arguments
  • subscription - The subscription to delete.
source

pub fn subscriptions_get( &self, subscription: &str ) -> ProjectSubscriptionGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the configuration details of a subscription.

§Arguments
  • subscription - The name of the subscription to get.
source

pub fn subscriptions_get_iam_policy( &self, resource: &str ) -> ProjectSubscriptionGetIamPolicyCall<'a, S>

Create a builder to help you perform the following task:

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

§Arguments
  • resource - REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
source

pub fn subscriptions_list( &self, project: &str ) -> ProjectSubscriptionListCall<'a, S>

Create a builder to help you perform the following task:

Lists matching subscriptions.

§Arguments
  • project - The name of the cloud project that subscriptions belong to.
source

pub fn subscriptions_modify_ack_deadline( &self, request: ModifyAckDeadlineRequest, subscription: &str ) -> ProjectSubscriptionModifyAckDeadlineCall<'a, S>

Create a builder to help you perform the following task:

Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level ackDeadlineSeconds used for subsequent messages.

§Arguments
  • request - No description provided.
  • subscription - The name of the subscription.
source

pub fn subscriptions_modify_push_config( &self, request: ModifyPushConfigRequest, subscription: &str ) -> ProjectSubscriptionModifyPushConfigCall<'a, S>

Create a builder to help you perform the following task:

Modifies the PushConfig for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty PushConfig) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the PushConfig.

§Arguments
  • request - No description provided.
  • subscription - The name of the subscription.
source

pub fn subscriptions_pull( &self, request: PullRequest, subscription: &str ) -> ProjectSubscriptionPullCall<'a, S>

Create a builder to help you perform the following task:

Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return UNAVAILABLE if there are too many concurrent pull requests pending for the given subscription.

§Arguments
  • request - No description provided.
  • subscription - The subscription from which messages should be pulled.
source

pub fn subscriptions_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str ) -> ProjectSubscriptionSetIamPolicyCall<'a, S>

Create a builder to help you perform the following task:

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.
source

pub fn subscriptions_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str ) -> ProjectSubscriptionTestIamPermissionCall<'a, S>

Create a builder to help you perform the following task:

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.
source

pub fn topics_subscriptions_list( &self, topic: &str ) -> ProjectTopicSubscriptionListCall<'a, S>

Create a builder to help you perform the following task:

Lists the name of the subscriptions for this topic.

§Arguments
  • topic - The name of the topic that subscriptions are attached to.
source

pub fn topics_create( &self, request: Topic, name: &str ) -> ProjectTopicCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates the given topic with the given name.

§Arguments
  • request - No description provided.
  • name - The name of the topic. It must have the format "projects/{project}/topics/{topic}". {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
source

pub fn topics_delete(&self, topic: &str) -> ProjectTopicDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their topic field is set to _deleted-topic_.

§Arguments
  • topic - Name of the topic to delete.
source

pub fn topics_get(&self, topic: &str) -> ProjectTopicGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the configuration of a topic.

§Arguments
  • topic - The name of the topic to get.
source

pub fn topics_get_iam_policy( &self, resource: &str ) -> ProjectTopicGetIamPolicyCall<'a, S>

Create a builder to help you perform the following task:

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

§Arguments
  • resource - REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
source

pub fn topics_list(&self, project: &str) -> ProjectTopicListCall<'a, S>

Create a builder to help you perform the following task:

Lists matching topics.

§Arguments
  • project - The name of the cloud project that topics belong to.
source

pub fn topics_publish( &self, request: PublishRequest, topic: &str ) -> ProjectTopicPublishCall<'a, S>

Create a builder to help you perform the following task:

Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.

§Arguments
  • request - No description provided.
  • topic - The messages in the request will be published on this topic.
source

pub fn topics_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str ) -> ProjectTopicSetIamPolicyCall<'a, S>

Create a builder to help you perform the following task:

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.
source

pub fn topics_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str ) -> ProjectTopicTestIamPermissionCall<'a, S>

Create a builder to help you perform the following task:

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

Trait Implementations§

source§

impl<'a, S> MethodsBuilder for ProjectMethods<'a, S>

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for ProjectMethods<'a, S>

§

impl<'a, S> Send for ProjectMethods<'a, S>
where S: Sync,

§

impl<'a, S> Sync for ProjectMethods<'a, S>
where S: Sync,

§

impl<'a, S> Unpin for ProjectMethods<'a, S>

§

impl<'a, S> !UnwindSafe for ProjectMethods<'a, S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more