diff --git a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java index 7d40d34a61e6..624b08928c95 100644 --- a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java +++ b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java @@ -362,6 +362,14 @@ public LifecycleCondition getCondition() { return lifecycleCondition; } + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("lifecycleAction", lifecycleAction) + .add("lifecycleCondition", lifecycleCondition) + .toString(); + } + @Override public int hashCode() { return Objects.hash(lifecycleAction, lifecycleCondition); @@ -487,6 +495,17 @@ public static Builder newBuilder() { return new Builder(); } + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("age", age) + .add("createBefore", createdBefore) + .add("numberofNewerVersions", numberOfNewerVersions) + .add("isLive", isLive) + .add("matchesStorageClass", matchesStorageClass) + .toString(); + } + public Integer getAge() { return age; } @@ -584,6 +603,11 @@ public abstract static class LifecycleAction implements Serializable { public abstract String getActionType(); + @Override + public String toString() { + return MoreObjects.toStringHelper(this).add("actionType", getActionType()).toString(); + } + /** * Creates a new {@code DeleteLifecycleAction}. Blobs that meet the Condition associated with * this action will be deleted. @@ -631,6 +655,14 @@ public String getActionType() { return TYPE; } + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("actionType", getActionType()) + .add("storageClass", storageClass.name()) + .toString(); + } + StorageClass getStorageClass() { return storageClass; }