/*
 * Copyright 2012 AMG.lab, a Bull Group Company
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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.
 */
package org.xlcloud.service.heat.template.resources;

import java.util.List;

import org.xlcloud.service.heat.template.fields.ResourceType;

/**
 * Model of AWS::EC2::Instance
 * 
 * @see <a
 *      href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html">AWS::EC2::Instance</a>
 * @author Tomek Adamczewski, AMG.net
 * @author Piotr Kulasek-Szwed, AMG.net
 */
public class Instance extends ResourceBase {

    private String instanceType;

    private String imageId;

    private String userData;

    private String keyName;

    private String availabilityZone;

    private List<MountPoint> volumes;

    private List<String> securityGroups;

    private List<String> securityGroupIds;

    @Override
    public String getType() {
        return ResourceType.INSTANCE.value();
    }

    @Override
    public ResourceType getResourceType() {
        return ResourceType.INSTANCE;
    }

    /**
     * @return value of {@link #instanceType}
     */
    public String getInstanceType() {
        return instanceType;
    }

    /**
     * Sets the value of {@link #instanceType}
     * 
     * @param instanceType
     */
    public void setInstanceType(String instanceType) {
        this.instanceType = instanceType;
    }

    /**
     * @return value of {@link #imageId}
     */
    public String getImageId() {
        return imageId;
    }

    /**
     * Sets the value of {@link #imageId}
     * 
     * @param imageId
     */
    public void setImageId(String imageId) {
        this.imageId = imageId;
    }

    /**
     * Gets the value of {@link #userData}.
     * 
     * @return value of {@link #userData}
     */
    public String getUserData() {
        return userData;
    }

    /**
     * Sets the value of {@link #userData}.
     * 
     * @param userData
     *            - value
     */
    public void setUserData(String userData) {
        this.userData = userData;
    }

    /**
     * Gets the value of {@link #keyName}.
     * 
     * @return value of {@link #keyName}
     */
    public String getKeyName() {
        return keyName;
    }

    /**
     * Sets the value of {@link #keyName}.
     * 
     * @param keyName
     *            - value
     */
    public void setKeyName(String keyName) {
        this.keyName = keyName;
    }

    /**
     * Gets the value of {@link #availabilityZone}.
     * 
     * @return value of {@link #availabilityZone}
     */
    public String getAvailabilityZone() {
        return availabilityZone;
    }

    /**
     * Sets the value of {@link #availabilityZone}.
     * 
     * @param availabilityZone
     *            - value
     */
    public void setAvailabilityZone(String availabilityZone) {
        this.availabilityZone = availabilityZone;
    }

    /**
     * Gets the value of {@link #volumes}.
     * 
     * @return value of {@link #volumes}
     */
    public List<MountPoint> getVolumes() {
        return volumes;
    }

    /**
     * Sets the value of {@link #volumes}.
     * 
     * @param volumes
     *            - value
     */
    public void setVolumes(List<MountPoint> volumes) {
        this.volumes = volumes;
    }

    /**
     * Gets the value of {@link #securityGroups}.
     * 
     * @return value of {@link #securityGroups}
     */
    public List<String> getSecurityGroups() {
        return securityGroups;
    }

    /**
     * Sets the value of {@link #securityGroups}.
     * 
     * @param securityGroups
     *            - value
     */
    public void setSecurityGroups(List<String> securityGroups) {
        this.securityGroups = securityGroups;
    }

    /**
     * Gets the value of {@link #securityGroupIds}.
     * 
     * @return value of {@link #securityGroupIds}
     */
    public List<String> getSecurityGroupIds() {
        return securityGroupIds;
    }

    /**
     * Sets the value of {@link #securityGroupIds}.
     * 
     * @param securityGroupIds
     *            - value
     */
    public void setSecurityGroupIds(List<String> securityGroupIds) {
        this.securityGroupIds = securityGroupIds;
    }

}
