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

com.pulumi.azurenative.compute.outputs.CloudServiceExtensionPropertiesResponse Maven / Gradle / Ivy

There is a newer version: 2.82.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.outputs;

import com.pulumi.azurenative.compute.outputs.CloudServiceVaultAndSecretReferenceResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class CloudServiceExtensionPropertiesResponse {
    /**
     * @return Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available.
     * 
     */
    private @Nullable Boolean autoUpgradeMinorVersion;
    /**
     * @return Tag to force apply the provided public and protected settings.
     * Changing the tag value allows for re-running the extension without changing any of the public or protected settings.
     * If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler.
     * If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and
     * it is up to handler implementation whether to re-run it or not
     * 
     */
    private @Nullable String forceUpdateTag;
    /**
     * @return Protected settings for the extension which are encrypted before sent to the role instance.
     * 
     */
    private @Nullable Object protectedSettings;
    /**
     * @return Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance.
     * 
     */
    private @Nullable CloudServiceVaultAndSecretReferenceResponse protectedSettingsFromKeyVault;
    /**
     * @return The provisioning state, which only appears in the response.
     * 
     */
    private String provisioningState;
    /**
     * @return The name of the extension handler publisher.
     * 
     */
    private @Nullable String publisher;
    /**
     * @return Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service.
     * 
     */
    private @Nullable List rolesAppliedTo;
    /**
     * @return Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension.
     * 
     */
    private @Nullable Object settings;
    /**
     * @return Specifies the type of the extension.
     * 
     */
    private @Nullable String type;
    /**
     * @return Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance.
     * 
     */
    private @Nullable String typeHandlerVersion;

    private CloudServiceExtensionPropertiesResponse() {}
    /**
     * @return Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available.
     * 
     */
    public Optional autoUpgradeMinorVersion() {
        return Optional.ofNullable(this.autoUpgradeMinorVersion);
    }
    /**
     * @return Tag to force apply the provided public and protected settings.
     * Changing the tag value allows for re-running the extension without changing any of the public or protected settings.
     * If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler.
     * If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and
     * it is up to handler implementation whether to re-run it or not
     * 
     */
    public Optional forceUpdateTag() {
        return Optional.ofNullable(this.forceUpdateTag);
    }
    /**
     * @return Protected settings for the extension which are encrypted before sent to the role instance.
     * 
     */
    public Optional protectedSettings() {
        return Optional.ofNullable(this.protectedSettings);
    }
    /**
     * @return Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance.
     * 
     */
    public Optional protectedSettingsFromKeyVault() {
        return Optional.ofNullable(this.protectedSettingsFromKeyVault);
    }
    /**
     * @return The provisioning state, which only appears in the response.
     * 
     */
    public String provisioningState() {
        return this.provisioningState;
    }
    /**
     * @return The name of the extension handler publisher.
     * 
     */
    public Optional publisher() {
        return Optional.ofNullable(this.publisher);
    }
    /**
     * @return Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service.
     * 
     */
    public List rolesAppliedTo() {
        return this.rolesAppliedTo == null ? List.of() : this.rolesAppliedTo;
    }
    /**
     * @return Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension.
     * 
     */
    public Optional settings() {
        return Optional.ofNullable(this.settings);
    }
    /**
     * @return Specifies the type of the extension.
     * 
     */
    public Optional type() {
        return Optional.ofNullable(this.type);
    }
    /**
     * @return Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance.
     * 
     */
    public Optional typeHandlerVersion() {
        return Optional.ofNullable(this.typeHandlerVersion);
    }

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

    public static Builder builder(CloudServiceExtensionPropertiesResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean autoUpgradeMinorVersion;
        private @Nullable String forceUpdateTag;
        private @Nullable Object protectedSettings;
        private @Nullable CloudServiceVaultAndSecretReferenceResponse protectedSettingsFromKeyVault;
        private String provisioningState;
        private @Nullable String publisher;
        private @Nullable List rolesAppliedTo;
        private @Nullable Object settings;
        private @Nullable String type;
        private @Nullable String typeHandlerVersion;
        public Builder() {}
        public Builder(CloudServiceExtensionPropertiesResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.autoUpgradeMinorVersion = defaults.autoUpgradeMinorVersion;
    	      this.forceUpdateTag = defaults.forceUpdateTag;
    	      this.protectedSettings = defaults.protectedSettings;
    	      this.protectedSettingsFromKeyVault = defaults.protectedSettingsFromKeyVault;
    	      this.provisioningState = defaults.provisioningState;
    	      this.publisher = defaults.publisher;
    	      this.rolesAppliedTo = defaults.rolesAppliedTo;
    	      this.settings = defaults.settings;
    	      this.type = defaults.type;
    	      this.typeHandlerVersion = defaults.typeHandlerVersion;
        }

        @CustomType.Setter
        public Builder autoUpgradeMinorVersion(@Nullable Boolean autoUpgradeMinorVersion) {

            this.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
            return this;
        }
        @CustomType.Setter
        public Builder forceUpdateTag(@Nullable String forceUpdateTag) {

            this.forceUpdateTag = forceUpdateTag;
            return this;
        }
        @CustomType.Setter
        public Builder protectedSettings(@Nullable Object protectedSettings) {

            this.protectedSettings = protectedSettings;
            return this;
        }
        @CustomType.Setter
        public Builder protectedSettingsFromKeyVault(@Nullable CloudServiceVaultAndSecretReferenceResponse protectedSettingsFromKeyVault) {

            this.protectedSettingsFromKeyVault = protectedSettingsFromKeyVault;
            return this;
        }
        @CustomType.Setter
        public Builder provisioningState(String provisioningState) {
            if (provisioningState == null) {
              throw new MissingRequiredPropertyException("CloudServiceExtensionPropertiesResponse", "provisioningState");
            }
            this.provisioningState = provisioningState;
            return this;
        }
        @CustomType.Setter
        public Builder publisher(@Nullable String publisher) {

            this.publisher = publisher;
            return this;
        }
        @CustomType.Setter
        public Builder rolesAppliedTo(@Nullable List rolesAppliedTo) {

            this.rolesAppliedTo = rolesAppliedTo;
            return this;
        }
        public Builder rolesAppliedTo(String... rolesAppliedTo) {
            return rolesAppliedTo(List.of(rolesAppliedTo));
        }
        @CustomType.Setter
        public Builder settings(@Nullable Object settings) {

            this.settings = settings;
            return this;
        }
        @CustomType.Setter
        public Builder type(@Nullable String type) {

            this.type = type;
            return this;
        }
        @CustomType.Setter
        public Builder typeHandlerVersion(@Nullable String typeHandlerVersion) {

            this.typeHandlerVersion = typeHandlerVersion;
            return this;
        }
        public CloudServiceExtensionPropertiesResponse build() {
            final var _resultValue = new CloudServiceExtensionPropertiesResponse();
            _resultValue.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
            _resultValue.forceUpdateTag = forceUpdateTag;
            _resultValue.protectedSettings = protectedSettings;
            _resultValue.protectedSettingsFromKeyVault = protectedSettingsFromKeyVault;
            _resultValue.provisioningState = provisioningState;
            _resultValue.publisher = publisher;
            _resultValue.rolesAppliedTo = rolesAppliedTo;
            _resultValue.settings = settings;
            _resultValue.type = type;
            _resultValue.typeHandlerVersion = typeHandlerVersion;
            return _resultValue;
        }
    }
}