// *** 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;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gcp.Utilities;
import com.pulumi.gcp.compute.PublicAdvertisedPrefixArgs;
import com.pulumi.gcp.compute.inputs.PublicAdvertisedPrefixState;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Represents a PublicAdvertisedPrefix for use with bring your own IP addresses (BYOIP).
 * 
 * To get more information about PublicAdvertisedPrefix, see:
 * 
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/publicAdvertisedPrefixes)
 * * How-to Guides
 *     * [Using bring your own IP](https://cloud.google.com/vpc/docs/using-bring-your-own-ip)
 * 
 * ## Example Usage
 * ### Public Advertised Prefixes Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.PublicAdvertisedPrefix;
 * import com.pulumi.gcp.compute.PublicAdvertisedPrefixArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var prefixes = new PublicAdvertisedPrefix(&#34;prefixes&#34;, PublicAdvertisedPrefixArgs.builder()        
 *             .description(&#34;description&#34;)
 *             .dnsVerificationIp(&#34;127.127.0.0&#34;)
 *             .ipCidrRange(&#34;127.127.0.0/16&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * PublicAdvertisedPrefix can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix default projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix default {{project}}/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix default {{name}}
 * ```
 * 
 */
@ResourceType(type="gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix")
public class PublicAdvertisedPrefix extends com.pulumi.resources.CustomResource {
    /**
     * An optional description of this resource.
     * 
     */
    @Export(name="description", type=String.class, parameters={})
    private Output</* @Nullable */ String> description;

    /**
     * @return An optional description of this resource.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * The IPv4 address to be used for reverse DNS verification.
     * 
     */
    @Export(name="dnsVerificationIp", type=String.class, parameters={})
    private Output<String> dnsVerificationIp;

    /**
     * @return The IPv4 address to be used for reverse DNS verification.
     * 
     */
    public Output<String> dnsVerificationIp() {
        return this.dnsVerificationIp;
    }
    /**
     * The IPv4 address range, in CIDR format, represented by this public advertised prefix.
     * 
     * ***
     * 
     */
    @Export(name="ipCidrRange", type=String.class, parameters={})
    private Output<String> ipCidrRange;

    /**
     * @return The IPv4 address range, in CIDR format, represented by this public advertised prefix.
     * 
     * ***
     * 
     */
    public Output<String> ipCidrRange() {
        return this.ipCidrRange;
    }
    /**
     * Name of the resource. The name must be 1-63 characters long, and
     * comply with RFC1035. Specifically, the name must be 1-63 characters
     * long and match the regular expression `a-z?`
     * which means the first character must be a lowercase letter, and all
     * following characters must be a dash, lowercase letter, or digit,
     * except the last character, which cannot be a dash.
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return Name of the resource. The name must be 1-63 characters long, and
     * comply with RFC1035. Specifically, the name must be 1-63 characters
     * long and match the regular expression `a-z?`
     * which means the first character must be a lowercase letter, and all
     * following characters must be a dash, lowercase letter, or digit,
     * except the last character, which cannot be a dash.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Export(name="project", type=String.class, parameters={})
    private Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Output<String> project() {
        return this.project;
    }
    /**
     * The URI of the created resource.
     * 
     */
    @Export(name="selfLink", type=String.class, parameters={})
    private Output<String> selfLink;

    /**
     * @return The URI of the created resource.
     * 
     */
    public Output<String> selfLink() {
        return this.selfLink;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public PublicAdvertisedPrefix(String name) {
        this(name, PublicAdvertisedPrefixArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public PublicAdvertisedPrefix(String name, PublicAdvertisedPrefixArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public PublicAdvertisedPrefix(String name, PublicAdvertisedPrefixArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix", name, args == null ? PublicAdvertisedPrefixArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private PublicAdvertisedPrefix(String name, Output<String> id, @Nullable PublicAdvertisedPrefixState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static PublicAdvertisedPrefix get(String name, Output<String> id, @Nullable PublicAdvertisedPrefixState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new PublicAdvertisedPrefix(name, id, state, options);
    }
}
