aws_sdk_iot/types/_aws_job_presigned_url_config.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Configuration information for pre-signed URLs. Valid when <code>protocols</code> contains HTTP.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AwsJobPresignedUrlConfig {
7 /// <p>How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 1800 seconds. Pre-signed URLs are generated when a request for the job document is received.</p>
8 pub expires_in_sec: ::std::option::Option<i64>,
9}
10impl AwsJobPresignedUrlConfig {
11 /// <p>How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 1800 seconds. Pre-signed URLs are generated when a request for the job document is received.</p>
12 pub fn expires_in_sec(&self) -> ::std::option::Option<i64> {
13 self.expires_in_sec
14 }
15}
16impl AwsJobPresignedUrlConfig {
17 /// Creates a new builder-style object to manufacture [`AwsJobPresignedUrlConfig`](crate::types::AwsJobPresignedUrlConfig).
18 pub fn builder() -> crate::types::builders::AwsJobPresignedUrlConfigBuilder {
19 crate::types::builders::AwsJobPresignedUrlConfigBuilder::default()
20 }
21}
22
23/// A builder for [`AwsJobPresignedUrlConfig`](crate::types::AwsJobPresignedUrlConfig).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct AwsJobPresignedUrlConfigBuilder {
27 pub(crate) expires_in_sec: ::std::option::Option<i64>,
28}
29impl AwsJobPresignedUrlConfigBuilder {
30 /// <p>How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 1800 seconds. Pre-signed URLs are generated when a request for the job document is received.</p>
31 pub fn expires_in_sec(mut self, input: i64) -> Self {
32 self.expires_in_sec = ::std::option::Option::Some(input);
33 self
34 }
35 /// <p>How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 1800 seconds. Pre-signed URLs are generated when a request for the job document is received.</p>
36 pub fn set_expires_in_sec(mut self, input: ::std::option::Option<i64>) -> Self {
37 self.expires_in_sec = input;
38 self
39 }
40 /// <p>How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 1800 seconds. Pre-signed URLs are generated when a request for the job document is received.</p>
41 pub fn get_expires_in_sec(&self) -> &::std::option::Option<i64> {
42 &self.expires_in_sec
43 }
44 /// Consumes the builder and constructs a [`AwsJobPresignedUrlConfig`](crate::types::AwsJobPresignedUrlConfig).
45 pub fn build(self) -> crate::types::AwsJobPresignedUrlConfig {
46 crate::types::AwsJobPresignedUrlConfig {
47 expires_in_sec: self.expires_in_sec,
48 }
49 }
50}