/**
* 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 Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Connect
{
namespace Model
{
/**
* Contains summary information about a reference. ReferenceSummary
* contains only one non null field between the URL and attachment based on the
* reference type.
See Also:
AWS
* API Reference
*/
class ReferenceSummary
{
public:
AWS_CONNECT_API ReferenceSummary();
AWS_CONNECT_API ReferenceSummary(Aws::Utils::Json::JsonView jsonValue);
AWS_CONNECT_API ReferenceSummary& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_CONNECT_API Aws::Utils::Json::JsonValue Jsonize() const;
/**
* Information about the reference when the referenceType
is
* URL
. Otherwise, null.
*/
inline const UrlReference& GetUrl() const{ return m_url; }
/**
* Information about the reference when the referenceType
is
* URL
. Otherwise, null.
*/
inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
/**
* Information about the reference when the referenceType
is
* URL
. Otherwise, null.
*/
inline void SetUrl(const UrlReference& value) { m_urlHasBeenSet = true; m_url = value; }
/**
* Information about the reference when the referenceType
is
* URL
. Otherwise, null.
*/
inline void SetUrl(UrlReference&& value) { m_urlHasBeenSet = true; m_url = std::move(value); }
/**
* Information about the reference when the referenceType
is
* URL
. Otherwise, null.
*/
inline ReferenceSummary& WithUrl(const UrlReference& value) { SetUrl(value); return *this;}
/**
* Information about the reference when the referenceType
is
* URL
. Otherwise, null.
*/
inline ReferenceSummary& WithUrl(UrlReference&& value) { SetUrl(std::move(value)); return *this;}
/**
* Information about the reference when the referenceType
is
* ATTACHMENT
. Otherwise, null.
*/
inline const AttachmentReference& GetAttachment() const{ return m_attachment; }
/**
* Information about the reference when the referenceType
is
* ATTACHMENT
. Otherwise, null.
*/
inline bool AttachmentHasBeenSet() const { return m_attachmentHasBeenSet; }
/**
* Information about the reference when the referenceType
is
* ATTACHMENT
. Otherwise, null.
*/
inline void SetAttachment(const AttachmentReference& value) { m_attachmentHasBeenSet = true; m_attachment = value; }
/**
* Information about the reference when the referenceType
is
* ATTACHMENT
. Otherwise, null.
*/
inline void SetAttachment(AttachmentReference&& value) { m_attachmentHasBeenSet = true; m_attachment = std::move(value); }
/**
* Information about the reference when the referenceType
is
* ATTACHMENT
. Otherwise, null.
*/
inline ReferenceSummary& WithAttachment(const AttachmentReference& value) { SetAttachment(value); return *this;}
/**
* Information about the reference when the referenceType
is
* ATTACHMENT
. Otherwise, null.
*/
inline ReferenceSummary& WithAttachment(AttachmentReference&& value) { SetAttachment(std::move(value)); return *this;}
/**
* Information about a reference when the referenceType
is
* STRING
. Otherwise, null.
*/
inline const StringReference& GetString() const{ return m_string; }
/**
* Information about a reference when the referenceType
is
* STRING
. Otherwise, null.
*/
inline bool StringHasBeenSet() const { return m_stringHasBeenSet; }
/**
* Information about a reference when the referenceType
is
* STRING
. Otherwise, null.
*/
inline void SetString(const StringReference& value) { m_stringHasBeenSet = true; m_string = value; }
/**
* Information about a reference when the referenceType
is
* STRING
. Otherwise, null.
*/
inline void SetString(StringReference&& value) { m_stringHasBeenSet = true; m_string = std::move(value); }
/**
* Information about a reference when the referenceType
is
* STRING
. Otherwise, null.
*/
inline ReferenceSummary& WithString(const StringReference& value) { SetString(value); return *this;}
/**
* Information about a reference when the referenceType
is
* STRING
. Otherwise, null.
*/
inline ReferenceSummary& WithString(StringReference&& value) { SetString(std::move(value)); return *this;}
/**
* Information about a reference when the referenceType
is
* NUMBER
. Otherwise, null.
*/
inline const NumberReference& GetNumber() const{ return m_number; }
/**
* Information about a reference when the referenceType
is
* NUMBER
. Otherwise, null.
*/
inline bool NumberHasBeenSet() const { return m_numberHasBeenSet; }
/**
* Information about a reference when the referenceType
is
* NUMBER
. Otherwise, null.
*/
inline void SetNumber(const NumberReference& value) { m_numberHasBeenSet = true; m_number = value; }
/**
* Information about a reference when the referenceType
is
* NUMBER
. Otherwise, null.
*/
inline void SetNumber(NumberReference&& value) { m_numberHasBeenSet = true; m_number = std::move(value); }
/**
* Information about a reference when the referenceType
is
* NUMBER
. Otherwise, null.
*/
inline ReferenceSummary& WithNumber(const NumberReference& value) { SetNumber(value); return *this;}
/**
* Information about a reference when the referenceType
is
* NUMBER
. Otherwise, null.
*/
inline ReferenceSummary& WithNumber(NumberReference&& value) { SetNumber(std::move(value)); return *this;}
/**
* Information about a reference when the referenceType
is
* DATE
. Otherwise, null.
*/
inline const DateReference& GetDate() const{ return m_date; }
/**
* Information about a reference when the referenceType
is
* DATE
. Otherwise, null.
*/
inline bool DateHasBeenSet() const { return m_dateHasBeenSet; }
/**
* Information about a reference when the referenceType
is
* DATE
. Otherwise, null.
*/
inline void SetDate(const DateReference& value) { m_dateHasBeenSet = true; m_date = value; }
/**
* Information about a reference when the referenceType
is
* DATE
. Otherwise, null.
*/
inline void SetDate(DateReference&& value) { m_dateHasBeenSet = true; m_date = std::move(value); }
/**
* Information about a reference when the referenceType
is
* DATE
. Otherwise, null.
*/
inline ReferenceSummary& WithDate(const DateReference& value) { SetDate(value); return *this;}
/**
* Information about a reference when the referenceType
is
* DATE
. Otherwise, null.
*/
inline ReferenceSummary& WithDate(DateReference&& value) { SetDate(std::move(value)); return *this;}
/**
* Information about a reference when the referenceType
is
* EMAIL
. Otherwise, null.
*/
inline const EmailReference& GetEmail() const{ return m_email; }
/**
* Information about a reference when the referenceType
is
* EMAIL
. Otherwise, null.
*/
inline bool EmailHasBeenSet() const { return m_emailHasBeenSet; }
/**
* Information about a reference when the referenceType
is
* EMAIL
. Otherwise, null.
*/
inline void SetEmail(const EmailReference& value) { m_emailHasBeenSet = true; m_email = value; }
/**
* Information about a reference when the referenceType
is
* EMAIL
. Otherwise, null.
*/
inline void SetEmail(EmailReference&& value) { m_emailHasBeenSet = true; m_email = std::move(value); }
/**
* Information about a reference when the referenceType
is
* EMAIL
. Otherwise, null.
*/
inline ReferenceSummary& WithEmail(const EmailReference& value) { SetEmail(value); return *this;}
/**
* Information about a reference when the referenceType
is
* EMAIL
. Otherwise, null.
*/
inline ReferenceSummary& WithEmail(EmailReference&& value) { SetEmail(std::move(value)); return *this;}
private:
UrlReference m_url;
bool m_urlHasBeenSet = false;
AttachmentReference m_attachment;
bool m_attachmentHasBeenSet = false;
StringReference m_string;
bool m_stringHasBeenSet = false;
NumberReference m_number;
bool m_numberHasBeenSet = false;
DateReference m_date;
bool m_dateHasBeenSet = false;
EmailReference m_email;
bool m_emailHasBeenSet = false;
};
} // namespace Model
} // namespace Connect
} // namespace Aws