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

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

Go to download

This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2024-04.

There is a newer version: 1.5.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.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 protected item.
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
@JsonTypeName("FetchTieringCostSavingsInfoForProtectedItemRequest")
@Fluent
public final class FetchTieringCostSavingsInfoForProtectedItemRequest extends FetchTieringCostInfoRequest {
    /*
     * Name of the protected item container
     */
    @JsonProperty(value = "containerName", required = true)
    private String containerName;

    /*
     * Name of the protectedItemName
     */
    @JsonProperty(value = "protectedItemName", required = true)
    private String protectedItemName;

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

    /**
     * Get the containerName property: Name of the protected item container.
     * 
     * @return the containerName value.
     */
    public String containerName() {
        return this.containerName;
    }

    /**
     * Set the containerName property: Name of the protected item container.
     * 
     * @param containerName the containerName value to set.
     * @return the FetchTieringCostSavingsInfoForProtectedItemRequest object itself.
     */
    public FetchTieringCostSavingsInfoForProtectedItemRequest withContainerName(String containerName) {
        this.containerName = containerName;
        return this;
    }

    /**
     * Get the protectedItemName property: Name of the protectedItemName.
     * 
     * @return the protectedItemName value.
     */
    public String protectedItemName() {
        return this.protectedItemName;
    }

    /**
     * Set the protectedItemName property: Name of the protectedItemName.
     * 
     * @param protectedItemName the protectedItemName value to set.
     * @return the FetchTieringCostSavingsInfoForProtectedItemRequest object itself.
     */
    public FetchTieringCostSavingsInfoForProtectedItemRequest withProtectedItemName(String protectedItemName) {
        this.protectedItemName = protectedItemName;
        return this;
    }

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

    /**
     * {@inheritDoc}
     */
    @Override
    public FetchTieringCostSavingsInfoForProtectedItemRequest 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 (containerName() == null) {
            throw LOGGER.logExceptionAsError(new IllegalArgumentException(
                "Missing required property containerName in model FetchTieringCostSavingsInfoForProtectedItemRequest"));
        }
        if (protectedItemName() == null) {
            throw LOGGER.logExceptionAsError(new IllegalArgumentException(
                "Missing required property protectedItemName in model FetchTieringCostSavingsInfoForProtectedItemRequest"));
        }
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy