# Interface Bucket.Lifecycle.Rule.ConditionOrBuilder (2.69.0)

2.69.0 (latest) 2.67.0 2.64.0 2.63.0 2.62.1 2.60.0 2.59.0 2.58.1 2.57.0 2.56.0 2.55.0 2.54.0 2.53.3 2.52.3 2.50.0 2.49.0 2.48.2 2.47.0 2.46.0 2.45.0 2.44.1 2.43.2 2.42.0 2.41.0 2.40.1 2.39.0 2.38.0 2.37.0 2.36.1 2.34.0 2.33.0 2.32.1 2.30.1 2.29.1 2.28.0 2.27.1 2.24.0 2.23.0 2.22.6 2.21.0 2.20.2 2.19.0 2.18.0 2.17.2 2.16.0 2.15.1 2.14.0 2.13.1 2.12.0 2.11.3 2.10.0 2.9.3 2.8.1 2.7.1 2.6.1 2.5.1 2.4.5 2.3.0 2.2.3 2.1.10

    public static interface Bucket.Lifecycle.Rule.ConditionOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getAgeDays()

    public abstract int getAgeDays()

Age of an object (in days). This condition is satisfied when an
object reaches the specified age.
A value of 0 indicates that all objects immediately match this
condition.

`optional int32 age_days = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The ageDays. |

### getCreatedBefore()

    public abstract Date getCreatedBefore()

Optional. This condition is satisfied when an object is created
before midnight of the specified date in UTC.

`.google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.type.Date` | The createdBefore. |

### getCreatedBeforeOrBuilder()

    public abstract DateOrBuilder getCreatedBeforeOrBuilder()

Optional. This condition is satisfied when an object is created
before midnight of the specified date in UTC.

`.google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.type.DateOrBuilder` |   |

### getCustomTimeBefore()

    public abstract Date getCustomTimeBefore()

Optional. An object matches this condition if the custom timestamp
set on the object is before the specified date in UTC.

`.google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.type.Date` | The customTimeBefore. |

### getCustomTimeBeforeOrBuilder()

    public abstract DateOrBuilder getCustomTimeBeforeOrBuilder()

Optional. An object matches this condition if the custom timestamp
set on the object is before the specified date in UTC.

`.google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.type.DateOrBuilder` |   |

### getDaysSinceCustomTime()

    public abstract int getDaysSinceCustomTime()

Number of days that have elapsed since the custom timestamp set on an
object.
The value of the field must be a nonnegative integer.

`optional int32 days_since_custom_time = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The daysSinceCustomTime. |

### getDaysSinceNoncurrentTime()

    public abstract int getDaysSinceNoncurrentTime()

This condition is relevant only for versioned objects. An object
version satisfies this condition only if these many days have been
passed since it became noncurrent. The value of the field must be a
nonnegative integer. If it's zero, the object version becomes
eligible for Lifecycle action as soon as it becomes noncurrent.

`optional int32 days_since_noncurrent_time = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The daysSinceNoncurrentTime. |

### getIsLive()

    public abstract boolean getIsLive()

Relevant only for versioned objects. If the value is
`true`, this condition matches live objects; if the value
is `false`, it matches archived objects.

`optional bool is_live = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The isLive. |

### getMatchesPrefix(int index)

    public abstract String getMatchesPrefix(int index)

Optional. List of object name prefixes. If any prefix exactly matches
the beginning of the object name, the condition evaluates to true.

`repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The matchesPrefix at the given index. |

### getMatchesPrefixBytes(int index)

    public abstract ByteString getMatchesPrefixBytes(int index)

Optional. List of object name prefixes. If any prefix exactly matches
the beginning of the object name, the condition evaluates to true.

`repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the matchesPrefix at the given index. |

### getMatchesPrefixCount()

    public abstract int getMatchesPrefixCount()

Optional. List of object name prefixes. If any prefix exactly matches
the beginning of the object name, the condition evaluates to true.

`repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of matchesPrefix. |

### getMatchesPrefixList()

    public abstract List<String> getMatchesPrefixList()

Optional. List of object name prefixes. If any prefix exactly matches
the beginning of the object name, the condition evaluates to true.

`repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the matchesPrefix. |

### getMatchesStorageClass(int index)

    public abstract String getMatchesStorageClass(int index)

Optional. Objects having any of the storage classes specified by this
condition are matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
`NEARLINE`, `COLDLINE`, `STANDARD`, and
`DURABLE_REDUCED_AVAILABILITY`.

`
repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The matchesStorageClass at the given index. |

### getMatchesStorageClassBytes(int index)

    public abstract ByteString getMatchesStorageClassBytes(int index)

Optional. Objects having any of the storage classes specified by this
condition are matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
`NEARLINE`, `COLDLINE`, `STANDARD`, and
`DURABLE_REDUCED_AVAILABILITY`.

`
repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the matchesStorageClass at the given index. |

### getMatchesStorageClassCount()

    public abstract int getMatchesStorageClassCount()

Optional. Objects having any of the storage classes specified by this
condition are matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
`NEARLINE`, `COLDLINE`, `STANDARD`, and
`DURABLE_REDUCED_AVAILABILITY`.

`
repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of matchesStorageClass. |

### getMatchesStorageClassList()

    public abstract List<String> getMatchesStorageClassList()

Optional. Objects having any of the storage classes specified by this
condition are matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
`NEARLINE`, `COLDLINE`, `STANDARD`, and
`DURABLE_REDUCED_AVAILABILITY`.

`
repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the matchesStorageClass. |

### getMatchesSuffix(int index)

    public abstract String getMatchesSuffix(int index)

Optional. List of object name suffixes. If any suffix exactly matches
the end of the object name, the condition evaluates to true.

`repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The matchesSuffix at the given index. |

### getMatchesSuffixBytes(int index)

    public abstract ByteString getMatchesSuffixBytes(int index)

Optional. List of object name suffixes. If any suffix exactly matches
the end of the object name, the condition evaluates to true.

`repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the matchesSuffix at the given index. |

### getMatchesSuffixCount()

    public abstract int getMatchesSuffixCount()

Optional. List of object name suffixes. If any suffix exactly matches
the end of the object name, the condition evaluates to true.

`repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of matchesSuffix. |

### getMatchesSuffixList()

    public abstract List<String> getMatchesSuffixList()

Optional. List of object name suffixes. If any suffix exactly matches
the end of the object name, the condition evaluates to true.

`repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the matchesSuffix. |

### getNoncurrentTimeBefore()

    public abstract Date getNoncurrentTimeBefore()

Optional. This condition is relevant only for versioned objects. An
object version satisfies this condition only if it became noncurrent
before the specified date in UTC.

`
.google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.type.Date` | The noncurrentTimeBefore. |

### getNoncurrentTimeBeforeOrBuilder()

    public abstract DateOrBuilder getNoncurrentTimeBeforeOrBuilder()

Optional. This condition is relevant only for versioned objects. An
object version satisfies this condition only if it became noncurrent
before the specified date in UTC.

`
.google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.type.DateOrBuilder` |   |

### getNumNewerVersions()

    public abstract int getNumNewerVersions()

Relevant only for versioned objects. If the value is N, this
condition is satisfied when there are at least N versions (including
the live version) newer than this version of the object.

`optional int32 num_newer_versions = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The numNewerVersions. |

### hasAgeDays()

    public abstract boolean hasAgeDays()

Age of an object (in days). This condition is satisfied when an
object reaches the specified age.
A value of 0 indicates that all objects immediately match this
condition.

`optional int32 age_days = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the ageDays field is set. |

### hasCreatedBefore()

    public abstract boolean hasCreatedBefore()

Optional. This condition is satisfied when an object is created
before midnight of the specified date in UTC.

`.google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createdBefore field is set. |

### hasCustomTimeBefore()

    public abstract boolean hasCustomTimeBefore()

Optional. An object matches this condition if the custom timestamp
set on the object is before the specified date in UTC.

`.google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the customTimeBefore field is set. |

### hasDaysSinceCustomTime()

    public abstract boolean hasDaysSinceCustomTime()

Number of days that have elapsed since the custom timestamp set on an
object.
The value of the field must be a nonnegative integer.

`optional int32 days_since_custom_time = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the daysSinceCustomTime field is set. |

### hasDaysSinceNoncurrentTime()

    public abstract boolean hasDaysSinceNoncurrentTime()

This condition is relevant only for versioned objects. An object
version satisfies this condition only if these many days have been
passed since it became noncurrent. The value of the field must be a
nonnegative integer. If it's zero, the object version becomes
eligible for Lifecycle action as soon as it becomes noncurrent.

`optional int32 days_since_noncurrent_time = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the daysSinceNoncurrentTime field is set. |

### hasIsLive()

    public abstract boolean hasIsLive()

Relevant only for versioned objects. If the value is
`true`, this condition matches live objects; if the value
is `false`, it matches archived objects.

`optional bool is_live = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the isLive field is set. |

### hasNoncurrentTimeBefore()

    public abstract boolean hasNoncurrentTimeBefore()

Optional. This condition is relevant only for versioned objects. An
object version satisfies this condition only if it became noncurrent
before the specified date in UTC.

`
.google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the noncurrentTimeBefore field is set. |

### hasNumNewerVersions()

    public abstract boolean hasNumNewerVersions()

Relevant only for versioned objects. If the value is N, this
condition is satisfied when there are at least N versions (including
the live version) newer than this version of the object.

`optional int32 num_newer_versions = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the numNewerVersions field is set. |