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

com.azure.resourcemanager.cosmos.fluent.models.CassandraClusterPublicStatusInner Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.46.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.cosmos.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.cosmos.models.CassandraClusterPublicStatusDataCentersItem;
import com.azure.resourcemanager.cosmos.models.CassandraError;
import com.azure.resourcemanager.cosmos.models.ConnectionError;
import com.azure.resourcemanager.cosmos.models.ManagedCassandraReaperStatus;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/**
 * Properties of a managed Cassandra cluster public status.
 */
@Fluent
public final class CassandraClusterPublicStatusInner {
    /*
     * The eTag property.
     */
    @JsonProperty(value = "eTag")
    private String etag;

    /*
     * The reaperStatus property.
     */
    @JsonProperty(value = "reaperStatus")
    private ManagedCassandraReaperStatus reaperStatus;

    /*
     * List relevant information about any connection errors to the Datacenters.
     */
    @JsonProperty(value = "connectionErrors")
    private List connectionErrors;

    /*
     * List relevant information about any errors about cluster, data center and connection error.
     */
    @JsonProperty(value = "errors")
    private List errors;

    /*
     * List of the status of each datacenter in this cluster.
     */
    @JsonProperty(value = "dataCenters")
    private List dataCenters;

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

    /**
     * Get the etag property: The eTag property.
     * 
     * @return the etag value.
     */
    public String etag() {
        return this.etag;
    }

    /**
     * Set the etag property: The eTag property.
     * 
     * @param etag the etag value to set.
     * @return the CassandraClusterPublicStatusInner object itself.
     */
    public CassandraClusterPublicStatusInner withEtag(String etag) {
        this.etag = etag;
        return this;
    }

    /**
     * Get the reaperStatus property: The reaperStatus property.
     * 
     * @return the reaperStatus value.
     */
    public ManagedCassandraReaperStatus reaperStatus() {
        return this.reaperStatus;
    }

    /**
     * Set the reaperStatus property: The reaperStatus property.
     * 
     * @param reaperStatus the reaperStatus value to set.
     * @return the CassandraClusterPublicStatusInner object itself.
     */
    public CassandraClusterPublicStatusInner withReaperStatus(ManagedCassandraReaperStatus reaperStatus) {
        this.reaperStatus = reaperStatus;
        return this;
    }

    /**
     * Get the connectionErrors property: List relevant information about any connection errors to the Datacenters.
     * 
     * @return the connectionErrors value.
     */
    public List connectionErrors() {
        return this.connectionErrors;
    }

    /**
     * Set the connectionErrors property: List relevant information about any connection errors to the Datacenters.
     * 
     * @param connectionErrors the connectionErrors value to set.
     * @return the CassandraClusterPublicStatusInner object itself.
     */
    public CassandraClusterPublicStatusInner withConnectionErrors(List connectionErrors) {
        this.connectionErrors = connectionErrors;
        return this;
    }

    /**
     * Get the errors property: List relevant information about any errors about cluster, data center and connection
     * error.
     * 
     * @return the errors value.
     */
    public List errors() {
        return this.errors;
    }

    /**
     * Set the errors property: List relevant information about any errors about cluster, data center and connection
     * error.
     * 
     * @param errors the errors value to set.
     * @return the CassandraClusterPublicStatusInner object itself.
     */
    public CassandraClusterPublicStatusInner withErrors(List errors) {
        this.errors = errors;
        return this;
    }

    /**
     * Get the dataCenters property: List of the status of each datacenter in this cluster.
     * 
     * @return the dataCenters value.
     */
    public List dataCenters() {
        return this.dataCenters;
    }

    /**
     * Set the dataCenters property: List of the status of each datacenter in this cluster.
     * 
     * @param dataCenters the dataCenters value to set.
     * @return the CassandraClusterPublicStatusInner object itself.
     */
    public CassandraClusterPublicStatusInner
        withDataCenters(List dataCenters) {
        this.dataCenters = dataCenters;
        return this;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy