// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.securityinsights.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Information regarding a deployment. */
@Fluent
public final class DeploymentInfo {
    /*
     * Status while fetching the last deployment.
     */
    @JsonProperty(value = "deploymentFetchStatus")
    private DeploymentFetchStatus deploymentFetchStatus;

    /*
     * Deployment information.
     */
    @JsonProperty(value = "deployment")
    private Deployment deployment;

    /*
     * Additional details about the deployment that can be shown to the user.
     */
    @JsonProperty(value = "message")
    private String message;

    /**
     * Get the deploymentFetchStatus property: Status while fetching the last deployment.
     *
     * @return the deploymentFetchStatus value.
     */
    public DeploymentFetchStatus deploymentFetchStatus() {
        return this.deploymentFetchStatus;
    }

    /**
     * Set the deploymentFetchStatus property: Status while fetching the last deployment.
     *
     * @param deploymentFetchStatus the deploymentFetchStatus value to set.
     * @return the DeploymentInfo object itself.
     */
    public DeploymentInfo withDeploymentFetchStatus(DeploymentFetchStatus deploymentFetchStatus) {
        this.deploymentFetchStatus = deploymentFetchStatus;
        return this;
    }

    /**
     * Get the deployment property: Deployment information.
     *
     * @return the deployment value.
     */
    public Deployment deployment() {
        return this.deployment;
    }

    /**
     * Set the deployment property: Deployment information.
     *
     * @param deployment the deployment value to set.
     * @return the DeploymentInfo object itself.
     */
    public DeploymentInfo withDeployment(Deployment deployment) {
        this.deployment = deployment;
        return this;
    }

    /**
     * Get the message property: Additional details about the deployment that can be shown to the user.
     *
     * @return the message value.
     */
    public String message() {
        return this.message;
    }

    /**
     * Set the message property: Additional details about the deployment that can be shown to the user.
     *
     * @param message the message value to set.
     * @return the DeploymentInfo object itself.
     */
    public DeploymentInfo withMessage(String message) {
        this.message = message;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (deployment() != null) {
            deployment().validate();
        }
    }
}
