use std::fmt::Write;
pub mod batch_create_table_rows_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) table_id: std::option::Option<std::string::String>,
pub(crate) rows_to_create: std::option::Option<std::vec::Vec<crate::model::CreateRowData>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.table_id = Some(input.into());
self
}
pub fn set_table_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_id = input;
self
}
pub fn rows_to_create(mut self, input: crate::model::CreateRowData) -> Self {
let mut v = self.rows_to_create.unwrap_or_default();
v.push(input);
self.rows_to_create = Some(v);
self
}
pub fn set_rows_to_create(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CreateRowData>>,
) -> Self {
self.rows_to_create = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchCreateTableRowsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchCreateTableRowsInput {
workbook_id: self.workbook_id,
table_id: self.table_id,
rows_to_create: self.rows_to_create,
client_request_token: self.client_request_token,
})
}
}
}
impl BatchCreateTableRowsInput {
#[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::BatchCreateTableRows,
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::BatchCreateTableRowsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_1 = &_input.workbook_id;
let input_1 = input_1.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_1,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_2 = &_input.table_id;
let input_2 = input_2.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
)
})?;
let table_id = aws_smithy_http::label::fmt_string(
input_2,
aws_smithy_http::label::EncodingStrategy::Default,
);
if table_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables/{tableId}/rows/batchcreate",
workbookId = workbook_id,
tableId = table_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchCreateTableRowsInput,
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_batch_create_table_rows(
&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::BatchCreateTableRows::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchCreateTableRows",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_create_table_rows_input::Builder {
crate::input::batch_create_table_rows_input::Builder::default()
}
}
pub mod batch_delete_table_rows_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) table_id: std::option::Option<std::string::String>,
pub(crate) row_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.table_id = Some(input.into());
self
}
pub fn set_table_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_id = input;
self
}
pub fn row_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.row_ids.unwrap_or_default();
v.push(input.into());
self.row_ids = Some(v);
self
}
pub fn set_row_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.row_ids = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchDeleteTableRowsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchDeleteTableRowsInput {
workbook_id: self.workbook_id,
table_id: self.table_id,
row_ids: self.row_ids,
client_request_token: self.client_request_token,
})
}
}
}
impl BatchDeleteTableRowsInput {
#[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::BatchDeleteTableRows,
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::BatchDeleteTableRowsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_3 = &_input.workbook_id;
let input_3 = input_3.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_3,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_4 = &_input.table_id;
let input_4 = input_4.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
)
})?;
let table_id = aws_smithy_http::label::fmt_string(
input_4,
aws_smithy_http::label::EncodingStrategy::Default,
);
if table_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables/{tableId}/rows/batchdelete",
workbookId = workbook_id,
tableId = table_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchDeleteTableRowsInput,
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_batch_delete_table_rows(
&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::BatchDeleteTableRows::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDeleteTableRows",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_delete_table_rows_input::Builder {
crate::input::batch_delete_table_rows_input::Builder::default()
}
}
pub mod batch_update_table_rows_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) table_id: std::option::Option<std::string::String>,
pub(crate) rows_to_update: std::option::Option<std::vec::Vec<crate::model::UpdateRowData>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.table_id = Some(input.into());
self
}
pub fn set_table_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_id = input;
self
}
pub fn rows_to_update(mut self, input: crate::model::UpdateRowData) -> Self {
let mut v = self.rows_to_update.unwrap_or_default();
v.push(input);
self.rows_to_update = Some(v);
self
}
pub fn set_rows_to_update(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::UpdateRowData>>,
) -> Self {
self.rows_to_update = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchUpdateTableRowsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchUpdateTableRowsInput {
workbook_id: self.workbook_id,
table_id: self.table_id,
rows_to_update: self.rows_to_update,
client_request_token: self.client_request_token,
})
}
}
}
impl BatchUpdateTableRowsInput {
#[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::BatchUpdateTableRows,
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::BatchUpdateTableRowsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_5 = &_input.workbook_id;
let input_5 = input_5.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_5,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_6 = &_input.table_id;
let input_6 = input_6.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
)
})?;
let table_id = aws_smithy_http::label::fmt_string(
input_6,
aws_smithy_http::label::EncodingStrategy::Default,
);
if table_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables/{tableId}/rows/batchupdate",
workbookId = workbook_id,
tableId = table_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchUpdateTableRowsInput,
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_batch_update_table_rows(
&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::BatchUpdateTableRows::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchUpdateTableRows",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_update_table_rows_input::Builder {
crate::input::batch_update_table_rows_input::Builder::default()
}
}
pub mod batch_upsert_table_rows_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) table_id: std::option::Option<std::string::String>,
pub(crate) rows_to_upsert: std::option::Option<std::vec::Vec<crate::model::UpsertRowData>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.table_id = Some(input.into());
self
}
pub fn set_table_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_id = input;
self
}
pub fn rows_to_upsert(mut self, input: crate::model::UpsertRowData) -> Self {
let mut v = self.rows_to_upsert.unwrap_or_default();
v.push(input);
self.rows_to_upsert = Some(v);
self
}
pub fn set_rows_to_upsert(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::UpsertRowData>>,
) -> Self {
self.rows_to_upsert = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchUpsertTableRowsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchUpsertTableRowsInput {
workbook_id: self.workbook_id,
table_id: self.table_id,
rows_to_upsert: self.rows_to_upsert,
client_request_token: self.client_request_token,
})
}
}
}
impl BatchUpsertTableRowsInput {
#[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::BatchUpsertTableRows,
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::BatchUpsertTableRowsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_7 = &_input.workbook_id;
let input_7 = input_7.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_7,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_8 = &_input.table_id;
let input_8 = input_8.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
)
})?;
let table_id = aws_smithy_http::label::fmt_string(
input_8,
aws_smithy_http::label::EncodingStrategy::Default,
);
if table_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables/{tableId}/rows/batchupsert",
workbookId = workbook_id,
tableId = table_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchUpsertTableRowsInput,
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_batch_upsert_table_rows(
&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::BatchUpsertTableRows::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchUpsertTableRows",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_upsert_table_rows_input::Builder {
crate::input::batch_upsert_table_rows_input::Builder::default()
}
}
pub mod describe_table_data_import_job_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) table_id: std::option::Option<std::string::String>,
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.table_id = Some(input.into());
self
}
pub fn set_table_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_id = input;
self
}
pub fn job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.job_id = Some(input.into());
self
}
pub fn set_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeTableDataImportJobInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeTableDataImportJobInput {
workbook_id: self.workbook_id,
table_id: self.table_id,
job_id: self.job_id,
})
}
}
}
impl DescribeTableDataImportJobInput {
#[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::DescribeTableDataImportJob,
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::DescribeTableDataImportJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_9 = &_input.workbook_id;
let input_9 = input_9.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_9,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_10 = &_input.table_id;
let input_10 = input_10.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
)
})?;
let table_id = aws_smithy_http::label::fmt_string(
input_10,
aws_smithy_http::label::EncodingStrategy::Default,
);
if table_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
),
);
}
let input_11 = &_input.job_id;
let input_11 = input_11.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"job_id",
"cannot be empty or unset",
)
})?;
let job_id = aws_smithy_http::label::fmt_string(
input_11,
aws_smithy_http::label::EncodingStrategy::Default,
);
if job_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"job_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables/{tableId}/import/{jobId}",
workbookId = workbook_id,
tableId = table_id,
jobId = job_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeTableDataImportJobInput,
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::DescribeTableDataImportJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeTableDataImportJob",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_table_data_import_job_input::Builder {
crate::input::describe_table_data_import_job_input::Builder::default()
}
}
pub mod get_screen_data_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) app_id: std::option::Option<std::string::String>,
pub(crate) screen_id: std::option::Option<std::string::String>,
pub(crate) variables: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::VariableValue>,
>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn app_id(mut self, input: impl Into<std::string::String>) -> Self {
self.app_id = Some(input.into());
self
}
pub fn set_app_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.app_id = input;
self
}
pub fn screen_id(mut self, input: impl Into<std::string::String>) -> Self {
self.screen_id = Some(input.into());
self
}
pub fn set_screen_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.screen_id = input;
self
}
pub fn variables(
mut self,
k: impl Into<std::string::String>,
v: crate::model::VariableValue,
) -> Self {
let mut hash_map = self.variables.unwrap_or_default();
hash_map.insert(k.into(), v);
self.variables = Some(hash_map);
self
}
pub fn set_variables(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::VariableValue>,
>,
) -> Self {
self.variables = 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::GetScreenDataInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetScreenDataInput {
workbook_id: self.workbook_id,
app_id: self.app_id,
screen_id: self.screen_id,
variables: self.variables,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
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("workbook_id", &self.workbook_id);
formatter.field("app_id", &self.app_id);
formatter.field("screen_id", &self.screen_id);
formatter.field("variables", &"*** Sensitive Data Redacted ***");
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
}
impl GetScreenDataInput {
#[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::GetScreenData,
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::GetScreenDataInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/screendata").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetScreenDataInput,
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_get_screen_data(&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::GetScreenData::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetScreenData",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_screen_data_input::Builder {
crate::input::get_screen_data_input::Builder::default()
}
}
pub mod invoke_screen_automation_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) app_id: std::option::Option<std::string::String>,
pub(crate) screen_id: std::option::Option<std::string::String>,
pub(crate) screen_automation_id: std::option::Option<std::string::String>,
pub(crate) variables: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::VariableValue>,
>,
pub(crate) row_id: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn app_id(mut self, input: impl Into<std::string::String>) -> Self {
self.app_id = Some(input.into());
self
}
pub fn set_app_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.app_id = input;
self
}
pub fn screen_id(mut self, input: impl Into<std::string::String>) -> Self {
self.screen_id = Some(input.into());
self
}
pub fn set_screen_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.screen_id = input;
self
}
pub fn screen_automation_id(mut self, input: impl Into<std::string::String>) -> Self {
self.screen_automation_id = Some(input.into());
self
}
pub fn set_screen_automation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.screen_automation_id = input;
self
}
pub fn variables(
mut self,
k: impl Into<std::string::String>,
v: crate::model::VariableValue,
) -> Self {
let mut hash_map = self.variables.unwrap_or_default();
hash_map.insert(k.into(), v);
self.variables = Some(hash_map);
self
}
pub fn set_variables(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::VariableValue>,
>,
) -> Self {
self.variables = input;
self
}
pub fn row_id(mut self, input: impl Into<std::string::String>) -> Self {
self.row_id = Some(input.into());
self
}
pub fn set_row_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.row_id = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::InvokeScreenAutomationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::InvokeScreenAutomationInput {
workbook_id: self.workbook_id,
app_id: self.app_id,
screen_id: self.screen_id,
screen_automation_id: self.screen_automation_id,
variables: self.variables,
row_id: self.row_id,
client_request_token: self.client_request_token,
})
}
}
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("workbook_id", &self.workbook_id);
formatter.field("app_id", &self.app_id);
formatter.field("screen_id", &self.screen_id);
formatter.field("screen_automation_id", &self.screen_automation_id);
formatter.field("variables", &"*** Sensitive Data Redacted ***");
formatter.field("row_id", &self.row_id);
formatter.field("client_request_token", &self.client_request_token);
formatter.finish()
}
}
}
impl InvokeScreenAutomationInput {
#[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::InvokeScreenAutomation,
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::InvokeScreenAutomationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_12 = &_input.workbook_id;
let input_12 = input_12.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_12,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_13 = &_input.app_id;
let input_13 = input_13.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"app_id",
"cannot be empty or unset",
)
})?;
let app_id = aws_smithy_http::label::fmt_string(
input_13,
aws_smithy_http::label::EncodingStrategy::Default,
);
if app_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"app_id",
"cannot be empty or unset",
),
);
}
let input_14 = &_input.screen_id;
let input_14 = input_14.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"screen_id",
"cannot be empty or unset",
)
})?;
let screen_id = aws_smithy_http::label::fmt_string(
input_14,
aws_smithy_http::label::EncodingStrategy::Default,
);
if screen_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"screen_id",
"cannot be empty or unset",
),
);
}
let input_15 = &_input.screen_automation_id;
let input_15 = input_15.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"screen_automation_id",
"cannot be empty or unset",
)
})?;
let screen_automation_id = aws_smithy_http::label::fmt_string(
input_15,
aws_smithy_http::label::EncodingStrategy::Default,
);
if screen_automation_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"screen_automation_id",
"cannot be empty or unset",
),
);
}
write!(output, "/workbooks/{workbookId}/apps/{appId}/screens/{screenId}/automations/{screenAutomationId}", workbookId = workbook_id, appId = app_id, screenId = screen_id, screenAutomationId = screen_automation_id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::InvokeScreenAutomationInput,
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_invoke_screen_automation(
&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::InvokeScreenAutomation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"InvokeScreenAutomation",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::invoke_screen_automation_input::Builder {
crate::input::invoke_screen_automation_input::Builder::default()
}
}
pub mod list_table_columns_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) table_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.table_id = Some(input.into());
self
}
pub fn set_table_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_id = 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::ListTableColumnsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTableColumnsInput {
workbook_id: self.workbook_id,
table_id: self.table_id,
next_token: self.next_token,
})
}
}
}
impl ListTableColumnsInput {
#[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::ListTableColumns,
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::ListTableColumnsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_16 = &_input.workbook_id;
let input_16 = input_16.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_16,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_17 = &_input.table_id;
let input_17 = input_17.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
)
})?;
let table_id = aws_smithy_http::label::fmt_string(
input_17,
aws_smithy_http::label::EncodingStrategy::Default,
);
if table_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables/{tableId}/columns",
workbookId = workbook_id,
tableId = table_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListTableColumnsInput,
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_18) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_18));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTableColumnsInput,
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::ListTableColumns::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTableColumns",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_table_columns_input::Builder {
crate::input::list_table_columns_input::Builder::default()
}
}
pub mod list_table_rows_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) table_id: std::option::Option<std::string::String>,
pub(crate) row_ids: std::option::Option<std::vec::Vec<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 workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.table_id = Some(input.into());
self
}
pub fn set_table_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_id = input;
self
}
pub fn row_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.row_ids.unwrap_or_default();
v.push(input.into());
self.row_ids = Some(v);
self
}
pub fn set_row_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.row_ids = 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::ListTableRowsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListTableRowsInput {
workbook_id: self.workbook_id,
table_id: self.table_id,
row_ids: self.row_ids,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl ListTableRowsInput {
#[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::ListTableRows,
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::ListTableRowsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_19 = &_input.workbook_id;
let input_19 = input_19.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_19,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_20 = &_input.table_id;
let input_20 = input_20.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
)
})?;
let table_id = aws_smithy_http::label::fmt_string(
input_20,
aws_smithy_http::label::EncodingStrategy::Default,
);
if table_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables/{tableId}/rows/list",
workbookId = workbook_id,
tableId = table_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTableRowsInput,
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_list_table_rows(&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::ListTableRows::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTableRows",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_table_rows_input::Builder {
crate::input::list_table_rows_input::Builder::default()
}
}
pub mod list_tables_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListTablesInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListTablesInput {
workbook_id: self.workbook_id,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl ListTablesInput {
#[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::ListTables,
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::ListTablesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_21 = &_input.workbook_id;
let input_21 = input_21.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_21,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables",
workbookId = workbook_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListTablesInput,
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_22) = &_input.max_results {
if *inner_22 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_22).encode(),
);
}
}
if let Some(inner_23) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_23));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTablesInput,
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::ListTables::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTables",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_tables_input::Builder {
crate::input::list_tables_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
impl ListTagsForResourceInput {
#[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::ListTagsForResource,
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::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_24 = &_input.resource_arn;
let input_24 = input_24.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_24,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTagsForResourceInput,
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::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
crate::input::list_tags_for_resource_input::Builder::default()
}
}
pub mod query_table_rows_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) table_id: std::option::Option<std::string::String>,
pub(crate) filter_formula: std::option::Option<crate::model::Filter>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.table_id = Some(input.into());
self
}
pub fn set_table_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.table_id = input;
self
}
pub fn filter_formula(mut self, input: crate::model::Filter) -> Self {
self.filter_formula = Some(input);
self
}
pub fn set_filter_formula(
mut self,
input: std::option::Option<crate::model::Filter>,
) -> Self {
self.filter_formula = 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::QueryTableRowsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::QueryTableRowsInput {
workbook_id: self.workbook_id,
table_id: self.table_id,
filter_formula: self.filter_formula,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl QueryTableRowsInput {
#[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::QueryTableRows,
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::QueryTableRowsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_25 = &_input.workbook_id;
let input_25 = input_25.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_25,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_26 = &_input.table_id;
let input_26 = input_26.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
)
})?;
let table_id = aws_smithy_http::label::fmt_string(
input_26,
aws_smithy_http::label::EncodingStrategy::Default,
);
if table_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"table_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables/{tableId}/rows/query",
workbookId = workbook_id,
tableId = table_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::QueryTableRowsInput,
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_query_table_rows(&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::QueryTableRows::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"QueryTableRows",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::query_table_rows_input::Builder {
crate::input::query_table_rows_input::Builder::default()
}
}
pub mod start_table_data_import_job_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) workbook_id: std::option::Option<std::string::String>,
pub(crate) data_source: std::option::Option<crate::model::ImportDataSource>,
pub(crate) data_format: std::option::Option<crate::model::ImportSourceDataFormat>,
pub(crate) destination_table_id: std::option::Option<std::string::String>,
pub(crate) import_options: std::option::Option<crate::model::ImportOptions>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn workbook_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workbook_id = Some(input.into());
self
}
pub fn set_workbook_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workbook_id = input;
self
}
pub fn data_source(mut self, input: crate::model::ImportDataSource) -> Self {
self.data_source = Some(input);
self
}
pub fn set_data_source(
mut self,
input: std::option::Option<crate::model::ImportDataSource>,
) -> Self {
self.data_source = input;
self
}
pub fn data_format(mut self, input: crate::model::ImportSourceDataFormat) -> Self {
self.data_format = Some(input);
self
}
pub fn set_data_format(
mut self,
input: std::option::Option<crate::model::ImportSourceDataFormat>,
) -> Self {
self.data_format = input;
self
}
pub fn destination_table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_table_id = Some(input.into());
self
}
pub fn set_destination_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_table_id = input;
self
}
pub fn import_options(mut self, input: crate::model::ImportOptions) -> Self {
self.import_options = Some(input);
self
}
pub fn set_import_options(
mut self,
input: std::option::Option<crate::model::ImportOptions>,
) -> Self {
self.import_options = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartTableDataImportJobInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartTableDataImportJobInput {
workbook_id: self.workbook_id,
data_source: self.data_source,
data_format: self.data_format,
destination_table_id: self.destination_table_id,
import_options: self.import_options,
client_request_token: self.client_request_token,
})
}
}
}
impl StartTableDataImportJobInput {
#[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::StartTableDataImportJob,
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::StartTableDataImportJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_27 = &_input.workbook_id;
let input_27 = input_27.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
)
})?;
let workbook_id = aws_smithy_http::label::fmt_string(
input_27,
aws_smithy_http::label::EncodingStrategy::Default,
);
if workbook_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"workbook_id",
"cannot be empty or unset",
),
);
}
let input_28 = &_input.destination_table_id;
let input_28 = input_28.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"destination_table_id",
"cannot be empty or unset",
)
})?;
let destination_table_id = aws_smithy_http::label::fmt_string(
input_28,
aws_smithy_http::label::EncodingStrategy::Default,
);
if destination_table_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"destination_table_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/workbooks/{workbookId}/tables/{destinationTableId}/import",
workbookId = workbook_id,
destinationTableId = destination_table_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartTableDataImportJobInput,
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_start_table_data_import_job(
&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::StartTableDataImportJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartTableDataImportJob",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_table_data_import_job_input::Builder {
crate::input::start_table_data_import_job_input::Builder::default()
}
}
pub mod tag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: 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 resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = 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,
) -> Result<crate::input::TagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
impl TagResourceInput {
#[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::TagResource,
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::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_29 = &_input.resource_arn;
let input_29 = input_29.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_29,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
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_tag_resource(&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::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UntagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
impl UntagResourceInput {
#[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::UntagResource,
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::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_30 = &_input.resource_arn;
let input_30 = input_30.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_30,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UntagResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_31 = &_input.tag_keys;
let inner_31 = inner_31.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"tag_keys",
"cannot be empty or unset",
)
})?;
for inner_32 in inner_31 {
query.push_kv("tagKeys", &aws_smithy_http::query::fmt_string(&inner_32));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
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::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"honeycode",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UntagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartTableDataImportJobInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub data_source: std::option::Option<crate::model::ImportDataSource>,
#[doc(hidden)]
pub data_format: std::option::Option<crate::model::ImportSourceDataFormat>,
#[doc(hidden)]
pub destination_table_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub import_options: std::option::Option<crate::model::ImportOptions>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl StartTableDataImportJobInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn data_source(&self) -> std::option::Option<&crate::model::ImportDataSource> {
self.data_source.as_ref()
}
pub fn data_format(&self) -> std::option::Option<&crate::model::ImportSourceDataFormat> {
self.data_format.as_ref()
}
pub fn destination_table_id(&self) -> std::option::Option<&str> {
self.destination_table_id.as_deref()
}
pub fn import_options(&self) -> std::option::Option<&crate::model::ImportOptions> {
self.import_options.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct QueryTableRowsInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filter_formula: std::option::Option<crate::model::Filter>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl QueryTableRowsInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn table_id(&self) -> std::option::Option<&str> {
self.table_id.as_deref()
}
pub fn filter_formula(&self) -> std::option::Option<&crate::model::Filter> {
self.filter_formula.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()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTagsForResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTablesInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListTablesInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTableRowsInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub row_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListTableRowsInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn table_id(&self) -> std::option::Option<&str> {
self.table_id.as_deref()
}
pub fn row_ids(&self) -> std::option::Option<&[std::string::String]> {
self.row_ids.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()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTableColumnsInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListTableColumnsInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn table_id(&self) -> std::option::Option<&str> {
self.table_id.as_deref()
}
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)]
pub struct InvokeScreenAutomationInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub app_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub screen_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub screen_automation_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub variables: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::VariableValue>,
>,
#[doc(hidden)]
pub row_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl InvokeScreenAutomationInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn app_id(&self) -> std::option::Option<&str> {
self.app_id.as_deref()
}
pub fn screen_id(&self) -> std::option::Option<&str> {
self.screen_id.as_deref()
}
pub fn screen_automation_id(&self) -> std::option::Option<&str> {
self.screen_automation_id.as_deref()
}
pub fn variables(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::VariableValue>,
> {
self.variables.as_ref()
}
pub fn row_id(&self) -> std::option::Option<&str> {
self.row_id.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
impl std::fmt::Debug for InvokeScreenAutomationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvokeScreenAutomationInput");
formatter.field("workbook_id", &self.workbook_id);
formatter.field("app_id", &self.app_id);
formatter.field("screen_id", &self.screen_id);
formatter.field("screen_automation_id", &self.screen_automation_id);
formatter.field("variables", &"*** Sensitive Data Redacted ***");
formatter.field("row_id", &self.row_id);
formatter.field("client_request_token", &self.client_request_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetScreenDataInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub app_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub screen_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub variables: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::VariableValue>,
>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetScreenDataInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn app_id(&self) -> std::option::Option<&str> {
self.app_id.as_deref()
}
pub fn screen_id(&self) -> std::option::Option<&str> {
self.screen_id.as_deref()
}
pub fn variables(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::VariableValue>,
> {
self.variables.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 GetScreenDataInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetScreenDataInput");
formatter.field("workbook_id", &self.workbook_id);
formatter.field("app_id", &self.app_id);
formatter.field("screen_id", &self.screen_id);
formatter.field("variables", &"*** Sensitive Data Redacted ***");
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, std::fmt::Debug)]
pub struct DescribeTableDataImportJobInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeTableDataImportJobInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn table_id(&self) -> std::option::Option<&str> {
self.table_id.as_deref()
}
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchUpsertTableRowsInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub rows_to_upsert: std::option::Option<std::vec::Vec<crate::model::UpsertRowData>>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl BatchUpsertTableRowsInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn table_id(&self) -> std::option::Option<&str> {
self.table_id.as_deref()
}
pub fn rows_to_upsert(&self) -> std::option::Option<&[crate::model::UpsertRowData]> {
self.rows_to_upsert.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchUpdateTableRowsInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub rows_to_update: std::option::Option<std::vec::Vec<crate::model::UpdateRowData>>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl BatchUpdateTableRowsInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn table_id(&self) -> std::option::Option<&str> {
self.table_id.as_deref()
}
pub fn rows_to_update(&self) -> std::option::Option<&[crate::model::UpdateRowData]> {
self.rows_to_update.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchDeleteTableRowsInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub row_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl BatchDeleteTableRowsInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn table_id(&self) -> std::option::Option<&str> {
self.table_id.as_deref()
}
pub fn row_ids(&self) -> std::option::Option<&[std::string::String]> {
self.row_ids.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchCreateTableRowsInput {
#[doc(hidden)]
pub workbook_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub table_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub rows_to_create: std::option::Option<std::vec::Vec<crate::model::CreateRowData>>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl BatchCreateTableRowsInput {
pub fn workbook_id(&self) -> std::option::Option<&str> {
self.workbook_id.as_deref()
}
pub fn table_id(&self) -> std::option::Option<&str> {
self.table_id.as_deref()
}
pub fn rows_to_create(&self) -> std::option::Option<&[crate::model::CreateRowData]> {
self.rows_to_create.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}