com.azure.storage.blob.models.ObjectReplicationPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-storage-blob Show documentation
Show all versions of azure-storage-blob Show documentation
This module contains client library for Microsoft Azure Blob Storage.
// 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;
}
}