aws_sdk_pinpoint/types/
_export_job_request.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Specifies the settings for a job that exports endpoint definitions to an Amazon Simple Storage Service (Amazon S3) bucket.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ExportJobRequest {
7    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
8    pub role_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
10    /// bucket-name
11    /// </replaceable>/<replaceable>
12    /// folder-name
13    /// </replaceable>/.</p>
14    pub s3_url_prefix: ::std::option::Option<::std::string::String>,
15    /// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
16    pub segment_id: ::std::option::Option<::std::string::String>,
17    /// <p>The version of the segment to export endpoint definitions from, if specified.</p>
18    pub segment_version: ::std::option::Option<i32>,
19}
20impl ExportJobRequest {
21    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
22    pub fn role_arn(&self) -> ::std::option::Option<&str> {
23        self.role_arn.as_deref()
24    }
25    /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
26    /// bucket-name
27    /// </replaceable>/<replaceable>
28    /// folder-name
29    /// </replaceable>/.</p>
30    pub fn s3_url_prefix(&self) -> ::std::option::Option<&str> {
31        self.s3_url_prefix.as_deref()
32    }
33    /// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
34    pub fn segment_id(&self) -> ::std::option::Option<&str> {
35        self.segment_id.as_deref()
36    }
37    /// <p>The version of the segment to export endpoint definitions from, if specified.</p>
38    pub fn segment_version(&self) -> ::std::option::Option<i32> {
39        self.segment_version
40    }
41}
42impl ExportJobRequest {
43    /// Creates a new builder-style object to manufacture [`ExportJobRequest`](crate::types::ExportJobRequest).
44    pub fn builder() -> crate::types::builders::ExportJobRequestBuilder {
45        crate::types::builders::ExportJobRequestBuilder::default()
46    }
47}
48
49/// A builder for [`ExportJobRequest`](crate::types::ExportJobRequest).
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
51#[non_exhaustive]
52pub struct ExportJobRequestBuilder {
53    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
54    pub(crate) s3_url_prefix: ::std::option::Option<::std::string::String>,
55    pub(crate) segment_id: ::std::option::Option<::std::string::String>,
56    pub(crate) segment_version: ::std::option::Option<i32>,
57}
58impl ExportJobRequestBuilder {
59    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
60    /// This field is required.
61    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.role_arn = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
66    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.role_arn = input;
68        self
69    }
70    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
71    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
72        &self.role_arn
73    }
74    /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
75    /// bucket-name
76    /// </replaceable>/<replaceable>
77    /// folder-name
78    /// </replaceable>/.</p>
79    /// This field is required.
80    pub fn s3_url_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.s3_url_prefix = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
85    /// bucket-name
86    /// </replaceable>/<replaceable>
87    /// folder-name
88    /// </replaceable>/.</p>
89    pub fn set_s3_url_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.s3_url_prefix = input;
91        self
92    }
93    /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
94    /// bucket-name
95    /// </replaceable>/<replaceable>
96    /// folder-name
97    /// </replaceable>/.</p>
98    pub fn get_s3_url_prefix(&self) -> &::std::option::Option<::std::string::String> {
99        &self.s3_url_prefix
100    }
101    /// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
102    pub fn segment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.segment_id = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
107    pub fn set_segment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.segment_id = input;
109        self
110    }
111    /// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
112    pub fn get_segment_id(&self) -> &::std::option::Option<::std::string::String> {
113        &self.segment_id
114    }
115    /// <p>The version of the segment to export endpoint definitions from, if specified.</p>
116    pub fn segment_version(mut self, input: i32) -> Self {
117        self.segment_version = ::std::option::Option::Some(input);
118        self
119    }
120    /// <p>The version of the segment to export endpoint definitions from, if specified.</p>
121    pub fn set_segment_version(mut self, input: ::std::option::Option<i32>) -> Self {
122        self.segment_version = input;
123        self
124    }
125    /// <p>The version of the segment to export endpoint definitions from, if specified.</p>
126    pub fn get_segment_version(&self) -> &::std::option::Option<i32> {
127        &self.segment_version
128    }
129    /// Consumes the builder and constructs a [`ExportJobRequest`](crate::types::ExportJobRequest).
130    pub fn build(self) -> crate::types::ExportJobRequest {
131        crate::types::ExportJobRequest {
132            role_arn: self.role_arn,
133            s3_url_prefix: self.s3_url_prefix,
134            segment_id: self.segment_id,
135            segment_version: self.segment_version,
136        }
137    }
138}