/** * 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 MainframeModernization { namespace Model { /** *

Defines an alternate key. This value is optional. A legacy data set might not * have any alternate key defined but if those alternate keys definitions exist, * provide them, as some applications will make use of them.

See * Also:

AWS API * Reference

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

Indicates whether the alternate key values are supposed to be unique for the * given data set.

*/ inline bool GetAllowDuplicates() const{ return m_allowDuplicates; } /** *

Indicates whether the alternate key values are supposed to be unique for the * given data set.

*/ inline bool AllowDuplicatesHasBeenSet() const { return m_allowDuplicatesHasBeenSet; } /** *

Indicates whether the alternate key values are supposed to be unique for the * given data set.

*/ inline void SetAllowDuplicates(bool value) { m_allowDuplicatesHasBeenSet = true; m_allowDuplicates = value; } /** *

Indicates whether the alternate key values are supposed to be unique for the * given data set.

*/ inline AlternateKey& WithAllowDuplicates(bool value) { SetAllowDuplicates(value); return *this;} /** *

A strictly positive integer value representing the length of the alternate * key.

*/ inline int GetLength() const{ return m_length; } /** *

A strictly positive integer value representing the length of the alternate * key.

*/ inline bool LengthHasBeenSet() const { return m_lengthHasBeenSet; } /** *

A strictly positive integer value representing the length of the alternate * key.

*/ inline void SetLength(int value) { m_lengthHasBeenSet = true; m_length = value; } /** *

A strictly positive integer value representing the length of the alternate * key.

*/ inline AlternateKey& WithLength(int value) { SetLength(value); return *this;} /** *

The name of the alternate key.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the alternate key.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the alternate key.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the alternate key.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the alternate key.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the alternate key.

*/ inline AlternateKey& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the alternate key.

*/ inline AlternateKey& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the alternate key.

*/ inline AlternateKey& WithName(const char* value) { SetName(value); return *this;} /** *

A positive integer value representing the offset to mark the start of the * alternate key part in the record byte array.

*/ inline int GetOffset() const{ return m_offset; } /** *

A positive integer value representing the offset to mark the start of the * alternate key part in the record byte array.

*/ inline bool OffsetHasBeenSet() const { return m_offsetHasBeenSet; } /** *

A positive integer value representing the offset to mark the start of the * alternate key part in the record byte array.

*/ inline void SetOffset(int value) { m_offsetHasBeenSet = true; m_offset = value; } /** *

A positive integer value representing the offset to mark the start of the * alternate key part in the record byte array.

*/ inline AlternateKey& WithOffset(int value) { SetOffset(value); return *this;} private: bool m_allowDuplicates; bool m_allowDuplicatesHasBeenSet = false; int m_length; bool m_lengthHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; int m_offset; bool m_offsetHasBeenSet = false; }; } // namespace Model } // namespace MainframeModernization } // namespace Aws