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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SignPayloadInput {
    /// <p>The name of the signing profile.</p>
    pub profile_name: ::std::option::Option<::std::string::String>,
    /// <p>The AWS account ID of the profile owner.</p>
    pub profile_owner: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the object digest (hash) to sign.</p>
    pub payload: ::std::option::Option<::aws_smithy_types::Blob>,
    /// <p>Payload content type. The single valid type is <code>application/vnd.cncf.notary.payload.v1+json</code>.</p>
    pub payload_format: ::std::option::Option<::std::string::String>,
}
impl SignPayloadInput {
    /// <p>The name of the signing profile.</p>
    pub fn profile_name(&self) -> ::std::option::Option<&str> {
        self.profile_name.as_deref()
    }
    /// <p>The AWS account ID of the profile owner.</p>
    pub fn profile_owner(&self) -> ::std::option::Option<&str> {
        self.profile_owner.as_deref()
    }
    /// <p>Specifies the object digest (hash) to sign.</p>
    pub fn payload(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.payload.as_ref()
    }
    /// <p>Payload content type. The single valid type is <code>application/vnd.cncf.notary.payload.v1+json</code>.</p>
    pub fn payload_format(&self) -> ::std::option::Option<&str> {
        self.payload_format.as_deref()
    }
}
impl SignPayloadInput {
    /// Creates a new builder-style object to manufacture [`SignPayloadInput`](crate::operation::sign_payload::SignPayloadInput).
    pub fn builder() -> crate::operation::sign_payload::builders::SignPayloadInputBuilder {
        crate::operation::sign_payload::builders::SignPayloadInputBuilder::default()
    }
}

/// A builder for [`SignPayloadInput`](crate::operation::sign_payload::SignPayloadInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SignPayloadInputBuilder {
    pub(crate) profile_name: ::std::option::Option<::std::string::String>,
    pub(crate) profile_owner: ::std::option::Option<::std::string::String>,
    pub(crate) payload: ::std::option::Option<::aws_smithy_types::Blob>,
    pub(crate) payload_format: ::std::option::Option<::std::string::String>,
}
impl SignPayloadInputBuilder {
    /// <p>The name of the signing profile.</p>
    /// This field is required.
    pub fn profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the signing profile.</p>
    pub fn set_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_name = input;
        self
    }
    /// <p>The name of the signing profile.</p>
    pub fn get_profile_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_name
    }
    /// <p>The AWS account ID of the profile owner.</p>
    pub fn profile_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The AWS account ID of the profile owner.</p>
    pub fn set_profile_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_owner = input;
        self
    }
    /// <p>The AWS account ID of the profile owner.</p>
    pub fn get_profile_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_owner
    }
    /// <p>Specifies the object digest (hash) to sign.</p>
    /// This field is required.
    pub fn payload(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.payload = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the object digest (hash) to sign.</p>
    pub fn set_payload(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.payload = input;
        self
    }
    /// <p>Specifies the object digest (hash) to sign.</p>
    pub fn get_payload(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.payload
    }
    /// <p>Payload content type. The single valid type is <code>application/vnd.cncf.notary.payload.v1+json</code>.</p>
    /// This field is required.
    pub fn payload_format(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.payload_format = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Payload content type. The single valid type is <code>application/vnd.cncf.notary.payload.v1+json</code>.</p>
    pub fn set_payload_format(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.payload_format = input;
        self
    }
    /// <p>Payload content type. The single valid type is <code>application/vnd.cncf.notary.payload.v1+json</code>.</p>
    pub fn get_payload_format(&self) -> &::std::option::Option<::std::string::String> {
        &self.payload_format
    }
    /// Consumes the builder and constructs a [`SignPayloadInput`](crate::operation::sign_payload::SignPayloadInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::sign_payload::SignPayloadInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::sign_payload::SignPayloadInput {
            profile_name: self.profile_name,
            profile_owner: self.profile_owner,
            payload: self.payload,
            payload_format: self.payload_format,
        })
    }
}