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

The request failed due to a conflict. Check the ConflictType and * error message for more details.

See Also:

AWS * API Reference

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

The type of conflict which caused a ConflictException. Possible types and the * corresponding error messages are as follows:

  • * DOMAIN_NOT_ACTIVE: The domain is not active.

  • * CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT: You cannot change the * speaker ID after an enrollment has been requested.

  • * ENROLLMENT_ALREADY_EXISTS: There is already an enrollment for this * session.

  • SPEAKER_NOT_SET: You must set the * speaker ID before requesting an enrollment.

  • * SPEAKER_OPTED_OUT: You cannot request an enrollment for an opted * out speaker.

  • CONCURRENT_CHANGES: The request * could not be processed as the resource was modified by another request during * execution.

*/ inline const ConflictType& GetConflictType() const{ return m_conflictType; } /** *

The type of conflict which caused a ConflictException. Possible types and the * corresponding error messages are as follows:

  • * DOMAIN_NOT_ACTIVE: The domain is not active.

  • * CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT: You cannot change the * speaker ID after an enrollment has been requested.

  • * ENROLLMENT_ALREADY_EXISTS: There is already an enrollment for this * session.

  • SPEAKER_NOT_SET: You must set the * speaker ID before requesting an enrollment.

  • * SPEAKER_OPTED_OUT: You cannot request an enrollment for an opted * out speaker.

  • CONCURRENT_CHANGES: The request * could not be processed as the resource was modified by another request during * execution.

*/ inline bool ConflictTypeHasBeenSet() const { return m_conflictTypeHasBeenSet; } /** *

The type of conflict which caused a ConflictException. Possible types and the * corresponding error messages are as follows:

  • * DOMAIN_NOT_ACTIVE: The domain is not active.

  • * CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT: You cannot change the * speaker ID after an enrollment has been requested.

  • * ENROLLMENT_ALREADY_EXISTS: There is already an enrollment for this * session.

  • SPEAKER_NOT_SET: You must set the * speaker ID before requesting an enrollment.

  • * SPEAKER_OPTED_OUT: You cannot request an enrollment for an opted * out speaker.

  • CONCURRENT_CHANGES: The request * could not be processed as the resource was modified by another request during * execution.

*/ inline void SetConflictType(const ConflictType& value) { m_conflictTypeHasBeenSet = true; m_conflictType = value; } /** *

The type of conflict which caused a ConflictException. Possible types and the * corresponding error messages are as follows:

  • * DOMAIN_NOT_ACTIVE: The domain is not active.

  • * CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT: You cannot change the * speaker ID after an enrollment has been requested.

  • * ENROLLMENT_ALREADY_EXISTS: There is already an enrollment for this * session.

  • SPEAKER_NOT_SET: You must set the * speaker ID before requesting an enrollment.

  • * SPEAKER_OPTED_OUT: You cannot request an enrollment for an opted * out speaker.

  • CONCURRENT_CHANGES: The request * could not be processed as the resource was modified by another request during * execution.

*/ inline void SetConflictType(ConflictType&& value) { m_conflictTypeHasBeenSet = true; m_conflictType = std::move(value); } /** *

The type of conflict which caused a ConflictException. Possible types and the * corresponding error messages are as follows:

  • * DOMAIN_NOT_ACTIVE: The domain is not active.

  • * CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT: You cannot change the * speaker ID after an enrollment has been requested.

  • * ENROLLMENT_ALREADY_EXISTS: There is already an enrollment for this * session.

  • SPEAKER_NOT_SET: You must set the * speaker ID before requesting an enrollment.

  • * SPEAKER_OPTED_OUT: You cannot request an enrollment for an opted * out speaker.

  • CONCURRENT_CHANGES: The request * could not be processed as the resource was modified by another request during * execution.

*/ inline ConflictException& WithConflictType(const ConflictType& value) { SetConflictType(value); return *this;} /** *

The type of conflict which caused a ConflictException. Possible types and the * corresponding error messages are as follows:

  • * DOMAIN_NOT_ACTIVE: The domain is not active.

  • * CANNOT_CHANGE_SPEAKER_AFTER_ENROLLMENT: You cannot change the * speaker ID after an enrollment has been requested.

  • * ENROLLMENT_ALREADY_EXISTS: There is already an enrollment for this * session.

  • SPEAKER_NOT_SET: You must set the * speaker ID before requesting an enrollment.

  • * SPEAKER_OPTED_OUT: You cannot request an enrollment for an opted * out speaker.

  • CONCURRENT_CHANGES: The request * could not be processed as the resource was modified by another request during * execution.

*/ inline ConflictException& WithConflictType(ConflictType&& value) { SetConflictType(std::move(value)); return *this;} inline const Aws::String& GetMessage() const{ return m_message; } inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } inline ConflictException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} inline ConflictException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} inline ConflictException& WithMessage(const char* value) { SetMessage(value); return *this;} private: ConflictType m_conflictType; bool m_conflictTypeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; }; } // namespace Model } // namespace VoiceID } // namespace Aws