aws-sdk-devicefarm 1.105.0

AWS SDK for AWS Device Farm
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents the screen resolution of a device in height and width, expressed in pixels.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Resolution {
    /// <p>The screen resolution's width, expressed in pixels.</p>
    pub width: ::std::option::Option<i32>,
    /// <p>The screen resolution's height, expressed in pixels.</p>
    pub height: ::std::option::Option<i32>,
}
impl Resolution {
    /// <p>The screen resolution's width, expressed in pixels.</p>
    pub fn width(&self) -> ::std::option::Option<i32> {
        self.width
    }
    /// <p>The screen resolution's height, expressed in pixels.</p>
    pub fn height(&self) -> ::std::option::Option<i32> {
        self.height
    }
}
impl Resolution {
    /// Creates a new builder-style object to manufacture [`Resolution`](crate::types::Resolution).
    pub fn builder() -> crate::types::builders::ResolutionBuilder {
        crate::types::builders::ResolutionBuilder::default()
    }
}

/// A builder for [`Resolution`](crate::types::Resolution).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ResolutionBuilder {
    pub(crate) width: ::std::option::Option<i32>,
    pub(crate) height: ::std::option::Option<i32>,
}
impl ResolutionBuilder {
    /// <p>The screen resolution's width, expressed in pixels.</p>
    pub fn width(mut self, input: i32) -> Self {
        self.width = ::std::option::Option::Some(input);
        self
    }
    /// <p>The screen resolution's width, expressed in pixels.</p>
    pub fn set_width(mut self, input: ::std::option::Option<i32>) -> Self {
        self.width = input;
        self
    }
    /// <p>The screen resolution's width, expressed in pixels.</p>
    pub fn get_width(&self) -> &::std::option::Option<i32> {
        &self.width
    }
    /// <p>The screen resolution's height, expressed in pixels.</p>
    pub fn height(mut self, input: i32) -> Self {
        self.height = ::std::option::Option::Some(input);
        self
    }
    /// <p>The screen resolution's height, expressed in pixels.</p>
    pub fn set_height(mut self, input: ::std::option::Option<i32>) -> Self {
        self.height = input;
        self
    }
    /// <p>The screen resolution's height, expressed in pixels.</p>
    pub fn get_height(&self) -> &::std::option::Option<i32> {
        &self.height
    }
    /// Consumes the builder and constructs a [`Resolution`](crate::types::Resolution).
    pub fn build(self) -> crate::types::Resolution {
        crate::types::Resolution {
            width: self.width,
            height: self.height,
        }
    }
}