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

com.azure.storage.blob.models.ObjectReplicationPolicy Maven / Gradle / Ivy

There is a newer version: 12.29.0
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.storage.blob.models;

import com.azure.core.annotation.Immutable;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * A type that contains information about an object replication policy on a source blob.
 */
@Immutable
public class ObjectReplicationPolicy {

    private final String policyId;
    private final List objectReplicationRules;

    /**
     * Constructs a new ObjectReplicationPolicy object.
     * @param policyId The policy id
     * @param rules A {@code List} of rules associated with this policy to the status of the replication associated
     * with that rule.
     */
    public ObjectReplicationPolicy(String policyId, List rules) {
        this.policyId = policyId;
        this.objectReplicationRules = Collections.unmodifiableList(new ArrayList<>(rules));
    }

    /**
     * @return The policy id.
     */
    public String getPolicyId() {
        return policyId;
    }

    /**
     * @return A {@code List} of rules associated with this policy to the status of the replication associated with that
     * rule.
     */
    public List getRules() {
        return this.objectReplicationRules;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy