/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/pinpoint/Pinpoint_EXPORTS.h> #include <aws/pinpoint/model/SegmentDimensions.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/pinpoint/model/SegmentGroupList.h> #include <aws/core/utils/memory/stl/AWSMap.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Pinpoint { namespace Model { /** * <p>Specifies the configuration, dimension, and other settings for a segment. A * WriteSegmentRequest object can include a Dimensions object or a SegmentGroups * object, but not both.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/WriteSegmentRequest">AWS * API Reference</a></p> */ class WriteSegmentRequest { public: AWS_PINPOINT_API WriteSegmentRequest(); AWS_PINPOINT_API WriteSegmentRequest(Aws::Utils::Json::JsonView jsonValue); AWS_PINPOINT_API WriteSegmentRequest& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>The criteria that define the dimensions for the segment.</p> */ inline const SegmentDimensions& GetDimensions() const{ return m_dimensions; } /** * <p>The criteria that define the dimensions for the segment.</p> */ inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; } /** * <p>The criteria that define the dimensions for the segment.</p> */ inline void SetDimensions(const SegmentDimensions& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; } /** * <p>The criteria that define the dimensions for the segment.</p> */ inline void SetDimensions(SegmentDimensions&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::move(value); } /** * <p>The criteria that define the dimensions for the segment.</p> */ inline WriteSegmentRequest& WithDimensions(const SegmentDimensions& value) { SetDimensions(value); return *this;} /** * <p>The criteria that define the dimensions for the segment.</p> */ inline WriteSegmentRequest& WithDimensions(SegmentDimensions&& value) { SetDimensions(std::move(value)); return *this;} /** * <p>The name of the segment.</p> */ inline const Aws::String& GetName() const{ return m_name; } /** * <p>The name of the segment.</p> */ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** * <p>The name of the segment.</p> */ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** * <p>The name of the segment.</p> */ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** * <p>The name of the segment.</p> */ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** * <p>The name of the segment.</p> */ inline WriteSegmentRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** * <p>The name of the segment.</p> */ inline WriteSegmentRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** * <p>The name of the segment.</p> */ inline WriteSegmentRequest& WithName(const char* value) { SetName(value); return *this;} /** * <p>The segment group to use and the dimensions to apply to the group's base * segments in order to build the segment. A segment group can consist of zero or * more base segments. Your request can include only one segment group.</p> */ inline const SegmentGroupList& GetSegmentGroups() const{ return m_segmentGroups; } /** * <p>The segment group to use and the dimensions to apply to the group's base * segments in order to build the segment. A segment group can consist of zero or * more base segments. Your request can include only one segment group.</p> */ inline bool SegmentGroupsHasBeenSet() const { return m_segmentGroupsHasBeenSet; } /** * <p>The segment group to use and the dimensions to apply to the group's base * segments in order to build the segment. A segment group can consist of zero or * more base segments. Your request can include only one segment group.</p> */ inline void SetSegmentGroups(const SegmentGroupList& value) { m_segmentGroupsHasBeenSet = true; m_segmentGroups = value; } /** * <p>The segment group to use and the dimensions to apply to the group's base * segments in order to build the segment. A segment group can consist of zero or * more base segments. Your request can include only one segment group.</p> */ inline void SetSegmentGroups(SegmentGroupList&& value) { m_segmentGroupsHasBeenSet = true; m_segmentGroups = std::move(value); } /** * <p>The segment group to use and the dimensions to apply to the group's base * segments in order to build the segment. A segment group can consist of zero or * more base segments. Your request can include only one segment group.</p> */ inline WriteSegmentRequest& WithSegmentGroups(const SegmentGroupList& value) { SetSegmentGroups(value); return *this;} /** * <p>The segment group to use and the dimensions to apply to the group's base * segments in order to build the segment. A segment group can consist of zero or * more base segments. Your request can include only one segment group.</p> */ inline WriteSegmentRequest& WithSegmentGroups(SegmentGroupList&& value) { SetSegmentGroups(std::move(value)); return *this;} /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline WriteSegmentRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;} /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline WriteSegmentRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;} /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline WriteSegmentRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline WriteSegmentRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline WriteSegmentRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline WriteSegmentRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline WriteSegmentRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline WriteSegmentRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** * <p>As of <b>22-05-2023</b> tags has been deprecated for update operations. * After this date any value in tags is not processed and an error code is not * returned. To manage tags we recommend using either <a * href="https://docs.aws.amazon.com/pinpoint/latest/apireference/tags-resource-arn.html">Tags</a> * in the <i>API Reference for Amazon Pinpoint</i>, <a * href="https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/index.html">resourcegroupstaggingapi</a> * commands in the <i>AWS Command Line Interface Documentation</i> or <a * href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/resourcegroupstaggingapi/package-summary.html">resourcegroupstaggingapi</a> * in the <i>AWS SDK</i>.</p> <p>(Deprecated) A string-to-string map of * key-value pairs that defines the tags to associate with the segment. Each tag * consists of a required tag key and an associated tag value.</p> */ inline WriteSegmentRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: SegmentDimensions m_dimensions; bool m_dimensionsHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; SegmentGroupList m_segmentGroups; bool m_segmentGroupsHasBeenSet = false; Aws::Map<Aws::String, Aws::String> m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Pinpoint } // namespace Aws