Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR sdk/storage/mgmt-v2019_06_01] [Storage] Add object replication policy #9906

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/storage/mgmt-v2019_06_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.3.0</version>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-storage</artifactId>
<version>1.0.0-beta-5</version>
<version>1.0.0-beta</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for Storage Management</name>
<description>This package contains Microsoft Storage Management SDK.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
*/
public class BlobRestoreRange {
/**
* Blob start range. Empty means account start.
* Blob start range. This is inclusive. Empty means account start.
*/
@JsonProperty(value = "startRange", required = true)
private String startRange;

/**
* Blob end range. Empty means account end.
* Blob end range. This is exclusive. Empty means account end.
*/
@JsonProperty(value = "endRange", required = true)
private String endRange;

/**
* Get blob start range. Empty means account start.
* Get blob start range. This is inclusive. Empty means account start.
*
* @return the startRange value
*/
Expand All @@ -36,7 +36,7 @@ public String startRange() {
}

/**
* Set blob start range. Empty means account start.
* Set blob start range. This is inclusive. Empty means account start.
*
* @param startRange the startRange value to set
* @return the BlobRestoreRange object itself.
Expand All @@ -47,7 +47,7 @@ public BlobRestoreRange withStartRange(String startRange) {
}

/**
* Get blob end range. Empty means account end.
* Get blob end range. This is exclusive. Empty means account end.
*
* @return the endRange value
*/
Expand All @@ -56,7 +56,7 @@ public String endRange() {
}

/**
* Set blob end range. Empty means account end.
* Set blob end range. This is exclusive. Empty means account end.
*
* @param endRange the endRange value to set
* @return the BlobRestoreRange object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.microsoft.azure.arm.model.Appliable;
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import com.microsoft.azure.arm.model.Appliable;
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;
import java.util.List;

/**
* Type representing FileServiceProperties.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.storage.v2019_06_01;

import com.microsoft.azure.arm.collection.SupportsCreating;
import rx.Completable;
import rx.Observable;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.ObjectReplicationPoliciesInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing ObjectReplicationPolicies.
*/
public interface ObjectReplicationPolicies extends SupportsCreating<ObjectReplicationPolicy.DefinitionStages.Blank>, HasInner<ObjectReplicationPoliciesInner> {
/**
* Get the object replication policy of the storage account by policy ID.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param objectReplicationPolicyId The ID of object replication policy or 'default' if the policy ID is unknown.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ObjectReplicationPolicy> getAsync(String resourceGroupName, String accountName, String objectReplicationPolicyId);

/**
* List the object replication policies associated with the storage account.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ObjectReplicationPolicy> listAsync(String resourceGroupName, String accountName);

/**
* Deletes the object replication policy associated with the specified storage account.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param objectReplicationPolicyId The ID of object replication policy or 'default' if the policy ID is unknown.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Completable deleteAsync(String resourceGroupName, String accountName, String objectReplicationPolicyId);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.storage.v2019_06_01;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.ObjectReplicationPolicyInner;
import com.microsoft.azure.arm.model.Indexable;
import com.microsoft.azure.arm.model.Refreshable;
import com.microsoft.azure.arm.model.Updatable;
import com.microsoft.azure.arm.model.Appliable;
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;
import org.joda.time.DateTime;
import java.util.List;

/**
* Type representing ObjectReplicationPolicy.
*/
public interface ObjectReplicationPolicy extends HasInner<ObjectReplicationPolicyInner>, Indexable, Refreshable<ObjectReplicationPolicy>, Updatable<ObjectReplicationPolicy.Update>, HasManager<StorageManager> {
/**
* @return the destinationAccount value.
*/
String destinationAccount();

/**
* @return the enabledTime value.
*/
DateTime enabledTime();

/**
* @return the id value.
*/
String id();

/**
* @return the name value.
*/
String name();

/**
* @return the policyId value.
*/
String policyId();

/**
* @return the rules value.
*/
List<ObjectReplicationPolicyRule> rules();

/**
* @return the sourceAccount value.
*/
String sourceAccount();

/**
* @return the type value.
*/
String type();

/**
* The entirety of the ObjectReplicationPolicy definition.
*/
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithStorageAccount, DefinitionStages.WithDestinationAccount, DefinitionStages.WithSourceAccount, DefinitionStages.WithCreate {
}

/**
* Grouping of ObjectReplicationPolicy definition stages.
*/
interface DefinitionStages {
/**
* The first stage of a ObjectReplicationPolicy definition.
*/
interface Blank extends WithStorageAccount {
}

/**
* The stage of the objectreplicationpolicy definition allowing to specify StorageAccount.
*/
interface WithStorageAccount {
/**
* Specifies resourceGroupName, accountName.
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only
* @return the next definition stage
*/
WithDestinationAccount withExistingStorageAccount(String resourceGroupName, String accountName);
}

/**
* The stage of the objectreplicationpolicy definition allowing to specify DestinationAccount.
*/
interface WithDestinationAccount {
/**
* Specifies destinationAccount.
* @param destinationAccount Required. Destination account name
* @return the next definition stage
*/
WithSourceAccount withDestinationAccount(String destinationAccount);
}

/**
* The stage of the objectreplicationpolicy definition allowing to specify SourceAccount.
*/
interface WithSourceAccount {
/**
* Specifies sourceAccount.
* @param sourceAccount Required. Source account name
* @return the next definition stage
*/
WithCreate withSourceAccount(String sourceAccount);
}

/**
* The stage of the objectreplicationpolicy definition allowing to specify Rules.
*/
interface WithRules {
/**
* Specifies rules.
* @param rules The storage account object replication rules
* @return the next definition stage
*/
WithCreate withRules(List<ObjectReplicationPolicyRule> rules);
}

/**
* The stage of the definition which contains all the minimum required inputs for
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<ObjectReplicationPolicy>, DefinitionStages.WithRules {
}
}
/**
* The template for a ObjectReplicationPolicy update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<ObjectReplicationPolicy>, UpdateStages.WithRules {
}

/**
* Grouping of ObjectReplicationPolicy update stages.
*/
interface UpdateStages {
/**
* The stage of the objectreplicationpolicy update allowing to specify Rules.
*/
interface WithRules {
/**
* Specifies rules.
* @param rules The storage account object replication rules
* @return the next update stage
*/
Update withRules(List<ObjectReplicationPolicyRule> rules);
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.storage.v2019_06_01;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Filters limit replication to a subset of blobs within the storage account. A
* logical OR is performed on values in the filter. If multiple filters are
* defined, a logical AND is performed on all filters.
*/
public class ObjectReplicationPolicyFilter {
/**
* Optional. Filters the results to replicate only blobs whose names begin
* with the specified prefix.
*/
@JsonProperty(value = "prefixMatch")
private List<String> prefixMatch;

/**
* Blobs created after the time will be replicated to the destination. It
* must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example:
* 2020-02-19T16:05:00Z.
*/
@JsonProperty(value = "minCreationTime")
private String minCreationTime;

/**
* Get optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
*
* @return the prefixMatch value
*/
public List<String> prefixMatch() {
return this.prefixMatch;
}

/**
* Set optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
*
* @param prefixMatch the prefixMatch value to set
* @return the ObjectReplicationPolicyFilter object itself.
*/
public ObjectReplicationPolicyFilter withPrefixMatch(List<String> prefixMatch) {
this.prefixMatch = prefixMatch;
return this;
}

/**
* Get blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z.
*
* @return the minCreationTime value
*/
public String minCreationTime() {
return this.minCreationTime;
}

/**
* Set blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z.
*
* @param minCreationTime the minCreationTime value to set
* @return the ObjectReplicationPolicyFilter object itself.
*/
public ObjectReplicationPolicyFilter withMinCreationTime(String minCreationTime) {
this.minCreationTime = minCreationTime;
return this;
}

}
Loading