Skip to main content

aws_sdk_datasync/types/
_fsx_protocol.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct FsxProtocol {
7    /// <p>Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).</p>
8    pub nfs: ::std::option::Option<crate::types::FsxProtocolNfs>,
9    /// <p>Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.</p>
10    pub smb: ::std::option::Option<crate::types::FsxProtocolSmb>,
11}
12impl FsxProtocol {
13    /// <p>Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).</p>
14    pub fn nfs(&self) -> ::std::option::Option<&crate::types::FsxProtocolNfs> {
15        self.nfs.as_ref()
16    }
17    /// <p>Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.</p>
18    pub fn smb(&self) -> ::std::option::Option<&crate::types::FsxProtocolSmb> {
19        self.smb.as_ref()
20    }
21}
22impl FsxProtocol {
23    /// Creates a new builder-style object to manufacture [`FsxProtocol`](crate::types::FsxProtocol).
24    pub fn builder() -> crate::types::builders::FsxProtocolBuilder {
25        crate::types::builders::FsxProtocolBuilder::default()
26    }
27}
28
29/// A builder for [`FsxProtocol`](crate::types::FsxProtocol).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct FsxProtocolBuilder {
33    pub(crate) nfs: ::std::option::Option<crate::types::FsxProtocolNfs>,
34    pub(crate) smb: ::std::option::Option<crate::types::FsxProtocolSmb>,
35}
36impl FsxProtocolBuilder {
37    /// <p>Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).</p>
38    pub fn nfs(mut self, input: crate::types::FsxProtocolNfs) -> Self {
39        self.nfs = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).</p>
43    pub fn set_nfs(mut self, input: ::std::option::Option<crate::types::FsxProtocolNfs>) -> Self {
44        self.nfs = input;
45        self
46    }
47    /// <p>Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).</p>
48    pub fn get_nfs(&self) -> &::std::option::Option<crate::types::FsxProtocolNfs> {
49        &self.nfs
50    }
51    /// <p>Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.</p>
52    pub fn smb(mut self, input: crate::types::FsxProtocolSmb) -> Self {
53        self.smb = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.</p>
57    pub fn set_smb(mut self, input: ::std::option::Option<crate::types::FsxProtocolSmb>) -> Self {
58        self.smb = input;
59        self
60    }
61    /// <p>Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.</p>
62    pub fn get_smb(&self) -> &::std::option::Option<crate::types::FsxProtocolSmb> {
63        &self.smb
64    }
65    /// Consumes the builder and constructs a [`FsxProtocol`](crate::types::FsxProtocol).
66    pub fn build(self) -> crate::types::FsxProtocol {
67        crate::types::FsxProtocol {
68            nfs: self.nfs,
69            smb: self.smb,
70        }
71    }
72}