aws_sdk_ec2/types/
_inference_device_memory_info.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <note>
4/// <p>Amazon Elastic Inference is no longer available.</p>
5/// </note>
6/// <p>Describes the memory available to the inference accelerator.</p>
7#[non_exhaustive]
8#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
9pub struct InferenceDeviceMemoryInfo {
10    /// <p>The size of the memory available to the inference accelerator, in MiB.</p>
11    pub size_in_mib: ::std::option::Option<i32>,
12}
13impl InferenceDeviceMemoryInfo {
14    /// <p>The size of the memory available to the inference accelerator, in MiB.</p>
15    pub fn size_in_mib(&self) -> ::std::option::Option<i32> {
16        self.size_in_mib
17    }
18}
19impl InferenceDeviceMemoryInfo {
20    /// Creates a new builder-style object to manufacture [`InferenceDeviceMemoryInfo`](crate::types::InferenceDeviceMemoryInfo).
21    pub fn builder() -> crate::types::builders::InferenceDeviceMemoryInfoBuilder {
22        crate::types::builders::InferenceDeviceMemoryInfoBuilder::default()
23    }
24}
25
26/// A builder for [`InferenceDeviceMemoryInfo`](crate::types::InferenceDeviceMemoryInfo).
27#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
28#[non_exhaustive]
29pub struct InferenceDeviceMemoryInfoBuilder {
30    pub(crate) size_in_mib: ::std::option::Option<i32>,
31}
32impl InferenceDeviceMemoryInfoBuilder {
33    /// <p>The size of the memory available to the inference accelerator, in MiB.</p>
34    pub fn size_in_mib(mut self, input: i32) -> Self {
35        self.size_in_mib = ::std::option::Option::Some(input);
36        self
37    }
38    /// <p>The size of the memory available to the inference accelerator, in MiB.</p>
39    pub fn set_size_in_mib(mut self, input: ::std::option::Option<i32>) -> Self {
40        self.size_in_mib = input;
41        self
42    }
43    /// <p>The size of the memory available to the inference accelerator, in MiB.</p>
44    pub fn get_size_in_mib(&self) -> &::std::option::Option<i32> {
45        &self.size_in_mib
46    }
47    /// Consumes the builder and constructs a [`InferenceDeviceMemoryInfo`](crate::types::InferenceDeviceMemoryInfo).
48    pub fn build(self) -> crate::types::InferenceDeviceMemoryInfo {
49        crate::types::InferenceDeviceMemoryInfo {
50            size_in_mib: self.size_in_mib,
51        }
52    }
53}