use std::fmt::Write;
pub mod create_connector_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) capacity: std::option::Option<crate::model::Capacity>,
pub(crate) connector_configuration: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) connector_description: std::option::Option<std::string::String>,
pub(crate) connector_name: std::option::Option<std::string::String>,
pub(crate) kafka_cluster: std::option::Option<crate::model::KafkaCluster>,
pub(crate) kafka_cluster_client_authentication:
std::option::Option<crate::model::KafkaClusterClientAuthentication>,
pub(crate) kafka_cluster_encryption_in_transit:
std::option::Option<crate::model::KafkaClusterEncryptionInTransit>,
pub(crate) kafka_connect_version: std::option::Option<std::string::String>,
pub(crate) log_delivery: std::option::Option<crate::model::LogDelivery>,
pub(crate) plugins: std::option::Option<std::vec::Vec<crate::model::Plugin>>,
pub(crate) service_execution_role_arn: std::option::Option<std::string::String>,
pub(crate) worker_configuration: std::option::Option<crate::model::WorkerConfiguration>,
}
impl Builder {
pub fn capacity(mut self, input: crate::model::Capacity) -> Self {
self.capacity = Some(input);
self
}
pub fn set_capacity(mut self, input: std::option::Option<crate::model::Capacity>) -> Self {
self.capacity = input;
self
}
pub fn connector_configuration(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.connector_configuration.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.connector_configuration = Some(hash_map);
self
}
pub fn set_connector_configuration(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.connector_configuration = input;
self
}
pub fn connector_description(mut self, input: impl Into<std::string::String>) -> Self {
self.connector_description = Some(input.into());
self
}
pub fn set_connector_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connector_description = input;
self
}
pub fn connector_name(mut self, input: impl Into<std::string::String>) -> Self {
self.connector_name = Some(input.into());
self
}
pub fn set_connector_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connector_name = input;
self
}
pub fn kafka_cluster(mut self, input: crate::model::KafkaCluster) -> Self {
self.kafka_cluster = Some(input);
self
}
pub fn set_kafka_cluster(
mut self,
input: std::option::Option<crate::model::KafkaCluster>,
) -> Self {
self.kafka_cluster = input;
self
}
pub fn kafka_cluster_client_authentication(
mut self,
input: crate::model::KafkaClusterClientAuthentication,
) -> Self {
self.kafka_cluster_client_authentication = Some(input);
self
}
pub fn set_kafka_cluster_client_authentication(
mut self,
input: std::option::Option<crate::model::KafkaClusterClientAuthentication>,
) -> Self {
self.kafka_cluster_client_authentication = input;
self
}
pub fn kafka_cluster_encryption_in_transit(
mut self,
input: crate::model::KafkaClusterEncryptionInTransit,
) -> Self {
self.kafka_cluster_encryption_in_transit = Some(input);
self
}
pub fn set_kafka_cluster_encryption_in_transit(
mut self,
input: std::option::Option<crate::model::KafkaClusterEncryptionInTransit>,
) -> Self {
self.kafka_cluster_encryption_in_transit = input;
self
}
pub fn kafka_connect_version(mut self, input: impl Into<std::string::String>) -> Self {
self.kafka_connect_version = Some(input.into());
self
}
pub fn set_kafka_connect_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.kafka_connect_version = input;
self
}
pub fn log_delivery(mut self, input: crate::model::LogDelivery) -> Self {
self.log_delivery = Some(input);
self
}
pub fn set_log_delivery(
mut self,
input: std::option::Option<crate::model::LogDelivery>,
) -> Self {
self.log_delivery = input;
self
}
pub fn plugins(mut self, input: crate::model::Plugin) -> Self {
let mut v = self.plugins.unwrap_or_default();
v.push(input);
self.plugins = Some(v);
self
}
pub fn set_plugins(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Plugin>>,
) -> Self {
self.plugins = input;
self
}
pub fn service_execution_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.service_execution_role_arn = Some(input.into());
self
}
pub fn set_service_execution_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_execution_role_arn = input;
self
}
pub fn worker_configuration(mut self, input: crate::model::WorkerConfiguration) -> Self {
self.worker_configuration = Some(input);
self
}
pub fn set_worker_configuration(
mut self,
input: std::option::Option<crate::model::WorkerConfiguration>,
) -> Self {
self.worker_configuration = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateConnectorInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateConnectorInput {
capacity: self.capacity,
connector_configuration: self.connector_configuration,
connector_description: self.connector_description,
connector_name: self.connector_name,
kafka_cluster: self.kafka_cluster,
kafka_cluster_client_authentication: self.kafka_cluster_client_authentication,
kafka_cluster_encryption_in_transit: self.kafka_cluster_encryption_in_transit,
kafka_connect_version: self.kafka_connect_version,
log_delivery: self.log_delivery,
plugins: self.plugins,
service_execution_role_arn: self.service_execution_role_arn,
worker_configuration: self.worker_configuration,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("capacity", &self.capacity);
formatter.field(
"connector_configuration",
&"*** Sensitive Data Redacted ***",
);
formatter.field("connector_description", &self.connector_description);
formatter.field("connector_name", &self.connector_name);
formatter.field("kafka_cluster", &self.kafka_cluster);
formatter.field(
"kafka_cluster_client_authentication",
&self.kafka_cluster_client_authentication,
);
formatter.field(
"kafka_cluster_encryption_in_transit",
&self.kafka_cluster_encryption_in_transit,
);
formatter.field("kafka_connect_version", &self.kafka_connect_version);
formatter.field("log_delivery", &self.log_delivery);
formatter.field("plugins", &self.plugins);
formatter.field(
"service_execution_role_arn",
&self.service_execution_role_arn,
);
formatter.field("worker_configuration", &self.worker_configuration);
formatter.finish()
}
}
}
impl CreateConnectorInput {
#[allow(unused_mut)]
#[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::CreateConnector,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateConnectorInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/v1/connectors").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateConnectorInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_connector(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateConnector::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateConnector",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_connector_input::Builder {
crate::input::create_connector_input::Builder::default()
}
}
pub mod create_custom_plugin_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) content_type: std::option::Option<crate::model::CustomPluginContentType>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) location: std::option::Option<crate::model::CustomPluginLocation>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn content_type(mut self, input: crate::model::CustomPluginContentType) -> Self {
self.content_type = Some(input);
self
}
pub fn set_content_type(
mut self,
input: std::option::Option<crate::model::CustomPluginContentType>,
) -> Self {
self.content_type = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn location(mut self, input: crate::model::CustomPluginLocation) -> Self {
self.location = Some(input);
self
}
pub fn set_location(
mut self,
input: std::option::Option<crate::model::CustomPluginLocation>,
) -> Self {
self.location = input;
self
}
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 build(
self,
) -> Result<
crate::input::CreateCustomPluginInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateCustomPluginInput {
content_type: self.content_type,
description: self.description,
location: self.location,
name: self.name,
})
}
}
}
impl CreateCustomPluginInput {
#[allow(unused_mut)]
#[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::CreateCustomPlugin,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateCustomPluginInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/v1/custom-plugins").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateCustomPluginInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_custom_plugin(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateCustomPlugin::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateCustomPlugin",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_custom_plugin_input::Builder {
crate::input::create_custom_plugin_input::Builder::default()
}
}
pub mod create_worker_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) properties_file_content: std::option::Option<std::string::String>,
}
impl Builder {
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
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 properties_file_content(mut self, input: impl Into<std::string::String>) -> Self {
self.properties_file_content = Some(input.into());
self
}
pub fn set_properties_file_content(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.properties_file_content = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateWorkerConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateWorkerConfigurationInput {
description: self.description,
name: self.name,
properties_file_content: self.properties_file_content,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("description", &self.description);
formatter.field("name", &self.name);
formatter.field(
"properties_file_content",
&"*** Sensitive Data Redacted ***",
);
formatter.finish()
}
}
}
impl CreateWorkerConfigurationInput {
#[allow(unused_mut)]
#[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::CreateWorkerConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateWorkerConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/v1/worker-configurations").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateWorkerConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_worker_configuration(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateWorkerConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateWorkerConfiguration",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_worker_configuration_input::Builder {
crate::input::create_worker_configuration_input::Builder::default()
}
}
pub mod delete_connector_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connector_arn: std::option::Option<std::string::String>,
pub(crate) current_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connector_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.connector_arn = Some(input.into());
self
}
pub fn set_connector_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connector_arn = input;
self
}
pub fn current_version(mut self, input: impl Into<std::string::String>) -> Self {
self.current_version = Some(input.into());
self
}
pub fn set_current_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.current_version = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteConnectorInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteConnectorInput {
connector_arn: self.connector_arn,
current_version: self.current_version,
})
}
}
}
impl DeleteConnectorInput {
#[allow(unused_mut)]
#[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::DeleteConnector,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteConnectorInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_1 = &_input.connector_arn;
let input_1 = input_1.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"connector_arn",
"cannot be empty or unset",
)
})?;
let connector_arn = aws_smithy_http::label::fmt_string(
input_1,
aws_smithy_http::label::EncodingStrategy::Default,
);
if connector_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"connector_arn",
"cannot be empty or unset",
),
);
}
write!(
output,
"/v1/connectors/{connectorArn}",
connectorArn = connector_arn
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteConnectorInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_2) = &_input.current_version {
{
query.push_kv(
"currentVersion",
&aws_smithy_http::query::fmt_string(&inner_2),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConnectorInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteConnector::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConnector",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_connector_input::Builder {
crate::input::delete_connector_input::Builder::default()
}
}
pub mod delete_custom_plugin_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) custom_plugin_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn custom_plugin_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_plugin_arn = Some(input.into());
self
}
pub fn set_custom_plugin_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.custom_plugin_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteCustomPluginInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteCustomPluginInput {
custom_plugin_arn: self.custom_plugin_arn,
})
}
}
}
impl DeleteCustomPluginInput {
#[allow(unused_mut)]
#[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::DeleteCustomPlugin,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteCustomPluginInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_3 = &_input.custom_plugin_arn;
let input_3 = input_3.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"custom_plugin_arn",
"cannot be empty or unset",
)
})?;
let custom_plugin_arn = aws_smithy_http::label::fmt_string(
input_3,
aws_smithy_http::label::EncodingStrategy::Default,
);
if custom_plugin_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"custom_plugin_arn",
"cannot be empty or unset",
),
);
}
write!(
output,
"/v1/custom-plugins/{customPluginArn}",
customPluginArn = custom_plugin_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteCustomPluginInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteCustomPlugin::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteCustomPlugin",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_custom_plugin_input::Builder {
crate::input::delete_custom_plugin_input::Builder::default()
}
}
pub mod describe_connector_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connector_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connector_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.connector_arn = Some(input.into());
self
}
pub fn set_connector_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connector_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConnectorInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConnectorInput {
connector_arn: self.connector_arn,
})
}
}
}
impl DescribeConnectorInput {
#[allow(unused_mut)]
#[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::DescribeConnector,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeConnectorInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_4 = &_input.connector_arn;
let input_4 = input_4.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"connector_arn",
"cannot be empty or unset",
)
})?;
let connector_arn = aws_smithy_http::label::fmt_string(
input_4,
aws_smithy_http::label::EncodingStrategy::Default,
);
if connector_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"connector_arn",
"cannot be empty or unset",
),
);
}
write!(
output,
"/v1/connectors/{connectorArn}",
connectorArn = connector_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConnectorInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeConnector::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConnector",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_connector_input::Builder {
crate::input::describe_connector_input::Builder::default()
}
}
pub mod describe_custom_plugin_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) custom_plugin_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn custom_plugin_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_plugin_arn = Some(input.into());
self
}
pub fn set_custom_plugin_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.custom_plugin_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeCustomPluginInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeCustomPluginInput {
custom_plugin_arn: self.custom_plugin_arn,
})
}
}
}
impl DescribeCustomPluginInput {
#[allow(unused_mut)]
#[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::DescribeCustomPlugin,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeCustomPluginInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_5 = &_input.custom_plugin_arn;
let input_5 = input_5.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"custom_plugin_arn",
"cannot be empty or unset",
)
})?;
let custom_plugin_arn = aws_smithy_http::label::fmt_string(
input_5,
aws_smithy_http::label::EncodingStrategy::Default,
);
if custom_plugin_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"custom_plugin_arn",
"cannot be empty or unset",
),
);
}
write!(
output,
"/v1/custom-plugins/{customPluginArn}",
customPluginArn = custom_plugin_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeCustomPluginInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeCustomPlugin::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeCustomPlugin",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_custom_plugin_input::Builder {
crate::input::describe_custom_plugin_input::Builder::default()
}
}
pub mod describe_worker_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) worker_configuration_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn worker_configuration_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.worker_configuration_arn = Some(input.into());
self
}
pub fn set_worker_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.worker_configuration_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeWorkerConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeWorkerConfigurationInput {
worker_configuration_arn: self.worker_configuration_arn,
})
}
}
}
impl DescribeWorkerConfigurationInput {
#[allow(unused_mut)]
#[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::DescribeWorkerConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeWorkerConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_6 = &_input.worker_configuration_arn;
let input_6 = input_6.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"worker_configuration_arn",
"cannot be empty or unset",
)
})?;
let worker_configuration_arn = aws_smithy_http::label::fmt_string(
input_6,
aws_smithy_http::label::EncodingStrategy::Default,
);
if worker_configuration_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"worker_configuration_arn",
"cannot be empty or unset",
),
);
}
write!(
output,
"/v1/worker-configurations/{workerConfigurationArn}",
workerConfigurationArn = worker_configuration_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeWorkerConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeWorkerConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeWorkerConfiguration",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_worker_configuration_input::Builder {
crate::input::describe_worker_configuration_input::Builder::default()
}
}
pub mod list_connectors_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connector_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 connector_name_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.connector_name_prefix = Some(input.into());
self
}
pub fn set_connector_name_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connector_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,
) -> Result<crate::input::ListConnectorsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListConnectorsInput {
connector_name_prefix: self.connector_name_prefix,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListConnectorsInput {
#[allow(unused_mut)]
#[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::ListConnectors,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListConnectorsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/v1/connectors").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListConnectorsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_7) = &_input.connector_name_prefix {
{
query.push_kv(
"connectorNamePrefix",
&aws_smithy_http::query::fmt_string(&inner_7),
);
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_8) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_8));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListConnectorsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListConnectors::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListConnectors",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_connectors_input::Builder {
crate::input::list_connectors_input::Builder::default()
}
}
pub mod list_custom_plugins_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
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,
) -> Result<
crate::input::ListCustomPluginsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListCustomPluginsInput {
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListCustomPluginsInput {
#[allow(unused_mut)]
#[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::ListCustomPlugins,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListCustomPluginsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/v1/custom-plugins").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListCustomPluginsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_9) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_9));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListCustomPluginsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListCustomPlugins::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListCustomPlugins",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_custom_plugins_input::Builder {
crate::input::list_custom_plugins_input::Builder::default()
}
}
pub mod list_worker_configurations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
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,
) -> Result<
crate::input::ListWorkerConfigurationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListWorkerConfigurationsInput {
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListWorkerConfigurationsInput {
#[allow(unused_mut)]
#[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::ListWorkerConfigurations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListWorkerConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/v1/worker-configurations").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListWorkerConfigurationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_10) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_10));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListWorkerConfigurationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListWorkerConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListWorkerConfigurations",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_worker_configurations_input::Builder {
crate::input::list_worker_configurations_input::Builder::default()
}
}
pub mod update_connector_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) capacity: std::option::Option<crate::model::CapacityUpdate>,
pub(crate) connector_arn: std::option::Option<std::string::String>,
pub(crate) current_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn capacity(mut self, input: crate::model::CapacityUpdate) -> Self {
self.capacity = Some(input);
self
}
pub fn set_capacity(
mut self,
input: std::option::Option<crate::model::CapacityUpdate>,
) -> Self {
self.capacity = input;
self
}
pub fn connector_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.connector_arn = Some(input.into());
self
}
pub fn set_connector_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connector_arn = input;
self
}
pub fn current_version(mut self, input: impl Into<std::string::String>) -> Self {
self.current_version = Some(input.into());
self
}
pub fn set_current_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.current_version = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateConnectorInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateConnectorInput {
capacity: self.capacity,
connector_arn: self.connector_arn,
current_version: self.current_version,
})
}
}
}
impl UpdateConnectorInput {
#[allow(unused_mut)]
#[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::UpdateConnector,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateConnectorInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_11 = &_input.connector_arn;
let input_11 = input_11.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"connector_arn",
"cannot be empty or unset",
)
})?;
let connector_arn = aws_smithy_http::label::fmt_string(
input_11,
aws_smithy_http::label::EncodingStrategy::Default,
);
if connector_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"connector_arn",
"cannot be empty or unset",
),
);
}
write!(
output,
"/v1/connectors/{connectorArn}",
connectorArn = connector_arn
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UpdateConnectorInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_12 = &_input.current_version;
let inner_12 = inner_12.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"current_version",
"cannot be empty or unset",
)
})?;
if inner_12.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"current_version",
"cannot be empty or unset",
),
);
}
query.push_kv(
"currentVersion",
&aws_smithy_http::query::fmt_string(&inner_12),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateConnectorInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_connector(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
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);
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(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateConnector::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateConnector",
"kafkaconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_connector_input::Builder {
crate::input::update_connector_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateConnectorInput {
#[doc(hidden)]
pub capacity: std::option::Option<crate::model::CapacityUpdate>,
#[doc(hidden)]
pub connector_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub current_version: std::option::Option<std::string::String>,
}
impl UpdateConnectorInput {
pub fn capacity(&self) -> std::option::Option<&crate::model::CapacityUpdate> {
self.capacity.as_ref()
}
pub fn connector_arn(&self) -> std::option::Option<&str> {
self.connector_arn.as_deref()
}
pub fn current_version(&self) -> std::option::Option<&str> {
self.current_version.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListWorkerConfigurationsInput {
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListWorkerConfigurationsInput {
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListCustomPluginsInput {
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListCustomPluginsInput {
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListConnectorsInput {
#[doc(hidden)]
pub connector_name_prefix: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListConnectorsInput {
pub fn connector_name_prefix(&self) -> std::option::Option<&str> {
self.connector_name_prefix.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeWorkerConfigurationInput {
#[doc(hidden)]
pub worker_configuration_arn: std::option::Option<std::string::String>,
}
impl DescribeWorkerConfigurationInput {
pub fn worker_configuration_arn(&self) -> std::option::Option<&str> {
self.worker_configuration_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeCustomPluginInput {
#[doc(hidden)]
pub custom_plugin_arn: std::option::Option<std::string::String>,
}
impl DescribeCustomPluginInput {
pub fn custom_plugin_arn(&self) -> std::option::Option<&str> {
self.custom_plugin_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConnectorInput {
#[doc(hidden)]
pub connector_arn: std::option::Option<std::string::String>,
}
impl DescribeConnectorInput {
pub fn connector_arn(&self) -> std::option::Option<&str> {
self.connector_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteCustomPluginInput {
#[doc(hidden)]
pub custom_plugin_arn: std::option::Option<std::string::String>,
}
impl DeleteCustomPluginInput {
pub fn custom_plugin_arn(&self) -> std::option::Option<&str> {
self.custom_plugin_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConnectorInput {
#[doc(hidden)]
pub connector_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub current_version: std::option::Option<std::string::String>,
}
impl DeleteConnectorInput {
pub fn connector_arn(&self) -> std::option::Option<&str> {
self.connector_arn.as_deref()
}
pub fn current_version(&self) -> std::option::Option<&str> {
self.current_version.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateWorkerConfigurationInput {
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub properties_file_content: std::option::Option<std::string::String>,
}
impl CreateWorkerConfigurationInput {
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn properties_file_content(&self) -> std::option::Option<&str> {
self.properties_file_content.as_deref()
}
}
impl std::fmt::Debug for CreateWorkerConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateWorkerConfigurationInput");
formatter.field("description", &self.description);
formatter.field("name", &self.name);
formatter.field(
"properties_file_content",
&"*** Sensitive Data Redacted ***",
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateCustomPluginInput {
#[doc(hidden)]
pub content_type: std::option::Option<crate::model::CustomPluginContentType>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub location: std::option::Option<crate::model::CustomPluginLocation>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl CreateCustomPluginInput {
pub fn content_type(&self) -> std::option::Option<&crate::model::CustomPluginContentType> {
self.content_type.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn location(&self) -> std::option::Option<&crate::model::CustomPluginLocation> {
self.location.as_ref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateConnectorInput {
#[doc(hidden)]
pub capacity: std::option::Option<crate::model::Capacity>,
#[doc(hidden)]
pub connector_configuration:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub connector_description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connector_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub kafka_cluster: std::option::Option<crate::model::KafkaCluster>,
#[doc(hidden)]
pub kafka_cluster_client_authentication:
std::option::Option<crate::model::KafkaClusterClientAuthentication>,
#[doc(hidden)]
pub kafka_cluster_encryption_in_transit:
std::option::Option<crate::model::KafkaClusterEncryptionInTransit>,
#[doc(hidden)]
pub kafka_connect_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub log_delivery: std::option::Option<crate::model::LogDelivery>,
#[doc(hidden)]
pub plugins: std::option::Option<std::vec::Vec<crate::model::Plugin>>,
#[doc(hidden)]
pub service_execution_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub worker_configuration: std::option::Option<crate::model::WorkerConfiguration>,
}
impl CreateConnectorInput {
pub fn capacity(&self) -> std::option::Option<&crate::model::Capacity> {
self.capacity.as_ref()
}
pub fn connector_configuration(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.connector_configuration.as_ref()
}
pub fn connector_description(&self) -> std::option::Option<&str> {
self.connector_description.as_deref()
}
pub fn connector_name(&self) -> std::option::Option<&str> {
self.connector_name.as_deref()
}
pub fn kafka_cluster(&self) -> std::option::Option<&crate::model::KafkaCluster> {
self.kafka_cluster.as_ref()
}
pub fn kafka_cluster_client_authentication(
&self,
) -> std::option::Option<&crate::model::KafkaClusterClientAuthentication> {
self.kafka_cluster_client_authentication.as_ref()
}
pub fn kafka_cluster_encryption_in_transit(
&self,
) -> std::option::Option<&crate::model::KafkaClusterEncryptionInTransit> {
self.kafka_cluster_encryption_in_transit.as_ref()
}
pub fn kafka_connect_version(&self) -> std::option::Option<&str> {
self.kafka_connect_version.as_deref()
}
pub fn log_delivery(&self) -> std::option::Option<&crate::model::LogDelivery> {
self.log_delivery.as_ref()
}
pub fn plugins(&self) -> std::option::Option<&[crate::model::Plugin]> {
self.plugins.as_deref()
}
pub fn service_execution_role_arn(&self) -> std::option::Option<&str> {
self.service_execution_role_arn.as_deref()
}
pub fn worker_configuration(&self) -> std::option::Option<&crate::model::WorkerConfiguration> {
self.worker_configuration.as_ref()
}
}
impl std::fmt::Debug for CreateConnectorInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateConnectorInput");
formatter.field("capacity", &self.capacity);
formatter.field(
"connector_configuration",
&"*** Sensitive Data Redacted ***",
);
formatter.field("connector_description", &self.connector_description);
formatter.field("connector_name", &self.connector_name);
formatter.field("kafka_cluster", &self.kafka_cluster);
formatter.field(
"kafka_cluster_client_authentication",
&self.kafka_cluster_client_authentication,
);
formatter.field(
"kafka_cluster_encryption_in_transit",
&self.kafka_cluster_encryption_in_transit,
);
formatter.field("kafka_connect_version", &self.kafka_connect_version);
formatter.field("log_delivery", &self.log_delivery);
formatter.field("plugins", &self.plugins);
formatter.field(
"service_execution_role_arn",
&self.service_execution_role_arn,
);
formatter.field("worker_configuration", &self.worker_configuration);
formatter.finish()
}
}