All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cfdsl.ec2.NetworkInterfaceAttachment Maven / Gradle / Ivy

The newest version!
package cfdsl.ec2;

import cfdsl.resource.Resource;
import cfdsl.resource.ResourceBuilder;

/**
 * AWS::EC2::NetworkInterfaceAttachment
 * resource type.
 */
public final class NetworkInterfaceAttachment extends Resource {
    private NetworkInterfaceAttachment(Builder b) {
        super("AWS::EC2::NetworkInterfaceAttachment", b);
    }

    public static Builder between(
            String logicalName,
            Instance instance,
            NetworkInterface networkInterface,
            int deviceIndex) {
        return new Builder(logicalName, instance, networkInterface, deviceIndex);
    }

    public static final class Builder extends ResourceBuilder {
        private Builder(
                String logicalName,
                Instance instance,
                NetworkInterface networkInterface,
                int deviceIndex) {
            super(logicalName);
            addProperty("InstanceId", instance);
            addProperty("NetworkInterfaceId", networkInterface);
            addProperty("DeviceIndex", deviceIndex);
        }

        public Builder deleteOnTermination(boolean deleteOnTermination) {
            addProperty("DeleteOnTermination", deleteOnTermination);
            return this;
        }

        @Override
        public NetworkInterfaceAttachment build() {
            return new NetworkInterfaceAttachment(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy