aws_sdk_signer/operation/sign_payload/
_sign_payload_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SignPayloadOutput {
6    /// <p>Unique identifier of the signing job.</p>
7    pub job_id: ::std::option::Option<::std::string::String>,
8    /// <p>The AWS account ID of the job owner.</p>
9    pub job_owner: ::std::option::Option<::std::string::String>,
10    /// <p>Information including the signing profile ARN and the signing job ID.</p>
11    pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
12    /// <p>A cryptographic signature.</p>
13    pub signature: ::std::option::Option<::aws_smithy_types::Blob>,
14    _request_id: Option<String>,
15}
16impl SignPayloadOutput {
17    /// <p>Unique identifier of the signing job.</p>
18    pub fn job_id(&self) -> ::std::option::Option<&str> {
19        self.job_id.as_deref()
20    }
21    /// <p>The AWS account ID of the job owner.</p>
22    pub fn job_owner(&self) -> ::std::option::Option<&str> {
23        self.job_owner.as_deref()
24    }
25    /// <p>Information including the signing profile ARN and the signing job ID.</p>
26    pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
27        self.metadata.as_ref()
28    }
29    /// <p>A cryptographic signature.</p>
30    pub fn signature(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
31        self.signature.as_ref()
32    }
33}
34impl ::aws_types::request_id::RequestId for SignPayloadOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl SignPayloadOutput {
40    /// Creates a new builder-style object to manufacture [`SignPayloadOutput`](crate::operation::sign_payload::SignPayloadOutput).
41    pub fn builder() -> crate::operation::sign_payload::builders::SignPayloadOutputBuilder {
42        crate::operation::sign_payload::builders::SignPayloadOutputBuilder::default()
43    }
44}
45
46/// A builder for [`SignPayloadOutput`](crate::operation::sign_payload::SignPayloadOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct SignPayloadOutputBuilder {
50    pub(crate) job_id: ::std::option::Option<::std::string::String>,
51    pub(crate) job_owner: ::std::option::Option<::std::string::String>,
52    pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
53    pub(crate) signature: ::std::option::Option<::aws_smithy_types::Blob>,
54    _request_id: Option<String>,
55}
56impl SignPayloadOutputBuilder {
57    /// <p>Unique identifier of the signing job.</p>
58    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.job_id = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>Unique identifier of the signing job.</p>
63    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.job_id = input;
65        self
66    }
67    /// <p>Unique identifier of the signing job.</p>
68    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
69        &self.job_id
70    }
71    /// <p>The AWS account ID of the job owner.</p>
72    pub fn job_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.job_owner = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The AWS account ID of the job owner.</p>
77    pub fn set_job_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.job_owner = input;
79        self
80    }
81    /// <p>The AWS account ID of the job owner.</p>
82    pub fn get_job_owner(&self) -> &::std::option::Option<::std::string::String> {
83        &self.job_owner
84    }
85    /// Adds a key-value pair to `metadata`.
86    ///
87    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
88    ///
89    /// <p>Information including the signing profile ARN and the signing job ID.</p>
90    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
91        let mut hash_map = self.metadata.unwrap_or_default();
92        hash_map.insert(k.into(), v.into());
93        self.metadata = ::std::option::Option::Some(hash_map);
94        self
95    }
96    /// <p>Information including the signing profile ARN and the signing job ID.</p>
97    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
98        self.metadata = input;
99        self
100    }
101    /// <p>Information including the signing profile ARN and the signing job ID.</p>
102    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
103        &self.metadata
104    }
105    /// <p>A cryptographic signature.</p>
106    pub fn signature(mut self, input: ::aws_smithy_types::Blob) -> Self {
107        self.signature = ::std::option::Option::Some(input);
108        self
109    }
110    /// <p>A cryptographic signature.</p>
111    pub fn set_signature(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
112        self.signature = input;
113        self
114    }
115    /// <p>A cryptographic signature.</p>
116    pub fn get_signature(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
117        &self.signature
118    }
119    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
120        self._request_id = Some(request_id.into());
121        self
122    }
123
124    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
125        self._request_id = request_id;
126        self
127    }
128    /// Consumes the builder and constructs a [`SignPayloadOutput`](crate::operation::sign_payload::SignPayloadOutput).
129    pub fn build(self) -> crate::operation::sign_payload::SignPayloadOutput {
130        crate::operation::sign_payload::SignPayloadOutput {
131            job_id: self.job_id,
132            job_owner: self.job_owner,
133            metadata: self.metadata,
134            signature: self.signature,
135            _request_id: self._request_id,
136        }
137    }
138}