/*
* 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 pinpoint-2016-12-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.Pinpoint.Model
{
///
/// Container for the parameters to the UpdatePushTemplate operation.
/// Updates an existing message template for messages that are sent through a push notification
/// channel.
///
public partial class UpdatePushTemplateRequest : AmazonPinpointRequest
{
private bool? _createNewVersion;
private PushNotificationTemplateRequest _pushNotificationTemplateRequest;
private string _templateName;
private string _version;
///
/// Gets and sets the property CreateNewVersion.
///
/// Specifies whether to save the updates as a new version of the message template. Valid
/// values are: true, save the updates as a new version; and, false, save the updates
/// to (overwrite) the latest existing version of the template.
///
///
///
/// If you don't specify a value for this parameter, Amazon Pinpoint saves the updates
/// to (overwrites) the latest existing version of the template. If you specify a value
/// of true for this parameter, don't specify a value for the version parameter. Otherwise,
/// an error will occur.
///
///
public bool CreateNewVersion
{
get { return this._createNewVersion.GetValueOrDefault(); }
set { this._createNewVersion = value; }
}
// Check to see if CreateNewVersion property is set
internal bool IsSetCreateNewVersion()
{
return this._createNewVersion.HasValue;
}
///
/// Gets and sets the property PushNotificationTemplateRequest.
///
[AWSProperty(Required=true)]
public PushNotificationTemplateRequest PushNotificationTemplateRequest
{
get { return this._pushNotificationTemplateRequest; }
set { this._pushNotificationTemplateRequest = value; }
}
// Check to see if PushNotificationTemplateRequest property is set
internal bool IsSetPushNotificationTemplateRequest()
{
return this._pushNotificationTemplateRequest != null;
}
///
/// Gets and sets the property TemplateName.
///
/// The name of the message template. A template name must start with an alphanumeric
/// character and can contain a maximum of 128 characters. The characters can be alphanumeric
/// characters, underscores (_), or hyphens (-). Template names are case sensitive.
///
///
[AWSProperty(Required=true)]
public string TemplateName
{
get { return this._templateName; }
set { this._templateName = value; }
}
// Check to see if TemplateName property is set
internal bool IsSetTemplateName()
{
return this._templateName != null;
}
///
/// Gets and sets the property Version.
///
/// The unique identifier for the version of the message template to update, retrieve
/// information about, or delete. To retrieve identifiers and other information for all
/// the versions of a template, use the Template
/// Versions resource.
///
///
///
/// If specified, this value must match the identifier for an existing template version.
/// If specified for an update operation, this value must match the identifier for the
/// latest existing version of the template. This restriction helps ensure that race conditions
/// don't occur.
///
///
///
/// If you don't specify a value for this parameter, Amazon Pinpoint does the following:
///
///
///
/// For a get operation, retrieves information about the active version of the template.
///
///
///
/// For an update operation, saves the updates to (overwrites) the latest existing version
/// of the template, if the create-new-version parameter isn't used or is set to false.
///
///
///
/// For a delete operation, deletes the template, including all versions of the template.
///
///
///
public string Version
{
get { return this._version; }
set { this._version = value; }
}
// Check to see if Version property is set
internal bool IsSetVersion()
{
return this._version != null;
}
}
}