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>Details on an Elastic Inference accelerator task override. This parameter is used to override the Elastic Inference accelerator specified in the task definition. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-inference.html">Working with Amazon Elastic Inference on Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct InferenceAcceleratorOverride {
    /// <p>The Elastic Inference accelerator device name to override for the task. This parameter must match a <code>deviceName</code> specified in the task definition.</p>
    pub device_name: ::std::option::Option<::std::string::String>,
    /// <p>The Elastic Inference accelerator type to use.</p>
    pub device_type: ::std::option::Option<::std::string::String>,
}
impl InferenceAcceleratorOverride {
    /// <p>The Elastic Inference accelerator device name to override for the task. This parameter must match a <code>deviceName</code> specified in the task definition.</p>
    pub fn device_name(&self) -> ::std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>The Elastic Inference accelerator type to use.</p>
    pub fn device_type(&self) -> ::std::option::Option<&str> {
        self.device_type.as_deref()
    }
}
impl InferenceAcceleratorOverride {
    /// Creates a new builder-style object to manufacture [`InferenceAcceleratorOverride`](crate::types::InferenceAcceleratorOverride).
    pub fn builder() -> crate::types::builders::InferenceAcceleratorOverrideBuilder {
        crate::types::builders::InferenceAcceleratorOverrideBuilder::default()
    }
}

/// A builder for [`InferenceAcceleratorOverride`](crate::types::InferenceAcceleratorOverride).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct InferenceAcceleratorOverrideBuilder {
    pub(crate) device_name: ::std::option::Option<::std::string::String>,
    pub(crate) device_type: ::std::option::Option<::std::string::String>,
}
impl InferenceAcceleratorOverrideBuilder {
    /// <p>The Elastic Inference accelerator device name to override for the task. This parameter must match a <code>deviceName</code> specified in the task definition.</p>
    pub fn device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Elastic Inference accelerator device name to override for the task. This parameter must match a <code>deviceName</code> specified in the task definition.</p>
    pub fn set_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_name = input;
        self
    }
    /// <p>The Elastic Inference accelerator device name to override for the task. This parameter must match a <code>deviceName</code> specified in the task definition.</p>
    pub fn get_device_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_name
    }
    /// <p>The Elastic Inference accelerator type to use.</p>
    pub fn device_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Elastic Inference accelerator type to use.</p>
    pub fn set_device_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_type = input;
        self
    }
    /// <p>The Elastic Inference accelerator type to use.</p>
    pub fn get_device_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_type
    }
    /// Consumes the builder and constructs a [`InferenceAcceleratorOverride`](crate::types::InferenceAcceleratorOverride).
    pub fn build(self) -> crate::types::InferenceAcceleratorOverride {
        crate::types::InferenceAcceleratorOverride {
            device_name: self.device_name,
            device_type: self.device_type,
        }
    }
}