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/greengrassv2/GreengrassV2_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSVector.h> 9 #include <aws/greengrassv2/model/LambdaVolumeMount.h> 10 #include <aws/greengrassv2/model/LambdaDeviceMount.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 GreengrassV2 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>Contains information about a container in which Lambda functions run on 30 * Greengrass core devices.</p><p><h3>See Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/greengrassv2-2020-11-30/LambdaContainerParams">AWS 32 * API Reference</a></p> 33 */ 34 class AWS_GREENGRASSV2_API LambdaContainerParams 35 { 36 public: 37 LambdaContainerParams(); 38 LambdaContainerParams(Aws::Utils::Json::JsonView jsonValue); 39 LambdaContainerParams& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The memory size of the container, expressed in kilobytes.</p> <p>Default: 45 * <code>16384</code> (16 MB)</p> 46 */ GetMemorySizeInKB()47 inline int GetMemorySizeInKB() const{ return m_memorySizeInKB; } 48 49 /** 50 * <p>The memory size of the container, expressed in kilobytes.</p> <p>Default: 51 * <code>16384</code> (16 MB)</p> 52 */ MemorySizeInKBHasBeenSet()53 inline bool MemorySizeInKBHasBeenSet() const { return m_memorySizeInKBHasBeenSet; } 54 55 /** 56 * <p>The memory size of the container, expressed in kilobytes.</p> <p>Default: 57 * <code>16384</code> (16 MB)</p> 58 */ SetMemorySizeInKB(int value)59 inline void SetMemorySizeInKB(int value) { m_memorySizeInKBHasBeenSet = true; m_memorySizeInKB = value; } 60 61 /** 62 * <p>The memory size of the container, expressed in kilobytes.</p> <p>Default: 63 * <code>16384</code> (16 MB)</p> 64 */ WithMemorySizeInKB(int value)65 inline LambdaContainerParams& WithMemorySizeInKB(int value) { SetMemorySizeInKB(value); return *this;} 66 67 68 /** 69 * <p>Whether or not the container can read information from the device's 70 * <code>/sys</code> folder.</p> <p>Default: <code>false</code> </p> 71 */ GetMountROSysfs()72 inline bool GetMountROSysfs() const{ return m_mountROSysfs; } 73 74 /** 75 * <p>Whether or not the container can read information from the device's 76 * <code>/sys</code> folder.</p> <p>Default: <code>false</code> </p> 77 */ MountROSysfsHasBeenSet()78 inline bool MountROSysfsHasBeenSet() const { return m_mountROSysfsHasBeenSet; } 79 80 /** 81 * <p>Whether or not the container can read information from the device's 82 * <code>/sys</code> folder.</p> <p>Default: <code>false</code> </p> 83 */ SetMountROSysfs(bool value)84 inline void SetMountROSysfs(bool value) { m_mountROSysfsHasBeenSet = true; m_mountROSysfs = value; } 85 86 /** 87 * <p>Whether or not the container can read information from the device's 88 * <code>/sys</code> folder.</p> <p>Default: <code>false</code> </p> 89 */ WithMountROSysfs(bool value)90 inline LambdaContainerParams& WithMountROSysfs(bool value) { SetMountROSysfs(value); return *this;} 91 92 93 /** 94 * <p>The list of volumes that the container can access.</p> 95 */ GetVolumes()96 inline const Aws::Vector<LambdaVolumeMount>& GetVolumes() const{ return m_volumes; } 97 98 /** 99 * <p>The list of volumes that the container can access.</p> 100 */ VolumesHasBeenSet()101 inline bool VolumesHasBeenSet() const { return m_volumesHasBeenSet; } 102 103 /** 104 * <p>The list of volumes that the container can access.</p> 105 */ SetVolumes(const Aws::Vector<LambdaVolumeMount> & value)106 inline void SetVolumes(const Aws::Vector<LambdaVolumeMount>& value) { m_volumesHasBeenSet = true; m_volumes = value; } 107 108 /** 109 * <p>The list of volumes that the container can access.</p> 110 */ SetVolumes(Aws::Vector<LambdaVolumeMount> && value)111 inline void SetVolumes(Aws::Vector<LambdaVolumeMount>&& value) { m_volumesHasBeenSet = true; m_volumes = std::move(value); } 112 113 /** 114 * <p>The list of volumes that the container can access.</p> 115 */ WithVolumes(const Aws::Vector<LambdaVolumeMount> & value)116 inline LambdaContainerParams& WithVolumes(const Aws::Vector<LambdaVolumeMount>& value) { SetVolumes(value); return *this;} 117 118 /** 119 * <p>The list of volumes that the container can access.</p> 120 */ WithVolumes(Aws::Vector<LambdaVolumeMount> && value)121 inline LambdaContainerParams& WithVolumes(Aws::Vector<LambdaVolumeMount>&& value) { SetVolumes(std::move(value)); return *this;} 122 123 /** 124 * <p>The list of volumes that the container can access.</p> 125 */ AddVolumes(const LambdaVolumeMount & value)126 inline LambdaContainerParams& AddVolumes(const LambdaVolumeMount& value) { m_volumesHasBeenSet = true; m_volumes.push_back(value); return *this; } 127 128 /** 129 * <p>The list of volumes that the container can access.</p> 130 */ AddVolumes(LambdaVolumeMount && value)131 inline LambdaContainerParams& AddVolumes(LambdaVolumeMount&& value) { m_volumesHasBeenSet = true; m_volumes.push_back(std::move(value)); return *this; } 132 133 134 /** 135 * <p>The list of system devices that the container can access.</p> 136 */ GetDevices()137 inline const Aws::Vector<LambdaDeviceMount>& GetDevices() const{ return m_devices; } 138 139 /** 140 * <p>The list of system devices that the container can access.</p> 141 */ DevicesHasBeenSet()142 inline bool DevicesHasBeenSet() const { return m_devicesHasBeenSet; } 143 144 /** 145 * <p>The list of system devices that the container can access.</p> 146 */ SetDevices(const Aws::Vector<LambdaDeviceMount> & value)147 inline void SetDevices(const Aws::Vector<LambdaDeviceMount>& value) { m_devicesHasBeenSet = true; m_devices = value; } 148 149 /** 150 * <p>The list of system devices that the container can access.</p> 151 */ SetDevices(Aws::Vector<LambdaDeviceMount> && value)152 inline void SetDevices(Aws::Vector<LambdaDeviceMount>&& value) { m_devicesHasBeenSet = true; m_devices = std::move(value); } 153 154 /** 155 * <p>The list of system devices that the container can access.</p> 156 */ WithDevices(const Aws::Vector<LambdaDeviceMount> & value)157 inline LambdaContainerParams& WithDevices(const Aws::Vector<LambdaDeviceMount>& value) { SetDevices(value); return *this;} 158 159 /** 160 * <p>The list of system devices that the container can access.</p> 161 */ WithDevices(Aws::Vector<LambdaDeviceMount> && value)162 inline LambdaContainerParams& WithDevices(Aws::Vector<LambdaDeviceMount>&& value) { SetDevices(std::move(value)); return *this;} 163 164 /** 165 * <p>The list of system devices that the container can access.</p> 166 */ AddDevices(const LambdaDeviceMount & value)167 inline LambdaContainerParams& AddDevices(const LambdaDeviceMount& value) { m_devicesHasBeenSet = true; m_devices.push_back(value); return *this; } 168 169 /** 170 * <p>The list of system devices that the container can access.</p> 171 */ AddDevices(LambdaDeviceMount && value)172 inline LambdaContainerParams& AddDevices(LambdaDeviceMount&& value) { m_devicesHasBeenSet = true; m_devices.push_back(std::move(value)); return *this; } 173 174 private: 175 176 int m_memorySizeInKB; 177 bool m_memorySizeInKBHasBeenSet; 178 179 bool m_mountROSysfs; 180 bool m_mountROSysfsHasBeenSet; 181 182 Aws::Vector<LambdaVolumeMount> m_volumes; 183 bool m_volumesHasBeenSet; 184 185 Aws::Vector<LambdaDeviceMount> m_devices; 186 bool m_devicesHasBeenSet; 187 }; 188 189 } // namespace Model 190 } // namespace GreengrassV2 191 } // namespace Aws 192