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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Specifies the configuration for asynchronous inference invocation outputs.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AsyncInferenceOutputConfig {
    /// <p>The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the asynchronous inference output in Amazon S3.</p>
    /// <p></p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon S3 location to upload inference responses to.</p>
    pub s3_output_path: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the configuration for notifications of inference results for asynchronous inference.</p>
    pub notification_config: ::std::option::Option<crate::types::AsyncInferenceNotificationConfig>,
    /// <p>The Amazon S3 location to upload failure inference responses to.</p>
    pub s3_failure_path: ::std::option::Option<::std::string::String>,
}
impl AsyncInferenceOutputConfig {
    /// <p>The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the asynchronous inference output in Amazon S3.</p>
    /// <p></p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The Amazon S3 location to upload inference responses to.</p>
    pub fn s3_output_path(&self) -> ::std::option::Option<&str> {
        self.s3_output_path.as_deref()
    }
    /// <p>Specifies the configuration for notifications of inference results for asynchronous inference.</p>
    pub fn notification_config(&self) -> ::std::option::Option<&crate::types::AsyncInferenceNotificationConfig> {
        self.notification_config.as_ref()
    }
    /// <p>The Amazon S3 location to upload failure inference responses to.</p>
    pub fn s3_failure_path(&self) -> ::std::option::Option<&str> {
        self.s3_failure_path.as_deref()
    }
}
impl AsyncInferenceOutputConfig {
    /// Creates a new builder-style object to manufacture [`AsyncInferenceOutputConfig`](crate::types::AsyncInferenceOutputConfig).
    pub fn builder() -> crate::types::builders::AsyncInferenceOutputConfigBuilder {
        crate::types::builders::AsyncInferenceOutputConfigBuilder::default()
    }
}

/// A builder for [`AsyncInferenceOutputConfig`](crate::types::AsyncInferenceOutputConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AsyncInferenceOutputConfigBuilder {
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) s3_output_path: ::std::option::Option<::std::string::String>,
    pub(crate) notification_config: ::std::option::Option<crate::types::AsyncInferenceNotificationConfig>,
    pub(crate) s3_failure_path: ::std::option::Option<::std::string::String>,
}
impl AsyncInferenceOutputConfigBuilder {
    /// <p>The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the asynchronous inference output in Amazon S3.</p>
    /// <p></p>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the asynchronous inference output in Amazon S3.</p>
    /// <p></p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the asynchronous inference output in Amazon S3.</p>
    /// <p></p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// <p>The Amazon S3 location to upload inference responses to.</p>
    pub fn s3_output_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3_output_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon S3 location to upload inference responses to.</p>
    pub fn set_s3_output_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3_output_path = input;
        self
    }
    /// <p>The Amazon S3 location to upload inference responses to.</p>
    pub fn get_s3_output_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3_output_path
    }
    /// <p>Specifies the configuration for notifications of inference results for asynchronous inference.</p>
    pub fn notification_config(mut self, input: crate::types::AsyncInferenceNotificationConfig) -> Self {
        self.notification_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the configuration for notifications of inference results for asynchronous inference.</p>
    pub fn set_notification_config(mut self, input: ::std::option::Option<crate::types::AsyncInferenceNotificationConfig>) -> Self {
        self.notification_config = input;
        self
    }
    /// <p>Specifies the configuration for notifications of inference results for asynchronous inference.</p>
    pub fn get_notification_config(&self) -> &::std::option::Option<crate::types::AsyncInferenceNotificationConfig> {
        &self.notification_config
    }
    /// <p>The Amazon S3 location to upload failure inference responses to.</p>
    pub fn s3_failure_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3_failure_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon S3 location to upload failure inference responses to.</p>
    pub fn set_s3_failure_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3_failure_path = input;
        self
    }
    /// <p>The Amazon S3 location to upload failure inference responses to.</p>
    pub fn get_s3_failure_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3_failure_path
    }
    /// Consumes the builder and constructs a [`AsyncInferenceOutputConfig`](crate::types::AsyncInferenceOutputConfig).
    pub fn build(self) -> crate::types::AsyncInferenceOutputConfig {
        crate::types::AsyncInferenceOutputConfig {
            kms_key_id: self.kms_key_id,
            s3_output_path: self.s3_output_path,
            notification_config: self.notification_config,
            s3_failure_path: self.s3_failure_path,
        }
    }
}