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

Describes a custom rewrite or redirect rule.

See Also:

AWS * API Reference

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

The source pattern for a URL rewrite or redirect rule.

*/ inline const Aws::String& GetSource() const{ return m_source; } /** *

The source pattern for a URL rewrite or redirect rule.

*/ inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; } /** *

The source pattern for a URL rewrite or redirect rule.

*/ inline void SetSource(const Aws::String& value) { m_sourceHasBeenSet = true; m_source = value; } /** *

The source pattern for a URL rewrite or redirect rule.

*/ inline void SetSource(Aws::String&& value) { m_sourceHasBeenSet = true; m_source = std::move(value); } /** *

The source pattern for a URL rewrite or redirect rule.

*/ inline void SetSource(const char* value) { m_sourceHasBeenSet = true; m_source.assign(value); } /** *

The source pattern for a URL rewrite or redirect rule.

*/ inline CustomRule& WithSource(const Aws::String& value) { SetSource(value); return *this;} /** *

The source pattern for a URL rewrite or redirect rule.

*/ inline CustomRule& WithSource(Aws::String&& value) { SetSource(std::move(value)); return *this;} /** *

The source pattern for a URL rewrite or redirect rule.

*/ inline CustomRule& WithSource(const char* value) { SetSource(value); return *this;} /** *

The target pattern for a URL rewrite or redirect rule.

*/ inline const Aws::String& GetTarget() const{ return m_target; } /** *

The target pattern for a URL rewrite or redirect rule.

*/ inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } /** *

The target pattern for a URL rewrite or redirect rule.

*/ inline void SetTarget(const Aws::String& value) { m_targetHasBeenSet = true; m_target = value; } /** *

The target pattern for a URL rewrite or redirect rule.

*/ inline void SetTarget(Aws::String&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } /** *

The target pattern for a URL rewrite or redirect rule.

*/ inline void SetTarget(const char* value) { m_targetHasBeenSet = true; m_target.assign(value); } /** *

The target pattern for a URL rewrite or redirect rule.

*/ inline CustomRule& WithTarget(const Aws::String& value) { SetTarget(value); return *this;} /** *

The target pattern for a URL rewrite or redirect rule.

*/ inline CustomRule& WithTarget(Aws::String&& value) { SetTarget(std::move(value)); return *this;} /** *

The target pattern for a URL rewrite or redirect rule.

*/ inline CustomRule& WithTarget(const char* value) { SetTarget(value); return *this;} /** *

The status code for a URL rewrite or redirect rule.

200
*

Represents a 200 rewrite rule.

301

Represents * a 301 (moved pemanently) redirect rule. This and all future requests should be * directed to the target URL.

302

Represents a 302 * temporary redirect rule.

404

Represents a 404 * redirect rule.

404-200

Represents a 404 rewrite * rule.

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The status code for a URL rewrite or redirect rule.

200
*

Represents a 200 rewrite rule.

301

Represents * a 301 (moved pemanently) redirect rule. This and all future requests should be * directed to the target URL.

302

Represents a 302 * temporary redirect rule.

404

Represents a 404 * redirect rule.

404-200

Represents a 404 rewrite * rule.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status code for a URL rewrite or redirect rule.

200
*

Represents a 200 rewrite rule.

301

Represents * a 301 (moved pemanently) redirect rule. This and all future requests should be * directed to the target URL.

302

Represents a 302 * temporary redirect rule.

404

Represents a 404 * redirect rule.

404-200

Represents a 404 rewrite * rule.

*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status code for a URL rewrite or redirect rule.

200
*

Represents a 200 rewrite rule.

301

Represents * a 301 (moved pemanently) redirect rule. This and all future requests should be * directed to the target URL.

302

Represents a 302 * temporary redirect rule.

404

Represents a 404 * redirect rule.

404-200

Represents a 404 rewrite * rule.

*/ inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status code for a URL rewrite or redirect rule.

200
*

Represents a 200 rewrite rule.

301

Represents * a 301 (moved pemanently) redirect rule. This and all future requests should be * directed to the target URL.

302

Represents a 302 * temporary redirect rule.

404

Represents a 404 * redirect rule.

404-200

Represents a 404 rewrite * rule.

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The status code for a URL rewrite or redirect rule.

200
*

Represents a 200 rewrite rule.

301

Represents * a 301 (moved pemanently) redirect rule. This and all future requests should be * directed to the target URL.

302

Represents a 302 * temporary redirect rule.

404

Represents a 404 * redirect rule.

404-200

Represents a 404 rewrite * rule.

*/ inline CustomRule& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The status code for a URL rewrite or redirect rule.

200
*

Represents a 200 rewrite rule.

301

Represents * a 301 (moved pemanently) redirect rule. This and all future requests should be * directed to the target URL.

302

Represents a 302 * temporary redirect rule.

404

Represents a 404 * redirect rule.

404-200

Represents a 404 rewrite * rule.

*/ inline CustomRule& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The status code for a URL rewrite or redirect rule.

200
*

Represents a 200 rewrite rule.

301

Represents * a 301 (moved pemanently) redirect rule. This and all future requests should be * directed to the target URL.

302

Represents a 302 * temporary redirect rule.

404

Represents a 404 * redirect rule.

404-200

Represents a 404 rewrite * rule.

*/ inline CustomRule& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The condition for a URL rewrite or redirect rule, such as a country code. *

*/ inline const Aws::String& GetCondition() const{ return m_condition; } /** *

The condition for a URL rewrite or redirect rule, such as a country code. *

*/ inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; } /** *

The condition for a URL rewrite or redirect rule, such as a country code. *

*/ inline void SetCondition(const Aws::String& value) { m_conditionHasBeenSet = true; m_condition = value; } /** *

The condition for a URL rewrite or redirect rule, such as a country code. *

*/ inline void SetCondition(Aws::String&& value) { m_conditionHasBeenSet = true; m_condition = std::move(value); } /** *

The condition for a URL rewrite or redirect rule, such as a country code. *

*/ inline void SetCondition(const char* value) { m_conditionHasBeenSet = true; m_condition.assign(value); } /** *

The condition for a URL rewrite or redirect rule, such as a country code. *

*/ inline CustomRule& WithCondition(const Aws::String& value) { SetCondition(value); return *this;} /** *

The condition for a URL rewrite or redirect rule, such as a country code. *

*/ inline CustomRule& WithCondition(Aws::String&& value) { SetCondition(std::move(value)); return *this;} /** *

The condition for a URL rewrite or redirect rule, such as a country code. *

*/ inline CustomRule& WithCondition(const char* value) { SetCondition(value); return *this;} private: Aws::String m_source; bool m_sourceHasBeenSet = false; Aws::String m_target; bool m_targetHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Aws::String m_condition; bool m_conditionHasBeenSet = false; }; } // namespace Model } // namespace Amplify } // namespace Aws