-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Changing OR object to a list of the proper OR class #12740
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
|
|
||
| namespace Azure.Storage.Blobs.Models | ||
| { | ||
| /// <summary> | ||
| /// Contains Object Replication Policy ID and the respective list of | ||
| /// <see cref="ObjectReplicationRule"/>(s). This is used when retrieving the | ||
| /// Object Replication Properties on the source blob. The policy id for the | ||
| /// destination blob is set in ObjectReplicationDestinationPolicy of the respective | ||
| /// method responses. (e.g. <see cref="BlobProperties.ObjectReplicationDestinationPolicy"/>, | ||
| /// <see cref="BlobDownloadDetails.ObjectReplicationDestinationPolicy"/>). | ||
| /// </summary> | ||
| public class ObjectReplicationPolicy | ||
| { | ||
| internal ObjectReplicationPolicy() { } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we have a SomethingFactory class where customers can create these for test purposes. We should add ORS entities there as well to factory method for the type enclosing them.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amnguye you can add methods to create |
||
| /// <summary> | ||
| /// The Object Replication Policy ID. | ||
| /// </summary> | ||
| public string PolicyId { get; internal set; } | ||
| /// <summary> | ||
| /// The Rule ID(s) and respective Replication Status(s) that are under | ||
| /// the Policy ID. | ||
| /// </summary> | ||
| public IList<ObjectReplicationRule> Rules { get; internal set; } | ||
|
|
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
|
|
||
| namespace Azure.Storage.Blobs.Models | ||
| { | ||
| /// <summary> | ||
| /// Contains the Object Replication Rule ID and Replication Status( | ||
| /// <see cref="ObjectReplicationStatus"/>) of a blob. | ||
| /// There can be more than one <see cref="ObjectReplicationRule"/> under a | ||
| /// <see cref="ObjectReplicationPolicy"/>. Object Replication Rule IDs | ||
| /// </summary> | ||
| public class ObjectReplicationRule | ||
| { | ||
| internal ObjectReplicationRule() { } | ||
| /// <summary> | ||
| /// The Object Replication Rule ID. | ||
| /// </summary> | ||
| public string RuleId { get; internal set; } | ||
| /// <summary> | ||
| /// The Replication Status. See <see cref="ObjectReplicationStatus"/>. | ||
| /// </summary> | ||
| public ObjectReplicationStatus ReplicationStatus { get; internal set; } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Specifies the Replication Status of a blob. This is used when a storage account | ||
| /// has Object Replication Policy(s) applied. See <see cref="ObjectReplicationPolicy"/> | ||
| /// and <see cref="ObjectReplicationRule"/>. | ||
| /// </summary> | ||
| [Flags] | ||
| public enum ObjectReplicationStatus | ||
| { | ||
| /// <summary> | ||
| /// Object Replication to the | ||
| /// destination completed. | ||
| /// </summary> | ||
| Complete = 0, | ||
|
|
||
| /// <summary> | ||
| /// Object Replication to the | ||
| /// destination container failed. | ||
| /// </summary> | ||
| Failed = 1 | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add this to BlobDownloadDetails's factory.