// *** 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.gcp.compute.outputs;

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

@CustomType
public final class RegionNetworkEndpointGroupAppEngine {
    /**
     * @return Optional serving service.
     * The service name must be 1-63 characters long, and comply with RFC1035.
     * Example value: &#34;default&#34;, &#34;my-service&#34;.
     * 
     */
    private @Nullable String service;
    /**
     * @return A template to parse service and version fields from a request URL.
     * URL mask allows for routing to multiple App Engine services without
     * having to create multiple Network Endpoint Groups and backend services.
     * For example, the request URLs &#34;foo1-dot-appname.appspot.com/v1&#34; and
     * &#34;foo1-dot-appname.appspot.com/v2&#34; can be backed by the same Serverless NEG with
     * URL mask &#34;-dot-appname.appspot.com/&#34;. The URL mask will parse
     * them to { service = &#34;foo1&#34;, version = &#34;v1&#34; } and { service = &#34;foo1&#34;, version = &#34;v2&#34; } respectively.
     * 
     */
    private @Nullable String urlMask;
    /**
     * @return Optional serving version.
     * The version must be 1-63 characters long, and comply with RFC1035.
     * Example value: &#34;v1&#34;, &#34;v2&#34;.
     * 
     */
    private @Nullable String version;

    private RegionNetworkEndpointGroupAppEngine() {}
    /**
     * @return Optional serving service.
     * The service name must be 1-63 characters long, and comply with RFC1035.
     * Example value: &#34;default&#34;, &#34;my-service&#34;.
     * 
     */
    public Optional<String> service() {
        return Optional.ofNullable(this.service);
    }
    /**
     * @return A template to parse service and version fields from a request URL.
     * URL mask allows for routing to multiple App Engine services without
     * having to create multiple Network Endpoint Groups and backend services.
     * For example, the request URLs &#34;foo1-dot-appname.appspot.com/v1&#34; and
     * &#34;foo1-dot-appname.appspot.com/v2&#34; can be backed by the same Serverless NEG with
     * URL mask &#34;-dot-appname.appspot.com/&#34;. The URL mask will parse
     * them to { service = &#34;foo1&#34;, version = &#34;v1&#34; } and { service = &#34;foo1&#34;, version = &#34;v2&#34; } respectively.
     * 
     */
    public Optional<String> urlMask() {
        return Optional.ofNullable(this.urlMask);
    }
    /**
     * @return Optional serving version.
     * The version must be 1-63 characters long, and comply with RFC1035.
     * Example value: &#34;v1&#34;, &#34;v2&#34;.
     * 
     */
    public Optional<String> version() {
        return Optional.ofNullable(this.version);
    }

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

    public static Builder builder(RegionNetworkEndpointGroupAppEngine defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String service;
        private @Nullable String urlMask;
        private @Nullable String version;
        public Builder() {}
        public Builder(RegionNetworkEndpointGroupAppEngine defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.service = defaults.service;
    	      this.urlMask = defaults.urlMask;
    	      this.version = defaults.version;
        }

        @CustomType.Setter
        public Builder service(@Nullable String service) {
            this.service = service;
            return this;
        }
        @CustomType.Setter
        public Builder urlMask(@Nullable String urlMask) {
            this.urlMask = urlMask;
            return this;
        }
        @CustomType.Setter
        public Builder version(@Nullable String version) {
            this.version = version;
            return this;
        }
        public RegionNetworkEndpointGroupAppEngine build() {
            final var o = new RegionNetworkEndpointGroupAppEngine();
            o.service = service;
            o.urlMask = urlMask;
            o.version = version;
            return o;
        }
    }
}
