/*
 * Copyright 2014 Click Travel Ltd
 *
 * 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 com.clicktravel.cheddar.system.event;

/*
 * System event to indicate that a termination request has been received for an EC2 instance of an application
 */
public class ApplicationEC2InstanceTerminationRequestedEvent extends AbstractSystemEvent {

    private String ec2InstanceId;

    public String getEc2InstanceId() {
        return ec2InstanceId;
    }

    public void setEc2InstanceId(final String ec2InstanceId) {
        this.ec2InstanceId = ec2InstanceId;
    }

    @Override
    public String toString() {
        return "ApplicationEC2InstanceTerminationRequestedEvent [ec2InstanceId=" + ec2InstanceId
                + ", getEc2InstanceId()=" + getEc2InstanceId() + ", type()=" + type() + ", getTargetApplicationName()="
                + getTargetApplicationName() + ", getTargetApplicationVersion()=" + getTargetApplicationVersion() + "]";
    }

}

@@ -1072,24 +1072,889 @@
 eId;%0A    %7D%0A%0A
+    @Override%0A    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = 1;%0A        result = prime * result + ((ec2InstanceId == null) ? 0 : ec2InstanceId.hashCode());%0A        return result;%0A    %7D%0A%0A    @Override%0A    public boolean equals(final Object obj) %7B%0A        if (this == obj) %7B%0A            return true;%0A        %7D%0A        if (obj == null) %7B%0A            return false;%0A        %7D%0A        if (getClass() != obj.getClass()) %7B%0A            return false;%0A        %7D%0A        final ApplicationEC2InstanceTerminationRequestedEvent other = (ApplicationEC2InstanceTerminationRequestedEvent) obj;%0A        if (ec2InstanceId == null) %7B%0A            if (other.ec2InstanceId != null) %7B%0A                return false;%0A            %7D%0A        %7D else if (!ec2InstanceId.equals(other.ec2InstanceId)) %7B%0A            return false;%0A        %7D%0A        return true;%0A    %7D%0A%0A
     @Overrid

Add hashCode and equals for ApplicationEC2InstanceTerminationRequestedEvent