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

com.azure.resourcemanager.recoveryservicesbackup.models.DistributedNodesInfo Maven / Gradle / Ivy

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

package com.azure.resourcemanager.recoveryservicesbackup.models;

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

/**
 * This is used to represent the various nodes of the distributed container.
 */
@Fluent
public final class DistributedNodesInfo {
    /*
     * Name of the node under a distributed container.
     */
    @JsonProperty(value = "nodeName")
    private String nodeName;

    /*
     * Status of this Node.
     * Failed | Succeeded
     */
    @JsonProperty(value = "status")
    private String status;

    /*
     * Error Details if the Status is non-success.
     */
    @JsonProperty(value = "errorDetail")
    private ErrorDetail errorDetail;

    /*
     * ARM resource id of the node
     */
    @JsonProperty(value = "sourceResourceId")
    private String sourceResourceId;

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

    /**
     * Get the nodeName property: Name of the node under a distributed container.
     * 
     * @return the nodeName value.
     */
    public String nodeName() {
        return this.nodeName;
    }

    /**
     * Set the nodeName property: Name of the node under a distributed container.
     * 
     * @param nodeName the nodeName value to set.
     * @return the DistributedNodesInfo object itself.
     */
    public DistributedNodesInfo withNodeName(String nodeName) {
        this.nodeName = nodeName;
        return this;
    }

    /**
     * Get the status property: Status of this Node.
     * Failed | Succeeded.
     * 
     * @return the status value.
     */
    public String status() {
        return this.status;
    }

    /**
     * Set the status property: Status of this Node.
     * Failed | Succeeded.
     * 
     * @param status the status value to set.
     * @return the DistributedNodesInfo object itself.
     */
    public DistributedNodesInfo withStatus(String status) {
        this.status = status;
        return this;
    }

    /**
     * Get the errorDetail property: Error Details if the Status is non-success.
     * 
     * @return the errorDetail value.
     */
    public ErrorDetail errorDetail() {
        return this.errorDetail;
    }

    /**
     * Set the errorDetail property: Error Details if the Status is non-success.
     * 
     * @param errorDetail the errorDetail value to set.
     * @return the DistributedNodesInfo object itself.
     */
    public DistributedNodesInfo withErrorDetail(ErrorDetail errorDetail) {
        this.errorDetail = errorDetail;
        return this;
    }

    /**
     * Get the sourceResourceId property: ARM resource id of the node.
     * 
     * @return the sourceResourceId value.
     */
    public String sourceResourceId() {
        return this.sourceResourceId;
    }

    /**
     * Set the sourceResourceId property: ARM resource id of the node.
     * 
     * @param sourceResourceId the sourceResourceId value to set.
     * @return the DistributedNodesInfo object itself.
     */
    public DistributedNodesInfo withSourceResourceId(String sourceResourceId) {
        this.sourceResourceId = sourceResourceId;
        return this;
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy