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/batch/Batch_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <utility> 10 11 namespace Aws 12 { 13 namespace Utils 14 { 15 namespace Json 16 { 17 class JsonValue; 18 class JsonView; 19 } // namespace Json 20 } // namespace Utils 21 namespace Batch 22 { 23 namespace Model 24 { 25 26 /** 27 * <p>Details on a Docker volume mount point that's used in a job's container 28 * properties. This parameter maps to <code>Volumes</code> in the <a 29 * href="https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/#create-a-container">Create 30 * a container</a> section of the Docker Remote API and the <code>--volume</code> 31 * option to docker run.</p><p><h3>See Also:</h3> <a 32 * href="http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/MountPoint">AWS 33 * API Reference</a></p> 34 */ 35 class AWS_BATCH_API MountPoint 36 { 37 public: 38 MountPoint(); 39 MountPoint(Aws::Utils::Json::JsonView jsonValue); 40 MountPoint& operator=(Aws::Utils::Json::JsonView jsonValue); 41 Aws::Utils::Json::JsonValue Jsonize() const; 42 43 44 /** 45 * <p>The path on the container where the host volume is mounted.</p> 46 */ GetContainerPath()47 inline const Aws::String& GetContainerPath() const{ return m_containerPath; } 48 49 /** 50 * <p>The path on the container where the host volume is mounted.</p> 51 */ ContainerPathHasBeenSet()52 inline bool ContainerPathHasBeenSet() const { return m_containerPathHasBeenSet; } 53 54 /** 55 * <p>The path on the container where the host volume is mounted.</p> 56 */ SetContainerPath(const Aws::String & value)57 inline void SetContainerPath(const Aws::String& value) { m_containerPathHasBeenSet = true; m_containerPath = value; } 58 59 /** 60 * <p>The path on the container where the host volume is mounted.</p> 61 */ SetContainerPath(Aws::String && value)62 inline void SetContainerPath(Aws::String&& value) { m_containerPathHasBeenSet = true; m_containerPath = std::move(value); } 63 64 /** 65 * <p>The path on the container where the host volume is mounted.</p> 66 */ SetContainerPath(const char * value)67 inline void SetContainerPath(const char* value) { m_containerPathHasBeenSet = true; m_containerPath.assign(value); } 68 69 /** 70 * <p>The path on the container where the host volume is mounted.</p> 71 */ WithContainerPath(const Aws::String & value)72 inline MountPoint& WithContainerPath(const Aws::String& value) { SetContainerPath(value); return *this;} 73 74 /** 75 * <p>The path on the container where the host volume is mounted.</p> 76 */ WithContainerPath(Aws::String && value)77 inline MountPoint& WithContainerPath(Aws::String&& value) { SetContainerPath(std::move(value)); return *this;} 78 79 /** 80 * <p>The path on the container where the host volume is mounted.</p> 81 */ WithContainerPath(const char * value)82 inline MountPoint& WithContainerPath(const char* value) { SetContainerPath(value); return *this;} 83 84 85 /** 86 * <p>If this value is <code>true</code>, the container has read-only access to the 87 * volume. Otherwise, the container can write to the volume. The default value is 88 * <code>false</code>.</p> 89 */ GetReadOnly()90 inline bool GetReadOnly() const{ return m_readOnly; } 91 92 /** 93 * <p>If this value is <code>true</code>, the container has read-only access to the 94 * volume. Otherwise, the container can write to the volume. The default value is 95 * <code>false</code>.</p> 96 */ ReadOnlyHasBeenSet()97 inline bool ReadOnlyHasBeenSet() const { return m_readOnlyHasBeenSet; } 98 99 /** 100 * <p>If this value is <code>true</code>, the container has read-only access to the 101 * volume. Otherwise, the container can write to the volume. The default value is 102 * <code>false</code>.</p> 103 */ SetReadOnly(bool value)104 inline void SetReadOnly(bool value) { m_readOnlyHasBeenSet = true; m_readOnly = value; } 105 106 /** 107 * <p>If this value is <code>true</code>, the container has read-only access to the 108 * volume. Otherwise, the container can write to the volume. The default value is 109 * <code>false</code>.</p> 110 */ WithReadOnly(bool value)111 inline MountPoint& WithReadOnly(bool value) { SetReadOnly(value); return *this;} 112 113 114 /** 115 * <p>The name of the volume to mount.</p> 116 */ GetSourceVolume()117 inline const Aws::String& GetSourceVolume() const{ return m_sourceVolume; } 118 119 /** 120 * <p>The name of the volume to mount.</p> 121 */ SourceVolumeHasBeenSet()122 inline bool SourceVolumeHasBeenSet() const { return m_sourceVolumeHasBeenSet; } 123 124 /** 125 * <p>The name of the volume to mount.</p> 126 */ SetSourceVolume(const Aws::String & value)127 inline void SetSourceVolume(const Aws::String& value) { m_sourceVolumeHasBeenSet = true; m_sourceVolume = value; } 128 129 /** 130 * <p>The name of the volume to mount.</p> 131 */ SetSourceVolume(Aws::String && value)132 inline void SetSourceVolume(Aws::String&& value) { m_sourceVolumeHasBeenSet = true; m_sourceVolume = std::move(value); } 133 134 /** 135 * <p>The name of the volume to mount.</p> 136 */ SetSourceVolume(const char * value)137 inline void SetSourceVolume(const char* value) { m_sourceVolumeHasBeenSet = true; m_sourceVolume.assign(value); } 138 139 /** 140 * <p>The name of the volume to mount.</p> 141 */ WithSourceVolume(const Aws::String & value)142 inline MountPoint& WithSourceVolume(const Aws::String& value) { SetSourceVolume(value); return *this;} 143 144 /** 145 * <p>The name of the volume to mount.</p> 146 */ WithSourceVolume(Aws::String && value)147 inline MountPoint& WithSourceVolume(Aws::String&& value) { SetSourceVolume(std::move(value)); return *this;} 148 149 /** 150 * <p>The name of the volume to mount.</p> 151 */ WithSourceVolume(const char * value)152 inline MountPoint& WithSourceVolume(const char* value) { SetSourceVolume(value); return *this;} 153 154 private: 155 156 Aws::String m_containerPath; 157 bool m_containerPathHasBeenSet; 158 159 bool m_readOnly; 160 bool m_readOnlyHasBeenSet; 161 162 Aws::String m_sourceVolume; 163 bool m_sourceVolumeHasBeenSet; 164 }; 165 166 } // namespace Model 167 } // namespace Batch 168 } // namespace Aws 169