/Amazon.EC2/Model/DescribeReservedInstancesOfferingsRequest.cs
C# | 301 lines | 143 code | 23 blank | 135 comment | 7 complexity | e31f0087ccd64e9a7a6824ba124e95dc MD5 | raw file
- /*******************************************************************************
- * Copyright 2008-2012 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.
- * *****************************************************************************
- * __ _ _ ___
- * ( )( \/\/ )/ __)
- * /__\ \ / \__ \
- * (_)(_) \/\/ (___/
- *
- * AWS SDK for .NET
- * API Version: 2012-04-01
- */
-
- using System;
- using System.Collections.Generic;
- using System.Xml.Serialization;
- using System.Text;
-
- namespace Amazon.EC2.Model
- {
- /// <summary>
- /// Describes Reserved Instance offerings that are
- /// available for purchase. With Amazon EC2
- /// Reserved Instances, you
- /// purchase the right to launch Amazon EC2 instances
- /// for a period of time (without getting
- /// insufficient capacity errors) and pay a
- /// lower usage rate for the
- /// actual time used. For more information
- /// about Reserved Instances, go to the Amazon
- /// Elastic Compute Cloud Developer Guide.
- /// </summary>
- [XmlRootAttribute(Namespace = "http://ec2.amazonaws.com/doc/2012-04-01/", IsNullable = false)]
- public class DescribeReservedInstancesOfferingsRequest
- {
- private List<string> reservedInstancesIdField;
- private string instanceTypeField;
- private string availabilityZoneField;
- private string productDescriptionField;
- private List<Filter> filterField;
- private string instanceTenancyField;
- private string offeringTypeField;
-
- /// <summary>
- /// Gets and sets the ReservedInstancesId property.
- /// ID of the Reserved Instances to describe.
- /// </summary>
- [XmlElementAttribute(ElementName = "ReservedInstancesId")]
- public List<string> ReservedInstancesId
- {
- get
- {
- if (this.reservedInstancesIdField == null)
- {
- this.reservedInstancesIdField = new List<string>();
- }
- return this.reservedInstancesIdField;
- }
- set { this.reservedInstancesIdField = value; }
- }
-
- /// <summary>
- /// Sets the ReservedInstancesId property
- /// </summary>
- /// <param name="list">ID of the Reserved Instances to describe.</param>
- /// <returns>this instance</returns>
- public DescribeReservedInstancesOfferingsRequest WithReservedInstancesId(params string[] list)
- {
- foreach (string item in list)
- {
- ReservedInstancesId.Add(item);
- }
- return this;
- }
-
- /// <summary>
- /// Checks if ReservedInstancesId property is set
- /// </summary>
- /// <returns>true if ReservedInstancesId property is set</returns>
- public bool IsSetReservedInstancesId()
- {
- return (ReservedInstancesId.Count > 0);
- }
-
- /// <summary>
- /// Gets and sets the InstanceType property.
- /// The instance type on which the Reserved
- /// Instance can be used.
- /// </summary>
- [XmlElementAttribute(ElementName = "InstanceType")]
- public string InstanceType
- {
- get { return this.instanceTypeField; }
- set { this.instanceTypeField = value; }
- }
-
- /// <summary>
- /// Sets the InstanceType property
- /// </summary>
- /// <param name="instanceType">The instance type on which the Reserved
- /// Instance can be used.</param>
- /// <returns>this instance</returns>
- public DescribeReservedInstancesOfferingsRequest WithInstanceType(string instanceType)
- {
- this.instanceTypeField = instanceType;
- return this;
- }
-
- /// <summary>
- /// Checks if InstanceType property is set
- /// </summary>
- /// <returns>true if InstanceType property is set</returns>
- public bool IsSetInstanceType()
- {
- return this.instanceTypeField != null;
- }
-
- /// <summary>
- /// Gets and sets the AvailabilityZone property.
- /// The Availability Zone in which the Reserved
- /// Instance can be used.
- /// </summary>
- [XmlElementAttribute(ElementName = "AvailabilityZone")]
- public string AvailabilityZone
- {
- get { return this.availabilityZoneField; }
- set { this.availabilityZoneField = value; }
- }
-
- /// <summary>
- /// Sets the AvailabilityZone property
- /// </summary>
- /// <param name="availabilityZone">The Availability Zone in which the Reserved
- /// Instance can be used.</param>
- /// <returns>this instance</returns>
- public DescribeReservedInstancesOfferingsRequest WithAvailabilityZone(string availabilityZone)
- {
- this.availabilityZoneField = availabilityZone;
- return this;
- }
-
- /// <summary>
- /// Checks if AvailabilityZone property is set
- /// </summary>
- /// <returns>true if AvailabilityZone property is set</returns>
- public bool IsSetAvailabilityZone()
- {
- return this.availabilityZoneField != null;
- }
-
- /// <summary>
- /// Gets and sets the ProductDescription property.
- /// The Reserved Instance description.
- /// </summary>
- [XmlElementAttribute(ElementName = "ProductDescription")]
- public string ProductDescription
- {
- get { return this.productDescriptionField; }
- set { this.productDescriptionField = value; }
- }
-
- /// <summary>
- /// Sets the ProductDescription property
- /// </summary>
- /// <param name="productDescription">The Reserved Instance description.</param>
- /// <returns>this instance</returns>
- public DescribeReservedInstancesOfferingsRequest WithProductDescription(string productDescription)
- {
- this.productDescriptionField = productDescription;
- return this;
- }
-
- /// <summary>
- /// Checks if ProductDescription property is set
- /// </summary>
- /// <returns>true if ProductDescription property is set</returns>
- public bool IsSetProductDescription()
- {
- return this.productDescriptionField != null;
- }
-
- /// <summary>
- /// Gets and sets the Filter property.
- /// A list of filters used to match system-defined properties and user-defined tags
- /// associated with the specified ReservedInstances.
- /// For a complete reference to the available filter keys for this operation, see the
- /// Amazon EC2 API reference.
- /// </summary>
- [XmlElementAttribute(ElementName = "Filter")]
- public List<Filter> Filter
- {
- get
- {
- if (this.filterField == null)
- {
- this.filterField = new List<Filter>();
- }
- return this.filterField;
- }
- set { this.filterField = value; }
- }
-
- /// <summary>
- /// Sets the Filter property
- /// </summary>
- /// <param name="list">A list of filters used to match system-defined properties and user-defined tags
- /// associated with the specified ReservedInstances.
- /// For a complete reference to the available filter keys for this operation, see the
- /// Amazon EC2 API reference.</param>
- /// <returns>this instance</returns>
- public DescribeReservedInstancesOfferingsRequest WithFilter(params Filter[] list)
- {
- foreach (Filter item in list)
- {
- Filter.Add(item);
- }
- return this;
- }
-
- /// <summary>
- /// Checks if Filter property is set
- /// </summary>
- /// <returns>true if Filter property is set</returns>
- public bool IsSetFilter()
- {
- return (Filter.Count > 0);
- }
-
- /// <summary>
- /// The tenancy of the Reserved Instance offering. A Reserved Instance with tenancy of dedicated will run on
- /// single-tenant hardware and can only be launched within a VPC.
- /// Valid Values: default | dedicated
- /// </summary>
- [XmlElementAttribute(ElementName = "InstanceTenancy")]
- public string InstanceTenancy
- {
- get { return this.instanceTenancyField; }
- set { this.instanceTenancyField = value; }
- }
-
- /// <summary>
- /// Sets the tenancy of the Reserved Instance offering. A Reserved Instance with tenancy of dedicated will run on
- /// single-tenant hardware and can only be launched within a VPC.
- /// </summary>
- /// <param name="instanceTenancy">Instance Tenancy. Valid Values: default | dedicated</param>
- /// <returns>this instance</returns>
- public DescribeReservedInstancesOfferingsRequest WithInstanceTenancy(string instanceTenancy)
- {
- this.instanceTenancyField = instanceTenancy;
- return this;
- }
-
- /// <summary>
- /// Checks if the InstanceTenancy property is set.
- /// </summary>
- /// <returns>true if the InstanceTenancy property is set</returns>
- public bool IsSetInstanceTenancy()
- {
- return !string.IsNullOrEmpty(this.instanceTenancyField);
- }
-
- /// <summary>
- /// Gets and sets the Reserved Instance offering type.
- /// Valid Values: Heavy Utilization | Medium Utilization | Light Utilization
- /// </summary>
- [XmlElementAttribute(ElementName = "OfferingType")]
- public string OfferingType
- {
- get { return this.offeringTypeField; }
- set { this.offeringTypeField = value; }
- }
-
- /// <summary>
- /// Sets the Reserved Instance offering type.
- /// </summary>
- /// <param name="offeringType">Offering type. Valid values: Heavy Utilization | Medium Utilization | Light Utilization</param>
- /// <returns>this instance</returns>
- public DescribeReservedInstancesOfferingsRequest WithOfferingType(string offeringType)
- {
- this.offeringTypeField = offeringType;
- return this;
- }
-
- /// <summary>
- /// Checks if the OfferingType property is set.
- /// </summary>
- /// <returns>true if the OfferingType property is set</returns>
- public bool IsSetOfferingType()
- {
- return !string.IsNullOrEmpty(this.offeringTypeField);
- }
- }
- }