-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Added code for tag conditions #13090
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
83e8d49
Added Options classes
gapra-msft fccea10
Prepped lease clients to add tags
gapra-msft 5096e60
Merge branch 'master' into storage/tagConditions
gapra-msft 31b46d2
Regenerated code for tags
gapra-msft 16e511c
Added recordings for ifTags tests
gapra-msft 3f424d2
Added tags to a bunch of APIs in BlobBase
gapra-msft 7429428
Added tests for set tier tags
gapra-msft 653f3c1
Added tags to rest of the APIs
gapra-msft bf5ed7c
Added snapshot tests
gapra-msft 70999a7
Added get blob and get properties tests
gapra-msft 890abdf
Added set metadata and properties tests
gapra-msft fbc8d93
Added delete test
gapra-msft 24e9d87
Added copy tests
gapra-msft 8fe1c61
Added block tests
gapra-msft c17742b
Added Append blob tests
gapra-msft 1542b31
Added page blob tests
gapra-msft a8991ae
fixed recorded tests
gapra-msft f3304a0
Fixed change lease tests
gapra-msft 59ec0f4
Fixed JAva doc snippets
gapra-msft baabf80
fixed checkstyle
gapra-msft c656c34
Last checkstype
gapra-msft ec8139d
Changed name of ifTags
gapra-msft 5b61015
Merge branch 'master' into storage/tagConditions
gapra-msft 7f11017
renamed tagcondition
gapra-msft f4b661e
plural
gapra-msft 9a1cc77
line endings
gapra-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
49 changes: 18 additions & 31 deletions
49
...ure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java
Large diffs are not rendered by default.
Oops, something went wrong.
258 changes: 96 additions & 162 deletions
258
...age/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java
Large diffs are not rendered by default.
Oops, something went wrong.
49 changes: 18 additions & 31 deletions
49
...zure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java
Large diffs are not rendered by default.
Oops, something went wrong.
81 changes: 30 additions & 51 deletions
81
...azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
...-storage-blob/src/main/java/com/azure/storage/blob/models/BlobLeaseRequestConditions.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| package com.azure.storage.blob.models; | ||
|
|
||
| import com.azure.core.http.RequestConditions; | ||
|
|
||
| import java.time.OffsetDateTime; | ||
|
|
||
| /** | ||
| * This class contains values which will restrict the successful operation of a variety of lease requests to the | ||
| * conditions present. These conditions are entirely optional. The entire object or any of its properties may be set to | ||
| * null when passed to a method to indicate that those conditions are not desired. Please refer to the type of each | ||
| * field for more information on those particular access conditions. | ||
| */ | ||
| public class BlobLeaseRequestConditions extends RequestConditions { | ||
| private String ifTags; | ||
|
|
||
| /** | ||
| * Optionally limit requests to resources that match the passed ETag. | ||
| * | ||
| * @param ifMatch ETag that resources must match. | ||
| * @return The updated BlobLeaseRequestConditions object. | ||
| */ | ||
| @Override | ||
| public BlobLeaseRequestConditions setIfMatch(String ifMatch) { | ||
| super.setIfMatch(ifMatch); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Optionally limit requests to resources that do not match the passed ETag. | ||
| * | ||
| * @param ifNoneMatch ETag that resources must not match. | ||
| * @return The updated BlobLeaseRequestConditions object. | ||
| */ | ||
| @Override | ||
| public BlobLeaseRequestConditions setIfNoneMatch(String ifNoneMatch) { | ||
| super.setIfNoneMatch(ifNoneMatch); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Optionally limit requests to resources that have only been modified since the passed | ||
| * {@link OffsetDateTime datetime}. | ||
| * | ||
| * @param ifModifiedSince The datetime that resources must have been modified since. | ||
| * @return The updated BlobLeaseRequestConditions object. | ||
| */ | ||
| @Override | ||
| public BlobLeaseRequestConditions setIfModifiedSince(OffsetDateTime ifModifiedSince) { | ||
| super.setIfModifiedSince(ifModifiedSince); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Optionally limit requests to resources that have remained unmodified since the passed | ||
| * {@link OffsetDateTime datetime}. | ||
| * | ||
| * @param ifUnmodifiedSince The datetime that resources must have remained unmodified since. | ||
| * @return The updated BlobLeaseRequestConditions object. | ||
| */ | ||
| @Override | ||
| public BlobLeaseRequestConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince) { | ||
| super.setIfUnmodifiedSince(ifUnmodifiedSince); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the SQL statement that apply to the tags of the blob. | ||
| * | ||
| * @return The SQL statement that apply to the tags of the blob. | ||
| */ | ||
| public String getIfTags() { | ||
| return ifTags; | ||
| } | ||
|
|
||
| /** | ||
| * Optionally applies the SQL statement to the tags of the blob. | ||
| * | ||
| * @param ifTags The SQL statement that apply to the tags of the blob. | ||
| * @return The updated BlobLeaseRequestConditions object. | ||
| */ | ||
| public BlobLeaseRequestConditions setIfTags(String ifTags) { | ||
| this.ifTags = ifTags; | ||
| return this; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe we should call the parameter
ifTagsMatchor something?ifTagsreads to me like it's just checking if there are tags presentThere 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.
I like that idea
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.
There's a lot of over conditions that can be checked related to tags. In .NET, we went with TagConditions
Uh oh!
There was an error while loading. Please reload this page.
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.
Changed to tagsConditions