All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.compute.ImageArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.compute;

import com.pulumi.azurenative.compute.enums.HyperVGenerationTypes;
import com.pulumi.azurenative.compute.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ImageArgs extends com.pulumi.resources.ResourceArgs {

    public static final ImageArgs Empty = new ImageArgs();

    /**
     * The extended location of the Image.
     * 
     */
    @Import(name="extendedLocation")
    private @Nullable Output extendedLocation;

    /**
     * @return The extended location of the Image.
     * 
     */
    public Optional> extendedLocation() {
        return Optional.ofNullable(this.extendedLocation);
    }

    /**
     * Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
     * 
     */
    @Import(name="hyperVGeneration")
    private @Nullable Output> hyperVGeneration;

    /**
     * @return Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
     * 
     */
    public Optional>> hyperVGeneration() {
        return Optional.ofNullable(this.hyperVGeneration);
    }

    /**
     * The name of the image.
     * 
     */
    @Import(name="imageName")
    private @Nullable Output imageName;

    /**
     * @return The name of the image.
     * 
     */
    public Optional> imageName() {
        return Optional.ofNullable(this.imageName);
    }

    /**
     * Resource location
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Resource location
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The name of the resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The source virtual machine from which Image is created.
     * 
     */
    @Import(name="sourceVirtualMachine")
    private @Nullable Output sourceVirtualMachine;

    /**
     * @return The source virtual machine from which Image is created.
     * 
     */
    public Optional> sourceVirtualMachine() {
        return Optional.ofNullable(this.sourceVirtualMachine);
    }

    /**
     * Specifies the storage settings for the virtual machine disks.
     * 
     */
    @Import(name="storageProfile")
    private @Nullable Output storageProfile;

    /**
     * @return Specifies the storage settings for the virtual machine disks.
     * 
     */
    public Optional> storageProfile() {
        return Optional.ofNullable(this.storageProfile);
    }

    /**
     * Resource tags
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private ImageArgs() {}

    private ImageArgs(ImageArgs $) {
        this.extendedLocation = $.extendedLocation;
        this.hyperVGeneration = $.hyperVGeneration;
        this.imageName = $.imageName;
        this.location = $.location;
        this.resourceGroupName = $.resourceGroupName;
        this.sourceVirtualMachine = $.sourceVirtualMachine;
        this.storageProfile = $.storageProfile;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private ImageArgs $;

        public Builder() {
            $ = new ImageArgs();
        }

        public Builder(ImageArgs defaults) {
            $ = new ImageArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param extendedLocation The extended location of the Image.
         * 
         * @return builder
         * 
         */
        public Builder extendedLocation(@Nullable Output extendedLocation) {
            $.extendedLocation = extendedLocation;
            return this;
        }

        /**
         * @param extendedLocation The extended location of the Image.
         * 
         * @return builder
         * 
         */
        public Builder extendedLocation(ExtendedLocationArgs extendedLocation) {
            return extendedLocation(Output.of(extendedLocation));
        }

        /**
         * @param hyperVGeneration Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
         * 
         * @return builder
         * 
         */
        public Builder hyperVGeneration(@Nullable Output> hyperVGeneration) {
            $.hyperVGeneration = hyperVGeneration;
            return this;
        }

        /**
         * @param hyperVGeneration Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
         * 
         * @return builder
         * 
         */
        public Builder hyperVGeneration(Either hyperVGeneration) {
            return hyperVGeneration(Output.of(hyperVGeneration));
        }

        /**
         * @param hyperVGeneration Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
         * 
         * @return builder
         * 
         */
        public Builder hyperVGeneration(String hyperVGeneration) {
            return hyperVGeneration(Either.ofLeft(hyperVGeneration));
        }

        /**
         * @param hyperVGeneration Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
         * 
         * @return builder
         * 
         */
        public Builder hyperVGeneration(HyperVGenerationTypes hyperVGeneration) {
            return hyperVGeneration(Either.ofRight(hyperVGeneration));
        }

        /**
         * @param imageName The name of the image.
         * 
         * @return builder
         * 
         */
        public Builder imageName(@Nullable Output imageName) {
            $.imageName = imageName;
            return this;
        }

        /**
         * @param imageName The name of the image.
         * 
         * @return builder
         * 
         */
        public Builder imageName(String imageName) {
            return imageName(Output.of(imageName));
        }

        /**
         * @param location Resource location
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Resource location
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param sourceVirtualMachine The source virtual machine from which Image is created.
         * 
         * @return builder
         * 
         */
        public Builder sourceVirtualMachine(@Nullable Output sourceVirtualMachine) {
            $.sourceVirtualMachine = sourceVirtualMachine;
            return this;
        }

        /**
         * @param sourceVirtualMachine The source virtual machine from which Image is created.
         * 
         * @return builder
         * 
         */
        public Builder sourceVirtualMachine(SubResourceArgs sourceVirtualMachine) {
            return sourceVirtualMachine(Output.of(sourceVirtualMachine));
        }

        /**
         * @param storageProfile Specifies the storage settings for the virtual machine disks.
         * 
         * @return builder
         * 
         */
        public Builder storageProfile(@Nullable Output storageProfile) {
            $.storageProfile = storageProfile;
            return this;
        }

        /**
         * @param storageProfile Specifies the storage settings for the virtual machine disks.
         * 
         * @return builder
         * 
         */
        public Builder storageProfile(ImageStorageProfileArgs storageProfile) {
            return storageProfile(Output.of(storageProfile));
        }

        /**
         * @param tags Resource tags
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public ImageArgs build() {
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ImageArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy