diff --git a/clients/google-api-services-storage/v1/2.0.0/README.md b/clients/google-api-services-storage/v1/2.0.0/README.md
index 0bd3f4a4122..5e30c031814 100644
--- a/clients/google-api-services-storage/v1/2.0.0/README.md
+++ b/clients/google-api-services-storage/v1/2.0.0/README.md
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
+ * Boolean properties can have four possible values: + * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} + * or {@link Boolean#FALSE}. + *
+ * + *+ * This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} + * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. + * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and + * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. + *
+ * + *+ * When set to true, object retention is enabled for this bucket. + *
+ */ + public boolean isEnableObjectRetention() { + if (enableObjectRetention == null || enableObjectRetention == com.google.api.client.util.Data.NULL_BOOLEAN) { + return false; + } + return enableObjectRetention; + } + /** Apply a predefined set of access controls to this bucket. */ @com.google.api.client.util.Key private java.lang.String predefinedAcl; @@ -8145,6 +8188,29 @@ public Patch setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch return this; } + /** + * Must be true to remove the retention configuration, reduce its unlocked retention period, + * or change its mode from unlocked to locked. + */ + @com.google.api.client.util.Key + private java.lang.Boolean overrideUnlockedRetention; + + /** Must be true to remove the retention configuration, reduce its unlocked retention period, or change + its mode from unlocked to locked. + */ + public java.lang.Boolean getOverrideUnlockedRetention() { + return overrideUnlockedRetention; + } + + /** + * Must be true to remove the retention configuration, reduce its unlocked retention period, + * or change its mode from unlocked to locked. + */ + public Patch setOverrideUnlockedRetention(java.lang.Boolean overrideUnlockedRetention) { + this.overrideUnlockedRetention = overrideUnlockedRetention; + return this; + } + /** Apply a predefined set of access controls to this object. */ @com.google.api.client.util.Key private java.lang.String predefinedAcl; @@ -9658,6 +9724,29 @@ public Update setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatc return this; } + /** + * Must be true to remove the retention configuration, reduce its unlocked retention period, + * or change its mode from unlocked to locked. + */ + @com.google.api.client.util.Key + private java.lang.Boolean overrideUnlockedRetention; + + /** Must be true to remove the retention configuration, reduce its unlocked retention period, or change + its mode from unlocked to locked. + */ + public java.lang.Boolean getOverrideUnlockedRetention() { + return overrideUnlockedRetention; + } + + /** + * Must be true to remove the retention configuration, reduce its unlocked retention period, + * or change its mode from unlocked to locked. + */ + public Update setOverrideUnlockedRetention(java.lang.Boolean overrideUnlockedRetention) { + this.overrideUnlockedRetention = overrideUnlockedRetention; + return this; + } + /** Apply a predefined set of access controls to this object. */ @com.google.api.client.util.Key private java.lang.String predefinedAcl; diff --git a/clients/google-api-services-storage/v1/2.0.0/com/google/api/services/storage/model/Bucket.java b/clients/google-api-services-storage/v1/2.0.0/com/google/api/services/storage/model/Bucket.java index f79d70c439b..c1871d77be3 100644 --- a/clients/google-api-services-storage/v1/2.0.0/com/google/api/services/storage/model/Bucket.java +++ b/clients/google-api-services-storage/v1/2.0.0/com/google/api/services/storage/model/Bucket.java @@ -180,6 +180,13 @@ public final class Bucket extends com.google.api.client.json.GenericJson { @com.google.api.client.util.Key private java.lang.String name; + /** + * The bucket's object retention config. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private ObjectRetention objectRetention; + /** * The owner of the bucket. This is always the project team's owner group. * The value may be {@code null}. @@ -229,6 +236,14 @@ public final class Bucket extends com.google.api.client.json.GenericJson { @com.google.api.client.util.Key private java.lang.String selfLink; + /** + * The bucket's soft delete policy, which defines the period of time that soft-deleted objects + * will be retained, and cannot be permanently deleted. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private SoftDeletePolicy softDeletePolicy; + /** * The bucket's default storage class, used whenever no storageClass is specified for a newly- * created object. This defines how objects in the bucket are stored and determines the SLA and @@ -614,6 +629,23 @@ public Bucket setName(java.lang.String name) { return this; } + /** + * The bucket's object retention config. + * @return value or {@code null} for none + */ + public ObjectRetention getObjectRetention() { + return objectRetention; + } + + /** + * The bucket's object retention config. + * @param objectRetention objectRetention or {@code null} for none + */ + public Bucket setObjectRetention(ObjectRetention objectRetention) { + this.objectRetention = objectRetention; + return this; + } + /** * The owner of the bucket. This is always the project team's owner group. * @return value or {@code null} for none @@ -730,6 +762,25 @@ public Bucket setSelfLink(java.lang.String selfLink) { return this; } + /** + * The bucket's soft delete policy, which defines the period of time that soft-deleted objects + * will be retained, and cannot be permanently deleted. + * @return value or {@code null} for none + */ + public SoftDeletePolicy getSoftDeletePolicy() { + return softDeletePolicy; + } + + /** + * The bucket's soft delete policy, which defines the period of time that soft-deleted objects + * will be retained, and cannot be permanently deleted. + * @param softDeletePolicy softDeletePolicy or {@code null} for none + */ + public Bucket setSoftDeletePolicy(SoftDeletePolicy softDeletePolicy) { + this.softDeletePolicy = softDeletePolicy; + return this; + } + /** * The bucket's default storage class, used whenever no storageClass is specified for a newly- * created object. This defines how objects in the bucket are stored and determines the SLA and @@ -847,6 +898,22 @@ public static final class Autoclass extends com.google.api.client.json.GenericJs @com.google.api.client.util.Key private java.lang.Boolean enabled; + /** + * The storage class that objects in the bucket eventually transition to if they are not read for + * a certain length of time. Valid values are NEARLINE and ARCHIVE. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String terminalStorageClass; + + /** + * A date and time in RFC 3339 format representing the time of the most recent update to + * "terminalStorageClass". + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private com.google.api.client.util.DateTime terminalStorageClassUpdateTime; + /** * A date and time in RFC 3339 format representing the instant at which "enabled" was last * toggled. @@ -872,6 +939,44 @@ public Autoclass setEnabled(java.lang.Boolean enabled) { return this; } + /** + * The storage class that objects in the bucket eventually transition to if they are not read for + * a certain length of time. Valid values are NEARLINE and ARCHIVE. + * @return value or {@code null} for none + */ + public java.lang.String getTerminalStorageClass() { + return terminalStorageClass; + } + + /** + * The storage class that objects in the bucket eventually transition to if they are not read for + * a certain length of time. Valid values are NEARLINE and ARCHIVE. + * @param terminalStorageClass terminalStorageClass or {@code null} for none + */ + public Autoclass setTerminalStorageClass(java.lang.String terminalStorageClass) { + this.terminalStorageClass = terminalStorageClass; + return this; + } + + /** + * A date and time in RFC 3339 format representing the time of the most recent update to + * "terminalStorageClass". + * @return value or {@code null} for none + */ + public com.google.api.client.util.DateTime getTerminalStorageClassUpdateTime() { + return terminalStorageClassUpdateTime; + } + + /** + * A date and time in RFC 3339 format representing the time of the most recent update to + * "terminalStorageClass". + * @param terminalStorageClassUpdateTime terminalStorageClassUpdateTime or {@code null} for none + */ + public Autoclass setTerminalStorageClassUpdateTime(com.google.api.client.util.DateTime terminalStorageClassUpdateTime) { + this.terminalStorageClassUpdateTime = terminalStorageClassUpdateTime; + return this; + } + /** * A date and time in RFC 3339 format representing the instant at which "enabled" was last * toggled. @@ -2006,6 +2111,47 @@ public Logging clone() { } + /** + * The bucket's object retention config. + */ + public static final class ObjectRetention extends com.google.api.client.json.GenericJson { + + /** + * The bucket's object retention mode. Can be Enabled. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String mode; + + /** + * The bucket's object retention mode. Can be Enabled. + * @return value or {@code null} for none + */ + public java.lang.String getMode() { + return mode; + } + + /** + * The bucket's object retention mode. Can be Enabled. + * @param mode mode or {@code null} for none + */ + public ObjectRetention setMode(java.lang.String mode) { + this.mode = mode; + return this; + } + + @Override + public ObjectRetention set(String fieldName, Object value) { + return (ObjectRetention) super.set(fieldName, value); + } + + @Override + public ObjectRetention clone() { + return (ObjectRetention) super.clone(); + } + + } + /** * The owner of the bucket. This is always the project team's owner group. */ @@ -2175,6 +2321,78 @@ public RetentionPolicy clone() { } + /** + * The bucket's soft delete policy, which defines the period of time that soft-deleted objects will + * be retained, and cannot be permanently deleted. + */ + public static final class SoftDeletePolicy extends com.google.api.client.json.GenericJson { + + /** + * Server-determined value that indicates the time from which the policy, or one with a greater + * retention, was effective. This value is in RFC 3339 format. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private com.google.api.client.util.DateTime effectiveTime; + + /** + * The period of time in seconds, that soft-deleted objects in the bucket will be retained and + * cannot be permanently deleted. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key @com.google.api.client.json.JsonString + private java.lang.Long retentionDurationSeconds; + + /** + * Server-determined value that indicates the time from which the policy, or one with a greater + * retention, was effective. This value is in RFC 3339 format. + * @return value or {@code null} for none + */ + public com.google.api.client.util.DateTime getEffectiveTime() { + return effectiveTime; + } + + /** + * Server-determined value that indicates the time from which the policy, or one with a greater + * retention, was effective. This value is in RFC 3339 format. + * @param effectiveTime effectiveTime or {@code null} for none + */ + public SoftDeletePolicy setEffectiveTime(com.google.api.client.util.DateTime effectiveTime) { + this.effectiveTime = effectiveTime; + return this; + } + + /** + * The period of time in seconds, that soft-deleted objects in the bucket will be retained and + * cannot be permanently deleted. + * @return value or {@code null} for none + */ + public java.lang.Long getRetentionDurationSeconds() { + return retentionDurationSeconds; + } + + /** + * The period of time in seconds, that soft-deleted objects in the bucket will be retained and + * cannot be permanently deleted. + * @param retentionDurationSeconds retentionDurationSeconds or {@code null} for none + */ + public SoftDeletePolicy setRetentionDurationSeconds(java.lang.Long retentionDurationSeconds) { + this.retentionDurationSeconds = retentionDurationSeconds; + return this; + } + + @Override + public SoftDeletePolicy set(String fieldName, Object value) { + return (SoftDeletePolicy) super.set(fieldName, value); + } + + @Override + public SoftDeletePolicy clone() { + return (SoftDeletePolicy) super.clone(); + } + + } + /** * The bucket's versioning configuration. */ diff --git a/clients/google-api-services-storage/v1/2.0.0/com/google/api/services/storage/model/StorageObject.java b/clients/google-api-services-storage/v1/2.0.0/com/google/api/services/storage/model/StorageObject.java index 1b00ed0c024..4fe421df7c6 100644 --- a/clients/google-api-services-storage/v1/2.0.0/com/google/api/services/storage/model/StorageObject.java +++ b/clients/google-api-services-storage/v1/2.0.0/com/google/api/services/storage/model/StorageObject.java @@ -208,6 +208,13 @@ public final class StorageObject extends com.google.api.client.json.GenericJson @com.google.api.client.util.Key private Owner owner; + /** + * A collection of object level retention parameters. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private Retention retention; + /** * A server-determined value that specifies the earliest time that the object's retention period * expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with @@ -709,6 +716,23 @@ public StorageObject setOwner(Owner owner) { return this; } + /** + * A collection of object level retention parameters. + * @return value or {@code null} for none + */ + public Retention getRetention() { + return retention; + } + + /** + * A collection of object level retention parameters. + * @param retention retention or {@code null} for none + */ + public StorageObject setRetention(Retention retention) { + this.retention = retention; + return this; + } + /** * A server-determined value that specifies the earliest time that the object's retention period * expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with @@ -1028,4 +1052,69 @@ public Owner clone() { } + /** + * A collection of object level retention parameters. + */ + public static final class Retention extends com.google.api.client.json.GenericJson { + + /** + * The bucket's object retention mode, can only be Unlocked or Locked. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String mode; + + /** + * A time in RFC 3339 format until which object retention protects this object. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private com.google.api.client.util.DateTime retainUntilTime; + + /** + * The bucket's object retention mode, can only be Unlocked or Locked. + * @return value or {@code null} for none + */ + public java.lang.String getMode() { + return mode; + } + + /** + * The bucket's object retention mode, can only be Unlocked or Locked. + * @param mode mode or {@code null} for none + */ + public Retention setMode(java.lang.String mode) { + this.mode = mode; + return this; + } + + /** + * A time in RFC 3339 format until which object retention protects this object. + * @return value or {@code null} for none + */ + public com.google.api.client.util.DateTime getRetainUntilTime() { + return retainUntilTime; + } + + /** + * A time in RFC 3339 format until which object retention protects this object. + * @param retainUntilTime retainUntilTime or {@code null} for none + */ + public Retention setRetainUntilTime(com.google.api.client.util.DateTime retainUntilTime) { + this.retainUntilTime = retainUntilTime; + return this; + } + + @Override + public Retention set(String fieldName, Object value) { + return (Retention) super.set(fieldName, value); + } + + @Override + public Retention clone() { + return (Retention) super.clone(); + } + + } + } diff --git a/clients/google-api-services-storage/v1/2.0.0/pom.xml b/clients/google-api-services-storage/v1/2.0.0/pom.xml index 036fe1bd4f5..6cdd1b68d7e 100644 --- a/clients/google-api-services-storage/v1/2.0.0/pom.xml +++ b/clients/google-api-services-storage/v1/2.0.0/pom.xml @@ -8,8 +8,8 @@