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

/// <p>An attribute that was extracted, but Amazon Comprehend Medical was unable to relate to an entity.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UnmappedAttribute {
    /// <p>The type of the unmapped attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PROTECTED_HEALTH_INFORMATION".</p>
    pub r#type: ::std::option::Option<crate::types::EntityType>,
    /// <p>The specific attribute that has been extracted but not mapped to an entity.</p>
    pub attribute: ::std::option::Option<crate::types::Attribute>,
}
impl UnmappedAttribute {
    /// <p>The type of the unmapped attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PROTECTED_HEALTH_INFORMATION".</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::EntityType> {
        self.r#type.as_ref()
    }
    /// <p>The specific attribute that has been extracted but not mapped to an entity.</p>
    pub fn attribute(&self) -> ::std::option::Option<&crate::types::Attribute> {
        self.attribute.as_ref()
    }
}
impl UnmappedAttribute {
    /// Creates a new builder-style object to manufacture [`UnmappedAttribute`](crate::types::UnmappedAttribute).
    pub fn builder() -> crate::types::builders::UnmappedAttributeBuilder {
        crate::types::builders::UnmappedAttributeBuilder::default()
    }
}

/// A builder for [`UnmappedAttribute`](crate::types::UnmappedAttribute).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UnmappedAttributeBuilder {
    pub(crate) r#type: ::std::option::Option<crate::types::EntityType>,
    pub(crate) attribute: ::std::option::Option<crate::types::Attribute>,
}
impl UnmappedAttributeBuilder {
    /// <p>The type of the unmapped attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PROTECTED_HEALTH_INFORMATION".</p>
    pub fn r#type(mut self, input: crate::types::EntityType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the unmapped attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PROTECTED_HEALTH_INFORMATION".</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::EntityType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the unmapped attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PROTECTED_HEALTH_INFORMATION".</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::EntityType> {
        &self.r#type
    }
    /// <p>The specific attribute that has been extracted but not mapped to an entity.</p>
    pub fn attribute(mut self, input: crate::types::Attribute) -> Self {
        self.attribute = ::std::option::Option::Some(input);
        self
    }
    /// <p>The specific attribute that has been extracted but not mapped to an entity.</p>
    pub fn set_attribute(mut self, input: ::std::option::Option<crate::types::Attribute>) -> Self {
        self.attribute = input;
        self
    }
    /// <p>The specific attribute that has been extracted but not mapped to an entity.</p>
    pub fn get_attribute(&self) -> &::std::option::Option<crate::types::Attribute> {
        &self.attribute
    }
    /// Consumes the builder and constructs a [`UnmappedAttribute`](crate::types::UnmappedAttribute).
    pub fn build(self) -> crate::types::UnmappedAttribute {
        crate::types::UnmappedAttribute {
            r#type: self.r#type,
            attribute: self.attribute,
        }
    }
}