#![allow(rustdoc::bare_urls)]
#![allow(rustdoc::broken_intra_doc_links)]
#![allow(rustdoc::invalid_html_tags)]
#![allow(rustdoc::redundant_explicit_links)]
#![no_implicit_prelude]
extern crate async_trait;
extern crate bytes;
extern crate gaxi;
extern crate google_cloud_gax;
extern crate google_cloud_longrunning;
extern crate google_cloud_lro;
extern crate serde;
extern crate serde_json;
extern crate serde_with;
extern crate std;
extern crate tracing;
extern crate wkt;
mod debug;
mod deserialize;
mod serialize;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Subscription {
pub name: std::string::String,
pub uid: std::string::String,
pub target_resource: std::string::String,
pub event_types: std::vec::Vec<std::string::String>,
pub payload_options: std::option::Option<crate::model::PayloadOptions>,
pub notification_endpoint: std::option::Option<crate::model::NotificationEndpoint>,
pub state: crate::model::subscription::State,
pub suspension_reason: crate::model::subscription::ErrorType,
pub authority: std::string::String,
pub create_time: std::option::Option<wkt::Timestamp>,
pub update_time: std::option::Option<wkt::Timestamp>,
pub reconciling: bool,
pub etag: std::string::String,
pub expiration: std::option::Option<crate::model::subscription::Expiration>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Subscription {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uid = v.into();
self
}
pub fn set_target_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.target_resource = v.into();
self
}
pub fn set_event_types<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.event_types = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_payload_options<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::PayloadOptions>,
{
self.payload_options = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_payload_options<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::PayloadOptions>,
{
self.payload_options = v.map(|x| x.into());
self
}
pub fn set_notification_endpoint<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::NotificationEndpoint>,
{
self.notification_endpoint = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_notification_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::NotificationEndpoint>,
{
self.notification_endpoint = v.map(|x| x.into());
self
}
pub fn set_state<T: std::convert::Into<crate::model::subscription::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_suspension_reason<T: std::convert::Into<crate::model::subscription::ErrorType>>(
mut self,
v: T,
) -> Self {
self.suspension_reason = v.into();
self
}
pub fn set_authority<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.authority = v.into();
self
}
pub fn set_create_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.create_time = v.map(|x| x.into());
self
}
pub fn set_update_time<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::Timestamp>,
{
self.update_time = v.map(|x| x.into());
self
}
pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.reconciling = v.into();
self
}
pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.etag = v.into();
self
}
pub fn set_expiration<
T: std::convert::Into<std::option::Option<crate::model::subscription::Expiration>>,
>(
mut self,
v: T,
) -> Self {
self.expiration = v.into();
self
}
pub fn expire_time(&self) -> std::option::Option<&std::boxed::Box<wkt::Timestamp>> {
#[allow(unreachable_patterns)]
self.expiration.as_ref().and_then(|v| match v {
crate::model::subscription::Expiration::ExpireTime(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_expire_time<T: std::convert::Into<std::boxed::Box<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.expiration =
std::option::Option::Some(crate::model::subscription::Expiration::ExpireTime(v.into()));
self
}
pub fn ttl(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
#[allow(unreachable_patterns)]
self.expiration.as_ref().and_then(|v| match v {
crate::model::subscription::Expiration::Ttl(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_ttl<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(mut self, v: T) -> Self {
self.expiration =
std::option::Option::Some(crate::model::subscription::Expiration::Ttl(v.into()));
self
}
}
impl wkt::message::Message for Subscription {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.Subscription"
}
}
pub mod subscription {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum State {
Unspecified,
Active,
Suspended,
Deleted,
UnknownValue(state::UnknownValue),
}
#[doc(hidden)]
pub mod state {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl State {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Active => std::option::Option::Some(1),
Self::Suspended => std::option::Option::Some(2),
Self::Deleted => std::option::Option::Some(3),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
Self::Active => std::option::Option::Some("ACTIVE"),
Self::Suspended => std::option::Option::Some("SUSPENDED"),
Self::Deleted => std::option::Option::Some("DELETED"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for State {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for State {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for State {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Active,
2 => Self::Suspended,
3 => Self::Deleted,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for State {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"STATE_UNSPECIFIED" => Self::Unspecified,
"ACTIVE" => Self::Active,
"SUSPENDED" => Self::Suspended,
"DELETED" => Self::Deleted,
_ => Self::UnknownValue(state::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for State {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Active => serializer.serialize_i32(1),
Self::Suspended => serializer.serialize_i32(2),
Self::Deleted => serializer.serialize_i32(3),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for State {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
".google.apps.events.subscriptions.v1.Subscription.State",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ErrorType {
Unspecified,
UserScopeRevoked,
ResourceDeleted,
UserAuthorizationFailure,
EndpointPermissionDenied,
EndpointNotFound,
EndpointResourceExhausted,
Other,
UnknownValue(error_type::UnknownValue),
}
#[doc(hidden)]
pub mod error_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ErrorType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::UserScopeRevoked => std::option::Option::Some(1),
Self::ResourceDeleted => std::option::Option::Some(2),
Self::UserAuthorizationFailure => std::option::Option::Some(3),
Self::EndpointPermissionDenied => std::option::Option::Some(4),
Self::EndpointNotFound => std::option::Option::Some(6),
Self::EndpointResourceExhausted => std::option::Option::Some(7),
Self::Other => std::option::Option::Some(5),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("ERROR_TYPE_UNSPECIFIED"),
Self::UserScopeRevoked => std::option::Option::Some("USER_SCOPE_REVOKED"),
Self::ResourceDeleted => std::option::Option::Some("RESOURCE_DELETED"),
Self::UserAuthorizationFailure => {
std::option::Option::Some("USER_AUTHORIZATION_FAILURE")
}
Self::EndpointPermissionDenied => {
std::option::Option::Some("ENDPOINT_PERMISSION_DENIED")
}
Self::EndpointNotFound => std::option::Option::Some("ENDPOINT_NOT_FOUND"),
Self::EndpointResourceExhausted => {
std::option::Option::Some("ENDPOINT_RESOURCE_EXHAUSTED")
}
Self::Other => std::option::Option::Some("OTHER"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ErrorType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ErrorType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ErrorType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::UserScopeRevoked,
2 => Self::ResourceDeleted,
3 => Self::UserAuthorizationFailure,
4 => Self::EndpointPermissionDenied,
5 => Self::Other,
6 => Self::EndpointNotFound,
7 => Self::EndpointResourceExhausted,
_ => Self::UnknownValue(error_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ErrorType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"ERROR_TYPE_UNSPECIFIED" => Self::Unspecified,
"USER_SCOPE_REVOKED" => Self::UserScopeRevoked,
"RESOURCE_DELETED" => Self::ResourceDeleted,
"USER_AUTHORIZATION_FAILURE" => Self::UserAuthorizationFailure,
"ENDPOINT_PERMISSION_DENIED" => Self::EndpointPermissionDenied,
"ENDPOINT_NOT_FOUND" => Self::EndpointNotFound,
"ENDPOINT_RESOURCE_EXHAUSTED" => Self::EndpointResourceExhausted,
"OTHER" => Self::Other,
_ => Self::UnknownValue(error_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ErrorType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::UserScopeRevoked => serializer.serialize_i32(1),
Self::ResourceDeleted => serializer.serialize_i32(2),
Self::UserAuthorizationFailure => serializer.serialize_i32(3),
Self::EndpointPermissionDenied => serializer.serialize_i32(4),
Self::EndpointNotFound => serializer.serialize_i32(6),
Self::EndpointResourceExhausted => serializer.serialize_i32(7),
Self::Other => serializer.serialize_i32(5),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ErrorType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorType>::new(
".google.apps.events.subscriptions.v1.Subscription.ErrorType",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Expiration {
ExpireTime(std::boxed::Box<wkt::Timestamp>),
Ttl(std::boxed::Box<wkt::Duration>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct PayloadOptions {
pub include_resource: bool,
pub field_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl PayloadOptions {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_include_resource<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.include_resource = v.into();
self
}
pub fn set_field_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.field_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_field_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.field_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for PayloadOptions {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.PayloadOptions"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct NotificationEndpoint {
#[allow(missing_docs)]
pub endpoint: std::option::Option<crate::model::notification_endpoint::Endpoint>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl NotificationEndpoint {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_endpoint<
T: std::convert::Into<std::option::Option<crate::model::notification_endpoint::Endpoint>>,
>(
mut self,
v: T,
) -> Self {
self.endpoint = v.into();
self
}
pub fn pubsub_topic(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.endpoint.as_ref().and_then(|v| match v {
crate::model::notification_endpoint::Endpoint::PubsubTopic(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_pubsub_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.endpoint = std::option::Option::Some(
crate::model::notification_endpoint::Endpoint::PubsubTopic(v.into()),
);
self
}
}
impl wkt::message::Message for NotificationEndpoint {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.NotificationEndpoint"
}
}
pub mod notification_endpoint {
#[allow(unused_imports)]
use super::*;
#[allow(missing_docs)]
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Endpoint {
PubsubTopic(std::string::String),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateSubscriptionRequest {
pub subscription: std::option::Option<crate::model::Subscription>,
pub validate_only: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateSubscriptionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_subscription<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Subscription>,
{
self.subscription = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_subscription<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Subscription>,
{
self.subscription = v.map(|x| x.into());
self
}
pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.validate_only = v.into();
self
}
}
impl wkt::message::Message for CreateSubscriptionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.CreateSubscriptionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteSubscriptionRequest {
pub name: std::string::String,
pub validate_only: bool,
pub allow_missing: bool,
pub etag: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteSubscriptionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.validate_only = v.into();
self
}
pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.allow_missing = v.into();
self
}
pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.etag = v.into();
self
}
}
impl wkt::message::Message for DeleteSubscriptionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.DeleteSubscriptionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetSubscriptionRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetSubscriptionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetSubscriptionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.GetSubscriptionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateSubscriptionRequest {
pub subscription: std::option::Option<crate::model::Subscription>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub validate_only: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateSubscriptionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_subscription<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Subscription>,
{
self.subscription = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_subscription<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Subscription>,
{
self.subscription = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.validate_only = v.into();
self
}
}
impl wkt::message::Message for UpdateSubscriptionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.UpdateSubscriptionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ReactivateSubscriptionRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ReactivateSubscriptionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for ReactivateSubscriptionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.ReactivateSubscriptionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSubscriptionsRequest {
pub page_size: i32,
pub page_token: std::string::String,
pub filter: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListSubscriptionsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListSubscriptionsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.ListSubscriptionsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListSubscriptionsResponse {
pub subscriptions: std::vec::Vec<crate::model::Subscription>,
pub next_page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListSubscriptionsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_subscriptions<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Subscription>,
{
use std::iter::Iterator;
self.subscriptions = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
}
impl wkt::message::Message for ListSubscriptionsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.ListSubscriptionsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListSubscriptionsResponse {
type PageItem = crate::model::Subscription;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.subscriptions
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateSubscriptionMetadata {
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateSubscriptionMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
}
impl wkt::message::Message for UpdateSubscriptionMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.UpdateSubscriptionMetadata"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateSubscriptionMetadata {
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateSubscriptionMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
}
impl wkt::message::Message for CreateSubscriptionMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.CreateSubscriptionMetadata"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteSubscriptionMetadata {
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteSubscriptionMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
}
impl wkt::message::Message for DeleteSubscriptionMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.DeleteSubscriptionMetadata"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ReactivateSubscriptionMetadata {
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ReactivateSubscriptionMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
}
impl wkt::message::Message for ReactivateSubscriptionMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.apps.events.subscriptions.v1.ReactivateSubscriptionMetadata"
}
}