/*
* 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 ec2-2016-11-15.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.EC2.Model
{
///
/// Container for the parameters to the PurchaseReservedInstancesOffering operation.
/// Purchases a Reserved Instance for use with your account. With Reserved Instances,
/// you pay a lower hourly rate compared to On-Demand instance pricing.
///
///
///
/// Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings
/// that match your specifications. After you've purchased a Reserved Instance, you can
/// check for your new Reserved Instance with DescribeReservedInstances.
///
///
///
/// To queue a purchase for a future date and time, specify a purchase time. If you do
/// not specify a purchase time, the default is the current time.
///
///
///
/// For more information, see Reserved
/// Instances and Reserved
/// Instance Marketplace in the Amazon EC2 User Guide.
///
///
public partial class PurchaseReservedInstancesOfferingRequest : AmazonEC2Request
{
private int? _instanceCount;
private ReservedInstanceLimitPrice _limitPrice;
private DateTime? _purchaseTime;
private string _reservedInstancesOfferingId;
///
/// Empty constructor used to set properties independently even when a simple constructor is available
///
public PurchaseReservedInstancesOfferingRequest() { }
///
/// Instantiates PurchaseReservedInstancesOfferingRequest with the parameterized properties
///
/// The ID of the Reserved Instance offering to purchase.
/// The number of Reserved Instances to purchase.
public PurchaseReservedInstancesOfferingRequest(string reservedInstancesOfferingId, int instanceCount)
{
_reservedInstancesOfferingId = reservedInstancesOfferingId;
_instanceCount = instanceCount;
}
///
/// Gets and sets the property InstanceCount.
///
/// The number of Reserved Instances to purchase.
///
///
[AWSProperty(Required=true)]
public int InstanceCount
{
get { return this._instanceCount.GetValueOrDefault(); }
set { this._instanceCount = value; }
}
// Check to see if InstanceCount property is set
internal bool IsSetInstanceCount()
{
return this._instanceCount.HasValue;
}
///
/// Gets and sets the property LimitPrice.
///
/// Specified for Reserved Instance Marketplace offerings to limit the total order and
/// ensure that the Reserved Instances are not purchased at unexpected prices.
///
///
public ReservedInstanceLimitPrice LimitPrice
{
get { return this._limitPrice; }
set { this._limitPrice = value; }
}
// Check to see if LimitPrice property is set
internal bool IsSetLimitPrice()
{
return this._limitPrice != null;
}
///
/// Gets and sets the property PurchaseTime.
///
/// The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
///
///
public DateTime PurchaseTime
{
get { return this._purchaseTime.GetValueOrDefault(); }
set { this._purchaseTime = value; }
}
// Check to see if PurchaseTime property is set
internal bool IsSetPurchaseTime()
{
return this._purchaseTime.HasValue;
}
///
/// Gets and sets the property ReservedInstancesOfferingId.
///
/// The ID of the Reserved Instance offering to purchase.
///
///
[AWSProperty(Required=true)]
public string ReservedInstancesOfferingId
{
get { return this._reservedInstancesOfferingId; }
set { this._reservedInstancesOfferingId = value; }
}
// Check to see if ReservedInstancesOfferingId property is set
internal bool IsSetReservedInstancesOfferingId()
{
return this._reservedInstancesOfferingId != null;
}
}
}