sdk/java/src/main/java/com/pulumi/ovh/Dedicated/ServerRebootTask.java
// *** 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.ovh.Dedicated;

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.ovh.Dedicated.ServerRebootTaskArgs;
import com.pulumi.ovh.Dedicated.inputs.ServerRebootTaskState;
import com.pulumi.ovh.Utilities;
import java.lang.String;
import java.util.List;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.ovh.Dedicated.DedicatedFunctions;
 * import com.pulumi.ovh.Dedicated.inputs.GetServerBootsArgs;
 * import com.pulumi.ovh.Dedicated.ServerUpdate;
 * import com.pulumi.ovh.Dedicated.ServerUpdateArgs;
 * import com.pulumi.ovh.Dedicated.ServerRebootTask;
 * import com.pulumi.ovh.Dedicated.ServerRebootTaskArgs;
 * 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) {
 *         final var rescue = DedicatedFunctions.getServerBoots(GetServerBootsArgs.builder()
 *             .serviceName(&#34;nsxxxxxxx.ip-xx-xx-xx.eu&#34;)
 *             .bootType(&#34;rescue&#34;)
 *             .kernel(&#34;rescue64-pro&#34;)
 *             .build());
 * 
 *         var serverOnRescue = new ServerUpdate(&#34;serverOnRescue&#34;, ServerUpdateArgs.builder()        
 *             .serviceName(&#34;nsxxxxxxx.ip-xx-xx-xx.eu&#34;)
 *             .bootId(rescue.applyValue(getServerBootsResult -&gt; getServerBootsResult.results()[0]))
 *             .monitoring(true)
 *             .state(&#34;ok&#34;)
 *             .build());
 * 
 *         var serverReboot = new ServerRebootTask(&#34;serverReboot&#34;, ServerRebootTaskArgs.builder()        
 *             .serviceName(rescue.applyValue(getServerBootsResult -&gt; getServerBootsResult.serviceName()))
 *             .keepers(serverOnRescue.bootId())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 */
@ResourceType(type="ovh:Dedicated/serverRebootTask:ServerRebootTask")
public class ServerRebootTask extends com.pulumi.resources.CustomResource {
    /**
     * Details of this task. (should be `Reboot asked`)
     * 
     */
    @Export(name="comment", refs={String.class}, tree="[0]")
    private Output<String> comment;

    /**
     * @return Details of this task. (should be `Reboot asked`)
     * 
     */
    public Output<String> comment() {
        return this.comment;
    }
    /**
     * Completion date in RFC3339 format.
     * 
     */
    @Export(name="doneDate", refs={String.class}, tree="[0]")
    private Output<String> doneDate;

    /**
     * @return Completion date in RFC3339 format.
     * 
     */
    public Output<String> doneDate() {
        return this.doneDate;
    }
    /**
     * Function name (should be `hardReboot`).
     * 
     */
    @Export(name="function", refs={String.class}, tree="[0]")
    private Output<String> function;

    /**
     * @return Function name (should be `hardReboot`).
     * 
     */
    public Output<String> function() {
        return this.function;
    }
    /**
     * List of values tracked to trigger reboot, used also to form implicit dependencies.
     * 
     */
    @Export(name="keepers", refs={List.class,String.class}, tree="[0,1]")
    private Output<List<String>> keepers;

    /**
     * @return List of values tracked to trigger reboot, used also to form implicit dependencies.
     * 
     */
    public Output<List<String>> keepers() {
        return this.keepers;
    }
    /**
     * Last update in RFC3339 format.
     * 
     */
    @Export(name="lastUpdate", refs={String.class}, tree="[0]")
    private Output<String> lastUpdate;

    /**
     * @return Last update in RFC3339 format.
     * 
     */
    public Output<String> lastUpdate() {
        return this.lastUpdate;
    }
    /**
     * The service_name of your dedicated server.
     * 
     */
    @Export(name="serviceName", refs={String.class}, tree="[0]")
    private Output<String> serviceName;

    /**
     * @return The service_name of your dedicated server.
     * 
     */
    public Output<String> serviceName() {
        return this.serviceName;
    }
    /**
     * Task creation date in RFC3339 format.
     * 
     */
    @Export(name="startDate", refs={String.class}, tree="[0]")
    private Output<String> startDate;

    /**
     * @return Task creation date in RFC3339 format.
     * 
     */
    public Output<String> startDate() {
        return this.startDate;
    }
    /**
     * Task status (should be `done`)
     * 
     */
    @Export(name="status", refs={String.class}, tree="[0]")
    private Output<String> status;

    /**
     * @return Task status (should be `done`)
     * 
     */
    public Output<String> status() {
        return this.status;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public ServerRebootTask(String name) {
        this(name, ServerRebootTaskArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public ServerRebootTask(String name, ServerRebootTaskArgs 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 ServerRebootTask(String name, ServerRebootTaskArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("ovh:Dedicated/serverRebootTask:ServerRebootTask", name, args == null ? ServerRebootTaskArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private ServerRebootTask(String name, Output<String> id, @Nullable ServerRebootTaskState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("ovh:Dedicated/serverRebootTask:ServerRebootTask", 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 ServerRebootTask get(String name, Output<String> id, @Nullable ServerRebootTaskState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new ServerRebootTask(name, id, state, options);
    }
}
