/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the evidently-2021-02-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudWatchEvidently.Model
{
///
/// This structure contains information about one audience segment. You can use
/// segments in your experiments and launches to narrow the user sessions used for experiment
/// or launch to only the user sessions that match one or more criteria.
///
public partial class Segment
{
private string _arn;
private DateTime? _createdTime;
private string _description;
private long? _experimentCount;
private DateTime? _lastUpdatedTime;
private long? _launchCount;
private string _name;
private string _pattern;
private Dictionary _tags = new Dictionary();
///
/// Gets and sets the property Arn.
///
/// The ARN of the segment.
///
///
[AWSProperty(Required=true, Min=0, Max=2048)]
public string Arn
{
get { return this._arn; }
set { this._arn = value; }
}
// Check to see if Arn property is set
internal bool IsSetArn()
{
return this._arn != null;
}
///
/// Gets and sets the property CreatedTime.
///
/// The date and time that this segment was created.
///
///
[AWSProperty(Required=true)]
public DateTime CreatedTime
{
get { return this._createdTime.GetValueOrDefault(); }
set { this._createdTime = value; }
}
// Check to see if CreatedTime property is set
internal bool IsSetCreatedTime()
{
return this._createdTime.HasValue;
}
///
/// Gets and sets the property Description.
///
/// The customer-created description for this segment.
///
///
[AWSProperty(Min=0, Max=160)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
///
/// Gets and sets the property ExperimentCount.
///
/// The number of experiments that this segment is used in. This count includes all current
/// experiments, not just those that are currently running.
///
///
public long ExperimentCount
{
get { return this._experimentCount.GetValueOrDefault(); }
set { this._experimentCount = value; }
}
// Check to see if ExperimentCount property is set
internal bool IsSetExperimentCount()
{
return this._experimentCount.HasValue;
}
///
/// Gets and sets the property LastUpdatedTime.
///
/// The date and time that this segment was most recently updated.
///
///
[AWSProperty(Required=true)]
public DateTime LastUpdatedTime
{
get { return this._lastUpdatedTime.GetValueOrDefault(); }
set { this._lastUpdatedTime = value; }
}
// Check to see if LastUpdatedTime property is set
internal bool IsSetLastUpdatedTime()
{
return this._lastUpdatedTime.HasValue;
}
///
/// Gets and sets the property LaunchCount.
///
/// The number of launches that this segment is used in. This count includes all current
/// launches, not just those that are currently running.
///
///
public long LaunchCount
{
get { return this._launchCount.GetValueOrDefault(); }
set { this._launchCount = value; }
}
// Check to see if LaunchCount property is set
internal bool IsSetLaunchCount()
{
return this._launchCount.HasValue;
}
///
/// Gets and sets the property Name.
///
/// The name of the segment.
///
///
[AWSProperty(Required=true, Min=1, Max=64)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property Pattern.
///
/// The pattern that defines the attributes to use to evalute whether a user session will
/// be in the segment. For more information about the pattern syntax, see Segment
/// rule pattern syntax.
///
///
[AWSProperty(Required=true, Min=1, Max=1024)]
public string Pattern
{
get { return this._pattern; }
set { this._pattern = value; }
}
// Check to see if Pattern property is set
internal bool IsSetPattern()
{
return this._pattern != null;
}
///
/// Gets and sets the property Tags.
///
/// The list of tag keys and values associated with this launch.
///
///
public Dictionary Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
}
}