use std::fmt::Write;
pub mod create_budget_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget: std::option::Option<crate::model::Budget>,
pub(crate) notifications_with_subscribers:
std::option::Option<std::vec::Vec<crate::model::NotificationWithSubscribers>>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget(mut self, input: crate::model::Budget) -> Self {
self.budget = Some(input);
self
}
pub fn set_budget(mut self, input: std::option::Option<crate::model::Budget>) -> Self {
self.budget = input;
self
}
pub fn notifications_with_subscribers(
mut self,
input: impl Into<crate::model::NotificationWithSubscribers>,
) -> Self {
let mut v = self.notifications_with_subscribers.unwrap_or_default();
v.push(input.into());
self.notifications_with_subscribers = Some(v);
self
}
pub fn set_notifications_with_subscribers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NotificationWithSubscribers>>,
) -> Self {
self.notifications_with_subscribers = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateBudgetInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateBudgetInput {
account_id: self.account_id,
budget: self.budget,
notifications_with_subscribers: self.notifications_with_subscribers,
})
}
}
}
#[doc(hidden)]
pub type CreateBudgetInputOperationOutputAlias = crate::operation::CreateBudget;
#[doc(hidden)]
pub type CreateBudgetInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateBudgetInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateBudget,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateBudgetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateBudgetInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateBudgetInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.CreateBudget",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_create_budget(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateBudget::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateBudget",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_budget_input::Builder {
crate::input::create_budget_input::Builder::default()
}
}
pub mod create_budget_action_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) notification_type: std::option::Option<crate::model::NotificationType>,
pub(crate) action_type: std::option::Option<crate::model::ActionType>,
pub(crate) action_threshold: std::option::Option<crate::model::ActionThreshold>,
pub(crate) definition: std::option::Option<crate::model::Definition>,
pub(crate) execution_role_arn: std::option::Option<std::string::String>,
pub(crate) approval_model: std::option::Option<crate::model::ApprovalModel>,
pub(crate) subscribers: std::option::Option<std::vec::Vec<crate::model::Subscriber>>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn notification_type(mut self, input: crate::model::NotificationType) -> Self {
self.notification_type = Some(input);
self
}
pub fn set_notification_type(
mut self,
input: std::option::Option<crate::model::NotificationType>,
) -> Self {
self.notification_type = input;
self
}
pub fn action_type(mut self, input: crate::model::ActionType) -> Self {
self.action_type = Some(input);
self
}
pub fn set_action_type(
mut self,
input: std::option::Option<crate::model::ActionType>,
) -> Self {
self.action_type = input;
self
}
pub fn action_threshold(mut self, input: crate::model::ActionThreshold) -> Self {
self.action_threshold = Some(input);
self
}
pub fn set_action_threshold(
mut self,
input: std::option::Option<crate::model::ActionThreshold>,
) -> Self {
self.action_threshold = input;
self
}
pub fn definition(mut self, input: crate::model::Definition) -> Self {
self.definition = Some(input);
self
}
pub fn set_definition(
mut self,
input: std::option::Option<crate::model::Definition>,
) -> Self {
self.definition = input;
self
}
pub fn execution_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.execution_role_arn = Some(input.into());
self
}
pub fn set_execution_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.execution_role_arn = input;
self
}
pub fn approval_model(mut self, input: crate::model::ApprovalModel) -> Self {
self.approval_model = Some(input);
self
}
pub fn set_approval_model(
mut self,
input: std::option::Option<crate::model::ApprovalModel>,
) -> Self {
self.approval_model = input;
self
}
pub fn subscribers(mut self, input: impl Into<crate::model::Subscriber>) -> Self {
let mut v = self.subscribers.unwrap_or_default();
v.push(input.into());
self.subscribers = Some(v);
self
}
pub fn set_subscribers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Subscriber>>,
) -> Self {
self.subscribers = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateBudgetActionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateBudgetActionInput {
account_id: self.account_id,
budget_name: self.budget_name,
notification_type: self.notification_type,
action_type: self.action_type,
action_threshold: self.action_threshold,
definition: self.definition,
execution_role_arn: self.execution_role_arn,
approval_model: self.approval_model,
subscribers: self.subscribers,
})
}
}
}
#[doc(hidden)]
pub type CreateBudgetActionInputOperationOutputAlias = crate::operation::CreateBudgetAction;
#[doc(hidden)]
pub type CreateBudgetActionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateBudgetActionInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateBudgetAction,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateBudgetActionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateBudgetActionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateBudgetActionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.CreateBudgetAction",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_budget_action(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateBudgetAction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateBudgetAction",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_budget_action_input::Builder {
crate::input::create_budget_action_input::Builder::default()
}
}
pub mod create_notification_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) notification: std::option::Option<crate::model::Notification>,
pub(crate) subscribers: std::option::Option<std::vec::Vec<crate::model::Subscriber>>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn notification(mut self, input: crate::model::Notification) -> Self {
self.notification = Some(input);
self
}
pub fn set_notification(
mut self,
input: std::option::Option<crate::model::Notification>,
) -> Self {
self.notification = input;
self
}
pub fn subscribers(mut self, input: impl Into<crate::model::Subscriber>) -> Self {
let mut v = self.subscribers.unwrap_or_default();
v.push(input.into());
self.subscribers = Some(v);
self
}
pub fn set_subscribers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Subscriber>>,
) -> Self {
self.subscribers = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateNotificationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateNotificationInput {
account_id: self.account_id,
budget_name: self.budget_name,
notification: self.notification,
subscribers: self.subscribers,
})
}
}
}
#[doc(hidden)]
pub type CreateNotificationInputOperationOutputAlias = crate::operation::CreateNotification;
#[doc(hidden)]
pub type CreateNotificationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateNotificationInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateNotification,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateNotificationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateNotificationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateNotificationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.CreateNotification",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_notification(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateNotification::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateNotification",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_notification_input::Builder {
crate::input::create_notification_input::Builder::default()
}
}
pub mod create_subscriber_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) notification: std::option::Option<crate::model::Notification>,
pub(crate) subscriber: std::option::Option<crate::model::Subscriber>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn notification(mut self, input: crate::model::Notification) -> Self {
self.notification = Some(input);
self
}
pub fn set_notification(
mut self,
input: std::option::Option<crate::model::Notification>,
) -> Self {
self.notification = input;
self
}
pub fn subscriber(mut self, input: crate::model::Subscriber) -> Self {
self.subscriber = Some(input);
self
}
pub fn set_subscriber(
mut self,
input: std::option::Option<crate::model::Subscriber>,
) -> Self {
self.subscriber = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateSubscriberInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateSubscriberInput {
account_id: self.account_id,
budget_name: self.budget_name,
notification: self.notification,
subscriber: self.subscriber,
})
}
}
}
#[doc(hidden)]
pub type CreateSubscriberInputOperationOutputAlias = crate::operation::CreateSubscriber;
#[doc(hidden)]
pub type CreateSubscriberInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateSubscriberInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateSubscriber,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateSubscriberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateSubscriberInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateSubscriberInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.CreateSubscriber",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_subscriber(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateSubscriber::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateSubscriber",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_subscriber_input::Builder {
crate::input::create_subscriber_input::Builder::default()
}
}
pub mod delete_budget_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBudgetInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBudgetInput {
account_id: self.account_id,
budget_name: self.budget_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteBudgetInputOperationOutputAlias = crate::operation::DeleteBudget;
#[doc(hidden)]
pub type DeleteBudgetInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteBudgetInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteBudget,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteBudgetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBudgetInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteBudgetInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DeleteBudget",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_delete_budget(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBudget::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBudget",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_budget_input::Builder {
crate::input::delete_budget_input::Builder::default()
}
}
pub mod delete_budget_action_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) action_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn action_id(mut self, input: impl Into<std::string::String>) -> Self {
self.action_id = Some(input.into());
self
}
pub fn set_action_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBudgetActionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBudgetActionInput {
account_id: self.account_id,
budget_name: self.budget_name,
action_id: self.action_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteBudgetActionInputOperationOutputAlias = crate::operation::DeleteBudgetAction;
#[doc(hidden)]
pub type DeleteBudgetActionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteBudgetActionInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteBudgetAction,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteBudgetActionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBudgetActionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteBudgetActionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DeleteBudgetAction",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_budget_action(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBudgetAction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBudgetAction",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_budget_action_input::Builder {
crate::input::delete_budget_action_input::Builder::default()
}
}
pub mod delete_notification_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) notification: std::option::Option<crate::model::Notification>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn notification(mut self, input: crate::model::Notification) -> Self {
self.notification = Some(input);
self
}
pub fn set_notification(
mut self,
input: std::option::Option<crate::model::Notification>,
) -> Self {
self.notification = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteNotificationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteNotificationInput {
account_id: self.account_id,
budget_name: self.budget_name,
notification: self.notification,
})
}
}
}
#[doc(hidden)]
pub type DeleteNotificationInputOperationOutputAlias = crate::operation::DeleteNotification;
#[doc(hidden)]
pub type DeleteNotificationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteNotificationInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteNotification,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteNotificationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteNotificationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteNotificationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DeleteNotification",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_notification(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteNotification::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteNotification",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_notification_input::Builder {
crate::input::delete_notification_input::Builder::default()
}
}
pub mod delete_subscriber_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) notification: std::option::Option<crate::model::Notification>,
pub(crate) subscriber: std::option::Option<crate::model::Subscriber>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn notification(mut self, input: crate::model::Notification) -> Self {
self.notification = Some(input);
self
}
pub fn set_notification(
mut self,
input: std::option::Option<crate::model::Notification>,
) -> Self {
self.notification = input;
self
}
pub fn subscriber(mut self, input: crate::model::Subscriber) -> Self {
self.subscriber = Some(input);
self
}
pub fn set_subscriber(
mut self,
input: std::option::Option<crate::model::Subscriber>,
) -> Self {
self.subscriber = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteSubscriberInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteSubscriberInput {
account_id: self.account_id,
budget_name: self.budget_name,
notification: self.notification,
subscriber: self.subscriber,
})
}
}
}
#[doc(hidden)]
pub type DeleteSubscriberInputOperationOutputAlias = crate::operation::DeleteSubscriber;
#[doc(hidden)]
pub type DeleteSubscriberInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteSubscriberInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteSubscriber,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteSubscriberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteSubscriberInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteSubscriberInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DeleteSubscriber",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_subscriber(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteSubscriber::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteSubscriber",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_subscriber_input::Builder {
crate::input::delete_subscriber_input::Builder::default()
}
}
pub mod describe_budget_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeBudgetInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeBudgetInput {
account_id: self.account_id,
budget_name: self.budget_name,
})
}
}
}
#[doc(hidden)]
pub type DescribeBudgetInputOperationOutputAlias = crate::operation::DescribeBudget;
#[doc(hidden)]
pub type DescribeBudgetInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeBudgetInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeBudget,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeBudgetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeBudgetInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeBudgetInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DescribeBudget",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_budget(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeBudget::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeBudget",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_budget_input::Builder {
crate::input::describe_budget_input::Builder::default()
}
}
pub mod describe_budget_action_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) action_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn action_id(mut self, input: impl Into<std::string::String>) -> Self {
self.action_id = Some(input.into());
self
}
pub fn set_action_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeBudgetActionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeBudgetActionInput {
account_id: self.account_id,
budget_name: self.budget_name,
action_id: self.action_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeBudgetActionInputOperationOutputAlias = crate::operation::DescribeBudgetAction;
#[doc(hidden)]
pub type DescribeBudgetActionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeBudgetActionInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeBudgetAction,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeBudgetActionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeBudgetActionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeBudgetActionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DescribeBudgetAction",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_budget_action(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeBudgetAction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeBudgetAction",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_budget_action_input::Builder {
crate::input::describe_budget_action_input::Builder::default()
}
}
pub mod describe_budget_action_histories_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) action_id: std::option::Option<std::string::String>,
pub(crate) time_period: std::option::Option<crate::model::TimePeriod>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn action_id(mut self, input: impl Into<std::string::String>) -> Self {
self.action_id = Some(input.into());
self
}
pub fn set_action_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_id = input;
self
}
pub fn time_period(mut self, input: crate::model::TimePeriod) -> Self {
self.time_period = Some(input);
self
}
pub fn set_time_period(
mut self,
input: std::option::Option<crate::model::TimePeriod>,
) -> Self {
self.time_period = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeBudgetActionHistoriesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeBudgetActionHistoriesInput {
account_id: self.account_id,
budget_name: self.budget_name,
action_id: self.action_id,
time_period: self.time_period,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeBudgetActionHistoriesInputOperationOutputAlias =
crate::operation::DescribeBudgetActionHistories;
#[doc(hidden)]
pub type DescribeBudgetActionHistoriesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeBudgetActionHistoriesInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeBudgetActionHistories,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeBudgetActionHistoriesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeBudgetActionHistoriesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeBudgetActionHistoriesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DescribeBudgetActionHistories",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_budget_action_histories(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeBudgetActionHistories::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeBudgetActionHistories",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_budget_action_histories_input::Builder {
crate::input::describe_budget_action_histories_input::Builder::default()
}
}
pub mod describe_budget_actions_for_account_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeBudgetActionsForAccountInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeBudgetActionsForAccountInput {
account_id: self.account_id,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeBudgetActionsForAccountInputOperationOutputAlias =
crate::operation::DescribeBudgetActionsForAccount;
#[doc(hidden)]
pub type DescribeBudgetActionsForAccountInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeBudgetActionsForAccountInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeBudgetActionsForAccount,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeBudgetActionsForAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeBudgetActionsForAccountInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeBudgetActionsForAccountInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DescribeBudgetActionsForAccount",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_budget_actions_for_account(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeBudgetActionsForAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeBudgetActionsForAccount",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_budget_actions_for_account_input::Builder {
crate::input::describe_budget_actions_for_account_input::Builder::default()
}
}
pub mod describe_budget_actions_for_budget_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeBudgetActionsForBudgetInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeBudgetActionsForBudgetInput {
account_id: self.account_id,
budget_name: self.budget_name,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeBudgetActionsForBudgetInputOperationOutputAlias =
crate::operation::DescribeBudgetActionsForBudget;
#[doc(hidden)]
pub type DescribeBudgetActionsForBudgetInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeBudgetActionsForBudgetInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeBudgetActionsForBudget,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeBudgetActionsForBudgetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeBudgetActionsForBudgetInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeBudgetActionsForBudgetInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DescribeBudgetActionsForBudget",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_budget_actions_for_budget(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeBudgetActionsForBudget::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeBudgetActionsForBudget",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_budget_actions_for_budget_input::Builder {
crate::input::describe_budget_actions_for_budget_input::Builder::default()
}
}
pub mod describe_budget_performance_history_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) time_period: std::option::Option<crate::model::TimePeriod>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn time_period(mut self, input: crate::model::TimePeriod) -> Self {
self.time_period = Some(input);
self
}
pub fn set_time_period(
mut self,
input: std::option::Option<crate::model::TimePeriod>,
) -> Self {
self.time_period = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeBudgetPerformanceHistoryInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeBudgetPerformanceHistoryInput {
account_id: self.account_id,
budget_name: self.budget_name,
time_period: self.time_period,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeBudgetPerformanceHistoryInputOperationOutputAlias =
crate::operation::DescribeBudgetPerformanceHistory;
#[doc(hidden)]
pub type DescribeBudgetPerformanceHistoryInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeBudgetPerformanceHistoryInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeBudgetPerformanceHistory,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeBudgetPerformanceHistoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeBudgetPerformanceHistoryInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeBudgetPerformanceHistoryInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_budget_performance_history(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeBudgetPerformanceHistory::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeBudgetPerformanceHistory",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_budget_performance_history_input::Builder {
crate::input::describe_budget_performance_history_input::Builder::default()
}
}
pub mod describe_budgets_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeBudgetsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeBudgetsInput {
account_id: self.account_id,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeBudgetsInputOperationOutputAlias = crate::operation::DescribeBudgets;
#[doc(hidden)]
pub type DescribeBudgetsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeBudgetsInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeBudgets,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeBudgetsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeBudgetsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeBudgetsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DescribeBudgets",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_budgets(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeBudgets::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeBudgets",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_budgets_input::Builder {
crate::input::describe_budgets_input::Builder::default()
}
}
pub mod describe_notifications_for_budget_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeNotificationsForBudgetInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeNotificationsForBudgetInput {
account_id: self.account_id,
budget_name: self.budget_name,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeNotificationsForBudgetInputOperationOutputAlias =
crate::operation::DescribeNotificationsForBudget;
#[doc(hidden)]
pub type DescribeNotificationsForBudgetInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeNotificationsForBudgetInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeNotificationsForBudget,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeNotificationsForBudgetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeNotificationsForBudgetInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeNotificationsForBudgetInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DescribeNotificationsForBudget",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_notifications_for_budget(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeNotificationsForBudget::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeNotificationsForBudget",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_notifications_for_budget_input::Builder {
crate::input::describe_notifications_for_budget_input::Builder::default()
}
}
pub mod describe_subscribers_for_notification_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) notification: std::option::Option<crate::model::Notification>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn notification(mut self, input: crate::model::Notification) -> Self {
self.notification = Some(input);
self
}
pub fn set_notification(
mut self,
input: std::option::Option<crate::model::Notification>,
) -> Self {
self.notification = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeSubscribersForNotificationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeSubscribersForNotificationInput {
account_id: self.account_id,
budget_name: self.budget_name,
notification: self.notification,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeSubscribersForNotificationInputOperationOutputAlias =
crate::operation::DescribeSubscribersForNotification;
#[doc(hidden)]
pub type DescribeSubscribersForNotificationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeSubscribersForNotificationInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeSubscribersForNotification,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeSubscribersForNotificationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeSubscribersForNotificationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeSubscribersForNotificationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.DescribeSubscribersForNotification",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_subscribers_for_notification(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeSubscribersForNotification::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeSubscribersForNotification",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_subscribers_for_notification_input::Builder {
crate::input::describe_subscribers_for_notification_input::Builder::default()
}
}
pub mod execute_budget_action_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) action_id: std::option::Option<std::string::String>,
pub(crate) execution_type: std::option::Option<crate::model::ExecutionType>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn action_id(mut self, input: impl Into<std::string::String>) -> Self {
self.action_id = Some(input.into());
self
}
pub fn set_action_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_id = input;
self
}
pub fn execution_type(mut self, input: crate::model::ExecutionType) -> Self {
self.execution_type = Some(input);
self
}
pub fn set_execution_type(
mut self,
input: std::option::Option<crate::model::ExecutionType>,
) -> Self {
self.execution_type = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ExecuteBudgetActionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ExecuteBudgetActionInput {
account_id: self.account_id,
budget_name: self.budget_name,
action_id: self.action_id,
execution_type: self.execution_type,
})
}
}
}
#[doc(hidden)]
pub type ExecuteBudgetActionInputOperationOutputAlias = crate::operation::ExecuteBudgetAction;
#[doc(hidden)]
pub type ExecuteBudgetActionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ExecuteBudgetActionInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ExecuteBudgetAction,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ExecuteBudgetActionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ExecuteBudgetActionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ExecuteBudgetActionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.ExecuteBudgetAction",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_execute_budget_action(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ExecuteBudgetAction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ExecuteBudgetAction",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::execute_budget_action_input::Builder {
crate::input::execute_budget_action_input::Builder::default()
}
}
pub mod update_budget_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) new_budget: std::option::Option<crate::model::Budget>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn new_budget(mut self, input: crate::model::Budget) -> Self {
self.new_budget = Some(input);
self
}
pub fn set_new_budget(mut self, input: std::option::Option<crate::model::Budget>) -> Self {
self.new_budget = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateBudgetInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateBudgetInput {
account_id: self.account_id,
new_budget: self.new_budget,
})
}
}
}
#[doc(hidden)]
pub type UpdateBudgetInputOperationOutputAlias = crate::operation::UpdateBudget;
#[doc(hidden)]
pub type UpdateBudgetInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateBudgetInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateBudget,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateBudgetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateBudgetInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateBudgetInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.UpdateBudget",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_update_budget(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateBudget::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateBudget",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_budget_input::Builder {
crate::input::update_budget_input::Builder::default()
}
}
pub mod update_budget_action_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) action_id: std::option::Option<std::string::String>,
pub(crate) notification_type: std::option::Option<crate::model::NotificationType>,
pub(crate) action_threshold: std::option::Option<crate::model::ActionThreshold>,
pub(crate) definition: std::option::Option<crate::model::Definition>,
pub(crate) execution_role_arn: std::option::Option<std::string::String>,
pub(crate) approval_model: std::option::Option<crate::model::ApprovalModel>,
pub(crate) subscribers: std::option::Option<std::vec::Vec<crate::model::Subscriber>>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn action_id(mut self, input: impl Into<std::string::String>) -> Self {
self.action_id = Some(input.into());
self
}
pub fn set_action_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_id = input;
self
}
pub fn notification_type(mut self, input: crate::model::NotificationType) -> Self {
self.notification_type = Some(input);
self
}
pub fn set_notification_type(
mut self,
input: std::option::Option<crate::model::NotificationType>,
) -> Self {
self.notification_type = input;
self
}
pub fn action_threshold(mut self, input: crate::model::ActionThreshold) -> Self {
self.action_threshold = Some(input);
self
}
pub fn set_action_threshold(
mut self,
input: std::option::Option<crate::model::ActionThreshold>,
) -> Self {
self.action_threshold = input;
self
}
pub fn definition(mut self, input: crate::model::Definition) -> Self {
self.definition = Some(input);
self
}
pub fn set_definition(
mut self,
input: std::option::Option<crate::model::Definition>,
) -> Self {
self.definition = input;
self
}
pub fn execution_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.execution_role_arn = Some(input.into());
self
}
pub fn set_execution_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.execution_role_arn = input;
self
}
pub fn approval_model(mut self, input: crate::model::ApprovalModel) -> Self {
self.approval_model = Some(input);
self
}
pub fn set_approval_model(
mut self,
input: std::option::Option<crate::model::ApprovalModel>,
) -> Self {
self.approval_model = input;
self
}
pub fn subscribers(mut self, input: impl Into<crate::model::Subscriber>) -> Self {
let mut v = self.subscribers.unwrap_or_default();
v.push(input.into());
self.subscribers = Some(v);
self
}
pub fn set_subscribers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Subscriber>>,
) -> Self {
self.subscribers = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateBudgetActionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateBudgetActionInput {
account_id: self.account_id,
budget_name: self.budget_name,
action_id: self.action_id,
notification_type: self.notification_type,
action_threshold: self.action_threshold,
definition: self.definition,
execution_role_arn: self.execution_role_arn,
approval_model: self.approval_model,
subscribers: self.subscribers,
})
}
}
}
#[doc(hidden)]
pub type UpdateBudgetActionInputOperationOutputAlias = crate::operation::UpdateBudgetAction;
#[doc(hidden)]
pub type UpdateBudgetActionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateBudgetActionInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateBudgetAction,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateBudgetActionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateBudgetActionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateBudgetActionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.UpdateBudgetAction",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_budget_action(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateBudgetAction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateBudgetAction",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_budget_action_input::Builder {
crate::input::update_budget_action_input::Builder::default()
}
}
pub mod update_notification_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) old_notification: std::option::Option<crate::model::Notification>,
pub(crate) new_notification: std::option::Option<crate::model::Notification>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn old_notification(mut self, input: crate::model::Notification) -> Self {
self.old_notification = Some(input);
self
}
pub fn set_old_notification(
mut self,
input: std::option::Option<crate::model::Notification>,
) -> Self {
self.old_notification = input;
self
}
pub fn new_notification(mut self, input: crate::model::Notification) -> Self {
self.new_notification = Some(input);
self
}
pub fn set_new_notification(
mut self,
input: std::option::Option<crate::model::Notification>,
) -> Self {
self.new_notification = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateNotificationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateNotificationInput {
account_id: self.account_id,
budget_name: self.budget_name,
old_notification: self.old_notification,
new_notification: self.new_notification,
})
}
}
}
#[doc(hidden)]
pub type UpdateNotificationInputOperationOutputAlias = crate::operation::UpdateNotification;
#[doc(hidden)]
pub type UpdateNotificationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateNotificationInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateNotification,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateNotificationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateNotificationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateNotificationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.UpdateNotification",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_notification(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateNotification::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateNotification",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_notification_input::Builder {
crate::input::update_notification_input::Builder::default()
}
}
pub mod update_subscriber_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) budget_name: std::option::Option<std::string::String>,
pub(crate) notification: std::option::Option<crate::model::Notification>,
pub(crate) old_subscriber: std::option::Option<crate::model::Subscriber>,
pub(crate) new_subscriber: std::option::Option<crate::model::Subscriber>,
}
impl Builder {
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn budget_name(mut self, input: impl Into<std::string::String>) -> Self {
self.budget_name = Some(input.into());
self
}
pub fn set_budget_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.budget_name = input;
self
}
pub fn notification(mut self, input: crate::model::Notification) -> Self {
self.notification = Some(input);
self
}
pub fn set_notification(
mut self,
input: std::option::Option<crate::model::Notification>,
) -> Self {
self.notification = input;
self
}
pub fn old_subscriber(mut self, input: crate::model::Subscriber) -> Self {
self.old_subscriber = Some(input);
self
}
pub fn set_old_subscriber(
mut self,
input: std::option::Option<crate::model::Subscriber>,
) -> Self {
self.old_subscriber = input;
self
}
pub fn new_subscriber(mut self, input: crate::model::Subscriber) -> Self {
self.new_subscriber = Some(input);
self
}
pub fn set_new_subscriber(
mut self,
input: std::option::Option<crate::model::Subscriber>,
) -> Self {
self.new_subscriber = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateSubscriberInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateSubscriberInput {
account_id: self.account_id,
budget_name: self.budget_name,
notification: self.notification,
old_subscriber: self.old_subscriber,
new_subscriber: self.new_subscriber,
})
}
}
}
#[doc(hidden)]
pub type UpdateSubscriberInputOperationOutputAlias = crate::operation::UpdateSubscriber;
#[doc(hidden)]
pub type UpdateSubscriberInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateSubscriberInput {
#[allow(clippy::let_and_return)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateSubscriber,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateSubscriberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateSubscriberInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateSubscriberInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSBudgetServiceGateway.UpdateSubscriber",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_subscriber(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateSubscriber::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateSubscriber",
"budgets",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_subscriber_input::Builder {
crate::input::update_subscriber_input::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateSubscriberInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub notification: std::option::Option<crate::model::Notification>,
pub old_subscriber: std::option::Option<crate::model::Subscriber>,
pub new_subscriber: std::option::Option<crate::model::Subscriber>,
}
impl UpdateSubscriberInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn notification(&self) -> std::option::Option<&crate::model::Notification> {
self.notification.as_ref()
}
pub fn old_subscriber(&self) -> std::option::Option<&crate::model::Subscriber> {
self.old_subscriber.as_ref()
}
pub fn new_subscriber(&self) -> std::option::Option<&crate::model::Subscriber> {
self.new_subscriber.as_ref()
}
}
impl std::fmt::Debug for UpdateSubscriberInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateSubscriberInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("notification", &self.notification);
formatter.field("old_subscriber", &self.old_subscriber);
formatter.field("new_subscriber", &self.new_subscriber);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateNotificationInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub old_notification: std::option::Option<crate::model::Notification>,
pub new_notification: std::option::Option<crate::model::Notification>,
}
impl UpdateNotificationInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn old_notification(&self) -> std::option::Option<&crate::model::Notification> {
self.old_notification.as_ref()
}
pub fn new_notification(&self) -> std::option::Option<&crate::model::Notification> {
self.new_notification.as_ref()
}
}
impl std::fmt::Debug for UpdateNotificationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateNotificationInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("old_notification", &self.old_notification);
formatter.field("new_notification", &self.new_notification);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateBudgetActionInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub action_id: std::option::Option<std::string::String>,
pub notification_type: std::option::Option<crate::model::NotificationType>,
pub action_threshold: std::option::Option<crate::model::ActionThreshold>,
pub definition: std::option::Option<crate::model::Definition>,
pub execution_role_arn: std::option::Option<std::string::String>,
pub approval_model: std::option::Option<crate::model::ApprovalModel>,
pub subscribers: std::option::Option<std::vec::Vec<crate::model::Subscriber>>,
}
impl UpdateBudgetActionInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn action_id(&self) -> std::option::Option<&str> {
self.action_id.as_deref()
}
pub fn notification_type(&self) -> std::option::Option<&crate::model::NotificationType> {
self.notification_type.as_ref()
}
pub fn action_threshold(&self) -> std::option::Option<&crate::model::ActionThreshold> {
self.action_threshold.as_ref()
}
pub fn definition(&self) -> std::option::Option<&crate::model::Definition> {
self.definition.as_ref()
}
pub fn execution_role_arn(&self) -> std::option::Option<&str> {
self.execution_role_arn.as_deref()
}
pub fn approval_model(&self) -> std::option::Option<&crate::model::ApprovalModel> {
self.approval_model.as_ref()
}
pub fn subscribers(&self) -> std::option::Option<&[crate::model::Subscriber]> {
self.subscribers.as_deref()
}
}
impl std::fmt::Debug for UpdateBudgetActionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateBudgetActionInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("action_id", &self.action_id);
formatter.field("notification_type", &self.notification_type);
formatter.field("action_threshold", &self.action_threshold);
formatter.field("definition", &self.definition);
formatter.field("execution_role_arn", &self.execution_role_arn);
formatter.field("approval_model", &self.approval_model);
formatter.field("subscribers", &self.subscribers);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateBudgetInput {
pub account_id: std::option::Option<std::string::String>,
pub new_budget: std::option::Option<crate::model::Budget>,
}
impl UpdateBudgetInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn new_budget(&self) -> std::option::Option<&crate::model::Budget> {
self.new_budget.as_ref()
}
}
impl std::fmt::Debug for UpdateBudgetInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateBudgetInput");
formatter.field("account_id", &self.account_id);
formatter.field("new_budget", &self.new_budget);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExecuteBudgetActionInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub action_id: std::option::Option<std::string::String>,
pub execution_type: std::option::Option<crate::model::ExecutionType>,
}
impl ExecuteBudgetActionInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn action_id(&self) -> std::option::Option<&str> {
self.action_id.as_deref()
}
pub fn execution_type(&self) -> std::option::Option<&crate::model::ExecutionType> {
self.execution_type.as_ref()
}
}
impl std::fmt::Debug for ExecuteBudgetActionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ExecuteBudgetActionInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("action_id", &self.action_id);
formatter.field("execution_type", &self.execution_type);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeSubscribersForNotificationInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub notification: std::option::Option<crate::model::Notification>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeSubscribersForNotificationInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn notification(&self) -> std::option::Option<&crate::model::Notification> {
self.notification.as_ref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for DescribeSubscribersForNotificationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeSubscribersForNotificationInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("notification", &self.notification);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeNotificationsForBudgetInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeNotificationsForBudgetInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for DescribeNotificationsForBudgetInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeNotificationsForBudgetInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeBudgetsInput {
pub account_id: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeBudgetsInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for DescribeBudgetsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeBudgetsInput");
formatter.field("account_id", &self.account_id);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeBudgetPerformanceHistoryInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub time_period: std::option::Option<crate::model::TimePeriod>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeBudgetPerformanceHistoryInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn time_period(&self) -> std::option::Option<&crate::model::TimePeriod> {
self.time_period.as_ref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for DescribeBudgetPerformanceHistoryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeBudgetPerformanceHistoryInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("time_period", &self.time_period);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeBudgetActionsForBudgetInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeBudgetActionsForBudgetInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for DescribeBudgetActionsForBudgetInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeBudgetActionsForBudgetInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeBudgetActionsForAccountInput {
pub account_id: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeBudgetActionsForAccountInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for DescribeBudgetActionsForAccountInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeBudgetActionsForAccountInput");
formatter.field("account_id", &self.account_id);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeBudgetActionHistoriesInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub action_id: std::option::Option<std::string::String>,
pub time_period: std::option::Option<crate::model::TimePeriod>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeBudgetActionHistoriesInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn action_id(&self) -> std::option::Option<&str> {
self.action_id.as_deref()
}
pub fn time_period(&self) -> std::option::Option<&crate::model::TimePeriod> {
self.time_period.as_ref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for DescribeBudgetActionHistoriesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeBudgetActionHistoriesInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("action_id", &self.action_id);
formatter.field("time_period", &self.time_period);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeBudgetActionInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub action_id: std::option::Option<std::string::String>,
}
impl DescribeBudgetActionInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn action_id(&self) -> std::option::Option<&str> {
self.action_id.as_deref()
}
}
impl std::fmt::Debug for DescribeBudgetActionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeBudgetActionInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("action_id", &self.action_id);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeBudgetInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
}
impl DescribeBudgetInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
}
impl std::fmt::Debug for DescribeBudgetInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeBudgetInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteSubscriberInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub notification: std::option::Option<crate::model::Notification>,
pub subscriber: std::option::Option<crate::model::Subscriber>,
}
impl DeleteSubscriberInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn notification(&self) -> std::option::Option<&crate::model::Notification> {
self.notification.as_ref()
}
pub fn subscriber(&self) -> std::option::Option<&crate::model::Subscriber> {
self.subscriber.as_ref()
}
}
impl std::fmt::Debug for DeleteSubscriberInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteSubscriberInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("notification", &self.notification);
formatter.field("subscriber", &self.subscriber);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteNotificationInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub notification: std::option::Option<crate::model::Notification>,
}
impl DeleteNotificationInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn notification(&self) -> std::option::Option<&crate::model::Notification> {
self.notification.as_ref()
}
}
impl std::fmt::Debug for DeleteNotificationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteNotificationInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("notification", &self.notification);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBudgetActionInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub action_id: std::option::Option<std::string::String>,
}
impl DeleteBudgetActionInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn action_id(&self) -> std::option::Option<&str> {
self.action_id.as_deref()
}
}
impl std::fmt::Debug for DeleteBudgetActionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBudgetActionInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("action_id", &self.action_id);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBudgetInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
}
impl DeleteBudgetInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
}
impl std::fmt::Debug for DeleteBudgetInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBudgetInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateSubscriberInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub notification: std::option::Option<crate::model::Notification>,
pub subscriber: std::option::Option<crate::model::Subscriber>,
}
impl CreateSubscriberInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn notification(&self) -> std::option::Option<&crate::model::Notification> {
self.notification.as_ref()
}
pub fn subscriber(&self) -> std::option::Option<&crate::model::Subscriber> {
self.subscriber.as_ref()
}
}
impl std::fmt::Debug for CreateSubscriberInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateSubscriberInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("notification", &self.notification);
formatter.field("subscriber", &self.subscriber);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateNotificationInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub notification: std::option::Option<crate::model::Notification>,
pub subscribers: std::option::Option<std::vec::Vec<crate::model::Subscriber>>,
}
impl CreateNotificationInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn notification(&self) -> std::option::Option<&crate::model::Notification> {
self.notification.as_ref()
}
pub fn subscribers(&self) -> std::option::Option<&[crate::model::Subscriber]> {
self.subscribers.as_deref()
}
}
impl std::fmt::Debug for CreateNotificationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateNotificationInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("notification", &self.notification);
formatter.field("subscribers", &self.subscribers);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateBudgetActionInput {
pub account_id: std::option::Option<std::string::String>,
pub budget_name: std::option::Option<std::string::String>,
pub notification_type: std::option::Option<crate::model::NotificationType>,
pub action_type: std::option::Option<crate::model::ActionType>,
pub action_threshold: std::option::Option<crate::model::ActionThreshold>,
pub definition: std::option::Option<crate::model::Definition>,
pub execution_role_arn: std::option::Option<std::string::String>,
pub approval_model: std::option::Option<crate::model::ApprovalModel>,
pub subscribers: std::option::Option<std::vec::Vec<crate::model::Subscriber>>,
}
impl CreateBudgetActionInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget_name(&self) -> std::option::Option<&str> {
self.budget_name.as_deref()
}
pub fn notification_type(&self) -> std::option::Option<&crate::model::NotificationType> {
self.notification_type.as_ref()
}
pub fn action_type(&self) -> std::option::Option<&crate::model::ActionType> {
self.action_type.as_ref()
}
pub fn action_threshold(&self) -> std::option::Option<&crate::model::ActionThreshold> {
self.action_threshold.as_ref()
}
pub fn definition(&self) -> std::option::Option<&crate::model::Definition> {
self.definition.as_ref()
}
pub fn execution_role_arn(&self) -> std::option::Option<&str> {
self.execution_role_arn.as_deref()
}
pub fn approval_model(&self) -> std::option::Option<&crate::model::ApprovalModel> {
self.approval_model.as_ref()
}
pub fn subscribers(&self) -> std::option::Option<&[crate::model::Subscriber]> {
self.subscribers.as_deref()
}
}
impl std::fmt::Debug for CreateBudgetActionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateBudgetActionInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget_name", &self.budget_name);
formatter.field("notification_type", &self.notification_type);
formatter.field("action_type", &self.action_type);
formatter.field("action_threshold", &self.action_threshold);
formatter.field("definition", &self.definition);
formatter.field("execution_role_arn", &self.execution_role_arn);
formatter.field("approval_model", &self.approval_model);
formatter.field("subscribers", &self.subscribers);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateBudgetInput {
pub account_id: std::option::Option<std::string::String>,
pub budget: std::option::Option<crate::model::Budget>,
pub notifications_with_subscribers:
std::option::Option<std::vec::Vec<crate::model::NotificationWithSubscribers>>,
}
impl CreateBudgetInput {
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn budget(&self) -> std::option::Option<&crate::model::Budget> {
self.budget.as_ref()
}
pub fn notifications_with_subscribers(
&self,
) -> std::option::Option<&[crate::model::NotificationWithSubscribers]> {
self.notifications_with_subscribers.as_deref()
}
}
impl std::fmt::Debug for CreateBudgetInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateBudgetInput");
formatter.field("account_id", &self.account_id);
formatter.field("budget", &self.budget);
formatter.field(
"notifications_with_subscribers",
&self.notifications_with_subscribers,
);
formatter.finish()
}
}