// *** 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.appmesh.inputs;

import com.pulumi.aws.appmesh.inputs.GatewayRouteSpecHttp2RouteActionTargetVirtualServiceArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class GatewayRouteSpecHttp2RouteActionTargetArgs extends com.pulumi.resources.ResourceArgs {

    public static final GatewayRouteSpecHttp2RouteActionTargetArgs Empty = new GatewayRouteSpecHttp2RouteActionTargetArgs();

    /**
     * The port number that corresponds to the target for Virtual Service provider port. This is required when the provider (router or node) of the Virtual Service has multiple listeners.
     * 
     */
    @Import(name="port")
    private @Nullable Output<Integer> port;

    /**
     * @return The port number that corresponds to the target for Virtual Service provider port. This is required when the provider (router or node) of the Virtual Service has multiple listeners.
     * 
     */
    public Optional<Output<Integer>> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * Virtual service gateway route target.
     * 
     */
    @Import(name="virtualService", required=true)
    private Output<GatewayRouteSpecHttp2RouteActionTargetVirtualServiceArgs> virtualService;

    /**
     * @return Virtual service gateway route target.
     * 
     */
    public Output<GatewayRouteSpecHttp2RouteActionTargetVirtualServiceArgs> virtualService() {
        return this.virtualService;
    }

    private GatewayRouteSpecHttp2RouteActionTargetArgs() {}

    private GatewayRouteSpecHttp2RouteActionTargetArgs(GatewayRouteSpecHttp2RouteActionTargetArgs $) {
        this.port = $.port;
        this.virtualService = $.virtualService;
    }

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

    public static final class Builder {
        private GatewayRouteSpecHttp2RouteActionTargetArgs $;

        public Builder() {
            $ = new GatewayRouteSpecHttp2RouteActionTargetArgs();
        }

        public Builder(GatewayRouteSpecHttp2RouteActionTargetArgs defaults) {
            $ = new GatewayRouteSpecHttp2RouteActionTargetArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param port The port number that corresponds to the target for Virtual Service provider port. This is required when the provider (router or node) of the Virtual Service has multiple listeners.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output<Integer> port) {
            $.port = port;
            return this;
        }

        /**
         * @param port The port number that corresponds to the target for Virtual Service provider port. This is required when the provider (router or node) of the Virtual Service has multiple listeners.
         * 
         * @return builder
         * 
         */
        public Builder port(Integer port) {
            return port(Output.of(port));
        }

        /**
         * @param virtualService Virtual service gateway route target.
         * 
         * @return builder
         * 
         */
        public Builder virtualService(Output<GatewayRouteSpecHttp2RouteActionTargetVirtualServiceArgs> virtualService) {
            $.virtualService = virtualService;
            return this;
        }

        /**
         * @param virtualService Virtual service gateway route target.
         * 
         * @return builder
         * 
         */
        public Builder virtualService(GatewayRouteSpecHttp2RouteActionTargetVirtualServiceArgs virtualService) {
            return virtualService(Output.of(virtualService));
        }

        public GatewayRouteSpecHttp2RouteActionTargetArgs build() {
            $.virtualService = Objects.requireNonNull($.virtualService, "expected parameter 'virtualService' to be non-null");
            return $;
        }
    }

}
