1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Limits that are related to concurrency and storage. All file and storage sizes are in bytes.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AccountLimit {
/// <p>The amount of storage space that you can use for all deployment packages and layer archives.</p>
pub total_code_size: i64,
/// <p>The maximum size of a function's deployment package and layers when they're extracted.</p>
pub code_size_unzipped: i64,
/// <p>The maximum size of a deployment package when it's uploaded directly to Lambda. Use Amazon S3 for larger files.</p>
pub code_size_zipped: i64,
/// <p>The maximum number of simultaneous function executions.</p>
pub concurrent_executions: i32,
/// <p>The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with <code>PutFunctionConcurrency</code>.</p>
pub unreserved_concurrent_executions: ::std::option::Option<i32>,
}
impl AccountLimit {
/// <p>The amount of storage space that you can use for all deployment packages and layer archives.</p>
pub fn total_code_size(&self) -> i64 {
self.total_code_size
}
/// <p>The maximum size of a function's deployment package and layers when they're extracted.</p>
pub fn code_size_unzipped(&self) -> i64 {
self.code_size_unzipped
}
/// <p>The maximum size of a deployment package when it's uploaded directly to Lambda. Use Amazon S3 for larger files.</p>
pub fn code_size_zipped(&self) -> i64 {
self.code_size_zipped
}
/// <p>The maximum number of simultaneous function executions.</p>
pub fn concurrent_executions(&self) -> i32 {
self.concurrent_executions
}
/// <p>The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with <code>PutFunctionConcurrency</code>.</p>
pub fn unreserved_concurrent_executions(&self) -> ::std::option::Option<i32> {
self.unreserved_concurrent_executions
}
}
impl AccountLimit {
/// Creates a new builder-style object to manufacture [`AccountLimit`](crate::types::AccountLimit).
pub fn builder() -> crate::types::builders::AccountLimitBuilder {
crate::types::builders::AccountLimitBuilder::default()
}
}
/// A builder for [`AccountLimit`](crate::types::AccountLimit).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AccountLimitBuilder {
pub(crate) total_code_size: ::std::option::Option<i64>,
pub(crate) code_size_unzipped: ::std::option::Option<i64>,
pub(crate) code_size_zipped: ::std::option::Option<i64>,
pub(crate) concurrent_executions: ::std::option::Option<i32>,
pub(crate) unreserved_concurrent_executions: ::std::option::Option<i32>,
}
impl AccountLimitBuilder {
/// <p>The amount of storage space that you can use for all deployment packages and layer archives.</p>
pub fn total_code_size(mut self, input: i64) -> Self {
self.total_code_size = ::std::option::Option::Some(input);
self
}
/// <p>The amount of storage space that you can use for all deployment packages and layer archives.</p>
pub fn set_total_code_size(mut self, input: ::std::option::Option<i64>) -> Self {
self.total_code_size = input;
self
}
/// <p>The amount of storage space that you can use for all deployment packages and layer archives.</p>
pub fn get_total_code_size(&self) -> &::std::option::Option<i64> {
&self.total_code_size
}
/// <p>The maximum size of a function's deployment package and layers when they're extracted.</p>
pub fn code_size_unzipped(mut self, input: i64) -> Self {
self.code_size_unzipped = ::std::option::Option::Some(input);
self
}
/// <p>The maximum size of a function's deployment package and layers when they're extracted.</p>
pub fn set_code_size_unzipped(mut self, input: ::std::option::Option<i64>) -> Self {
self.code_size_unzipped = input;
self
}
/// <p>The maximum size of a function's deployment package and layers when they're extracted.</p>
pub fn get_code_size_unzipped(&self) -> &::std::option::Option<i64> {
&self.code_size_unzipped
}
/// <p>The maximum size of a deployment package when it's uploaded directly to Lambda. Use Amazon S3 for larger files.</p>
pub fn code_size_zipped(mut self, input: i64) -> Self {
self.code_size_zipped = ::std::option::Option::Some(input);
self
}
/// <p>The maximum size of a deployment package when it's uploaded directly to Lambda. Use Amazon S3 for larger files.</p>
pub fn set_code_size_zipped(mut self, input: ::std::option::Option<i64>) -> Self {
self.code_size_zipped = input;
self
}
/// <p>The maximum size of a deployment package when it's uploaded directly to Lambda. Use Amazon S3 for larger files.</p>
pub fn get_code_size_zipped(&self) -> &::std::option::Option<i64> {
&self.code_size_zipped
}
/// <p>The maximum number of simultaneous function executions.</p>
pub fn concurrent_executions(mut self, input: i32) -> Self {
self.concurrent_executions = ::std::option::Option::Some(input);
self
}
/// <p>The maximum number of simultaneous function executions.</p>
pub fn set_concurrent_executions(mut self, input: ::std::option::Option<i32>) -> Self {
self.concurrent_executions = input;
self
}
/// <p>The maximum number of simultaneous function executions.</p>
pub fn get_concurrent_executions(&self) -> &::std::option::Option<i32> {
&self.concurrent_executions
}
/// <p>The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with <code>PutFunctionConcurrency</code>.</p>
pub fn unreserved_concurrent_executions(mut self, input: i32) -> Self {
self.unreserved_concurrent_executions = ::std::option::Option::Some(input);
self
}
/// <p>The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with <code>PutFunctionConcurrency</code>.</p>
pub fn set_unreserved_concurrent_executions(mut self, input: ::std::option::Option<i32>) -> Self {
self.unreserved_concurrent_executions = input;
self
}
/// <p>The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with <code>PutFunctionConcurrency</code>.</p>
pub fn get_unreserved_concurrent_executions(&self) -> &::std::option::Option<i32> {
&self.unreserved_concurrent_executions
}
/// Consumes the builder and constructs a [`AccountLimit`](crate::types::AccountLimit).
pub fn build(self) -> crate::types::AccountLimit {
crate::types::AccountLimit {
total_code_size: self.total_code_size.unwrap_or_default(),
code_size_unzipped: self.code_size_unzipped.unwrap_or_default(),
code_size_zipped: self.code_size_zipped.unwrap_or_default(),
concurrent_executions: self.concurrent_executions.unwrap_or_default(),
unreserved_concurrent_executions: self.unreserved_concurrent_executions,
}
}
}