1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/ecs/ECS_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/memory/stl/AWSVector.h>
10 #include <aws/ecs/model/DeviceCgroupPermission.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19   class JsonValue;
20   class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace ECS
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>An object representing a container instance host device.</p><p><h3>See
30    * Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/Device">AWS API
32    * Reference</a></p>
33    */
34   class AWS_ECS_API Device
35   {
36   public:
37     Device();
38     Device(Aws::Utils::Json::JsonView jsonValue);
39     Device& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>The path for the device on the host container instance.</p>
45      */
GetHostPath()46     inline const Aws::String& GetHostPath() const{ return m_hostPath; }
47 
48     /**
49      * <p>The path for the device on the host container instance.</p>
50      */
HostPathHasBeenSet()51     inline bool HostPathHasBeenSet() const { return m_hostPathHasBeenSet; }
52 
53     /**
54      * <p>The path for the device on the host container instance.</p>
55      */
SetHostPath(const Aws::String & value)56     inline void SetHostPath(const Aws::String& value) { m_hostPathHasBeenSet = true; m_hostPath = value; }
57 
58     /**
59      * <p>The path for the device on the host container instance.</p>
60      */
SetHostPath(Aws::String && value)61     inline void SetHostPath(Aws::String&& value) { m_hostPathHasBeenSet = true; m_hostPath = std::move(value); }
62 
63     /**
64      * <p>The path for the device on the host container instance.</p>
65      */
SetHostPath(const char * value)66     inline void SetHostPath(const char* value) { m_hostPathHasBeenSet = true; m_hostPath.assign(value); }
67 
68     /**
69      * <p>The path for the device on the host container instance.</p>
70      */
WithHostPath(const Aws::String & value)71     inline Device& WithHostPath(const Aws::String& value) { SetHostPath(value); return *this;}
72 
73     /**
74      * <p>The path for the device on the host container instance.</p>
75      */
WithHostPath(Aws::String && value)76     inline Device& WithHostPath(Aws::String&& value) { SetHostPath(std::move(value)); return *this;}
77 
78     /**
79      * <p>The path for the device on the host container instance.</p>
80      */
WithHostPath(const char * value)81     inline Device& WithHostPath(const char* value) { SetHostPath(value); return *this;}
82 
83 
84     /**
85      * <p>The path inside the container at which to expose the host device.</p>
86      */
GetContainerPath()87     inline const Aws::String& GetContainerPath() const{ return m_containerPath; }
88 
89     /**
90      * <p>The path inside the container at which to expose the host device.</p>
91      */
ContainerPathHasBeenSet()92     inline bool ContainerPathHasBeenSet() const { return m_containerPathHasBeenSet; }
93 
94     /**
95      * <p>The path inside the container at which to expose the host device.</p>
96      */
SetContainerPath(const Aws::String & value)97     inline void SetContainerPath(const Aws::String& value) { m_containerPathHasBeenSet = true; m_containerPath = value; }
98 
99     /**
100      * <p>The path inside the container at which to expose the host device.</p>
101      */
SetContainerPath(Aws::String && value)102     inline void SetContainerPath(Aws::String&& value) { m_containerPathHasBeenSet = true; m_containerPath = std::move(value); }
103 
104     /**
105      * <p>The path inside the container at which to expose the host device.</p>
106      */
SetContainerPath(const char * value)107     inline void SetContainerPath(const char* value) { m_containerPathHasBeenSet = true; m_containerPath.assign(value); }
108 
109     /**
110      * <p>The path inside the container at which to expose the host device.</p>
111      */
WithContainerPath(const Aws::String & value)112     inline Device& WithContainerPath(const Aws::String& value) { SetContainerPath(value); return *this;}
113 
114     /**
115      * <p>The path inside the container at which to expose the host device.</p>
116      */
WithContainerPath(Aws::String && value)117     inline Device& WithContainerPath(Aws::String&& value) { SetContainerPath(std::move(value)); return *this;}
118 
119     /**
120      * <p>The path inside the container at which to expose the host device.</p>
121      */
WithContainerPath(const char * value)122     inline Device& WithContainerPath(const char* value) { SetContainerPath(value); return *this;}
123 
124 
125     /**
126      * <p>The explicit permissions to provide to the container for the device. By
127      * default, the container has permissions for <code>read</code>,
128      * <code>write</code>, and <code>mknod</code> for the device.</p>
129      */
GetPermissions()130     inline const Aws::Vector<DeviceCgroupPermission>& GetPermissions() const{ return m_permissions; }
131 
132     /**
133      * <p>The explicit permissions to provide to the container for the device. By
134      * default, the container has permissions for <code>read</code>,
135      * <code>write</code>, and <code>mknod</code> for the device.</p>
136      */
PermissionsHasBeenSet()137     inline bool PermissionsHasBeenSet() const { return m_permissionsHasBeenSet; }
138 
139     /**
140      * <p>The explicit permissions to provide to the container for the device. By
141      * default, the container has permissions for <code>read</code>,
142      * <code>write</code>, and <code>mknod</code> for the device.</p>
143      */
SetPermissions(const Aws::Vector<DeviceCgroupPermission> & value)144     inline void SetPermissions(const Aws::Vector<DeviceCgroupPermission>& value) { m_permissionsHasBeenSet = true; m_permissions = value; }
145 
146     /**
147      * <p>The explicit permissions to provide to the container for the device. By
148      * default, the container has permissions for <code>read</code>,
149      * <code>write</code>, and <code>mknod</code> for the device.</p>
150      */
SetPermissions(Aws::Vector<DeviceCgroupPermission> && value)151     inline void SetPermissions(Aws::Vector<DeviceCgroupPermission>&& value) { m_permissionsHasBeenSet = true; m_permissions = std::move(value); }
152 
153     /**
154      * <p>The explicit permissions to provide to the container for the device. By
155      * default, the container has permissions for <code>read</code>,
156      * <code>write</code>, and <code>mknod</code> for the device.</p>
157      */
WithPermissions(const Aws::Vector<DeviceCgroupPermission> & value)158     inline Device& WithPermissions(const Aws::Vector<DeviceCgroupPermission>& value) { SetPermissions(value); return *this;}
159 
160     /**
161      * <p>The explicit permissions to provide to the container for the device. By
162      * default, the container has permissions for <code>read</code>,
163      * <code>write</code>, and <code>mknod</code> for the device.</p>
164      */
WithPermissions(Aws::Vector<DeviceCgroupPermission> && value)165     inline Device& WithPermissions(Aws::Vector<DeviceCgroupPermission>&& value) { SetPermissions(std::move(value)); return *this;}
166 
167     /**
168      * <p>The explicit permissions to provide to the container for the device. By
169      * default, the container has permissions for <code>read</code>,
170      * <code>write</code>, and <code>mknod</code> for the device.</p>
171      */
AddPermissions(const DeviceCgroupPermission & value)172     inline Device& AddPermissions(const DeviceCgroupPermission& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(value); return *this; }
173 
174     /**
175      * <p>The explicit permissions to provide to the container for the device. By
176      * default, the container has permissions for <code>read</code>,
177      * <code>write</code>, and <code>mknod</code> for the device.</p>
178      */
AddPermissions(DeviceCgroupPermission && value)179     inline Device& AddPermissions(DeviceCgroupPermission&& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(std::move(value)); return *this; }
180 
181   private:
182 
183     Aws::String m_hostPath;
184     bool m_hostPathHasBeenSet;
185 
186     Aws::String m_containerPath;
187     bool m_containerPathHasBeenSet;
188 
189     Aws::Vector<DeviceCgroupPermission> m_permissions;
190     bool m_permissionsHasBeenSet;
191   };
192 
193 } // namespace Model
194 } // namespace ECS
195 } // namespace Aws
196