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

com.azure.resourcemanager.appplatform.models.DeploymentResourceProperties Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure App Platform Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt

There is a newer version: 2.42.0
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appplatform.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/**
 * Deployment resource properties payload.
 */
@Fluent
public final class DeploymentResourceProperties {
    /*
     * Uploaded source information of the deployment.
     */
    @JsonProperty(value = "source")
    private UserSourceInfo source;

    /*
     * Deployment settings of the Deployment
     */
    @JsonProperty(value = "deploymentSettings")
    private DeploymentSettings deploymentSettings;

    /*
     * Provisioning state of the Deployment
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private DeploymentResourceProvisioningState provisioningState;

    /*
     * Status of the Deployment
     */
    @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
    private DeploymentResourceStatus status;

    /*
     * Indicates whether the Deployment is active
     */
    @JsonProperty(value = "active")
    private Boolean active;

    /*
     * Collection of instances belong to the Deployment
     */
    @JsonProperty(value = "instances", access = JsonProperty.Access.WRITE_ONLY)
    private List instances;

    /**
     * Creates an instance of DeploymentResourceProperties class.
     */
    public DeploymentResourceProperties() {
    }

    /**
     * Get the source property: Uploaded source information of the deployment.
     * 
     * @return the source value.
     */
    public UserSourceInfo source() {
        return this.source;
    }

    /**
     * Set the source property: Uploaded source information of the deployment.
     * 
     * @param source the source value to set.
     * @return the DeploymentResourceProperties object itself.
     */
    public DeploymentResourceProperties withSource(UserSourceInfo source) {
        this.source = source;
        return this;
    }

    /**
     * Get the deploymentSettings property: Deployment settings of the Deployment.
     * 
     * @return the deploymentSettings value.
     */
    public DeploymentSettings deploymentSettings() {
        return this.deploymentSettings;
    }

    /**
     * Set the deploymentSettings property: Deployment settings of the Deployment.
     * 
     * @param deploymentSettings the deploymentSettings value to set.
     * @return the DeploymentResourceProperties object itself.
     */
    public DeploymentResourceProperties withDeploymentSettings(DeploymentSettings deploymentSettings) {
        this.deploymentSettings = deploymentSettings;
        return this;
    }

    /**
     * Get the provisioningState property: Provisioning state of the Deployment.
     * 
     * @return the provisioningState value.
     */
    public DeploymentResourceProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the status property: Status of the Deployment.
     * 
     * @return the status value.
     */
    public DeploymentResourceStatus status() {
        return this.status;
    }

    /**
     * Get the active property: Indicates whether the Deployment is active.
     * 
     * @return the active value.
     */
    public Boolean active() {
        return this.active;
    }

    /**
     * Set the active property: Indicates whether the Deployment is active.
     * 
     * @param active the active value to set.
     * @return the DeploymentResourceProperties object itself.
     */
    public DeploymentResourceProperties withActive(Boolean active) {
        this.active = active;
        return this;
    }

    /**
     * Get the instances property: Collection of instances belong to the Deployment.
     * 
     * @return the instances value.
     */
    public List instances() {
        return this.instances;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (source() != null) {
            source().validate();
        }
        if (deploymentSettings() != null) {
            deploymentSettings().validate();
        }
        if (instances() != null) {
            instances().forEach(e -> e.validate());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy