use std::fmt::Write;
pub mod associate_kms_key_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::AssociateKmsKeyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::AssociateKmsKeyInput {
log_group_name: self.log_group_name,
kms_key_id: self.kms_key_id,
})
}
}
}
#[doc(hidden)]
pub type AssociateKmsKeyInputOperationOutputAlias = crate::operation::AssociateKmsKey;
#[doc(hidden)]
pub type AssociateKmsKeyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl AssociateKmsKeyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateKmsKey,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::AssociateKmsKeyInput,
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::AssociateKmsKeyInput,
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::AssociateKmsKeyInput,
) -> 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"),
"Logs_20140328.AssociateKmsKey",
);
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_associate_kms_key(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::AssociateKmsKey::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateKmsKey",
"cloudwatchlogs",
));
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::associate_kms_key_input::Builder {
crate::input::associate_kms_key_input::Builder::default()
}
}
pub mod cancel_export_task_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) task_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn task_id(mut self, input: impl Into<std::string::String>) -> Self {
self.task_id = Some(input.into());
self
}
pub fn set_task_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.task_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CancelExportTaskInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CancelExportTaskInput {
task_id: self.task_id,
})
}
}
}
#[doc(hidden)]
pub type CancelExportTaskInputOperationOutputAlias = crate::operation::CancelExportTask;
#[doc(hidden)]
pub type CancelExportTaskInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CancelExportTaskInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CancelExportTask,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CancelExportTaskInput,
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::CancelExportTaskInput,
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::CancelExportTaskInput,
) -> 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"),
"Logs_20140328.CancelExportTask",
);
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_cancel_export_task(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CancelExportTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CancelExportTask",
"cloudwatchlogs",
));
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::cancel_export_task_input::Builder {
crate::input::cancel_export_task_input::Builder::default()
}
}
pub mod create_export_task_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) task_name: std::option::Option<std::string::String>,
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) log_stream_name_prefix: std::option::Option<std::string::String>,
pub(crate) from: std::option::Option<i64>,
pub(crate) to: std::option::Option<i64>,
pub(crate) destination: std::option::Option<std::string::String>,
pub(crate) destination_prefix: std::option::Option<std::string::String>,
}
impl Builder {
pub fn task_name(mut self, input: impl Into<std::string::String>) -> Self {
self.task_name = Some(input.into());
self
}
pub fn set_task_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.task_name = input;
self
}
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn log_stream_name_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.log_stream_name_prefix = Some(input.into());
self
}
pub fn set_log_stream_name_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_stream_name_prefix = input;
self
}
pub fn from(mut self, input: i64) -> Self {
self.from = Some(input);
self
}
pub fn set_from(mut self, input: std::option::Option<i64>) -> Self {
self.from = input;
self
}
pub fn to(mut self, input: i64) -> Self {
self.to = Some(input);
self
}
pub fn set_to(mut self, input: std::option::Option<i64>) -> Self {
self.to = input;
self
}
pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
self.destination = Some(input.into());
self
}
pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
self.destination = input;
self
}
pub fn destination_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_prefix = Some(input.into());
self
}
pub fn set_destination_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_prefix = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateExportTaskInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateExportTaskInput {
task_name: self.task_name,
log_group_name: self.log_group_name,
log_stream_name_prefix: self.log_stream_name_prefix,
from: self.from,
to: self.to,
destination: self.destination,
destination_prefix: self.destination_prefix,
})
}
}
}
#[doc(hidden)]
pub type CreateExportTaskInputOperationOutputAlias = crate::operation::CreateExportTask;
#[doc(hidden)]
pub type CreateExportTaskInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateExportTaskInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateExportTask,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateExportTaskInput,
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::CreateExportTaskInput,
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::CreateExportTaskInput,
) -> 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"),
"Logs_20140328.CreateExportTask",
);
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_export_task(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateExportTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateExportTask",
"cloudwatchlogs",
));
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_export_task_input::Builder {
crate::input::create_export_task_input::Builder::default()
}
}
pub mod create_log_group_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateLogGroupInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateLogGroupInput {
log_group_name: self.log_group_name,
kms_key_id: self.kms_key_id,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type CreateLogGroupInputOperationOutputAlias = crate::operation::CreateLogGroup;
#[doc(hidden)]
pub type CreateLogGroupInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateLogGroupInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateLogGroup,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateLogGroupInput,
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::CreateLogGroupInput,
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::CreateLogGroupInput,
) -> 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"),
"Logs_20140328.CreateLogGroup",
);
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_log_group(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateLogGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateLogGroup",
"cloudwatchlogs",
));
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_log_group_input::Builder {
crate::input::create_log_group_input::Builder::default()
}
}
pub mod create_log_stream_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) log_stream_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn log_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_stream_name = Some(input.into());
self
}
pub fn set_log_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_stream_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateLogStreamInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateLogStreamInput {
log_group_name: self.log_group_name,
log_stream_name: self.log_stream_name,
})
}
}
}
#[doc(hidden)]
pub type CreateLogStreamInputOperationOutputAlias = crate::operation::CreateLogStream;
#[doc(hidden)]
pub type CreateLogStreamInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateLogStreamInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateLogStream,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateLogStreamInput,
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::CreateLogStreamInput,
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::CreateLogStreamInput,
) -> 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"),
"Logs_20140328.CreateLogStream",
);
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_log_stream(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateLogStream::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateLogStream",
"cloudwatchlogs",
));
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_log_stream_input::Builder {
crate::input::create_log_stream_input::Builder::default()
}
}
pub mod delete_destination_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_name = Some(input.into());
self
}
pub fn set_destination_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteDestinationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteDestinationInput {
destination_name: self.destination_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteDestinationInputOperationOutputAlias = crate::operation::DeleteDestination;
#[doc(hidden)]
pub type DeleteDestinationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteDestinationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteDestination,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteDestinationInput,
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::DeleteDestinationInput,
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::DeleteDestinationInput,
) -> 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"),
"Logs_20140328.DeleteDestination",
);
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_destination(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteDestination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDestination",
"cloudwatchlogs",
));
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_destination_input::Builder {
crate::input::delete_destination_input::Builder::default()
}
}
pub mod delete_log_group_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteLogGroupInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteLogGroupInput {
log_group_name: self.log_group_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteLogGroupInputOperationOutputAlias = crate::operation::DeleteLogGroup;
#[doc(hidden)]
pub type DeleteLogGroupInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteLogGroupInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteLogGroup,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteLogGroupInput,
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::DeleteLogGroupInput,
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::DeleteLogGroupInput,
) -> 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"),
"Logs_20140328.DeleteLogGroup",
);
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_log_group(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteLogGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteLogGroup",
"cloudwatchlogs",
));
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_log_group_input::Builder {
crate::input::delete_log_group_input::Builder::default()
}
}
pub mod delete_log_stream_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) log_stream_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn log_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_stream_name = Some(input.into());
self
}
pub fn set_log_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_stream_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteLogStreamInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteLogStreamInput {
log_group_name: self.log_group_name,
log_stream_name: self.log_stream_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteLogStreamInputOperationOutputAlias = crate::operation::DeleteLogStream;
#[doc(hidden)]
pub type DeleteLogStreamInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteLogStreamInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteLogStream,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteLogStreamInput,
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::DeleteLogStreamInput,
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::DeleteLogStreamInput,
) -> 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"),
"Logs_20140328.DeleteLogStream",
);
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_log_stream(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteLogStream::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteLogStream",
"cloudwatchlogs",
));
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_log_stream_input::Builder {
crate::input::delete_log_stream_input::Builder::default()
}
}
pub mod delete_metric_filter_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) filter_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn filter_name(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_name = Some(input.into());
self
}
pub fn set_filter_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.filter_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteMetricFilterInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteMetricFilterInput {
log_group_name: self.log_group_name,
filter_name: self.filter_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteMetricFilterInputOperationOutputAlias = crate::operation::DeleteMetricFilter;
#[doc(hidden)]
pub type DeleteMetricFilterInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteMetricFilterInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteMetricFilter,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteMetricFilterInput,
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::DeleteMetricFilterInput,
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::DeleteMetricFilterInput,
) -> 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"),
"Logs_20140328.DeleteMetricFilter",
);
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_metric_filter(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteMetricFilter::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteMetricFilter",
"cloudwatchlogs",
));
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_metric_filter_input::Builder {
crate::input::delete_metric_filter_input::Builder::default()
}
}
pub mod delete_query_definition_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) query_definition_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn query_definition_id(mut self, input: impl Into<std::string::String>) -> Self {
self.query_definition_id = Some(input.into());
self
}
pub fn set_query_definition_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.query_definition_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteQueryDefinitionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteQueryDefinitionInput {
query_definition_id: self.query_definition_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteQueryDefinitionInputOperationOutputAlias = crate::operation::DeleteQueryDefinition;
#[doc(hidden)]
pub type DeleteQueryDefinitionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteQueryDefinitionInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteQueryDefinition,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteQueryDefinitionInput,
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::DeleteQueryDefinitionInput,
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::DeleteQueryDefinitionInput,
) -> 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"),
"Logs_20140328.DeleteQueryDefinition",
);
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_query_definition(
&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteQueryDefinition::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteQueryDefinition",
"cloudwatchlogs",
));
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_query_definition_input::Builder {
crate::input::delete_query_definition_input::Builder::default()
}
}
pub mod delete_resource_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) policy_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn policy_name(mut self, input: impl Into<std::string::String>) -> Self {
self.policy_name = Some(input.into());
self
}
pub fn set_policy_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.policy_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteResourcePolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteResourcePolicyInput {
policy_name: self.policy_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteResourcePolicyInputOperationOutputAlias = crate::operation::DeleteResourcePolicy;
#[doc(hidden)]
pub type DeleteResourcePolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteResourcePolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteResourcePolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteResourcePolicyInput,
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::DeleteResourcePolicyInput,
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::DeleteResourcePolicyInput,
) -> 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"),
"Logs_20140328.DeleteResourcePolicy",
);
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_resource_policy(
&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteResourcePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteResourcePolicy",
"cloudwatchlogs",
));
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_resource_policy_input::Builder {
crate::input::delete_resource_policy_input::Builder::default()
}
}
pub mod delete_retention_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteRetentionPolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteRetentionPolicyInput {
log_group_name: self.log_group_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteRetentionPolicyInputOperationOutputAlias = crate::operation::DeleteRetentionPolicy;
#[doc(hidden)]
pub type DeleteRetentionPolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteRetentionPolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteRetentionPolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteRetentionPolicyInput,
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::DeleteRetentionPolicyInput,
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::DeleteRetentionPolicyInput,
) -> 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"),
"Logs_20140328.DeleteRetentionPolicy",
);
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_retention_policy(
&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteRetentionPolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteRetentionPolicy",
"cloudwatchlogs",
));
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_retention_policy_input::Builder {
crate::input::delete_retention_policy_input::Builder::default()
}
}
pub mod delete_subscription_filter_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) filter_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn filter_name(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_name = Some(input.into());
self
}
pub fn set_filter_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.filter_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteSubscriptionFilterInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteSubscriptionFilterInput {
log_group_name: self.log_group_name,
filter_name: self.filter_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteSubscriptionFilterInputOperationOutputAlias =
crate::operation::DeleteSubscriptionFilter;
#[doc(hidden)]
pub type DeleteSubscriptionFilterInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteSubscriptionFilterInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteSubscriptionFilter,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteSubscriptionFilterInput,
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::DeleteSubscriptionFilterInput,
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::DeleteSubscriptionFilterInput,
) -> 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"),
"Logs_20140328.DeleteSubscriptionFilter",
);
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_subscription_filter(
&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteSubscriptionFilter::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteSubscriptionFilter",
"cloudwatchlogs",
));
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_subscription_filter_input::Builder {
crate::input::delete_subscription_filter_input::Builder::default()
}
}
pub mod describe_destinations_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination_name_prefix: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
pub fn destination_name_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_name_prefix = Some(input.into());
self
}
pub fn set_destination_name_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_name_prefix = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeDestinationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeDestinationsInput {
destination_name_prefix: self.destination_name_prefix,
next_token: self.next_token,
limit: self.limit,
})
}
}
}
#[doc(hidden)]
pub type DescribeDestinationsInputOperationOutputAlias = crate::operation::DescribeDestinations;
#[doc(hidden)]
pub type DescribeDestinationsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeDestinationsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeDestinations,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeDestinationsInput,
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::DescribeDestinationsInput,
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::DescribeDestinationsInput,
) -> 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"),
"Logs_20140328.DescribeDestinations",
);
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_destinations(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DescribeDestinations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDestinations",
"cloudwatchlogs",
));
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_destinations_input::Builder {
crate::input::describe_destinations_input::Builder::default()
}
}
pub mod describe_export_tasks_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) task_id: std::option::Option<std::string::String>,
pub(crate) status_code: std::option::Option<crate::model::ExportTaskStatusCode>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
pub fn task_id(mut self, input: impl Into<std::string::String>) -> Self {
self.task_id = Some(input.into());
self
}
pub fn set_task_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.task_id = input;
self
}
pub fn status_code(mut self, input: crate::model::ExportTaskStatusCode) -> Self {
self.status_code = Some(input);
self
}
pub fn set_status_code(
mut self,
input: std::option::Option<crate::model::ExportTaskStatusCode>,
) -> Self {
self.status_code = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeExportTasksInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeExportTasksInput {
task_id: self.task_id,
status_code: self.status_code,
next_token: self.next_token,
limit: self.limit,
})
}
}
}
#[doc(hidden)]
pub type DescribeExportTasksInputOperationOutputAlias = crate::operation::DescribeExportTasks;
#[doc(hidden)]
pub type DescribeExportTasksInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeExportTasksInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeExportTasks,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeExportTasksInput,
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::DescribeExportTasksInput,
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::DescribeExportTasksInput,
) -> 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"),
"Logs_20140328.DescribeExportTasks",
);
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_export_tasks(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DescribeExportTasks::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeExportTasks",
"cloudwatchlogs",
));
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_export_tasks_input::Builder {
crate::input::describe_export_tasks_input::Builder::default()
}
}
pub mod describe_log_groups_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name_prefix: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
pub fn log_group_name_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name_prefix = Some(input.into());
self
}
pub fn set_log_group_name_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name_prefix = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeLogGroupsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeLogGroupsInput {
log_group_name_prefix: self.log_group_name_prefix,
next_token: self.next_token,
limit: self.limit,
})
}
}
}
#[doc(hidden)]
pub type DescribeLogGroupsInputOperationOutputAlias = crate::operation::DescribeLogGroups;
#[doc(hidden)]
pub type DescribeLogGroupsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeLogGroupsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeLogGroups,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeLogGroupsInput,
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::DescribeLogGroupsInput,
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::DescribeLogGroupsInput,
) -> 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"),
"Logs_20140328.DescribeLogGroups",
);
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_log_groups(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DescribeLogGroups::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeLogGroups",
"cloudwatchlogs",
));
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_log_groups_input::Builder {
crate::input::describe_log_groups_input::Builder::default()
}
}
pub mod describe_log_streams_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) log_stream_name_prefix: std::option::Option<std::string::String>,
pub(crate) order_by: std::option::Option<crate::model::OrderBy>,
pub(crate) descending: std::option::Option<bool>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn log_stream_name_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.log_stream_name_prefix = Some(input.into());
self
}
pub fn set_log_stream_name_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_stream_name_prefix = input;
self
}
pub fn order_by(mut self, input: crate::model::OrderBy) -> Self {
self.order_by = Some(input);
self
}
pub fn set_order_by(mut self, input: std::option::Option<crate::model::OrderBy>) -> Self {
self.order_by = input;
self
}
pub fn descending(mut self, input: bool) -> Self {
self.descending = Some(input);
self
}
pub fn set_descending(mut self, input: std::option::Option<bool>) -> Self {
self.descending = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeLogStreamsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeLogStreamsInput {
log_group_name: self.log_group_name,
log_stream_name_prefix: self.log_stream_name_prefix,
order_by: self.order_by,
descending: self.descending,
next_token: self.next_token,
limit: self.limit,
})
}
}
}
#[doc(hidden)]
pub type DescribeLogStreamsInputOperationOutputAlias = crate::operation::DescribeLogStreams;
#[doc(hidden)]
pub type DescribeLogStreamsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeLogStreamsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeLogStreams,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeLogStreamsInput,
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::DescribeLogStreamsInput,
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::DescribeLogStreamsInput,
) -> 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"),
"Logs_20140328.DescribeLogStreams",
);
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_log_streams(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DescribeLogStreams::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeLogStreams",
"cloudwatchlogs",
));
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_log_streams_input::Builder {
crate::input::describe_log_streams_input::Builder::default()
}
}
pub mod describe_metric_filters_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) filter_name_prefix: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) metric_name: std::option::Option<std::string::String>,
pub(crate) metric_namespace: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn filter_name_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_name_prefix = Some(input.into());
self
}
pub fn set_filter_name_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.filter_name_prefix = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn metric_name(mut self, input: impl Into<std::string::String>) -> Self {
self.metric_name = Some(input.into());
self
}
pub fn set_metric_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.metric_name = input;
self
}
pub fn metric_namespace(mut self, input: impl Into<std::string::String>) -> Self {
self.metric_namespace = Some(input.into());
self
}
pub fn set_metric_namespace(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.metric_namespace = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeMetricFiltersInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeMetricFiltersInput {
log_group_name: self.log_group_name,
filter_name_prefix: self.filter_name_prefix,
next_token: self.next_token,
limit: self.limit,
metric_name: self.metric_name,
metric_namespace: self.metric_namespace,
})
}
}
}
#[doc(hidden)]
pub type DescribeMetricFiltersInputOperationOutputAlias = crate::operation::DescribeMetricFilters;
#[doc(hidden)]
pub type DescribeMetricFiltersInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeMetricFiltersInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeMetricFilters,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeMetricFiltersInput,
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::DescribeMetricFiltersInput,
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::DescribeMetricFiltersInput,
) -> 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"),
"Logs_20140328.DescribeMetricFilters",
);
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_metric_filters(
&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DescribeMetricFilters::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeMetricFilters",
"cloudwatchlogs",
));
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_metric_filters_input::Builder {
crate::input::describe_metric_filters_input::Builder::default()
}
}
pub mod describe_queries_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::QueryStatus>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn status(mut self, input: crate::model::QueryStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(mut self, input: std::option::Option<crate::model::QueryStatus>) -> Self {
self.status = 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::DescribeQueriesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeQueriesInput {
log_group_name: self.log_group_name,
status: self.status,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeQueriesInputOperationOutputAlias = crate::operation::DescribeQueries;
#[doc(hidden)]
pub type DescribeQueriesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeQueriesInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeQueries,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeQueriesInput,
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::DescribeQueriesInput,
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::DescribeQueriesInput,
) -> 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"),
"Logs_20140328.DescribeQueries",
);
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_queries(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DescribeQueries::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeQueries",
"cloudwatchlogs",
));
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_queries_input::Builder {
crate::input::describe_queries_input::Builder::default()
}
}
pub mod describe_query_definitions_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) query_definition_name_prefix: 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 query_definition_name_prefix(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.query_definition_name_prefix = Some(input.into());
self
}
pub fn set_query_definition_name_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.query_definition_name_prefix = 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::DescribeQueryDefinitionsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeQueryDefinitionsInput {
query_definition_name_prefix: self.query_definition_name_prefix,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type DescribeQueryDefinitionsInputOperationOutputAlias =
crate::operation::DescribeQueryDefinitions;
#[doc(hidden)]
pub type DescribeQueryDefinitionsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeQueryDefinitionsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeQueryDefinitions,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeQueryDefinitionsInput,
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::DescribeQueryDefinitionsInput,
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::DescribeQueryDefinitionsInput,
) -> 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"),
"Logs_20140328.DescribeQueryDefinitions",
);
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_query_definitions(
&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DescribeQueryDefinitions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeQueryDefinitions",
"cloudwatchlogs",
));
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_query_definitions_input::Builder {
crate::input::describe_query_definitions_input::Builder::default()
}
}
pub mod describe_resource_policies_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeResourcePoliciesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeResourcePoliciesInput {
next_token: self.next_token,
limit: self.limit,
})
}
}
}
#[doc(hidden)]
pub type DescribeResourcePoliciesInputOperationOutputAlias =
crate::operation::DescribeResourcePolicies;
#[doc(hidden)]
pub type DescribeResourcePoliciesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeResourcePoliciesInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeResourcePolicies,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeResourcePoliciesInput,
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::DescribeResourcePoliciesInput,
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::DescribeResourcePoliciesInput,
) -> 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"),
"Logs_20140328.DescribeResourcePolicies",
);
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_resource_policies(
&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DescribeResourcePolicies::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeResourcePolicies",
"cloudwatchlogs",
));
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_resource_policies_input::Builder {
crate::input::describe_resource_policies_input::Builder::default()
}
}
pub mod describe_subscription_filters_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) filter_name_prefix: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn filter_name_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_name_prefix = Some(input.into());
self
}
pub fn set_filter_name_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.filter_name_prefix = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeSubscriptionFiltersInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeSubscriptionFiltersInput {
log_group_name: self.log_group_name,
filter_name_prefix: self.filter_name_prefix,
next_token: self.next_token,
limit: self.limit,
})
}
}
}
#[doc(hidden)]
pub type DescribeSubscriptionFiltersInputOperationOutputAlias =
crate::operation::DescribeSubscriptionFilters;
#[doc(hidden)]
pub type DescribeSubscriptionFiltersInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeSubscriptionFiltersInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeSubscriptionFilters,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeSubscriptionFiltersInput,
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::DescribeSubscriptionFiltersInput,
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::DescribeSubscriptionFiltersInput,
) -> 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"),
"Logs_20140328.DescribeSubscriptionFilters",
);
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_subscription_filters(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DescribeSubscriptionFilters::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeSubscriptionFilters",
"cloudwatchlogs",
));
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_subscription_filters_input::Builder {
crate::input::describe_subscription_filters_input::Builder::default()
}
}
pub mod disassociate_kms_key_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DisassociateKmsKeyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DisassociateKmsKeyInput {
log_group_name: self.log_group_name,
})
}
}
}
#[doc(hidden)]
pub type DisassociateKmsKeyInputOperationOutputAlias = crate::operation::DisassociateKmsKey;
#[doc(hidden)]
pub type DisassociateKmsKeyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DisassociateKmsKeyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateKmsKey,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DisassociateKmsKeyInput,
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::DisassociateKmsKeyInput,
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::DisassociateKmsKeyInput,
) -> 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"),
"Logs_20140328.DisassociateKmsKey",
);
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_disassociate_kms_key(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DisassociateKmsKey::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateKmsKey",
"cloudwatchlogs",
));
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::disassociate_kms_key_input::Builder {
crate::input::disassociate_kms_key_input::Builder::default()
}
}
pub mod filter_log_events_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) log_stream_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) log_stream_name_prefix: std::option::Option<std::string::String>,
pub(crate) start_time: std::option::Option<i64>,
pub(crate) end_time: std::option::Option<i64>,
pub(crate) filter_pattern: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) interleaved: std::option::Option<bool>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn log_stream_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.log_stream_names.unwrap_or_default();
v.push(input.into());
self.log_stream_names = Some(v);
self
}
pub fn set_log_stream_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.log_stream_names = input;
self
}
pub fn log_stream_name_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.log_stream_name_prefix = Some(input.into());
self
}
pub fn set_log_stream_name_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_stream_name_prefix = input;
self
}
pub fn start_time(mut self, input: i64) -> Self {
self.start_time = Some(input);
self
}
pub fn set_start_time(mut self, input: std::option::Option<i64>) -> Self {
self.start_time = input;
self
}
pub fn end_time(mut self, input: i64) -> Self {
self.end_time = Some(input);
self
}
pub fn set_end_time(mut self, input: std::option::Option<i64>) -> Self {
self.end_time = input;
self
}
pub fn filter_pattern(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_pattern = Some(input.into());
self
}
pub fn set_filter_pattern(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.filter_pattern = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn interleaved(mut self, input: bool) -> Self {
self.interleaved = Some(input);
self
}
pub fn set_interleaved(mut self, input: std::option::Option<bool>) -> Self {
self.interleaved = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::FilterLogEventsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::FilterLogEventsInput {
log_group_name: self.log_group_name,
log_stream_names: self.log_stream_names,
log_stream_name_prefix: self.log_stream_name_prefix,
start_time: self.start_time,
end_time: self.end_time,
filter_pattern: self.filter_pattern,
next_token: self.next_token,
limit: self.limit,
interleaved: self.interleaved,
})
}
}
}
#[doc(hidden)]
pub type FilterLogEventsInputOperationOutputAlias = crate::operation::FilterLogEvents;
#[doc(hidden)]
pub type FilterLogEventsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl FilterLogEventsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::FilterLogEvents,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::FilterLogEventsInput,
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::FilterLogEventsInput,
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::FilterLogEventsInput,
) -> 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"),
"Logs_20140328.FilterLogEvents",
);
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_filter_log_events(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::FilterLogEvents::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"FilterLogEvents",
"cloudwatchlogs",
));
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::filter_log_events_input::Builder {
crate::input::filter_log_events_input::Builder::default()
}
}
pub mod get_log_events_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) log_stream_name: std::option::Option<std::string::String>,
pub(crate) start_time: std::option::Option<i64>,
pub(crate) end_time: std::option::Option<i64>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) start_from_head: std::option::Option<bool>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn log_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_stream_name = Some(input.into());
self
}
pub fn set_log_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_stream_name = input;
self
}
pub fn start_time(mut self, input: i64) -> Self {
self.start_time = Some(input);
self
}
pub fn set_start_time(mut self, input: std::option::Option<i64>) -> Self {
self.start_time = input;
self
}
pub fn end_time(mut self, input: i64) -> Self {
self.end_time = Some(input);
self
}
pub fn set_end_time(mut self, input: std::option::Option<i64>) -> Self {
self.end_time = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn start_from_head(mut self, input: bool) -> Self {
self.start_from_head = Some(input);
self
}
pub fn set_start_from_head(mut self, input: std::option::Option<bool>) -> Self {
self.start_from_head = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetLogEventsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetLogEventsInput {
log_group_name: self.log_group_name,
log_stream_name: self.log_stream_name,
start_time: self.start_time,
end_time: self.end_time,
next_token: self.next_token,
limit: self.limit,
start_from_head: self.start_from_head,
})
}
}
}
#[doc(hidden)]
pub type GetLogEventsInputOperationOutputAlias = crate::operation::GetLogEvents;
#[doc(hidden)]
pub type GetLogEventsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetLogEventsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetLogEvents,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetLogEventsInput,
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::GetLogEventsInput,
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::GetLogEventsInput,
) -> 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"),
"Logs_20140328.GetLogEvents",
);
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_get_log_events(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetLogEvents::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLogEvents",
"cloudwatchlogs",
));
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::get_log_events_input::Builder {
crate::input::get_log_events_input::Builder::default()
}
}
pub mod get_log_group_fields_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) time: std::option::Option<i64>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn time(mut self, input: i64) -> Self {
self.time = Some(input);
self
}
pub fn set_time(mut self, input: std::option::Option<i64>) -> Self {
self.time = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetLogGroupFieldsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetLogGroupFieldsInput {
log_group_name: self.log_group_name,
time: self.time,
})
}
}
}
#[doc(hidden)]
pub type GetLogGroupFieldsInputOperationOutputAlias = crate::operation::GetLogGroupFields;
#[doc(hidden)]
pub type GetLogGroupFieldsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetLogGroupFieldsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetLogGroupFields,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetLogGroupFieldsInput,
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::GetLogGroupFieldsInput,
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::GetLogGroupFieldsInput,
) -> 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"),
"Logs_20140328.GetLogGroupFields",
);
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_get_log_group_fields(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetLogGroupFields::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLogGroupFields",
"cloudwatchlogs",
));
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::get_log_group_fields_input::Builder {
crate::input::get_log_group_fields_input::Builder::default()
}
}
pub mod get_log_record_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_record_pointer: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_record_pointer(mut self, input: impl Into<std::string::String>) -> Self {
self.log_record_pointer = Some(input.into());
self
}
pub fn set_log_record_pointer(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_record_pointer = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetLogRecordInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetLogRecordInput {
log_record_pointer: self.log_record_pointer,
})
}
}
}
#[doc(hidden)]
pub type GetLogRecordInputOperationOutputAlias = crate::operation::GetLogRecord;
#[doc(hidden)]
pub type GetLogRecordInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetLogRecordInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetLogRecord,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetLogRecordInput,
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::GetLogRecordInput,
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::GetLogRecordInput,
) -> 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"),
"Logs_20140328.GetLogRecord",
);
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_get_log_record(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetLogRecord::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLogRecord",
"cloudwatchlogs",
));
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::get_log_record_input::Builder {
crate::input::get_log_record_input::Builder::default()
}
}
pub mod get_query_results_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) query_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn query_id(mut self, input: impl Into<std::string::String>) -> Self {
self.query_id = Some(input.into());
self
}
pub fn set_query_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetQueryResultsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetQueryResultsInput {
query_id: self.query_id,
})
}
}
}
#[doc(hidden)]
pub type GetQueryResultsInputOperationOutputAlias = crate::operation::GetQueryResults;
#[doc(hidden)]
pub type GetQueryResultsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetQueryResultsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetQueryResults,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetQueryResultsInput,
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::GetQueryResultsInput,
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::GetQueryResultsInput,
) -> 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"),
"Logs_20140328.GetQueryResults",
);
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_get_query_results(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetQueryResults::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetQueryResults",
"cloudwatchlogs",
));
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::get_query_results_input::Builder {
crate::input::get_query_results_input::Builder::default()
}
}
pub mod list_tags_log_group_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListTagsLogGroupInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListTagsLogGroupInput {
log_group_name: self.log_group_name,
})
}
}
}
#[doc(hidden)]
pub type ListTagsLogGroupInputOperationOutputAlias = crate::operation::ListTagsLogGroup;
#[doc(hidden)]
pub type ListTagsLogGroupInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListTagsLogGroupInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsLogGroup,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListTagsLogGroupInput,
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::ListTagsLogGroupInput,
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::ListTagsLogGroupInput,
) -> 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"),
"Logs_20140328.ListTagsLogGroup",
);
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_list_tags_log_group(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListTagsLogGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsLogGroup",
"cloudwatchlogs",
));
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::list_tags_log_group_input::Builder {
crate::input::list_tags_log_group_input::Builder::default()
}
}
pub mod put_destination_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination_name: std::option::Option<std::string::String>,
pub(crate) target_arn: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_name = Some(input.into());
self
}
pub fn set_destination_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_name = input;
self
}
pub fn target_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.target_arn = Some(input.into());
self
}
pub fn set_target_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.target_arn = input;
self
}
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutDestinationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutDestinationInput {
destination_name: self.destination_name,
target_arn: self.target_arn,
role_arn: self.role_arn,
})
}
}
}
#[doc(hidden)]
pub type PutDestinationInputOperationOutputAlias = crate::operation::PutDestination;
#[doc(hidden)]
pub type PutDestinationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutDestinationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutDestination,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutDestinationInput,
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::PutDestinationInput,
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::PutDestinationInput,
) -> 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"),
"Logs_20140328.PutDestination",
);
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_put_destination(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutDestination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutDestination",
"cloudwatchlogs",
));
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::put_destination_input::Builder {
crate::input::put_destination_input::Builder::default()
}
}
pub mod put_destination_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination_name: std::option::Option<std::string::String>,
pub(crate) access_policy: std::option::Option<std::string::String>,
}
impl Builder {
pub fn destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_name = Some(input.into());
self
}
pub fn set_destination_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_name = input;
self
}
pub fn access_policy(mut self, input: impl Into<std::string::String>) -> Self {
self.access_policy = Some(input.into());
self
}
pub fn set_access_policy(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.access_policy = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutDestinationPolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutDestinationPolicyInput {
destination_name: self.destination_name,
access_policy: self.access_policy,
})
}
}
}
#[doc(hidden)]
pub type PutDestinationPolicyInputOperationOutputAlias = crate::operation::PutDestinationPolicy;
#[doc(hidden)]
pub type PutDestinationPolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutDestinationPolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutDestinationPolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutDestinationPolicyInput,
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::PutDestinationPolicyInput,
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::PutDestinationPolicyInput,
) -> 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"),
"Logs_20140328.PutDestinationPolicy",
);
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_put_destination_policy(
&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutDestinationPolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutDestinationPolicy",
"cloudwatchlogs",
));
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::put_destination_policy_input::Builder {
crate::input::put_destination_policy_input::Builder::default()
}
}
pub mod put_log_events_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) log_stream_name: std::option::Option<std::string::String>,
pub(crate) log_events: std::option::Option<std::vec::Vec<crate::model::InputLogEvent>>,
pub(crate) sequence_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn log_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_stream_name = Some(input.into());
self
}
pub fn set_log_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_stream_name = input;
self
}
pub fn log_events(mut self, input: impl Into<crate::model::InputLogEvent>) -> Self {
let mut v = self.log_events.unwrap_or_default();
v.push(input.into());
self.log_events = Some(v);
self
}
pub fn set_log_events(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InputLogEvent>>,
) -> Self {
self.log_events = input;
self
}
pub fn sequence_token(mut self, input: impl Into<std::string::String>) -> Self {
self.sequence_token = Some(input.into());
self
}
pub fn set_sequence_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.sequence_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutLogEventsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutLogEventsInput {
log_group_name: self.log_group_name,
log_stream_name: self.log_stream_name,
log_events: self.log_events,
sequence_token: self.sequence_token,
})
}
}
}
#[doc(hidden)]
pub type PutLogEventsInputOperationOutputAlias = crate::operation::PutLogEvents;
#[doc(hidden)]
pub type PutLogEventsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutLogEventsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutLogEvents,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutLogEventsInput,
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::PutLogEventsInput,
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::PutLogEventsInput,
) -> 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"),
"Logs_20140328.PutLogEvents",
);
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_put_log_events(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutLogEvents::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutLogEvents",
"cloudwatchlogs",
));
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::put_log_events_input::Builder {
crate::input::put_log_events_input::Builder::default()
}
}
pub mod put_metric_filter_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) filter_name: std::option::Option<std::string::String>,
pub(crate) filter_pattern: std::option::Option<std::string::String>,
pub(crate) metric_transformations:
std::option::Option<std::vec::Vec<crate::model::MetricTransformation>>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn filter_name(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_name = Some(input.into());
self
}
pub fn set_filter_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.filter_name = input;
self
}
pub fn filter_pattern(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_pattern = Some(input.into());
self
}
pub fn set_filter_pattern(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.filter_pattern = input;
self
}
pub fn metric_transformations(
mut self,
input: impl Into<crate::model::MetricTransformation>,
) -> Self {
let mut v = self.metric_transformations.unwrap_or_default();
v.push(input.into());
self.metric_transformations = Some(v);
self
}
pub fn set_metric_transformations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::MetricTransformation>>,
) -> Self {
self.metric_transformations = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutMetricFilterInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutMetricFilterInput {
log_group_name: self.log_group_name,
filter_name: self.filter_name,
filter_pattern: self.filter_pattern,
metric_transformations: self.metric_transformations,
})
}
}
}
#[doc(hidden)]
pub type PutMetricFilterInputOperationOutputAlias = crate::operation::PutMetricFilter;
#[doc(hidden)]
pub type PutMetricFilterInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutMetricFilterInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutMetricFilter,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutMetricFilterInput,
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::PutMetricFilterInput,
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::PutMetricFilterInput,
) -> 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"),
"Logs_20140328.PutMetricFilter",
);
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_put_metric_filter(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutMetricFilter::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutMetricFilter",
"cloudwatchlogs",
));
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::put_metric_filter_input::Builder {
crate::input::put_metric_filter_input::Builder::default()
}
}
pub mod put_query_definition_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) query_definition_id: std::option::Option<std::string::String>,
pub(crate) log_group_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) query_string: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn query_definition_id(mut self, input: impl Into<std::string::String>) -> Self {
self.query_definition_id = Some(input.into());
self
}
pub fn set_query_definition_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.query_definition_id = input;
self
}
pub fn log_group_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.log_group_names.unwrap_or_default();
v.push(input.into());
self.log_group_names = Some(v);
self
}
pub fn set_log_group_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.log_group_names = input;
self
}
pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
self.query_string = Some(input.into());
self
}
pub fn set_query_string(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_string = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutQueryDefinitionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutQueryDefinitionInput {
name: self.name,
query_definition_id: self.query_definition_id,
log_group_names: self.log_group_names,
query_string: self.query_string,
})
}
}
}
#[doc(hidden)]
pub type PutQueryDefinitionInputOperationOutputAlias = crate::operation::PutQueryDefinition;
#[doc(hidden)]
pub type PutQueryDefinitionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutQueryDefinitionInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutQueryDefinition,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutQueryDefinitionInput,
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::PutQueryDefinitionInput,
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::PutQueryDefinitionInput,
) -> 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"),
"Logs_20140328.PutQueryDefinition",
);
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_put_query_definition(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutQueryDefinition::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutQueryDefinition",
"cloudwatchlogs",
));
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::put_query_definition_input::Builder {
crate::input::put_query_definition_input::Builder::default()
}
}
pub mod put_resource_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) policy_name: std::option::Option<std::string::String>,
pub(crate) policy_document: std::option::Option<std::string::String>,
}
impl Builder {
pub fn policy_name(mut self, input: impl Into<std::string::String>) -> Self {
self.policy_name = Some(input.into());
self
}
pub fn set_policy_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.policy_name = input;
self
}
pub fn policy_document(mut self, input: impl Into<std::string::String>) -> Self {
self.policy_document = Some(input.into());
self
}
pub fn set_policy_document(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.policy_document = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutResourcePolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutResourcePolicyInput {
policy_name: self.policy_name,
policy_document: self.policy_document,
})
}
}
}
#[doc(hidden)]
pub type PutResourcePolicyInputOperationOutputAlias = crate::operation::PutResourcePolicy;
#[doc(hidden)]
pub type PutResourcePolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutResourcePolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutResourcePolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutResourcePolicyInput,
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::PutResourcePolicyInput,
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::PutResourcePolicyInput,
) -> 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"),
"Logs_20140328.PutResourcePolicy",
);
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_put_resource_policy(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutResourcePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutResourcePolicy",
"cloudwatchlogs",
));
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::put_resource_policy_input::Builder {
crate::input::put_resource_policy_input::Builder::default()
}
}
pub mod put_retention_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) retention_in_days: std::option::Option<i32>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn retention_in_days(mut self, input: i32) -> Self {
self.retention_in_days = Some(input);
self
}
pub fn set_retention_in_days(mut self, input: std::option::Option<i32>) -> Self {
self.retention_in_days = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutRetentionPolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutRetentionPolicyInput {
log_group_name: self.log_group_name,
retention_in_days: self.retention_in_days,
})
}
}
}
#[doc(hidden)]
pub type PutRetentionPolicyInputOperationOutputAlias = crate::operation::PutRetentionPolicy;
#[doc(hidden)]
pub type PutRetentionPolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutRetentionPolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutRetentionPolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutRetentionPolicyInput,
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::PutRetentionPolicyInput,
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::PutRetentionPolicyInput,
) -> 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"),
"Logs_20140328.PutRetentionPolicy",
);
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_put_retention_policy(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutRetentionPolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutRetentionPolicy",
"cloudwatchlogs",
));
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::put_retention_policy_input::Builder {
crate::input::put_retention_policy_input::Builder::default()
}
}
pub mod put_subscription_filter_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) filter_name: std::option::Option<std::string::String>,
pub(crate) filter_pattern: std::option::Option<std::string::String>,
pub(crate) destination_arn: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) distribution: std::option::Option<crate::model::Distribution>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn filter_name(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_name = Some(input.into());
self
}
pub fn set_filter_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.filter_name = input;
self
}
pub fn filter_pattern(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_pattern = Some(input.into());
self
}
pub fn set_filter_pattern(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.filter_pattern = input;
self
}
pub fn destination_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_arn = Some(input.into());
self
}
pub fn set_destination_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_arn = input;
self
}
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn distribution(mut self, input: crate::model::Distribution) -> Self {
self.distribution = Some(input);
self
}
pub fn set_distribution(
mut self,
input: std::option::Option<crate::model::Distribution>,
) -> Self {
self.distribution = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutSubscriptionFilterInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutSubscriptionFilterInput {
log_group_name: self.log_group_name,
filter_name: self.filter_name,
filter_pattern: self.filter_pattern,
destination_arn: self.destination_arn,
role_arn: self.role_arn,
distribution: self.distribution,
})
}
}
}
#[doc(hidden)]
pub type PutSubscriptionFilterInputOperationOutputAlias = crate::operation::PutSubscriptionFilter;
#[doc(hidden)]
pub type PutSubscriptionFilterInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutSubscriptionFilterInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutSubscriptionFilter,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutSubscriptionFilterInput,
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::PutSubscriptionFilterInput,
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::PutSubscriptionFilterInput,
) -> 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"),
"Logs_20140328.PutSubscriptionFilter",
);
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_put_subscription_filter(
&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutSubscriptionFilter::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutSubscriptionFilter",
"cloudwatchlogs",
));
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::put_subscription_filter_input::Builder {
crate::input::put_subscription_filter_input::Builder::default()
}
}
pub mod start_query_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) log_group_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) start_time: std::option::Option<i64>,
pub(crate) end_time: std::option::Option<i64>,
pub(crate) query_string: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn log_group_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.log_group_names.unwrap_or_default();
v.push(input.into());
self.log_group_names = Some(v);
self
}
pub fn set_log_group_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.log_group_names = input;
self
}
pub fn start_time(mut self, input: i64) -> Self {
self.start_time = Some(input);
self
}
pub fn set_start_time(mut self, input: std::option::Option<i64>) -> Self {
self.start_time = input;
self
}
pub fn end_time(mut self, input: i64) -> Self {
self.end_time = Some(input);
self
}
pub fn set_end_time(mut self, input: std::option::Option<i64>) -> Self {
self.end_time = input;
self
}
pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
self.query_string = Some(input.into());
self
}
pub fn set_query_string(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_string = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartQueryInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartQueryInput {
log_group_name: self.log_group_name,
log_group_names: self.log_group_names,
start_time: self.start_time,
end_time: self.end_time,
query_string: self.query_string,
limit: self.limit,
})
}
}
}
#[doc(hidden)]
pub type StartQueryInputOperationOutputAlias = crate::operation::StartQuery;
#[doc(hidden)]
pub type StartQueryInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartQueryInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartQuery,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartQueryInput,
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::StartQueryInput,
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::StartQueryInput,
) -> 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"),
"Logs_20140328.StartQuery",
);
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_start_query(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::StartQuery::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartQuery",
"cloudwatchlogs",
));
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::start_query_input::Builder {
crate::input::start_query_input::Builder::default()
}
}
pub mod stop_query_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) query_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn query_id(mut self, input: impl Into<std::string::String>) -> Self {
self.query_id = Some(input.into());
self
}
pub fn set_query_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::StopQueryInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::StopQueryInput {
query_id: self.query_id,
})
}
}
}
#[doc(hidden)]
pub type StopQueryInputOperationOutputAlias = crate::operation::StopQuery;
#[doc(hidden)]
pub type StopQueryInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopQueryInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StopQuery,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopQueryInput,
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::StopQueryInput,
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::StopQueryInput,
) -> 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"),
"Logs_20140328.StopQuery",
);
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_stop_query(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::StopQuery::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopQuery",
"cloudwatchlogs",
));
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::stop_query_input::Builder {
crate::input::stop_query_input::Builder::default()
}
}
pub mod tag_log_group_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::TagLogGroupInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TagLogGroupInput {
log_group_name: self.log_group_name,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type TagLogGroupInputOperationOutputAlias = crate::operation::TagLogGroup;
#[doc(hidden)]
pub type TagLogGroupInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl TagLogGroupInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagLogGroup,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::TagLogGroupInput,
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::TagLogGroupInput,
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::TagLogGroupInput,
) -> 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"),
"Logs_20140328.TagLogGroup",
);
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_tag_log_group(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::TagLogGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagLogGroup",
"cloudwatchlogs",
));
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::tag_log_group_input::Builder {
crate::input::tag_log_group_input::Builder::default()
}
}
pub mod test_metric_filter_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter_pattern: std::option::Option<std::string::String>,
pub(crate) log_event_messages: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn filter_pattern(mut self, input: impl Into<std::string::String>) -> Self {
self.filter_pattern = Some(input.into());
self
}
pub fn set_filter_pattern(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.filter_pattern = input;
self
}
pub fn log_event_messages(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.log_event_messages.unwrap_or_default();
v.push(input.into());
self.log_event_messages = Some(v);
self
}
pub fn set_log_event_messages(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.log_event_messages = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::TestMetricFilterInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TestMetricFilterInput {
filter_pattern: self.filter_pattern,
log_event_messages: self.log_event_messages,
})
}
}
}
#[doc(hidden)]
pub type TestMetricFilterInputOperationOutputAlias = crate::operation::TestMetricFilter;
#[doc(hidden)]
pub type TestMetricFilterInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl TestMetricFilterInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TestMetricFilter,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::TestMetricFilterInput,
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::TestMetricFilterInput,
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::TestMetricFilterInput,
) -> 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"),
"Logs_20140328.TestMetricFilter",
);
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_test_metric_filter(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::TestMetricFilter::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TestMetricFilter",
"cloudwatchlogs",
));
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::test_metric_filter_input::Builder {
crate::input::test_metric_filter_input::Builder::default()
}
}
pub mod untag_log_group_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
pub fn set_log_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_group_name = input;
self
}
pub fn tags(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UntagLogGroupInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UntagLogGroupInput {
log_group_name: self.log_group_name,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type UntagLogGroupInputOperationOutputAlias = crate::operation::UntagLogGroup;
#[doc(hidden)]
pub type UntagLogGroupInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UntagLogGroupInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagLogGroup,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UntagLogGroupInput,
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::UntagLogGroupInput,
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::UntagLogGroupInput,
) -> 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"),
"Logs_20140328.UntagLogGroup",
);
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_untag_log_group(&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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::UntagLogGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagLogGroup",
"cloudwatchlogs",
));
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::untag_log_group_input::Builder {
crate::input::untag_log_group_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagLogGroupInput {
pub log_group_name: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagLogGroupInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[std::string::String]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for UntagLogGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UntagLogGroupInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TestMetricFilterInput {
pub filter_pattern: std::option::Option<std::string::String>,
pub log_event_messages: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl TestMetricFilterInput {
pub fn filter_pattern(&self) -> std::option::Option<&str> {
self.filter_pattern.as_deref()
}
pub fn log_event_messages(&self) -> std::option::Option<&[std::string::String]> {
self.log_event_messages.as_deref()
}
}
impl std::fmt::Debug for TestMetricFilterInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TestMetricFilterInput");
formatter.field("filter_pattern", &self.filter_pattern);
formatter.field("log_event_messages", &self.log_event_messages);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TagLogGroupInput {
pub log_group_name: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TagLogGroupInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for TagLogGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TagLogGroupInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopQueryInput {
pub query_id: std::option::Option<std::string::String>,
}
impl StopQueryInput {
pub fn query_id(&self) -> std::option::Option<&str> {
self.query_id.as_deref()
}
}
impl std::fmt::Debug for StopQueryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopQueryInput");
formatter.field("query_id", &self.query_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartQueryInput {
pub log_group_name: std::option::Option<std::string::String>,
pub log_group_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub start_time: std::option::Option<i64>,
pub end_time: std::option::Option<i64>,
pub query_string: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
}
impl StartQueryInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn log_group_names(&self) -> std::option::Option<&[std::string::String]> {
self.log_group_names.as_deref()
}
pub fn start_time(&self) -> std::option::Option<i64> {
self.start_time
}
pub fn end_time(&self) -> std::option::Option<i64> {
self.end_time
}
pub fn query_string(&self) -> std::option::Option<&str> {
self.query_string.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
}
impl std::fmt::Debug for StartQueryInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartQueryInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("log_group_names", &self.log_group_names);
formatter.field("start_time", &self.start_time);
formatter.field("end_time", &self.end_time);
formatter.field("query_string", &self.query_string);
formatter.field("limit", &self.limit);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutSubscriptionFilterInput {
pub log_group_name: std::option::Option<std::string::String>,
pub filter_name: std::option::Option<std::string::String>,
pub filter_pattern: std::option::Option<std::string::String>,
pub destination_arn: std::option::Option<std::string::String>,
pub role_arn: std::option::Option<std::string::String>,
pub distribution: std::option::Option<crate::model::Distribution>,
}
impl PutSubscriptionFilterInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn filter_name(&self) -> std::option::Option<&str> {
self.filter_name.as_deref()
}
pub fn filter_pattern(&self) -> std::option::Option<&str> {
self.filter_pattern.as_deref()
}
pub fn destination_arn(&self) -> std::option::Option<&str> {
self.destination_arn.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
pub fn distribution(&self) -> std::option::Option<&crate::model::Distribution> {
self.distribution.as_ref()
}
}
impl std::fmt::Debug for PutSubscriptionFilterInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutSubscriptionFilterInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("filter_name", &self.filter_name);
formatter.field("filter_pattern", &self.filter_pattern);
formatter.field("destination_arn", &self.destination_arn);
formatter.field("role_arn", &self.role_arn);
formatter.field("distribution", &self.distribution);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutRetentionPolicyInput {
pub log_group_name: std::option::Option<std::string::String>,
pub retention_in_days: std::option::Option<i32>,
}
impl PutRetentionPolicyInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn retention_in_days(&self) -> std::option::Option<i32> {
self.retention_in_days
}
}
impl std::fmt::Debug for PutRetentionPolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutRetentionPolicyInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("retention_in_days", &self.retention_in_days);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutResourcePolicyInput {
pub policy_name: std::option::Option<std::string::String>,
pub policy_document: std::option::Option<std::string::String>,
}
impl PutResourcePolicyInput {
pub fn policy_name(&self) -> std::option::Option<&str> {
self.policy_name.as_deref()
}
pub fn policy_document(&self) -> std::option::Option<&str> {
self.policy_document.as_deref()
}
}
impl std::fmt::Debug for PutResourcePolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutResourcePolicyInput");
formatter.field("policy_name", &self.policy_name);
formatter.field("policy_document", &self.policy_document);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutQueryDefinitionInput {
pub name: std::option::Option<std::string::String>,
pub query_definition_id: std::option::Option<std::string::String>,
pub log_group_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub query_string: std::option::Option<std::string::String>,
}
impl PutQueryDefinitionInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn query_definition_id(&self) -> std::option::Option<&str> {
self.query_definition_id.as_deref()
}
pub fn log_group_names(&self) -> std::option::Option<&[std::string::String]> {
self.log_group_names.as_deref()
}
pub fn query_string(&self) -> std::option::Option<&str> {
self.query_string.as_deref()
}
}
impl std::fmt::Debug for PutQueryDefinitionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutQueryDefinitionInput");
formatter.field("name", &self.name);
formatter.field("query_definition_id", &self.query_definition_id);
formatter.field("log_group_names", &self.log_group_names);
formatter.field("query_string", &self.query_string);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutMetricFilterInput {
pub log_group_name: std::option::Option<std::string::String>,
pub filter_name: std::option::Option<std::string::String>,
pub filter_pattern: std::option::Option<std::string::String>,
pub metric_transformations:
std::option::Option<std::vec::Vec<crate::model::MetricTransformation>>,
}
impl PutMetricFilterInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn filter_name(&self) -> std::option::Option<&str> {
self.filter_name.as_deref()
}
pub fn filter_pattern(&self) -> std::option::Option<&str> {
self.filter_pattern.as_deref()
}
pub fn metric_transformations(
&self,
) -> std::option::Option<&[crate::model::MetricTransformation]> {
self.metric_transformations.as_deref()
}
}
impl std::fmt::Debug for PutMetricFilterInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutMetricFilterInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("filter_name", &self.filter_name);
formatter.field("filter_pattern", &self.filter_pattern);
formatter.field("metric_transformations", &self.metric_transformations);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutLogEventsInput {
pub log_group_name: std::option::Option<std::string::String>,
pub log_stream_name: std::option::Option<std::string::String>,
pub log_events: std::option::Option<std::vec::Vec<crate::model::InputLogEvent>>,
pub sequence_token: std::option::Option<std::string::String>,
}
impl PutLogEventsInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn log_stream_name(&self) -> std::option::Option<&str> {
self.log_stream_name.as_deref()
}
pub fn log_events(&self) -> std::option::Option<&[crate::model::InputLogEvent]> {
self.log_events.as_deref()
}
pub fn sequence_token(&self) -> std::option::Option<&str> {
self.sequence_token.as_deref()
}
}
impl std::fmt::Debug for PutLogEventsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutLogEventsInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("log_stream_name", &self.log_stream_name);
formatter.field("log_events", &self.log_events);
formatter.field("sequence_token", &self.sequence_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutDestinationPolicyInput {
pub destination_name: std::option::Option<std::string::String>,
pub access_policy: std::option::Option<std::string::String>,
}
impl PutDestinationPolicyInput {
pub fn destination_name(&self) -> std::option::Option<&str> {
self.destination_name.as_deref()
}
pub fn access_policy(&self) -> std::option::Option<&str> {
self.access_policy.as_deref()
}
}
impl std::fmt::Debug for PutDestinationPolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutDestinationPolicyInput");
formatter.field("destination_name", &self.destination_name);
formatter.field("access_policy", &self.access_policy);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutDestinationInput {
pub destination_name: std::option::Option<std::string::String>,
pub target_arn: std::option::Option<std::string::String>,
pub role_arn: std::option::Option<std::string::String>,
}
impl PutDestinationInput {
pub fn destination_name(&self) -> std::option::Option<&str> {
self.destination_name.as_deref()
}
pub fn target_arn(&self) -> std::option::Option<&str> {
self.target_arn.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
}
impl std::fmt::Debug for PutDestinationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutDestinationInput");
formatter.field("destination_name", &self.destination_name);
formatter.field("target_arn", &self.target_arn);
formatter.field("role_arn", &self.role_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListTagsLogGroupInput {
pub log_group_name: std::option::Option<std::string::String>,
}
impl ListTagsLogGroupInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
}
impl std::fmt::Debug for ListTagsLogGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListTagsLogGroupInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetQueryResultsInput {
pub query_id: std::option::Option<std::string::String>,
}
impl GetQueryResultsInput {
pub fn query_id(&self) -> std::option::Option<&str> {
self.query_id.as_deref()
}
}
impl std::fmt::Debug for GetQueryResultsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetQueryResultsInput");
formatter.field("query_id", &self.query_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetLogRecordInput {
pub log_record_pointer: std::option::Option<std::string::String>,
}
impl GetLogRecordInput {
pub fn log_record_pointer(&self) -> std::option::Option<&str> {
self.log_record_pointer.as_deref()
}
}
impl std::fmt::Debug for GetLogRecordInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetLogRecordInput");
formatter.field("log_record_pointer", &self.log_record_pointer);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetLogGroupFieldsInput {
pub log_group_name: std::option::Option<std::string::String>,
pub time: std::option::Option<i64>,
}
impl GetLogGroupFieldsInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn time(&self) -> std::option::Option<i64> {
self.time
}
}
impl std::fmt::Debug for GetLogGroupFieldsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetLogGroupFieldsInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("time", &self.time);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetLogEventsInput {
pub log_group_name: std::option::Option<std::string::String>,
pub log_stream_name: std::option::Option<std::string::String>,
pub start_time: std::option::Option<i64>,
pub end_time: std::option::Option<i64>,
pub next_token: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
pub start_from_head: std::option::Option<bool>,
}
impl GetLogEventsInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn log_stream_name(&self) -> std::option::Option<&str> {
self.log_stream_name.as_deref()
}
pub fn start_time(&self) -> std::option::Option<i64> {
self.start_time
}
pub fn end_time(&self) -> std::option::Option<i64> {
self.end_time
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
pub fn start_from_head(&self) -> std::option::Option<bool> {
self.start_from_head
}
}
impl std::fmt::Debug for GetLogEventsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetLogEventsInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("log_stream_name", &self.log_stream_name);
formatter.field("start_time", &self.start_time);
formatter.field("end_time", &self.end_time);
formatter.field("next_token", &self.next_token);
formatter.field("limit", &self.limit);
formatter.field("start_from_head", &self.start_from_head);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct FilterLogEventsInput {
pub log_group_name: std::option::Option<std::string::String>,
pub log_stream_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub log_stream_name_prefix: std::option::Option<std::string::String>,
pub start_time: std::option::Option<i64>,
pub end_time: std::option::Option<i64>,
pub filter_pattern: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
pub interleaved: std::option::Option<bool>,
}
impl FilterLogEventsInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn log_stream_names(&self) -> std::option::Option<&[std::string::String]> {
self.log_stream_names.as_deref()
}
pub fn log_stream_name_prefix(&self) -> std::option::Option<&str> {
self.log_stream_name_prefix.as_deref()
}
pub fn start_time(&self) -> std::option::Option<i64> {
self.start_time
}
pub fn end_time(&self) -> std::option::Option<i64> {
self.end_time
}
pub fn filter_pattern(&self) -> std::option::Option<&str> {
self.filter_pattern.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
pub fn interleaved(&self) -> std::option::Option<bool> {
self.interleaved
}
}
impl std::fmt::Debug for FilterLogEventsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("FilterLogEventsInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("log_stream_names", &self.log_stream_names);
formatter.field("log_stream_name_prefix", &self.log_stream_name_prefix);
formatter.field("start_time", &self.start_time);
formatter.field("end_time", &self.end_time);
formatter.field("filter_pattern", &self.filter_pattern);
formatter.field("next_token", &self.next_token);
formatter.field("limit", &self.limit);
formatter.field("interleaved", &self.interleaved);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DisassociateKmsKeyInput {
pub log_group_name: std::option::Option<std::string::String>,
}
impl DisassociateKmsKeyInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
}
impl std::fmt::Debug for DisassociateKmsKeyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DisassociateKmsKeyInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeSubscriptionFiltersInput {
pub log_group_name: std::option::Option<std::string::String>,
pub filter_name_prefix: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
}
impl DescribeSubscriptionFiltersInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn filter_name_prefix(&self) -> std::option::Option<&str> {
self.filter_name_prefix.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
}
impl std::fmt::Debug for DescribeSubscriptionFiltersInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeSubscriptionFiltersInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("filter_name_prefix", &self.filter_name_prefix);
formatter.field("next_token", &self.next_token);
formatter.field("limit", &self.limit);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeResourcePoliciesInput {
pub next_token: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
}
impl DescribeResourcePoliciesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
}
impl std::fmt::Debug for DescribeResourcePoliciesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeResourcePoliciesInput");
formatter.field("next_token", &self.next_token);
formatter.field("limit", &self.limit);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeQueryDefinitionsInput {
pub query_definition_name_prefix: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeQueryDefinitionsInput {
pub fn query_definition_name_prefix(&self) -> std::option::Option<&str> {
self.query_definition_name_prefix.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 DescribeQueryDefinitionsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeQueryDefinitionsInput");
formatter.field(
"query_definition_name_prefix",
&self.query_definition_name_prefix,
);
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 DescribeQueriesInput {
pub log_group_name: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::QueryStatus>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeQueriesInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::QueryStatus> {
self.status.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 DescribeQueriesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeQueriesInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("status", &self.status);
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 DescribeMetricFiltersInput {
pub log_group_name: std::option::Option<std::string::String>,
pub filter_name_prefix: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
pub metric_name: std::option::Option<std::string::String>,
pub metric_namespace: std::option::Option<std::string::String>,
}
impl DescribeMetricFiltersInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn filter_name_prefix(&self) -> std::option::Option<&str> {
self.filter_name_prefix.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
pub fn metric_name(&self) -> std::option::Option<&str> {
self.metric_name.as_deref()
}
pub fn metric_namespace(&self) -> std::option::Option<&str> {
self.metric_namespace.as_deref()
}
}
impl std::fmt::Debug for DescribeMetricFiltersInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeMetricFiltersInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("filter_name_prefix", &self.filter_name_prefix);
formatter.field("next_token", &self.next_token);
formatter.field("limit", &self.limit);
formatter.field("metric_name", &self.metric_name);
formatter.field("metric_namespace", &self.metric_namespace);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeLogStreamsInput {
pub log_group_name: std::option::Option<std::string::String>,
pub log_stream_name_prefix: std::option::Option<std::string::String>,
pub order_by: std::option::Option<crate::model::OrderBy>,
pub descending: std::option::Option<bool>,
pub next_token: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
}
impl DescribeLogStreamsInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn log_stream_name_prefix(&self) -> std::option::Option<&str> {
self.log_stream_name_prefix.as_deref()
}
pub fn order_by(&self) -> std::option::Option<&crate::model::OrderBy> {
self.order_by.as_ref()
}
pub fn descending(&self) -> std::option::Option<bool> {
self.descending
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
}
impl std::fmt::Debug for DescribeLogStreamsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeLogStreamsInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("log_stream_name_prefix", &self.log_stream_name_prefix);
formatter.field("order_by", &self.order_by);
formatter.field("descending", &self.descending);
formatter.field("next_token", &self.next_token);
formatter.field("limit", &self.limit);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeLogGroupsInput {
pub log_group_name_prefix: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
}
impl DescribeLogGroupsInput {
pub fn log_group_name_prefix(&self) -> std::option::Option<&str> {
self.log_group_name_prefix.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
}
impl std::fmt::Debug for DescribeLogGroupsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeLogGroupsInput");
formatter.field("log_group_name_prefix", &self.log_group_name_prefix);
formatter.field("next_token", &self.next_token);
formatter.field("limit", &self.limit);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeExportTasksInput {
pub task_id: std::option::Option<std::string::String>,
pub status_code: std::option::Option<crate::model::ExportTaskStatusCode>,
pub next_token: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
}
impl DescribeExportTasksInput {
pub fn task_id(&self) -> std::option::Option<&str> {
self.task_id.as_deref()
}
pub fn status_code(&self) -> std::option::Option<&crate::model::ExportTaskStatusCode> {
self.status_code.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
}
impl std::fmt::Debug for DescribeExportTasksInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeExportTasksInput");
formatter.field("task_id", &self.task_id);
formatter.field("status_code", &self.status_code);
formatter.field("next_token", &self.next_token);
formatter.field("limit", &self.limit);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeDestinationsInput {
pub destination_name_prefix: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub limit: std::option::Option<i32>,
}
impl DescribeDestinationsInput {
pub fn destination_name_prefix(&self) -> std::option::Option<&str> {
self.destination_name_prefix.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> std::option::Option<i32> {
self.limit
}
}
impl std::fmt::Debug for DescribeDestinationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeDestinationsInput");
formatter.field("destination_name_prefix", &self.destination_name_prefix);
formatter.field("next_token", &self.next_token);
formatter.field("limit", &self.limit);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteSubscriptionFilterInput {
pub log_group_name: std::option::Option<std::string::String>,
pub filter_name: std::option::Option<std::string::String>,
}
impl DeleteSubscriptionFilterInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn filter_name(&self) -> std::option::Option<&str> {
self.filter_name.as_deref()
}
}
impl std::fmt::Debug for DeleteSubscriptionFilterInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteSubscriptionFilterInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("filter_name", &self.filter_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteRetentionPolicyInput {
pub log_group_name: std::option::Option<std::string::String>,
}
impl DeleteRetentionPolicyInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
}
impl std::fmt::Debug for DeleteRetentionPolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteRetentionPolicyInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteResourcePolicyInput {
pub policy_name: std::option::Option<std::string::String>,
}
impl DeleteResourcePolicyInput {
pub fn policy_name(&self) -> std::option::Option<&str> {
self.policy_name.as_deref()
}
}
impl std::fmt::Debug for DeleteResourcePolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteResourcePolicyInput");
formatter.field("policy_name", &self.policy_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteQueryDefinitionInput {
pub query_definition_id: std::option::Option<std::string::String>,
}
impl DeleteQueryDefinitionInput {
pub fn query_definition_id(&self) -> std::option::Option<&str> {
self.query_definition_id.as_deref()
}
}
impl std::fmt::Debug for DeleteQueryDefinitionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteQueryDefinitionInput");
formatter.field("query_definition_id", &self.query_definition_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteMetricFilterInput {
pub log_group_name: std::option::Option<std::string::String>,
pub filter_name: std::option::Option<std::string::String>,
}
impl DeleteMetricFilterInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn filter_name(&self) -> std::option::Option<&str> {
self.filter_name.as_deref()
}
}
impl std::fmt::Debug for DeleteMetricFilterInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteMetricFilterInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("filter_name", &self.filter_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteLogStreamInput {
pub log_group_name: std::option::Option<std::string::String>,
pub log_stream_name: std::option::Option<std::string::String>,
}
impl DeleteLogStreamInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn log_stream_name(&self) -> std::option::Option<&str> {
self.log_stream_name.as_deref()
}
}
impl std::fmt::Debug for DeleteLogStreamInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteLogStreamInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("log_stream_name", &self.log_stream_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteLogGroupInput {
pub log_group_name: std::option::Option<std::string::String>,
}
impl DeleteLogGroupInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
}
impl std::fmt::Debug for DeleteLogGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteLogGroupInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteDestinationInput {
pub destination_name: std::option::Option<std::string::String>,
}
impl DeleteDestinationInput {
pub fn destination_name(&self) -> std::option::Option<&str> {
self.destination_name.as_deref()
}
}
impl std::fmt::Debug for DeleteDestinationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteDestinationInput");
formatter.field("destination_name", &self.destination_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateLogStreamInput {
pub log_group_name: std::option::Option<std::string::String>,
pub log_stream_name: std::option::Option<std::string::String>,
}
impl CreateLogStreamInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn log_stream_name(&self) -> std::option::Option<&str> {
self.log_stream_name.as_deref()
}
}
impl std::fmt::Debug for CreateLogStreamInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateLogStreamInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("log_stream_name", &self.log_stream_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateLogGroupInput {
pub log_group_name: std::option::Option<std::string::String>,
pub kms_key_id: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateLogGroupInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for CreateLogGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateLogGroupInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("kms_key_id", &self.kms_key_id);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateExportTaskInput {
pub task_name: std::option::Option<std::string::String>,
pub log_group_name: std::option::Option<std::string::String>,
pub log_stream_name_prefix: std::option::Option<std::string::String>,
pub from: std::option::Option<i64>,
pub to: std::option::Option<i64>,
pub destination: std::option::Option<std::string::String>,
pub destination_prefix: std::option::Option<std::string::String>,
}
impl CreateExportTaskInput {
pub fn task_name(&self) -> std::option::Option<&str> {
self.task_name.as_deref()
}
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn log_stream_name_prefix(&self) -> std::option::Option<&str> {
self.log_stream_name_prefix.as_deref()
}
pub fn from(&self) -> std::option::Option<i64> {
self.from
}
pub fn to(&self) -> std::option::Option<i64> {
self.to
}
pub fn destination(&self) -> std::option::Option<&str> {
self.destination.as_deref()
}
pub fn destination_prefix(&self) -> std::option::Option<&str> {
self.destination_prefix.as_deref()
}
}
impl std::fmt::Debug for CreateExportTaskInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateExportTaskInput");
formatter.field("task_name", &self.task_name);
formatter.field("log_group_name", &self.log_group_name);
formatter.field("log_stream_name_prefix", &self.log_stream_name_prefix);
formatter.field("from", &self.from);
formatter.field("to", &self.to);
formatter.field("destination", &self.destination);
formatter.field("destination_prefix", &self.destination_prefix);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CancelExportTaskInput {
pub task_id: std::option::Option<std::string::String>,
}
impl CancelExportTaskInput {
pub fn task_id(&self) -> std::option::Option<&str> {
self.task_id.as_deref()
}
}
impl std::fmt::Debug for CancelExportTaskInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CancelExportTaskInput");
formatter.field("task_id", &self.task_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AssociateKmsKeyInput {
pub log_group_name: std::option::Option<std::string::String>,
pub kms_key_id: std::option::Option<std::string::String>,
}
impl AssociateKmsKeyInput {
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
}
impl std::fmt::Debug for AssociateKmsKeyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AssociateKmsKeyInput");
formatter.field("log_group_name", &self.log_group_name);
formatter.field("kms_key_id", &self.kms_key_id);
formatter.finish()
}
}