// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.ec2.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class NetworkInterfaceAttachment {
    private @Nullable String attachmentId;
    /**
     * @return Integer to define the devices index.
     * 
     */
    private Integer deviceIndex;
    /**
     * @return ID of the instance to attach to.
     * 
     */
    private String instance;

    private NetworkInterfaceAttachment() {}
    public Optional<String> attachmentId() {
        return Optional.ofNullable(this.attachmentId);
    }
    /**
     * @return Integer to define the devices index.
     * 
     */
    public Integer deviceIndex() {
        return this.deviceIndex;
    }
    /**
     * @return ID of the instance to attach to.
     * 
     */
    public String instance() {
        return this.instance;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(NetworkInterfaceAttachment defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String attachmentId;
        private Integer deviceIndex;
        private String instance;
        public Builder() {}
        public Builder(NetworkInterfaceAttachment defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.attachmentId = defaults.attachmentId;
    	      this.deviceIndex = defaults.deviceIndex;
    	      this.instance = defaults.instance;
        }

        @CustomType.Setter
        public Builder attachmentId(@Nullable String attachmentId) {
            this.attachmentId = attachmentId;
            return this;
        }
        @CustomType.Setter
        public Builder deviceIndex(Integer deviceIndex) {
            this.deviceIndex = Objects.requireNonNull(deviceIndex);
            return this;
        }
        @CustomType.Setter
        public Builder instance(String instance) {
            this.instance = Objects.requireNonNull(instance);
            return this;
        }
        public NetworkInterfaceAttachment build() {
            final var o = new NetworkInterfaceAttachment();
            o.attachmentId = attachmentId;
            o.deviceIndex = deviceIndex;
            o.instance = instance;
            return o;
        }
    }
}
