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

com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicy 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.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/**
 * Base class for backup policy. Workload-specific backup policies are derived from this class.
 */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "backupManagementType",
    defaultImpl = ProtectionPolicy.class)
@JsonTypeName("ProtectionPolicy")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "AzureWorkload", value = AzureVmWorkloadProtectionPolicy.class),
    @JsonSubTypes.Type(name = "AzureStorage", value = AzureFileShareProtectionPolicy.class),
    @JsonSubTypes.Type(name = "AzureIaasVM", value = AzureIaaSvmProtectionPolicy.class),
    @JsonSubTypes.Type(name = "AzureSql", value = AzureSqlProtectionPolicy.class),
    @JsonSubTypes.Type(name = "GenericProtectionPolicy", value = GenericProtectionPolicy.class),
    @JsonSubTypes.Type(name = "MAB", value = MabProtectionPolicy.class) })
@Fluent
public class ProtectionPolicy {
    /*
     * Number of items associated with this policy.
     */
    @JsonProperty(value = "protectedItemsCount")
    private Integer protectedItemsCount;

    /*
     * ResourceGuard Operation Requests
     */
    @JsonProperty(value = "resourceGuardOperationRequests")
    private List resourceGuardOperationRequests;

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

    /**
     * Get the protectedItemsCount property: Number of items associated with this policy.
     * 
     * @return the protectedItemsCount value.
     */
    public Integer protectedItemsCount() {
        return this.protectedItemsCount;
    }

    /**
     * Set the protectedItemsCount property: Number of items associated with this policy.
     * 
     * @param protectedItemsCount the protectedItemsCount value to set.
     * @return the ProtectionPolicy object itself.
     */
    public ProtectionPolicy withProtectedItemsCount(Integer protectedItemsCount) {
        this.protectedItemsCount = protectedItemsCount;
        return this;
    }

    /**
     * Get the resourceGuardOperationRequests property: ResourceGuard Operation Requests.
     * 
     * @return the resourceGuardOperationRequests value.
     */
    public List resourceGuardOperationRequests() {
        return this.resourceGuardOperationRequests;
    }

    /**
     * Set the resourceGuardOperationRequests property: ResourceGuard Operation Requests.
     * 
     * @param resourceGuardOperationRequests the resourceGuardOperationRequests value to set.
     * @return the ProtectionPolicy object itself.
     */
    public ProtectionPolicy withResourceGuardOperationRequests(List resourceGuardOperationRequests) {
        this.resourceGuardOperationRequests = resourceGuardOperationRequests;
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy