/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ECS { namespace Model { /** *

Details on a data volume from another container in the same task * definition.

See Also:

AWS API * Reference

*/ class VolumeFrom { public: AWS_ECS_API VolumeFrom(); AWS_ECS_API VolumeFrom(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API VolumeFrom& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of another container within the same task definition to mount * volumes from.

*/ inline const Aws::String& GetSourceContainer() const{ return m_sourceContainer; } /** *

The name of another container within the same task definition to mount * volumes from.

*/ inline bool SourceContainerHasBeenSet() const { return m_sourceContainerHasBeenSet; } /** *

The name of another container within the same task definition to mount * volumes from.

*/ inline void SetSourceContainer(const Aws::String& value) { m_sourceContainerHasBeenSet = true; m_sourceContainer = value; } /** *

The name of another container within the same task definition to mount * volumes from.

*/ inline void SetSourceContainer(Aws::String&& value) { m_sourceContainerHasBeenSet = true; m_sourceContainer = std::move(value); } /** *

The name of another container within the same task definition to mount * volumes from.

*/ inline void SetSourceContainer(const char* value) { m_sourceContainerHasBeenSet = true; m_sourceContainer.assign(value); } /** *

The name of another container within the same task definition to mount * volumes from.

*/ inline VolumeFrom& WithSourceContainer(const Aws::String& value) { SetSourceContainer(value); return *this;} /** *

The name of another container within the same task definition to mount * volumes from.

*/ inline VolumeFrom& WithSourceContainer(Aws::String&& value) { SetSourceContainer(std::move(value)); return *this;} /** *

The name of another container within the same task definition to mount * volumes from.

*/ inline VolumeFrom& WithSourceContainer(const char* value) { SetSourceContainer(value); return *this;} /** *

If this value is true, the container has read-only access to the * volume. If this value is false, then the container can write to the * volume. The default value is false.

*/ inline bool GetReadOnly() const{ return m_readOnly; } /** *

If this value is true, the container has read-only access to the * volume. If this value is false, then the container can write to the * volume. The default value is false.

*/ inline bool ReadOnlyHasBeenSet() const { return m_readOnlyHasBeenSet; } /** *

If this value is true, the container has read-only access to the * volume. If this value is false, then the container can write to the * volume. The default value is false.

*/ inline void SetReadOnly(bool value) { m_readOnlyHasBeenSet = true; m_readOnly = value; } /** *

If this value is true, the container has read-only access to the * volume. If this value is false, then the container can write to the * volume. The default value is false.

*/ inline VolumeFrom& WithReadOnly(bool value) { SetReadOnly(value); return *this;} private: Aws::String m_sourceContainer; bool m_sourceContainerHasBeenSet = false; bool m_readOnly; bool m_readOnlyHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws