com.azure.resourcemanager.cosmos.models.FailoverPolicies Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-cosmos Show documentation
Show all versions of azure-resourcemanager-cosmos Show documentation
This package contains Microsoft Azure CosmosDB SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
// 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.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* The list of new failover policies for the failover priority change.
*/
@Fluent
public final class FailoverPolicies {
/*
* List of failover policies.
*/
@JsonProperty(value = "failoverPolicies", required = true)
private List failoverPolicies;
/**
* Creates an instance of FailoverPolicies class.
*/
public FailoverPolicies() {
}
/**
* Get the failoverPolicies property: List of failover policies.
*
* @return the failoverPolicies value.
*/
public List failoverPolicies() {
return this.failoverPolicies;
}
/**
* Set the failoverPolicies property: List of failover policies.
*
* @param failoverPolicies the failoverPolicies value to set.
* @return the FailoverPolicies object itself.
*/
public FailoverPolicies withFailoverPolicies(List failoverPolicies) {
this.failoverPolicies = failoverPolicies;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (failoverPolicies() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property failoverPolicies in model FailoverPolicies"));
} else {
failoverPolicies().forEach(e -> e.validate());
}
}
private static final ClientLogger LOGGER = new ClientLogger(FailoverPolicies.class);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy