aws_sdk_ec2/types/
_gpu_device_memory_info.rs

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