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

[Storage] Add launch stage annotations around bucket lock methods #3764

Merged
merged 2 commits into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,14 @@ public abstract static class Builder {
abstract Builder setKmsKeyName(String kmsKeyName);

/** Sets the blob's event-based hold. */
@GcpLaunchStage.Beta

This comment was marked as spam.

This comment was marked as spam.

public abstract Builder setEventBasedHold(Boolean eventBasedHold);

/** Sets the blob's temporary hold. */
@GcpLaunchStage.Beta
public abstract Builder setTemporaryHold(Boolean temporaryHold);

@GcpLaunchStage.Beta
abstract Builder setRetentionExpirationTime(Long retentionExpirationTime);

/** Creates a {@code BlobInfo} object. */
Expand Down Expand Up @@ -775,6 +778,7 @@ public String getKmsKeyName() {
* Storage#update(BlobInfo, Storage.BlobTargetOption...)} in which case the value of event-based
* hold will remain {@code false} for the given instance.
*/
@GcpLaunchStage.Beta
public Boolean getEventBasedHold() {
return Data.<Boolean>isNull(eventBasedHold) ? null : eventBasedHold;
}
Expand All @@ -801,6 +805,7 @@ public Boolean getEventBasedHold() {
* Storage#update(BlobInfo, Storage.BlobTargetOption...)} in which case the value of temporary
* hold will remain {@code false} for the given instance.
*/
@GcpLaunchStage.Beta
public Boolean getTemporaryHold() {
return Data.<Boolean>isNull(temporaryHold) ? null : temporaryHold;
}
Expand All @@ -809,6 +814,7 @@ public Boolean getTemporaryHold() {
* Returns the retention expiration time of the blob as {@code Long}, if a retention period is
* defined. If retention period is not defined this value returns {@code null}
*/
@GcpLaunchStage.Beta
public Long getRetentionExpirationTime() {
return Data.<Long>isNull(retentionExpirationTime) ? null : retentionExpirationTime;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,16 +426,20 @@ public abstract static class Builder {
public abstract Builder setDefaultKmsKeyName(String defaultKmsKeyName);

/** Sets the default event-based hold for this bucket. */
@GcpLaunchStage.Beta
public abstract Builder setDefaultEventBasedHold(Boolean defaultEventBasedHold);

@GcpLaunchStage.Beta
abstract Builder setRetentionEffectiveTime(Long retentionEffectiveTime);

@GcpLaunchStage.Beta
abstract Builder setRetentionPolicyIsLocked(Boolean retentionPolicyIsLocked);

/**
* If policy is not locked this value can be cleared, increased, and decreased. If policy is
* locked the retention period can only be increased.
*/
@GcpLaunchStage.Beta
public abstract Builder setRetentionPeriod(Long retentionPeriod);

/** Creates a {@code BucketInfo} object. */
Expand Down Expand Up @@ -863,6 +867,7 @@ public String getDefaultKmsKeyName() {
* Storage#update(BucketInfo, Storage.BucketTargetOption...)} in which case the value of default
* event-based hold will remain {@code false} for the given instance.
*/
@GcpLaunchStage.Beta
public Boolean getDefaultEventBasedHold() {
return Data.isNull(defaultEventBasedHold) ? null : defaultEventBasedHold;
}
Expand All @@ -871,6 +876,7 @@ public Boolean getDefaultEventBasedHold() {
* Returns the retention effective time a policy took effect if a retention policy is defined as a
* {@code Long}.
*/
@GcpLaunchStage.Beta
public Long getRetentionEffectiveTime() {
return retentionEffectiveTime;
}
Expand All @@ -891,11 +897,13 @@ public Long getRetentionEffectiveTime() {
* com.google.cloud.storage.Storage.BucketField#RETENTION_POLICY} is not selected in a {@link
* Storage#get(String, Storage.BucketGetOption...)}, and the state for this field is unknown.
*/
@GcpLaunchStage.Beta
public Boolean retentionPolicyIsLocked() {
return Data.isNull(retentionPolicyIsLocked) ? null : retentionPolicyIsLocked;
}

/** Returns the retention policy retention period. */
@GcpLaunchStage.Beta
public Long getRetentionPeriod() {
return retentionPeriod;
}
Expand Down