com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostInfoRequest 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.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Base class for tiering cost request.
* Specific cost request types are derived from this class.
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY,
property = "objectType",
defaultImpl = FetchTieringCostInfoRequest.class)
@JsonTypeName("FetchTieringCostInfoRequest")
@JsonSubTypes({
@JsonSubTypes.Type(
name = "FetchTieringCostInfoForRehydrationRequest",
value = FetchTieringCostInfoForRehydrationRequest.class),
@JsonSubTypes.Type(
name = "FetchTieringCostSavingsInfoForPolicyRequest",
value = FetchTieringCostSavingsInfoForPolicyRequest.class),
@JsonSubTypes.Type(
name = "FetchTieringCostSavingsInfoForProtectedItemRequest",
value = FetchTieringCostSavingsInfoForProtectedItemRequest.class),
@JsonSubTypes.Type(
name = "FetchTieringCostSavingsInfoForVaultRequest",
value = FetchTieringCostSavingsInfoForVaultRequest.class) })
@Fluent
public class FetchTieringCostInfoRequest {
/*
* Source tier for the request
*/
@JsonProperty(value = "sourceTierType", required = true)
private RecoveryPointTierType sourceTierType;
/*
* target tier for the request
*/
@JsonProperty(value = "targetTierType", required = true)
private RecoveryPointTierType targetTierType;
/**
* Creates an instance of FetchTieringCostInfoRequest class.
*/
public FetchTieringCostInfoRequest() {
}
/**
* Get the sourceTierType property: Source tier for the request.
*
* @return the sourceTierType value.
*/
public RecoveryPointTierType sourceTierType() {
return this.sourceTierType;
}
/**
* Set the sourceTierType property: Source tier for the request.
*
* @param sourceTierType the sourceTierType value to set.
* @return the FetchTieringCostInfoRequest object itself.
*/
public FetchTieringCostInfoRequest withSourceTierType(RecoveryPointTierType sourceTierType) {
this.sourceTierType = sourceTierType;
return this;
}
/**
* Get the targetTierType property: target tier for the request.
*
* @return the targetTierType value.
*/
public RecoveryPointTierType targetTierType() {
return this.targetTierType;
}
/**
* Set the targetTierType property: target tier for the request.
*
* @param targetTierType the targetTierType value to set.
* @return the FetchTieringCostInfoRequest object itself.
*/
public FetchTieringCostInfoRequest withTargetTierType(RecoveryPointTierType targetTierType) {
this.targetTierType = targetTierType;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (sourceTierType() == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
"Missing required property sourceTierType in model FetchTieringCostInfoRequest"));
}
if (targetTierType() == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
"Missing required property targetTierType in model FetchTieringCostInfoRequest"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(FetchTieringCostInfoRequest.class);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy