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

A tructures that contains information about one pattern token related to an * anomaly.

For more information about patterns and tokens, see CreateLogAnomalyDetector. *

See Also:

AWS * API Reference

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

For a dynamic token, this indicates where in the pattern that this token * appears, related to other dynamic tokens. The dynamic token that appears first * has a value of 1, the one that appears second is 2, * and so on.

*/ inline int GetDynamicTokenPosition() const{ return m_dynamicTokenPosition; } /** *

For a dynamic token, this indicates where in the pattern that this token * appears, related to other dynamic tokens. The dynamic token that appears first * has a value of 1, the one that appears second is 2, * and so on.

*/ inline bool DynamicTokenPositionHasBeenSet() const { return m_dynamicTokenPositionHasBeenSet; } /** *

For a dynamic token, this indicates where in the pattern that this token * appears, related to other dynamic tokens. The dynamic token that appears first * has a value of 1, the one that appears second is 2, * and so on.

*/ inline void SetDynamicTokenPosition(int value) { m_dynamicTokenPositionHasBeenSet = true; m_dynamicTokenPosition = value; } /** *

For a dynamic token, this indicates where in the pattern that this token * appears, related to other dynamic tokens. The dynamic token that appears first * has a value of 1, the one that appears second is 2, * and so on.

*/ inline PatternToken& WithDynamicTokenPosition(int value) { SetDynamicTokenPosition(value); return *this;} /** *

Specifies whether this is a dynamic token.

*/ inline bool GetIsDynamic() const{ return m_isDynamic; } /** *

Specifies whether this is a dynamic token.

*/ inline bool IsDynamicHasBeenSet() const { return m_isDynamicHasBeenSet; } /** *

Specifies whether this is a dynamic token.

*/ inline void SetIsDynamic(bool value) { m_isDynamicHasBeenSet = true; m_isDynamic = value; } /** *

Specifies whether this is a dynamic token.

*/ inline PatternToken& WithIsDynamic(bool value) { SetIsDynamic(value); return *this;} /** *

The string represented by this token. If this is a dynamic token, the value * will be <*>

*/ inline const Aws::String& GetTokenString() const{ return m_tokenString; } /** *

The string represented by this token. If this is a dynamic token, the value * will be <*>

*/ inline bool TokenStringHasBeenSet() const { return m_tokenStringHasBeenSet; } /** *

The string represented by this token. If this is a dynamic token, the value * will be <*>

*/ inline void SetTokenString(const Aws::String& value) { m_tokenStringHasBeenSet = true; m_tokenString = value; } /** *

The string represented by this token. If this is a dynamic token, the value * will be <*>

*/ inline void SetTokenString(Aws::String&& value) { m_tokenStringHasBeenSet = true; m_tokenString = std::move(value); } /** *

The string represented by this token. If this is a dynamic token, the value * will be <*>

*/ inline void SetTokenString(const char* value) { m_tokenStringHasBeenSet = true; m_tokenString.assign(value); } /** *

The string represented by this token. If this is a dynamic token, the value * will be <*>

*/ inline PatternToken& WithTokenString(const Aws::String& value) { SetTokenString(value); return *this;} /** *

The string represented by this token. If this is a dynamic token, the value * will be <*>

*/ inline PatternToken& WithTokenString(Aws::String&& value) { SetTokenString(std::move(value)); return *this;} /** *

The string represented by this token. If this is a dynamic token, the value * will be <*>

*/ inline PatternToken& WithTokenString(const char* value) { SetTokenString(value); return *this;} /** *

Contains the values found for a dynamic token, and the number of times each * value was found.

*/ inline const Aws::Map& GetEnumerations() const{ return m_enumerations; } /** *

Contains the values found for a dynamic token, and the number of times each * value was found.

*/ inline bool EnumerationsHasBeenSet() const { return m_enumerationsHasBeenSet; } /** *

Contains the values found for a dynamic token, and the number of times each * value was found.

*/ inline void SetEnumerations(const Aws::Map& value) { m_enumerationsHasBeenSet = true; m_enumerations = value; } /** *

Contains the values found for a dynamic token, and the number of times each * value was found.

*/ inline void SetEnumerations(Aws::Map&& value) { m_enumerationsHasBeenSet = true; m_enumerations = std::move(value); } /** *

Contains the values found for a dynamic token, and the number of times each * value was found.

*/ inline PatternToken& WithEnumerations(const Aws::Map& value) { SetEnumerations(value); return *this;} /** *

Contains the values found for a dynamic token, and the number of times each * value was found.

*/ inline PatternToken& WithEnumerations(Aws::Map&& value) { SetEnumerations(std::move(value)); return *this;} /** *

Contains the values found for a dynamic token, and the number of times each * value was found.

*/ inline PatternToken& AddEnumerations(const Aws::String& key, long long value) { m_enumerationsHasBeenSet = true; m_enumerations.emplace(key, value); return *this; } /** *

Contains the values found for a dynamic token, and the number of times each * value was found.

*/ inline PatternToken& AddEnumerations(Aws::String&& key, long long value) { m_enumerationsHasBeenSet = true; m_enumerations.emplace(std::move(key), value); return *this; } /** *

Contains the values found for a dynamic token, and the number of times each * value was found.

*/ inline PatternToken& AddEnumerations(const char* key, long long value) { m_enumerationsHasBeenSet = true; m_enumerations.emplace(key, value); return *this; } private: int m_dynamicTokenPosition; bool m_dynamicTokenPositionHasBeenSet = false; bool m_isDynamic; bool m_isDynamicHasBeenSet = false; Aws::String m_tokenString; bool m_tokenStringHasBeenSet = false; Aws::Map m_enumerations; bool m_enumerationsHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws