/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace VPCLattice { namespace Model { /** */ class CreateRuleRequest : public VPCLatticeRequest { public: AWS_VPCLATTICE_API CreateRuleRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; } AWS_VPCLATTICE_API Aws::String SerializePayload() const override; /** *

The action for the default rule.

*/ inline const RuleAction& GetAction() const{ return m_action; } /** *

The action for the default rule.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

The action for the default rule.

*/ inline void SetAction(const RuleAction& value) { m_actionHasBeenSet = true; m_action = value; } /** *

The action for the default rule.

*/ inline void SetAction(RuleAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

The action for the default rule.

*/ inline CreateRuleRequest& WithAction(const RuleAction& value) { SetAction(value); return *this;} /** *

The action for the default rule.

*/ inline CreateRuleRequest& WithAction(RuleAction&& value) { SetAction(std::move(value)); return *this;} /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If you retry a request that completed successfully * using the same client token and parameters, the retry succeeds without * performing any actions. If the parameters aren't identical, the retry fails.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If you retry a request that completed successfully * using the same client token and parameters, the retry succeeds without * performing any actions. If the parameters aren't identical, the retry fails.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If you retry a request that completed successfully * using the same client token and parameters, the retry succeeds without * performing any actions. If the parameters aren't identical, the retry fails.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If you retry a request that completed successfully * using the same client token and parameters, the retry succeeds without * performing any actions. If the parameters aren't identical, the retry fails.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If you retry a request that completed successfully * using the same client token and parameters, the retry succeeds without * performing any actions. If the parameters aren't identical, the retry fails.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If you retry a request that completed successfully * using the same client token and parameters, the retry succeeds without * performing any actions. If the parameters aren't identical, the retry fails.

*/ inline CreateRuleRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If you retry a request that completed successfully * using the same client token and parameters, the retry succeeds without * performing any actions. If the parameters aren't identical, the retry fails.

*/ inline CreateRuleRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If you retry a request that completed successfully * using the same client token and parameters, the retry succeeds without * performing any actions. If the parameters aren't identical, the retry fails.

*/ inline CreateRuleRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

The ID or Amazon Resource Name (ARN) of the listener.

*/ inline const Aws::String& GetListenerIdentifier() const{ return m_listenerIdentifier; } /** *

The ID or Amazon Resource Name (ARN) of the listener.

*/ inline bool ListenerIdentifierHasBeenSet() const { return m_listenerIdentifierHasBeenSet; } /** *

The ID or Amazon Resource Name (ARN) of the listener.

*/ inline void SetListenerIdentifier(const Aws::String& value) { m_listenerIdentifierHasBeenSet = true; m_listenerIdentifier = value; } /** *

The ID or Amazon Resource Name (ARN) of the listener.

*/ inline void SetListenerIdentifier(Aws::String&& value) { m_listenerIdentifierHasBeenSet = true; m_listenerIdentifier = std::move(value); } /** *

The ID or Amazon Resource Name (ARN) of the listener.

*/ inline void SetListenerIdentifier(const char* value) { m_listenerIdentifierHasBeenSet = true; m_listenerIdentifier.assign(value); } /** *

The ID or Amazon Resource Name (ARN) of the listener.

*/ inline CreateRuleRequest& WithListenerIdentifier(const Aws::String& value) { SetListenerIdentifier(value); return *this;} /** *

The ID or Amazon Resource Name (ARN) of the listener.

*/ inline CreateRuleRequest& WithListenerIdentifier(Aws::String&& value) { SetListenerIdentifier(std::move(value)); return *this;} /** *

The ID or Amazon Resource Name (ARN) of the listener.

*/ inline CreateRuleRequest& WithListenerIdentifier(const char* value) { SetListenerIdentifier(value); return *this;} /** *

The rule match.

*/ inline const RuleMatch& GetMatch() const{ return m_match; } /** *

The rule match.

*/ inline bool MatchHasBeenSet() const { return m_matchHasBeenSet; } /** *

The rule match.

*/ inline void SetMatch(const RuleMatch& value) { m_matchHasBeenSet = true; m_match = value; } /** *

The rule match.

*/ inline void SetMatch(RuleMatch&& value) { m_matchHasBeenSet = true; m_match = std::move(value); } /** *

The rule match.

*/ inline CreateRuleRequest& WithMatch(const RuleMatch& value) { SetMatch(value); return *this;} /** *

The rule match.

*/ inline CreateRuleRequest& WithMatch(RuleMatch&& value) { SetMatch(std::move(value)); return *this;} /** *

The name of the rule. The name must be unique within the listener. The valid * characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or * last character, or immediately after another hyphen.

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

The name of the rule. The name must be unique within the listener. The valid * characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or * last character, or immediately after another hyphen.

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

The name of the rule. The name must be unique within the listener. The valid * characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or * last character, or immediately after another hyphen.

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

The name of the rule. The name must be unique within the listener. The valid * characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or * last character, or immediately after another hyphen.

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

The name of the rule. The name must be unique within the listener. The valid * characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or * last character, or immediately after another hyphen.

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

The name of the rule. The name must be unique within the listener. The valid * characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or * last character, or immediately after another hyphen.

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

The name of the rule. The name must be unique within the listener. The valid * characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or * last character, or immediately after another hyphen.

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

The name of the rule. The name must be unique within the listener. The valid * characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or * last character, or immediately after another hyphen.

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

The priority assigned to the rule. Each rule for a specific listener must * have a unique priority. The lower the priority number the higher the * priority.

*/ inline int GetPriority() const{ return m_priority; } /** *

The priority assigned to the rule. Each rule for a specific listener must * have a unique priority. The lower the priority number the higher the * priority.

*/ inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; } /** *

The priority assigned to the rule. Each rule for a specific listener must * have a unique priority. The lower the priority number the higher the * priority.

*/ inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; } /** *

The priority assigned to the rule. Each rule for a specific listener must * have a unique priority. The lower the priority number the higher the * priority.

*/ inline CreateRuleRequest& WithPriority(int value) { SetPriority(value); return *this;} /** *

The ID or Amazon Resource Name (ARN) of the service.

*/ inline const Aws::String& GetServiceIdentifier() const{ return m_serviceIdentifier; } /** *

The ID or Amazon Resource Name (ARN) of the service.

*/ inline bool ServiceIdentifierHasBeenSet() const { return m_serviceIdentifierHasBeenSet; } /** *

The ID or Amazon Resource Name (ARN) of the service.

*/ inline void SetServiceIdentifier(const Aws::String& value) { m_serviceIdentifierHasBeenSet = true; m_serviceIdentifier = value; } /** *

The ID or Amazon Resource Name (ARN) of the service.

*/ inline void SetServiceIdentifier(Aws::String&& value) { m_serviceIdentifierHasBeenSet = true; m_serviceIdentifier = std::move(value); } /** *

The ID or Amazon Resource Name (ARN) of the service.

*/ inline void SetServiceIdentifier(const char* value) { m_serviceIdentifierHasBeenSet = true; m_serviceIdentifier.assign(value); } /** *

The ID or Amazon Resource Name (ARN) of the service.

*/ inline CreateRuleRequest& WithServiceIdentifier(const Aws::String& value) { SetServiceIdentifier(value); return *this;} /** *

The ID or Amazon Resource Name (ARN) of the service.

*/ inline CreateRuleRequest& WithServiceIdentifier(Aws::String&& value) { SetServiceIdentifier(std::move(value)); return *this;} /** *

The ID or Amazon Resource Name (ARN) of the service.

*/ inline CreateRuleRequest& WithServiceIdentifier(const char* value) { SetServiceIdentifier(value); return *this;} /** *

The tags for the rule.

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

The tags for the rule.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tags for the rule.

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tags for the rule.

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tags for the rule.

*/ inline CreateRuleRequest& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

The tags for the rule.

*/ inline CreateRuleRequest& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

The tags for the rule.

*/ inline CreateRuleRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The tags for the rule.

*/ inline CreateRuleRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tags for the rule.

*/ inline CreateRuleRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tags for the rule.

*/ inline CreateRuleRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

The tags for the rule.

*/ inline CreateRuleRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tags for the rule.

*/ inline CreateRuleRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tags for the rule.

*/ inline CreateRuleRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: RuleAction m_action; bool m_actionHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::String m_listenerIdentifier; bool m_listenerIdentifierHasBeenSet = false; RuleMatch m_match; bool m_matchHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; int m_priority; bool m_priorityHasBeenSet = false; Aws::String m_serviceIdentifier; bool m_serviceIdentifierHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace VPCLattice } // namespace Aws