make regen-apis

This commit is contained in:
OMGeeky
2024-05-16 21:23:40 +02:00
parent 52d2e89e51
commit ad85cafeef
5108 changed files with 1615625 additions and 992044 deletions

View File

@@ -0,0 +1,276 @@
use super::*;
// region DeliveryConfigDeliveryRequirementEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// The DeliveryRequirement for this subscription.
pub enum DeliveryConfigDeliveryRequirementEnum {
/// Default value. This value is unused.
///
/// "DELIVERY_REQUIREMENT_UNSPECIFIED"
#[serde(rename="DELIVERY_REQUIREMENT_UNSPECIFIED")]
DELIVERYREQUIREMENTUNSPECIFIED,
/// The server does not wait for a published message to be successfully written to storage before delivering it to subscribers.
///
/// "DELIVER_IMMEDIATELY"
#[serde(rename="DELIVER_IMMEDIATELY")]
DELIVERIMMEDIATELY,
/// The server will not deliver a published message to subscribers until the message has been successfully written to storage. This will result in higher end-to-end latency, but consistent delivery.
///
/// "DELIVER_AFTER_STORED"
#[serde(rename="DELIVER_AFTER_STORED")]
DELIVERAFTERSTORED,
}
impl AsRef<str> for DeliveryConfigDeliveryRequirementEnum {
fn as_ref(&self) -> &str {
match *self {
DeliveryConfigDeliveryRequirementEnum::DELIVERYREQUIREMENTUNSPECIFIED => "DELIVERY_REQUIREMENT_UNSPECIFIED",
DeliveryConfigDeliveryRequirementEnum::DELIVERIMMEDIATELY => "DELIVER_IMMEDIATELY",
DeliveryConfigDeliveryRequirementEnum::DELIVERAFTERSTORED => "DELIVER_AFTER_STORED",
}
}
}
impl std::convert::TryFrom< &str> for DeliveryConfigDeliveryRequirementEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"DELIVERY_REQUIREMENT_UNSPECIFIED" => Ok(DeliveryConfigDeliveryRequirementEnum::DELIVERYREQUIREMENTUNSPECIFIED),
"DELIVER_IMMEDIATELY" => Ok(DeliveryConfigDeliveryRequirementEnum::DELIVERIMMEDIATELY),
"DELIVER_AFTER_STORED" => Ok(DeliveryConfigDeliveryRequirementEnum::DELIVERAFTERSTORED),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a DeliveryConfigDeliveryRequirementEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region ExportConfigCurrentStateEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Output only. The current state of the export, which may be different to the desired state due to errors. This field is output only.
pub enum ExportConfigCurrentStateEnum {
/// Default value. This value is unused.
///
/// "STATE_UNSPECIFIED"
#[serde(rename="STATE_UNSPECIFIED")]
STATEUNSPECIFIED,
/// Messages are being exported.
///
/// "ACTIVE"
#[serde(rename="ACTIVE")]
ACTIVE,
/// Exporting messages is suspended.
///
/// "PAUSED"
#[serde(rename="PAUSED")]
PAUSED,
/// Messages cannot be exported due to permission denied errors. Output only.
///
/// "PERMISSION_DENIED"
#[serde(rename="PERMISSION_DENIED")]
PERMISSIONDENIED,
/// Messages cannot be exported due to missing resources. Output only.
///
/// "NOT_FOUND"
#[serde(rename="NOT_FOUND")]
NOTFOUND,
}
impl AsRef<str> for ExportConfigCurrentStateEnum {
fn as_ref(&self) -> &str {
match *self {
ExportConfigCurrentStateEnum::STATEUNSPECIFIED => "STATE_UNSPECIFIED",
ExportConfigCurrentStateEnum::ACTIVE => "ACTIVE",
ExportConfigCurrentStateEnum::PAUSED => "PAUSED",
ExportConfigCurrentStateEnum::PERMISSIONDENIED => "PERMISSION_DENIED",
ExportConfigCurrentStateEnum::NOTFOUND => "NOT_FOUND",
}
}
}
impl std::convert::TryFrom< &str> for ExportConfigCurrentStateEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"STATE_UNSPECIFIED" => Ok(ExportConfigCurrentStateEnum::STATEUNSPECIFIED),
"ACTIVE" => Ok(ExportConfigCurrentStateEnum::ACTIVE),
"PAUSED" => Ok(ExportConfigCurrentStateEnum::PAUSED),
"PERMISSION_DENIED" => Ok(ExportConfigCurrentStateEnum::PERMISSIONDENIED),
"NOT_FOUND" => Ok(ExportConfigCurrentStateEnum::NOTFOUND),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ExportConfigCurrentStateEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region ExportConfigDesiredStateEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// The desired state of this export. Setting this to values other than `ACTIVE` and `PAUSED` will result in an error.
pub enum ExportConfigDesiredStateEnum {
/// Default value. This value is unused.
///
/// "STATE_UNSPECIFIED"
#[serde(rename="STATE_UNSPECIFIED")]
STATEUNSPECIFIED,
/// Messages are being exported.
///
/// "ACTIVE"
#[serde(rename="ACTIVE")]
ACTIVE,
/// Exporting messages is suspended.
///
/// "PAUSED"
#[serde(rename="PAUSED")]
PAUSED,
/// Messages cannot be exported due to permission denied errors. Output only.
///
/// "PERMISSION_DENIED"
#[serde(rename="PERMISSION_DENIED")]
PERMISSIONDENIED,
/// Messages cannot be exported due to missing resources. Output only.
///
/// "NOT_FOUND"
#[serde(rename="NOT_FOUND")]
NOTFOUND,
}
impl AsRef<str> for ExportConfigDesiredStateEnum {
fn as_ref(&self) -> &str {
match *self {
ExportConfigDesiredStateEnum::STATEUNSPECIFIED => "STATE_UNSPECIFIED",
ExportConfigDesiredStateEnum::ACTIVE => "ACTIVE",
ExportConfigDesiredStateEnum::PAUSED => "PAUSED",
ExportConfigDesiredStateEnum::PERMISSIONDENIED => "PERMISSION_DENIED",
ExportConfigDesiredStateEnum::NOTFOUND => "NOT_FOUND",
}
}
}
impl std::convert::TryFrom< &str> for ExportConfigDesiredStateEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"STATE_UNSPECIFIED" => Ok(ExportConfigDesiredStateEnum::STATEUNSPECIFIED),
"ACTIVE" => Ok(ExportConfigDesiredStateEnum::ACTIVE),
"PAUSED" => Ok(ExportConfigDesiredStateEnum::PAUSED),
"PERMISSION_DENIED" => Ok(ExportConfigDesiredStateEnum::PERMISSIONDENIED),
"NOT_FOUND" => Ok(ExportConfigDesiredStateEnum::NOTFOUND),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ExportConfigDesiredStateEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region SeekSubscriptionRequestNamedTargetEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Seek to a named position with respect to the message backlog.
pub enum SeekSubscriptionRequestNamedTargetEnum {
/// Unspecified named target. Do not use.
///
/// "NAMED_TARGET_UNSPECIFIED"
#[serde(rename="NAMED_TARGET_UNSPECIFIED")]
NAMEDTARGETUNSPECIFIED,
/// Seek to the oldest retained message.
///
/// "TAIL"
#[serde(rename="TAIL")]
TAIL,
/// Seek past all recently published messages, skipping the entire message backlog.
///
/// "HEAD"
#[serde(rename="HEAD")]
HEAD,
}
impl AsRef<str> for SeekSubscriptionRequestNamedTargetEnum {
fn as_ref(&self) -> &str {
match *self {
SeekSubscriptionRequestNamedTargetEnum::NAMEDTARGETUNSPECIFIED => "NAMED_TARGET_UNSPECIFIED",
SeekSubscriptionRequestNamedTargetEnum::TAIL => "TAIL",
SeekSubscriptionRequestNamedTargetEnum::HEAD => "HEAD",
}
}
}
impl std::convert::TryFrom< &str> for SeekSubscriptionRequestNamedTargetEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"NAMED_TARGET_UNSPECIFIED" => Ok(SeekSubscriptionRequestNamedTargetEnum::NAMEDTARGETUNSPECIFIED),
"TAIL" => Ok(SeekSubscriptionRequestNamedTargetEnum::TAIL),
"HEAD" => Ok(SeekSubscriptionRequestNamedTargetEnum::HEAD),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a SeekSubscriptionRequestNamedTargetEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion

View File

@@ -0,0 +1,119 @@
use super::*;
/// Central instance to access all PubsubLite related resource activities
///
/// # Examples
///
/// Instantiate a new hub
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_pubsublite1 as pubsublite1;
/// use pubsublite1::api::CancelOperationRequest;
/// use pubsublite1::{Result, Error};
/// use pubsublite1::api::enums::*;
/// # async fn dox() {
/// use std::default::Default;
/// use pubsublite1::{PubsubLite, oauth2, hyper, hyper_rustls, chrono, FieldMask};
///
/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and
/// // `client_secret`, among other things.
/// let secret: oauth2::ApplicationSecret = Default::default();
/// // Instantiate the authenticator. It will choose a suitable authentication flow for you,
/// // unless you replace `None` with the desired Flow.
/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
/// // retrieve them from storage.
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
/// secret,
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// ).build().await.unwrap();
/// let mut hub = PubsubLite::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
/// // As the method needs a request, you would usually fill it with the desired information
/// // into the respective structure. Some of the parts shown here might not be applicable !
/// // Values shown here are possibly random and not representative !
/// let mut req = CancelOperationRequest::default();
///
/// // You can configure optional parameters by calling the respective setters at will, and
/// // execute the final call using `doit()`.
/// // Values shown here are possibly random and not representative !
/// let result = hub.admin().projects_locations_operations_cancel(req, "name")
/// .doit().await;
///
/// match result {
/// Err(e) => match e {
/// // The Error enum provides details about what exactly happened.
/// // You can also just use its `Debug`, `Display` or `Error` traits
/// Error::HttpError(_)
/// |Error::Io(_)
/// |Error::MissingAPIKey
/// |Error::MissingToken(_)
/// |Error::Cancelled
/// |Error::UploadSizeLimitExceeded(_, _)
/// |Error::Failure(_)
/// |Error::BadRequest(_)
/// |Error::FieldClash(_)
/// |Error::JsonDecodeError(_, _) => println!("{}", e),
/// },
/// Ok(res) => println!("Success: {:?}", res),
/// }
/// # }
/// ```
#[derive(Clone)]
pub struct PubsubLite<S> {
pub client: hyper::Client<S, hyper::body::Body>,
pub auth: Box<dyn client::GetToken>,
pub(super) _user_agent: String,
pub(super) _base_url: String,
pub(super) _root_url: String,
}
impl<'a, S> client::Hub for PubsubLite<S> {}
impl<'a, S> PubsubLite<S> {
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> PubsubLite<S> {
PubsubLite {
client,
auth: Box::new(auth),
_user_agent: "google-api-rust-client/5.0.5".to_string(),
_base_url: "https://pubsublite.googleapis.com/".to_string(),
_root_url: "https://pubsublite.googleapis.com/".to_string(),
}
}
pub fn admin(&'a self) -> AdminMethods<'a, S> {
AdminMethods { hub: &self }
}
pub fn cursor(&'a self) -> CursorMethods<'a, S> {
CursorMethods { hub: &self }
}
pub fn topic_stats(&'a self) -> TopicStatMethods<'a, S> {
TopicStatMethods { hub: &self }
}
/// Set the user-agent header field to use in all requests to the server.
/// It defaults to `google-api-rust-client/5.0.5`.
///
/// Returns the previously set user-agent.
pub fn user_agent(&mut self, agent_name: String) -> String {
mem::replace(&mut self._user_agent, agent_name)
}
/// Set the base url to use in all requests to the server.
/// It defaults to `https://pubsublite.googleapis.com/`.
///
/// Returns the previously set base url.
pub fn base_url(&mut self, new_base_url: String) -> String {
mem::replace(&mut self._base_url, new_base_url)
}
/// Set the root url to use in all requests to the server.
/// It defaults to `https://pubsublite.googleapis.com/`.
///
/// Returns the previously set root url.
pub fn root_url(&mut self, new_root_url: String) -> String {
mem::replace(&mut self._root_url, new_root_url)
}
}

View File

@@ -0,0 +1,646 @@
use super::*;
/// A builder providing access to all methods supported on *admin* resources.
/// It is not used directly, but through the [`PubsubLite`] hub.
///
/// # Example
///
/// Instantiate a resource builder
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_pubsublite1 as pubsublite1;
///
/// # async fn dox() {
/// use std::default::Default;
/// use pubsublite1::{PubsubLite, 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 = PubsubLite::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
/// // like `projects_locations_operations_cancel(...)`, `projects_locations_operations_delete(...)`, `projects_locations_operations_get(...)`, `projects_locations_operations_list(...)`, `projects_locations_reservations_create(...)`, `projects_locations_reservations_delete(...)`, `projects_locations_reservations_get(...)`, `projects_locations_reservations_list(...)`, `projects_locations_reservations_patch(...)`, `projects_locations_reservations_topics_list(...)`, `projects_locations_subscriptions_create(...)`, `projects_locations_subscriptions_delete(...)`, `projects_locations_subscriptions_get(...)`, `projects_locations_subscriptions_list(...)`, `projects_locations_subscriptions_patch(...)`, `projects_locations_subscriptions_seek(...)`, `projects_locations_topics_create(...)`, `projects_locations_topics_delete(...)`, `projects_locations_topics_get(...)`, `projects_locations_topics_get_partitions(...)`, `projects_locations_topics_list(...)`, `projects_locations_topics_patch(...)` and `projects_locations_topics_subscriptions_list(...)`
/// // to build up your call.
/// let rb = hub.admin();
/// # }
/// ```
pub struct AdminMethods<'a, S>
where S: 'a {
pub(super) hub: &'a PubsubLite<S>,
}
impl<'a, S> client::MethodsBuilder for AdminMethods<'a, S> {}
impl<'a, S> AdminMethods<'a, S> {
/// Create a builder to help you perform the following task:
///
/// Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - The name of the operation resource to be cancelled.
pub fn projects_locations_operations_cancel(&self, request: CancelOperationRequest, name: &str) -> AdminProjectLocationOperationCancelCall<'a, S> {
AdminProjectLocationOperationCancelCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
///
/// # Arguments
///
/// * `name` - The name of the operation resource to be deleted.
pub fn projects_locations_operations_delete(&self, name: &str) -> AdminProjectLocationOperationDeleteCall<'a, S> {
AdminProjectLocationOperationDeleteCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
///
/// # Arguments
///
/// * `name` - The name of the operation resource.
pub fn projects_locations_operations_get(&self, name: &str) -> AdminProjectLocationOperationGetCall<'a, S> {
AdminProjectLocationOperationGetCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
///
/// # Arguments
///
/// * `name` - The name of the operation's parent resource.
pub fn projects_locations_operations_list(&self, name: &str) -> AdminProjectLocationOperationListCall<'a, S> {
AdminProjectLocationOperationListCall {
hub: self.hub,
_name: name.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_filter: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Lists the topics attached to the specified reservation.
///
/// # Arguments
///
/// * `name` - Required. The name of the reservation whose topics to list. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
pub fn projects_locations_reservations_topics_list(&self, name: &str) -> AdminProjectLocationReservationTopicListCall<'a, S> {
AdminProjectLocationReservationTopicListCall {
hub: self.hub,
_name: name.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Creates a new reservation.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. The parent location in which to create the reservation. Structured like `projects/{project_number}/locations/{location}`.
pub fn projects_locations_reservations_create(&self, request: Reservation, parent: &str) -> AdminProjectLocationReservationCreateCall<'a, S> {
AdminProjectLocationReservationCreateCall {
hub: self.hub,
_request: request,
_parent: parent.to_string(),
_reservation_id: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Deletes the specified reservation.
///
/// # Arguments
///
/// * `name` - Required. The name of the reservation to delete. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
pub fn projects_locations_reservations_delete(&self, name: &str) -> AdminProjectLocationReservationDeleteCall<'a, S> {
AdminProjectLocationReservationDeleteCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns the reservation configuration.
///
/// # Arguments
///
/// * `name` - Required. The name of the reservation whose configuration to return. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
pub fn projects_locations_reservations_get(&self, name: &str) -> AdminProjectLocationReservationGetCall<'a, S> {
AdminProjectLocationReservationGetCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns the list of reservations for the given project.
///
/// # Arguments
///
/// * `parent` - Required. The parent whose reservations are to be listed. Structured like `projects/{project_number}/locations/{location}`.
pub fn projects_locations_reservations_list(&self, parent: &str) -> AdminProjectLocationReservationListCall<'a, S> {
AdminProjectLocationReservationListCall {
hub: self.hub,
_parent: parent.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Updates properties of the specified reservation.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
pub fn projects_locations_reservations_patch(&self, request: Reservation, name: &str) -> AdminProjectLocationReservationPatchCall<'a, S> {
AdminProjectLocationReservationPatchCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_update_mask: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Creates a new subscription.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. The parent location in which to create the subscription. Structured like `projects/{project_number}/locations/{location}`.
pub fn projects_locations_subscriptions_create(&self, request: Subscription, parent: &str) -> AdminProjectLocationSubscriptionCreateCall<'a, S> {
AdminProjectLocationSubscriptionCreateCall {
hub: self.hub,
_request: request,
_parent: parent.to_string(),
_subscription_id: Default::default(),
_skip_backlog: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Deletes the specified subscription.
///
/// # Arguments
///
/// * `name` - Required. The name of the subscription to delete.
pub fn projects_locations_subscriptions_delete(&self, name: &str) -> AdminProjectLocationSubscriptionDeleteCall<'a, S> {
AdminProjectLocationSubscriptionDeleteCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns the subscription configuration.
///
/// # Arguments
///
/// * `name` - Required. The name of the subscription whose configuration to return.
pub fn projects_locations_subscriptions_get(&self, name: &str) -> AdminProjectLocationSubscriptionGetCall<'a, S> {
AdminProjectLocationSubscriptionGetCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns the list of subscriptions for the given project.
///
/// # Arguments
///
/// * `parent` - Required. The parent whose subscriptions are to be listed. Structured like `projects/{project_number}/locations/{location}`.
pub fn projects_locations_subscriptions_list(&self, parent: &str) -> AdminProjectLocationSubscriptionListCall<'a, S> {
AdminProjectLocationSubscriptionListCall {
hub: self.hub,
_parent: parent.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Updates properties of the specified subscription.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - The name of the subscription. Structured like: projects/{project_number}/locations/{location}/subscriptions/{subscription_id}
pub fn projects_locations_subscriptions_patch(&self, request: Subscription, name: &str) -> AdminProjectLocationSubscriptionPatchCall<'a, S> {
AdminProjectLocationSubscriptionPatchCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_update_mask: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Performs an out-of-band seek for a subscription to a specified target, which may be timestamps or named positions within the message backlog. Seek translates these targets to cursors for each partition and orchestrates subscribers to start consuming messages from these seek cursors. If an operation is returned, the seek has been registered and subscribers will eventually receive messages from the seek cursors (i.e. eventual consistency), as long as they are using a minimum supported client library version and not a system that tracks cursors independently of Pub/Sub Lite (e.g. Apache Beam, Dataflow, Spark). The seek operation will fail for unsupported clients. If clients would like to know when subscribers react to the seek (or not), they can poll the operation. The seek operation will succeed and complete once subscribers are ready to receive messages from the seek cursors for all partitions of the topic. This means that the seek operation will not complete until all subscribers come online. If the previous seek operation has not yet completed, it will be aborted and the new invocation of seek will supersede it.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Required. The name of the subscription to seek.
pub fn projects_locations_subscriptions_seek(&self, request: SeekSubscriptionRequest, name: &str) -> AdminProjectLocationSubscriptionSeekCall<'a, S> {
AdminProjectLocationSubscriptionSeekCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Lists the subscriptions attached to the specified topic.
///
/// # Arguments
///
/// * `name` - Required. The name of the topic whose subscriptions to list.
pub fn projects_locations_topics_subscriptions_list(&self, name: &str) -> AdminProjectLocationTopicSubscriptionListCall<'a, S> {
AdminProjectLocationTopicSubscriptionListCall {
hub: self.hub,
_name: name.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Creates a new topic.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. The parent location in which to create the topic. Structured like `projects/{project_number}/locations/{location}`.
pub fn projects_locations_topics_create(&self, request: Topic, parent: &str) -> AdminProjectLocationTopicCreateCall<'a, S> {
AdminProjectLocationTopicCreateCall {
hub: self.hub,
_request: request,
_parent: parent.to_string(),
_topic_id: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Deletes the specified topic.
///
/// # Arguments
///
/// * `name` - Required. The name of the topic to delete.
pub fn projects_locations_topics_delete(&self, name: &str) -> AdminProjectLocationTopicDeleteCall<'a, S> {
AdminProjectLocationTopicDeleteCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns the topic configuration.
///
/// # Arguments
///
/// * `name` - Required. The name of the topic whose configuration to return.
pub fn projects_locations_topics_get(&self, name: &str) -> AdminProjectLocationTopicGetCall<'a, S> {
AdminProjectLocationTopicGetCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns the partition information for the requested topic.
///
/// # Arguments
///
/// * `name` - Required. The topic whose partition information to return.
pub fn projects_locations_topics_get_partitions(&self, name: &str) -> AdminProjectLocationTopicGetPartitionCall<'a, S> {
AdminProjectLocationTopicGetPartitionCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns the list of topics for the given project.
///
/// # Arguments
///
/// * `parent` - Required. The parent whose topics are to be listed. Structured like `projects/{project_number}/locations/{location}`.
pub fn projects_locations_topics_list(&self, parent: &str) -> AdminProjectLocationTopicListCall<'a, S> {
AdminProjectLocationTopicListCall {
hub: self.hub,
_parent: parent.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Updates properties of the specified topic.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - The name of the topic. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}
pub fn projects_locations_topics_patch(&self, request: Topic, name: &str) -> AdminProjectLocationTopicPatchCall<'a, S> {
AdminProjectLocationTopicPatchCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_update_mask: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
}
/// A builder providing access to all methods supported on *cursor* resources.
/// It is not used directly, but through the [`PubsubLite`] hub.
///
/// # Example
///
/// Instantiate a resource builder
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_pubsublite1 as pubsublite1;
///
/// # async fn dox() {
/// use std::default::Default;
/// use pubsublite1::{PubsubLite, 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 = PubsubLite::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
/// // like `projects_locations_subscriptions_commit_cursor(...)` and `projects_locations_subscriptions_cursors_list(...)`
/// // to build up your call.
/// let rb = hub.cursor();
/// # }
/// ```
pub struct CursorMethods<'a, S>
where S: 'a {
pub(super) hub: &'a PubsubLite<S>,
}
impl<'a, S> client::MethodsBuilder for CursorMethods<'a, S> {}
impl<'a, S> CursorMethods<'a, S> {
/// Create a builder to help you perform the following task:
///
/// Returns all committed cursor information for a subscription.
///
/// # Arguments
///
/// * `parent` - Required. The subscription for which to retrieve cursors. Structured like `projects/{project_number}/locations/{location}/subscriptions/{subscription_id}`.
pub fn projects_locations_subscriptions_cursors_list(&self, parent: &str) -> CursorProjectLocationSubscriptionCursorListCall<'a, S> {
CursorProjectLocationSubscriptionCursorListCall {
hub: self.hub,
_parent: parent.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Updates the committed cursor.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `subscription` - The subscription for which to update the cursor.
pub fn projects_locations_subscriptions_commit_cursor(&self, request: CommitCursorRequest, subscription: &str) -> CursorProjectLocationSubscriptionCommitCursorCall<'a, S> {
CursorProjectLocationSubscriptionCommitCursorCall {
hub: self.hub,
_request: request,
_subscription: subscription.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
}
/// A builder providing access to all methods supported on *topicStat* resources.
/// It is not used directly, but through the [`PubsubLite`] hub.
///
/// # Example
///
/// Instantiate a resource builder
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_pubsublite1 as pubsublite1;
///
/// # async fn dox() {
/// use std::default::Default;
/// use pubsublite1::{PubsubLite, 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 = PubsubLite::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
/// // like `projects_locations_topics_compute_head_cursor(...)`, `projects_locations_topics_compute_message_stats(...)` and `projects_locations_topics_compute_time_cursor(...)`
/// // to build up your call.
/// let rb = hub.topic_stats();
/// # }
/// ```
pub struct TopicStatMethods<'a, S>
where S: 'a {
pub(super) hub: &'a PubsubLite<S>,
}
impl<'a, S> client::MethodsBuilder for TopicStatMethods<'a, S> {}
impl<'a, S> TopicStatMethods<'a, S> {
/// Create a builder to help you perform the following task:
///
/// Compute the head cursor for the partition. The head cursor's offset is guaranteed to be less than or equal to all messages which have not yet been acknowledged as published, and greater than the offset of any message whose publish has already been acknowledged. It is zero if there have never been messages in the partition.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `topic` - Required. The topic for which we should compute the head cursor.
pub fn projects_locations_topics_compute_head_cursor(&self, request: ComputeHeadCursorRequest, topic: &str) -> TopicStatProjectLocationTopicComputeHeadCursorCall<'a, S> {
TopicStatProjectLocationTopicComputeHeadCursorCall {
hub: self.hub,
_request: request,
_topic: topic.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Compute statistics about a range of messages in a given topic and partition.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `topic` - Required. The topic for which we should compute message stats.
pub fn projects_locations_topics_compute_message_stats(&self, request: ComputeMessageStatsRequest, topic: &str) -> TopicStatProjectLocationTopicComputeMessageStatCall<'a, S> {
TopicStatProjectLocationTopicComputeMessageStatCall {
hub: self.hub,
_request: request,
_topic: topic.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Compute the corresponding cursor for a publish or event time in a topic partition.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `topic` - Required. The topic for which we should compute the cursor.
pub fn projects_locations_topics_compute_time_cursor(&self, request: ComputeTimeCursorRequest, topic: &str) -> TopicStatProjectLocationTopicComputeTimeCursorCall<'a, S> {
TopicStatProjectLocationTopicComputeTimeCursorCall {
hub: self.hub,
_request: request,
_topic: topic.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
}

View File

@@ -0,0 +1,35 @@
use std::collections::HashMap;
use std::cell::RefCell;
use std::default::Default;
use std::collections::BTreeSet;
use std::error::Error as StdError;
use serde_json as json;
use std::io;
use std::fs;
use std::mem;
use hyper::client::connect;
use tokio::io::{AsyncRead, AsyncWrite};
use tokio::time::sleep;
use tower_service;
use serde::{Serialize, Deserialize};
use crate::{client, client::GetToken, client::serde_with};
mod utilities;
pub use utilities::*;
mod hub;
pub use hub::*;
mod schemas;
pub use schemas::*;
mod method_builders;
pub use method_builders::*;
mod call_builders;
pub use call_builders::*;
pub mod enums;
pub(crate) use enums::*;

View File

@@ -0,0 +1,764 @@
use super::*;
/// The request message for Operations.CancelOperation.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations operations cancel admin](AdminProjectLocationOperationCancelCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct CancelOperationRequest { _never_set: Option<bool> }
impl client::RequestValue for CancelOperationRequest {}
/// The throughput capacity configuration for each partition.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Capacity {
/// Publish throughput capacity per partition in MiB/s. Must be >= 4 and <= 16.
#[serde(rename="publishMibPerSec")]
pub publish_mib_per_sec: Option<i32>,
/// Subscribe throughput capacity per partition in MiB/s. Must be >= 4 and <= 32.
#[serde(rename="subscribeMibPerSec")]
pub subscribe_mib_per_sec: Option<i32>,
}
impl client::Part for Capacity {}
/// Request for CommitCursor.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations subscriptions commit cursor cursor](CursorProjectLocationSubscriptionCommitCursorCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct CommitCursorRequest {
/// The new value for the committed cursor.
pub cursor: Option<Cursor>,
/// The partition for which to update the cursor. Partitions are zero indexed, so `partition` must be in the range [0, topic.num_partitions).
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub partition: Option<i64>,
}
impl client::RequestValue for CommitCursorRequest {}
/// Response for CommitCursor.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations subscriptions commit cursor cursor](CursorProjectLocationSubscriptionCommitCursorCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct CommitCursorResponse { _never_set: Option<bool> }
impl client::ResponseResult for CommitCursorResponse {}
/// Compute the current head cursor for a partition.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics compute head cursor topic stats](TopicStatProjectLocationTopicComputeHeadCursorCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ComputeHeadCursorRequest {
/// Required. The partition for which we should compute the head cursor.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub partition: Option<i64>,
}
impl client::RequestValue for ComputeHeadCursorRequest {}
/// Response containing the head cursor for the requested topic and partition.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics compute head cursor topic stats](TopicStatProjectLocationTopicComputeHeadCursorCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ComputeHeadCursorResponse {
/// The head cursor.
#[serde(rename="headCursor")]
pub head_cursor: Option<Cursor>,
}
impl client::ResponseResult for ComputeHeadCursorResponse {}
/// Compute statistics about a range of messages in a given topic and partition.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics compute message stats topic stats](TopicStatProjectLocationTopicComputeMessageStatCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ComputeMessageStatsRequest {
/// The exclusive end of the range. The range is empty if end_cursor <= start_cursor. Specifying a start_cursor before the first message and an end_cursor after the last message will retrieve all messages.
#[serde(rename="endCursor")]
pub end_cursor: Option<Cursor>,
/// Required. The partition for which we should compute message stats.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub partition: Option<i64>,
/// The inclusive start of the range.
#[serde(rename="startCursor")]
pub start_cursor: Option<Cursor>,
}
impl client::RequestValue for ComputeMessageStatsRequest {}
/// Response containing stats for messages in the requested topic and partition.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics compute message stats topic stats](TopicStatProjectLocationTopicComputeMessageStatCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ComputeMessageStatsResponse {
/// The number of quota bytes accounted to these messages.
#[serde(rename="messageBytes")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub message_bytes: Option<i64>,
/// The count of messages.
#[serde(rename="messageCount")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub message_count: Option<i64>,
/// The minimum event timestamp across these messages. For the purposes of this computation, if a message does not have an event time, we use the publish time. The timestamp will be unset if there are no messages.
#[serde(rename="minimumEventTime")]
pub minimum_event_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
/// The minimum publish timestamp across these messages. Note that publish timestamps within a partition are not guaranteed to be non-decreasing. The timestamp will be unset if there are no messages.
#[serde(rename="minimumPublishTime")]
pub minimum_publish_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
}
impl client::ResponseResult for ComputeMessageStatsResponse {}
/// Compute the corresponding cursor for a publish or event time in a topic partition.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics compute time cursor topic stats](TopicStatProjectLocationTopicComputeTimeCursorCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ComputeTimeCursorRequest {
/// Required. The partition for which we should compute the cursor.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub partition: Option<i64>,
/// Required. The target publish or event time. Specifying a future time will return an unset cursor.
pub target: Option<TimeTarget>,
}
impl client::RequestValue for ComputeTimeCursorRequest {}
/// Response containing the cursor corresponding to a publish or event time in a topic partition.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics compute time cursor topic stats](TopicStatProjectLocationTopicComputeTimeCursorCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ComputeTimeCursorResponse {
/// If present, the cursor references the first message with time greater than or equal to the specified target time. If such a message cannot be found, the cursor will be unset (i.e. `cursor` is not present).
pub cursor: Option<Cursor>,
}
impl client::ResponseResult for ComputeTimeCursorResponse {}
/// A cursor that describes the position of a message within a topic partition.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Cursor {
/// The offset of a message within a topic partition. Must be greater than or equal 0.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub offset: Option<i64>,
}
impl client::Part for Cursor {}
/// The settings for a subscription's message delivery.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct DeliveryConfig {
/// The DeliveryRequirement for this subscription.
#[serde(rename="deliveryRequirement")]
pub delivery_requirement: Option<DeliveryConfigDeliveryRequirementEnum>,
}
impl client::Part for DeliveryConfig {}
/// A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations operations cancel admin](AdminProjectLocationOperationCancelCall) (response)
/// * [projects locations operations delete admin](AdminProjectLocationOperationDeleteCall) (response)
/// * [projects locations reservations delete admin](AdminProjectLocationReservationDeleteCall) (response)
/// * [projects locations subscriptions delete admin](AdminProjectLocationSubscriptionDeleteCall) (response)
/// * [projects locations topics delete admin](AdminProjectLocationTopicDeleteCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Empty { _never_set: Option<bool> }
impl client::ResponseResult for Empty {}
/// Configuration for a Pub/Sub Lite subscription that writes messages to a destination. User subscriber clients must not connect to this subscription.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ExportConfig {
/// Output only. The current state of the export, which may be different to the desired state due to errors. This field is output only.
#[serde(rename="currentState")]
pub current_state: Option<ExportConfigCurrentStateEnum>,
/// Optional. The name of an optional Pub/Sub Lite topic to publish messages that can not be exported to the destination. For example, the message can not be published to the Pub/Sub service because it does not satisfy the constraints documented at https://cloud.google.com/pubsub/docs/publisher. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}. Must be within the same project and location as the subscription. The topic may be changed or removed.
#[serde(rename="deadLetterTopic")]
pub dead_letter_topic: Option<String>,
/// The desired state of this export. Setting this to values other than `ACTIVE` and `PAUSED` will result in an error.
#[serde(rename="desiredState")]
pub desired_state: Option<ExportConfigDesiredStateEnum>,
/// Messages are automatically written from the Pub/Sub Lite topic associated with this subscription to a Pub/Sub topic.
#[serde(rename="pubsubConfig")]
pub pubsub_config: Option<PubSubConfig>,
}
impl client::Part for ExportConfig {}
/// The response message for Operations.ListOperations.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations operations list admin](AdminProjectLocationOperationListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListOperationsResponse {
/// The standard List next-page token.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// A list of operations that matches the specified filter in the request.
pub operations: Option<Vec<Operation>>,
}
impl client::ResponseResult for ListOperationsResponse {}
/// Response for ListPartitionCursors
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations subscriptions cursors list cursor](CursorProjectLocationSubscriptionCursorListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListPartitionCursorsResponse {
/// A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// The partition cursors from this request.
#[serde(rename="partitionCursors")]
pub partition_cursors: Option<Vec<PartitionCursor>>,
}
impl client::ResponseResult for ListPartitionCursorsResponse {}
/// Response for ListReservationTopics.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations reservations topics list admin](AdminProjectLocationReservationTopicListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListReservationTopicsResponse {
/// A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// The names of topics attached to the reservation. The order of the topics is unspecified.
pub topics: Option<Vec<String>>,
}
impl client::ResponseResult for ListReservationTopicsResponse {}
/// Response for ListReservations.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations reservations list admin](AdminProjectLocationReservationListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListReservationsResponse {
/// A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// The list of reservation in the requested parent. The order of the reservations is unspecified.
pub reservations: Option<Vec<Reservation>>,
}
impl client::ResponseResult for ListReservationsResponse {}
/// Response for ListSubscriptions.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations subscriptions list admin](AdminProjectLocationSubscriptionListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListSubscriptionsResponse {
/// A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// The list of subscriptions in the requested parent. The order of the subscriptions is unspecified.
pub subscriptions: Option<Vec<Subscription>>,
}
impl client::ResponseResult for ListSubscriptionsResponse {}
/// Response for ListTopicSubscriptions.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics subscriptions list admin](AdminProjectLocationTopicSubscriptionListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListTopicSubscriptionsResponse {
/// A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// The names of subscriptions attached to the topic. The order of the subscriptions is unspecified.
pub subscriptions: Option<Vec<String>>,
}
impl client::ResponseResult for ListTopicSubscriptionsResponse {}
/// Response for ListTopics.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics list admin](AdminProjectLocationTopicListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListTopicsResponse {
/// A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// The list of topic in the requested parent. The order of the topics is unspecified.
pub topics: Option<Vec<Topic>>,
}
impl client::ResponseResult for ListTopicsResponse {}
/// This resource represents a long-running operation that is the result of a network API call.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations operations get admin](AdminProjectLocationOperationGetCall) (response)
/// * [projects locations subscriptions seek admin](AdminProjectLocationSubscriptionSeekCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Operation {
/// If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
pub done: Option<bool>,
/// The error result of the operation in case of failure or cancellation.
pub error: Option<Status>,
/// Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
pub metadata: Option<HashMap<String, json::Value>>,
/// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
pub name: Option<String>,
/// The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
pub response: Option<HashMap<String, json::Value>>,
}
impl client::ResponseResult for Operation {}
/// The settings for a topic's partitions.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct PartitionConfig {
/// The capacity configuration.
pub capacity: Option<Capacity>,
/// The number of partitions in the topic. Must be at least 1. Once a topic has been created the number of partitions can be increased but not decreased. Message ordering is not guaranteed across a topic resize. For more information see https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub count: Option<i64>,
/// DEPRECATED: Use capacity instead which can express a superset of configurations. Every partition in the topic is allocated throughput equivalent to `scale` times the standard partition throughput (4 MiB/s). This is also reflected in the cost of this topic; a topic with `scale` of 2 and count of 10 is charged for 20 partitions. This value must be in the range [1,4].
pub scale: Option<i32>,
}
impl client::Part for PartitionConfig {}
/// A pair of a Cursor and the partition it is for.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct PartitionCursor {
/// The value of the cursor.
pub cursor: Option<Cursor>,
/// The partition this is for.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub partition: Option<i64>,
}
impl client::Part for PartitionCursor {}
/// Configuration for exporting to a Pub/Sub topic.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct PubSubConfig {
/// The name of the Pub/Sub topic. Structured like: projects/{project_number}/topics/{topic_id}. The topic may be changed.
pub topic: Option<String>,
}
impl client::Part for PubSubConfig {}
/// Metadata about a reservation resource.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations reservations create admin](AdminProjectLocationReservationCreateCall) (request|response)
/// * [projects locations reservations get admin](AdminProjectLocationReservationGetCall) (response)
/// * [projects locations reservations patch admin](AdminProjectLocationReservationPatchCall) (request|response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Reservation {
/// The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
pub name: Option<String>,
/// The reserved throughput capacity. Every unit of throughput capacity is equivalent to 1 MiB/s of published messages or 2 MiB/s of subscribed messages. Any topics which are declared as using capacity from a Reservation will consume resources from this reservation instead of being charged individually.
#[serde(rename="throughputCapacity")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub throughput_capacity: Option<i64>,
}
impl client::RequestValue for Reservation {}
impl client::ResponseResult for Reservation {}
/// The settings for this topic's Reservation usage.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ReservationConfig {
/// The Reservation to use for this topic's throughput capacity. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
#[serde(rename="throughputReservation")]
pub throughput_reservation: Option<String>,
}
impl client::Part for ReservationConfig {}
/// The settings for a topic's message retention.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct RetentionConfig {
/// The provisioned storage, in bytes, per partition. If the number of bytes stored in any of the topic's partitions grows beyond this value, older messages will be dropped to make room for newer ones, regardless of the value of `period`.
#[serde(rename="perPartitionBytes")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub per_partition_bytes: Option<i64>,
/// How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below `per_partition_bytes`.
#[serde_as(as = "Option<::client::serde::duration::Wrapper>")]
pub period: Option<client::chrono::Duration>,
}
impl client::Part for RetentionConfig {}
/// Request for SeekSubscription.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations subscriptions seek admin](AdminProjectLocationSubscriptionSeekCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct SeekSubscriptionRequest {
/// Seek to a named position with respect to the message backlog.
#[serde(rename="namedTarget")]
pub named_target: Option<SeekSubscriptionRequestNamedTargetEnum>,
/// Seek to the first message whose publish or event time is greater than or equal to the specified query time. If no such message can be located, will seek to the end of the message backlog.
#[serde(rename="timeTarget")]
pub time_target: Option<TimeTarget>,
}
impl client::RequestValue for SeekSubscriptionRequest {}
/// The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Status {
/// The status code, which should be an enum value of google.rpc.Code.
pub code: Option<i32>,
/// A list of messages that carry the error details. There is a common set of message types for APIs to use.
pub details: Option<Vec<HashMap<String, json::Value>>>,
/// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
pub message: Option<String>,
}
impl client::Part for Status {}
/// Metadata about a subscription resource.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations subscriptions create admin](AdminProjectLocationSubscriptionCreateCall) (request|response)
/// * [projects locations subscriptions get admin](AdminProjectLocationSubscriptionGetCall) (response)
/// * [projects locations subscriptions patch admin](AdminProjectLocationSubscriptionPatchCall) (request|response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Subscription {
/// The settings for this subscription's message delivery.
#[serde(rename="deliveryConfig")]
pub delivery_config: Option<DeliveryConfig>,
/// If present, messages are automatically written from the Pub/Sub Lite topic associated with this subscription to a destination.
#[serde(rename="exportConfig")]
pub export_config: Option<ExportConfig>,
/// The name of the subscription. Structured like: projects/{project_number}/locations/{location}/subscriptions/{subscription_id}
pub name: Option<String>,
/// The name of the topic this subscription is attached to. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}
pub topic: Option<String>,
}
impl client::RequestValue for Subscription {}
impl client::ResponseResult for Subscription {}
/// A target publish or event time. Can be used for seeking to or retrieving the corresponding cursor.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct TimeTarget {
/// Request the cursor of the first message with event time greater than or equal to `event_time`. If messages are missing an event time, the publish time is used as a fallback. As event times are user supplied, subsequent messages may have event times less than `event_time` and should be filtered by the client, if necessary.
#[serde(rename="eventTime")]
pub event_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
/// Request the cursor of the first message with publish time greater than or equal to `publish_time`. All messages thereafter are guaranteed to have publish times >= `publish_time`.
#[serde(rename="publishTime")]
pub publish_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
}
impl client::Part for TimeTarget {}
/// Metadata about a topic resource.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics create admin](AdminProjectLocationTopicCreateCall) (request|response)
/// * [projects locations topics get admin](AdminProjectLocationTopicGetCall) (response)
/// * [projects locations topics patch admin](AdminProjectLocationTopicPatchCall) (request|response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Topic {
/// The name of the topic. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}
pub name: Option<String>,
/// The settings for this topic's partitions.
#[serde(rename="partitionConfig")]
pub partition_config: Option<PartitionConfig>,
/// The settings for this topic's Reservation usage.
#[serde(rename="reservationConfig")]
pub reservation_config: Option<ReservationConfig>,
/// The settings for this topic's message retention.
#[serde(rename="retentionConfig")]
pub retention_config: Option<RetentionConfig>,
}
impl client::RequestValue for Topic {}
impl client::ResponseResult for Topic {}
/// Response for GetTopicPartitions.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [projects locations topics get partitions admin](AdminProjectLocationTopicGetPartitionCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct TopicPartitions {
/// The number of partitions in the topic.
#[serde(rename="partitionCount")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub partition_count: Option<i64>,
}
impl client::ResponseResult for TopicPartitions {}

View File

@@ -0,0 +1,24 @@
use super::*;
/// Identifies the an OAuth2 authorization scope.
/// A scope is needed when requesting an
/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
#[derive(PartialEq, Eq, Hash, Debug, Clone)]
pub enum Scope {
/// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
CloudPlatform,
}
impl AsRef<str> for Scope {
fn as_ref(&self) -> &str {
match *self {
Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
}
}
}
impl Default for Scope {
fn default() -> Scope {
Scope::CloudPlatform
}
}

View File

@@ -2,14 +2,14 @@
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
// DO NOT EDIT !
//! This documentation was generated from *PubsubLite* crate version *5.0.4+20240224*, where *20240224* is the exact revision of the *pubsublite:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
//! This documentation was generated from *PubsubLite* crate version *5.0.5+20240412*, where *20240412* is the exact revision of the *pubsublite:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
//!
//! Everything else about the *PubsubLite* *v1* API can be found at the
//! [official documentation site](https://cloud.google.com/pubsub/lite/docs).
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/pubsublite1).
//! # Features
//!
//! Handle the following *Resources* with ease from the central [hub](PubsubLite) ...
//! Handle the following *Resources* with ease from the central [hub](PubsubLite) ...
//!
//! * admin
//! * [*projects locations operations cancel*](api::AdminProjectLocationOperationCancelCall), [*projects locations operations delete*](api::AdminProjectLocationOperationDeleteCall), [*projects locations operations get*](api::AdminProjectLocationOperationGetCall), [*projects locations operations list*](api::AdminProjectLocationOperationListCall), [*projects locations reservations create*](api::AdminProjectLocationReservationCreateCall), [*projects locations reservations delete*](api::AdminProjectLocationReservationDeleteCall), [*projects locations reservations get*](api::AdminProjectLocationReservationGetCall), [*projects locations reservations list*](api::AdminProjectLocationReservationListCall), [*projects locations reservations patch*](api::AdminProjectLocationReservationPatchCall), [*projects locations reservations topics list*](api::AdminProjectLocationReservationTopicListCall), [*projects locations subscriptions create*](api::AdminProjectLocationSubscriptionCreateCall), [*projects locations subscriptions delete*](api::AdminProjectLocationSubscriptionDeleteCall), [*projects locations subscriptions get*](api::AdminProjectLocationSubscriptionGetCall), [*projects locations subscriptions list*](api::AdminProjectLocationSubscriptionListCall), [*projects locations subscriptions patch*](api::AdminProjectLocationSubscriptionPatchCall), [*projects locations subscriptions seek*](api::AdminProjectLocationSubscriptionSeekCall), [*projects locations topics create*](api::AdminProjectLocationTopicCreateCall), [*projects locations topics delete*](api::AdminProjectLocationTopicDeleteCall), [*projects locations topics get*](api::AdminProjectLocationTopicGetCall), [*projects locations topics get partitions*](api::AdminProjectLocationTopicGetPartitionCall), [*projects locations topics list*](api::AdminProjectLocationTopicListCall), [*projects locations topics patch*](api::AdminProjectLocationTopicPatchCall) and [*projects locations topics subscriptions list*](api::AdminProjectLocationTopicSubscriptionListCall)
@@ -58,8 +58,8 @@
//! let r = hub.admin().projects_locations_topics_delete(...).doit().await
//! ```
//!
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
//! The `doit()` method performs the actual communication with the server and returns the respective result.
//!
@@ -84,23 +84,24 @@
//! extern crate google_pubsublite1 as pubsublite1;
//! use pubsublite1::api::CancelOperationRequest;
//! use pubsublite1::{Result, Error};
//! use pubsublite1::api::enums::*;
//! # async fn dox() {
//! use std::default::Default;
//! use pubsublite1::{PubsubLite, oauth2, hyper, hyper_rustls, chrono, FieldMask};
//!
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
//! // `client_secret`, among other things.
//! let secret: oauth2::ApplicationSecret = Default::default();
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
//! // unless you replace `None` with the desired Flow.
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
//! // retrieve them from storage.
//! let auth = oauth2::InstalledFlowAuthenticator::builder(
//! secret,
//! oauth2::InstalledFlowReturnMethod::HTTPRedirect,
//! ).build().await.unwrap();
//! let mut hub = PubsubLite::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
//! let mut hub = PubsubLite::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
//! // As the method needs a request, you would usually fill it with the desired information
//! // into the respective structure. Some of the parts shown here might not be applicable !
//! // Values shown here are possibly random and not representative !
@@ -134,10 +135,10 @@
//! ## Handling Errors
//!
//! All errors produced by the system are provided either as [Result](client::Result) enumeration as return value of
//! the doit() methods, or handed as possibly intermediate results to either the
//! the doit() methods, or handed as possibly intermediate results to either the
//! [Hub Delegate](client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
//!
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
//! makes the system potentially resilient to all kinds of errors.
//!
//! ## Uploads and Downloads
@@ -147,25 +148,25 @@
//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
//! this call: `.param("alt", "media")`.
//!
//! Methods supporting uploads can do so using up to 2 different protocols:
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
//! Methods supporting uploads can do so using up to 2 different protocols:
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
//!
//! ## Customization and Callbacks
//!
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
//! Respective methods will be called to provide progress information, as well as determine whether the system should
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
//! Respective methods will be called to provide progress information, as well as determine whether the system should
//! retry on failure.
//!
//! The [delegate trait](client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
//!
//! ## Optional Parts in Server-Requests
//!
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
//! are valid.
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
//! the server to indicate either the set parts of the request or the desired parts in the response.
//!
//! ## Builder Arguments