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

com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForPolicyRequest 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.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * Request parameters for tiering cost info for policy.
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
@JsonTypeName("FetchTieringCostSavingsInfoForPolicyRequest")
@Fluent
public final class FetchTieringCostSavingsInfoForPolicyRequest extends FetchTieringCostInfoRequest {
    /*
     * Name of the backup policy for which the cost savings information is requested
     */
    @JsonProperty(value = "policyName", required = true)
    private String policyName;

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

    /**
     * Get the policyName property: Name of the backup policy for which the cost savings information is requested.
     * 
     * @return the policyName value.
     */
    public String policyName() {
        return this.policyName;
    }

    /**
     * Set the policyName property: Name of the backup policy for which the cost savings information is requested.
     * 
     * @param policyName the policyName value to set.
     * @return the FetchTieringCostSavingsInfoForPolicyRequest object itself.
     */
    public FetchTieringCostSavingsInfoForPolicyRequest withPolicyName(String policyName) {
        this.policyName = policyName;
        return this;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public FetchTieringCostSavingsInfoForPolicyRequest withSourceTierType(RecoveryPointTierType sourceTierType) {
        super.withSourceTierType(sourceTierType);
        return this;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public FetchTieringCostSavingsInfoForPolicyRequest withTargetTierType(RecoveryPointTierType targetTierType) {
        super.withTargetTierType(targetTierType);
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (policyName() == null) {
            throw LOGGER.logExceptionAsError(new IllegalArgumentException(
                "Missing required property policyName in model FetchTieringCostSavingsInfoForPolicyRequest"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(FetchTieringCostSavingsInfoForPolicyRequest.class);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy