// *** 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.networkservices.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 EdgeCacheOriginOriginOverrideActionUrlRewrite {
    /**
     * @return Prior to forwarding the request to the selected
     * origin, the request&#39;s host header is replaced with
     * contents of the hostRewrite.
     * This value must be between 1 and 255 characters.
     * 
     */
    private @Nullable String hostRewrite;

    private EdgeCacheOriginOriginOverrideActionUrlRewrite() {}
    /**
     * @return Prior to forwarding the request to the selected
     * origin, the request&#39;s host header is replaced with
     * contents of the hostRewrite.
     * This value must be between 1 and 255 characters.
     * 
     */
    public Optional<String> hostRewrite() {
        return Optional.ofNullable(this.hostRewrite);
    }

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

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

        @CustomType.Setter
        public Builder hostRewrite(@Nullable String hostRewrite) {
            this.hostRewrite = hostRewrite;
            return this;
        }
        public EdgeCacheOriginOriginOverrideActionUrlRewrite build() {
            final var o = new EdgeCacheOriginOriginOverrideActionUrlRewrite();
            o.hostRewrite = hostRewrite;
            return o;
        }
    }
}
