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

/// <p>A wrapper for pieces of the payload that's returned in response to a streaming inference request. A streaming inference response consists of one or more payload parts.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PayloadPart {
    /// <p>A blob that contains part of the response for your streaming inference request.</p>
    pub bytes: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl PayloadPart {
    /// <p>A blob that contains part of the response for your streaming inference request.</p>
    pub fn bytes(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.bytes.as_ref()
    }
}
impl ::std::fmt::Debug for PayloadPart {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PayloadPart");
        formatter.field("bytes", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl PayloadPart {
    /// Creates a new builder-style object to manufacture [`PayloadPart`](crate::types::PayloadPart).
    pub fn builder() -> crate::types::builders::PayloadPartBuilder {
        crate::types::builders::PayloadPartBuilder::default()
    }
}

/// A builder for [`PayloadPart`](crate::types::PayloadPart).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct PayloadPartBuilder {
    pub(crate) bytes: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl PayloadPartBuilder {
    /// <p>A blob that contains part of the response for your streaming inference request.</p>
    pub fn bytes(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.bytes = ::std::option::Option::Some(input);
        self
    }
    /// <p>A blob that contains part of the response for your streaming inference request.</p>
    pub fn set_bytes(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.bytes = input;
        self
    }
    /// <p>A blob that contains part of the response for your streaming inference request.</p>
    pub fn get_bytes(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.bytes
    }
    /// Consumes the builder and constructs a [`PayloadPart`](crate::types::PayloadPart).
    pub fn build(self) -> crate::types::PayloadPart {
        crate::types::PayloadPart { bytes: self.bytes }
    }
}
impl ::std::fmt::Debug for PayloadPartBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PayloadPartBuilder");
        formatter.field("bytes", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}