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

Defines an instance group for heterogeneous cluster training. When requesting * a training job using the CreateTrainingJob * API, you can configure multiple instance groups .

See Also:

AWS * API Reference

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

Specifies the instance type of the instance group.

*/ inline const TrainingInstanceType& GetInstanceType() const{ return m_instanceType; } /** *

Specifies the instance type of the instance group.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

Specifies the instance type of the instance group.

*/ inline void SetInstanceType(const TrainingInstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

Specifies the instance type of the instance group.

*/ inline void SetInstanceType(TrainingInstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

Specifies the instance type of the instance group.

*/ inline InstanceGroup& WithInstanceType(const TrainingInstanceType& value) { SetInstanceType(value); return *this;} /** *

Specifies the instance type of the instance group.

*/ inline InstanceGroup& WithInstanceType(TrainingInstanceType&& value) { SetInstanceType(std::move(value)); return *this;} /** *

Specifies the number of instances of the instance group.

*/ inline int GetInstanceCount() const{ return m_instanceCount; } /** *

Specifies the number of instances of the instance group.

*/ inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; } /** *

Specifies the number of instances of the instance group.

*/ inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; } /** *

Specifies the number of instances of the instance group.

*/ inline InstanceGroup& WithInstanceCount(int value) { SetInstanceCount(value); return *this;} /** *

Specifies the name of the instance group.

*/ inline const Aws::String& GetInstanceGroupName() const{ return m_instanceGroupName; } /** *

Specifies the name of the instance group.

*/ inline bool InstanceGroupNameHasBeenSet() const { return m_instanceGroupNameHasBeenSet; } /** *

Specifies the name of the instance group.

*/ inline void SetInstanceGroupName(const Aws::String& value) { m_instanceGroupNameHasBeenSet = true; m_instanceGroupName = value; } /** *

Specifies the name of the instance group.

*/ inline void SetInstanceGroupName(Aws::String&& value) { m_instanceGroupNameHasBeenSet = true; m_instanceGroupName = std::move(value); } /** *

Specifies the name of the instance group.

*/ inline void SetInstanceGroupName(const char* value) { m_instanceGroupNameHasBeenSet = true; m_instanceGroupName.assign(value); } /** *

Specifies the name of the instance group.

*/ inline InstanceGroup& WithInstanceGroupName(const Aws::String& value) { SetInstanceGroupName(value); return *this;} /** *

Specifies the name of the instance group.

*/ inline InstanceGroup& WithInstanceGroupName(Aws::String&& value) { SetInstanceGroupName(std::move(value)); return *this;} /** *

Specifies the name of the instance group.

*/ inline InstanceGroup& WithInstanceGroupName(const char* value) { SetInstanceGroupName(value); return *this;} private: TrainingInstanceType m_instanceType; bool m_instanceTypeHasBeenSet = false; int m_instanceCount; bool m_instanceCountHasBeenSet = false; Aws::String m_instanceGroupName; bool m_instanceGroupNameHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws