sdk/java/src/main/java/com/pulumi/ovh/CloudProject/Project.java
<reponame>lbrlabs/pulumi-ovh<filename>sdk/java/src/main/java/com/pulumi/ovh/CloudProject/Project.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.CloudProject;

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.CloudProject.ProjectArgs;
import com.pulumi.ovh.CloudProject.inputs.ProjectState;
import com.pulumi.ovh.CloudProject.outputs.ProjectOrder;
import com.pulumi.ovh.CloudProject.outputs.ProjectPlan;
import com.pulumi.ovh.CloudProject.outputs.ProjectPlanOption;
import com.pulumi.ovh.Utilities;
import java.lang.String;
import java.util.List;
import java.util.Optional;
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.Order.OrderFunctions;
 * import com.pulumi.ovh.Order.inputs.GetCartArgs;
 * import com.pulumi.ovh.Order.inputs.GetCartProductPlanArgs;
 * import com.pulumi.ovh.CloudProject.Project;
 * import com.pulumi.ovh.CloudProject.ProjectArgs;
 * import com.pulumi.ovh.CloudProject.inputs.ProjectPlanArgs;
 * 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 mycart = OrderFunctions.getCart(GetCartArgs.builder()
 *             .ovhSubsidiary(&#34;fr&#34;)
 *             .description(&#34;my cloud order cart&#34;)
 *             .build());
 * 
 *         final var cloud = OrderFunctions.getCartProductPlan(GetCartProductPlanArgs.builder()
 *             .cartId(mycart.applyValue(getCartResult -&gt; getCartResult.id()))
 *             .priceCapacity(&#34;renew&#34;)
 *             .product(&#34;cloud&#34;)
 *             .planCode(&#34;project.2018&#34;)
 *             .build());
 * 
 *         var myCloudProject = new Project(&#34;myCloudProject&#34;, ProjectArgs.builder()        
 *             .ovhSubsidiary(mycart.applyValue(getCartResult -&gt; getCartResult.ovhSubsidiary()))
 *             .description(&#34;my cloud project&#34;)
 *             .plan(ProjectPlanArgs.builder()
 *                 .duration(cloud.applyValue(getCartProductPlanResult -&gt; getCartProductPlanResult.selectedPrices()[0].duration()))
 *                 .planCode(cloud.applyValue(getCartProductPlanResult -&gt; getCartProductPlanResult.planCode()))
 *                 .pricingMode(cloud.applyValue(getCartProductPlanResult -&gt; getCartProductPlanResult.selectedPrices()[0].pricingMode()))
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Cloud project can be imported using the `order_id` that can be retrieved in the [order page](https://www.ovh.com/manager/#/dedicated/billing/orders/orders) at the creation time of the Public Cloud project.
 * 
 * bash
 * 
 * ```sh
 *  $ pulumi import ovh:CloudProject/project:Project my_cloud_project order_id
 * ```
 * 
 */
@ResourceType(type="ovh:CloudProject/project:Project")
public class Project extends com.pulumi.resources.CustomResource {
    @Export(name="access", refs={String.class}, tree="[0]")
    private Output<String> access;

    public Output<String> access() {
        return this.access;
    }
    /**
     * A description associated with the user.
     * 
     */
    @Export(name="description", refs={String.class}, tree="[0]")
    private Output<String> description;

    /**
     * @return A description associated with the user.
     * 
     */
    public Output<String> description() {
        return this.description;
    }
    /**
     * Details about the order that was used to create the public cloud project
     * 
     */
    @Export(name="orders", refs={List.class,ProjectOrder.class}, tree="[0,1]")
    private Output<List<ProjectOrder>> orders;

    /**
     * @return Details about the order that was used to create the public cloud project
     * 
     */
    public Output<List<ProjectOrder>> orders() {
        return this.orders;
    }
    /**
     * OVHcloud Subsidiary
     * 
     */
    @Export(name="ovhSubsidiary", refs={String.class}, tree="[0]")
    private Output<String> ovhSubsidiary;

    /**
     * @return OVHcloud Subsidiary
     * 
     */
    public Output<String> ovhSubsidiary() {
        return this.ovhSubsidiary;
    }
    /**
     * Ovh payment mode
     * 
     * @deprecated
     * This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.
     * 
     */
    @Deprecated /* This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used. */
    @Export(name="paymentMean", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> paymentMean;

    /**
     * @return Ovh payment mode
     * 
     */
    public Output<Optional<String>> paymentMean() {
        return Codegen.optional(this.paymentMean);
    }
    /**
     * Product Plan to order
     * 
     */
    @Export(name="plan", refs={ProjectPlan.class}, tree="[0]")
    private Output<ProjectPlan> plan;

    /**
     * @return Product Plan to order
     * 
     */
    public Output<ProjectPlan> plan() {
        return this.plan;
    }
    /**
     * Product Plan to order
     * 
     */
    @Export(name="planOptions", refs={List.class,ProjectPlanOption.class}, tree="[0,1]")
    private Output</* @Nullable */ List<ProjectPlanOption>> planOptions;

    /**
     * @return Product Plan to order
     * 
     */
    public Output<Optional<List<ProjectPlanOption>>> planOptions() {
        return Codegen.optional(this.planOptions);
    }
    /**
     * openstack project id
     * 
     */
    @Export(name="projectId", refs={String.class}, tree="[0]")
    private Output<String> projectId;

    /**
     * @return openstack project id
     * 
     */
    public Output<String> projectId() {
        return this.projectId;
    }
    /**
     * openstack project name
     * 
     */
    @Export(name="projectName", refs={String.class}, tree="[0]")
    private Output<String> projectName;

    /**
     * @return openstack project name
     * 
     */
    public Output<String> projectName() {
        return this.projectName;
    }
    /**
     * project status
     * 
     */
    @Export(name="status", refs={String.class}, tree="[0]")
    private Output<String> status;

    /**
     * @return project status
     * 
     */
    public Output<String> status() {
        return this.status;
    }

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

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