Class CleanupPolicyCondition.Builder (1.43.0)

public static final class CleanupPolicyCondition.Builder extends GeneratedMessageV3.Builder<CleanupPolicyCondition.Builder> implements CleanupPolicyConditionOrBuilder

CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. If multiple entries are set, all must be satisfied for the condition to be satisfied.

Protobuf type google.devtools.artifactregistry.v1.CleanupPolicyCondition

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllPackageNamePrefixes(Iterable<String> values)

public CleanupPolicyCondition.Builder addAllPackageNamePrefixes(Iterable<String> values)

Match versions by package prefix. Applied on any prefix match.

repeated string package_name_prefixes = 5;

Parameter
Name Description
values Iterable<String>

The packageNamePrefixes to add.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

addAllTagPrefixes(Iterable<String> values)

public CleanupPolicyCondition.Builder addAllTagPrefixes(Iterable<String> values)

Match versions by tag prefix. Applied on any prefix match.

repeated string tag_prefixes = 3;

Parameter
Name Description
values Iterable<String>

The tagPrefixes to add.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

addAllVersionNamePrefixes(Iterable<String> values)

public CleanupPolicyCondition.Builder addAllVersionNamePrefixes(Iterable<String> values)

Match versions by version name prefix. Applied on any prefix match.

repeated string version_name_prefixes = 4;

Parameter
Name Description
values Iterable<String>

The versionNamePrefixes to add.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

addPackageNamePrefixes(String value)

public CleanupPolicyCondition.Builder addPackageNamePrefixes(String value)

Match versions by package prefix. Applied on any prefix match.

repeated string package_name_prefixes = 5;

Parameter
Name Description
value String

The packageNamePrefixes to add.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

addPackageNamePrefixesBytes(ByteString value)

public CleanupPolicyCondition.Builder addPackageNamePrefixesBytes(ByteString value)

Match versions by package prefix. Applied on any prefix match.

repeated string package_name_prefixes = 5;

Parameter
Name Description
value ByteString

The bytes of the packageNamePrefixes to add.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CleanupPolicyCondition.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

addTagPrefixes(String value)

public CleanupPolicyCondition.Builder addTagPrefixes(String value)

Match versions by tag prefix. Applied on any prefix match.

repeated string tag_prefixes = 3;

Parameter
Name Description
value String

The tagPrefixes to add.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

addTagPrefixesBytes(ByteString value)

public CleanupPolicyCondition.Builder addTagPrefixesBytes(ByteString value)

Match versions by tag prefix. Applied on any prefix match.

repeated string tag_prefixes = 3;

Parameter
Name Description
value ByteString

The bytes of the tagPrefixes to add.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

addVersionNamePrefixes(String value)

public CleanupPolicyCondition.Builder addVersionNamePrefixes(String value)

Match versions by version name prefix. Applied on any prefix match.

repeated string version_name_prefixes = 4;

Parameter
Name Description
value String

The versionNamePrefixes to add.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

addVersionNamePrefixesBytes(ByteString value)

public CleanupPolicyCondition.Builder addVersionNamePrefixesBytes(ByteString value)

Match versions by version name prefix. Applied on any prefix match.

repeated string version_name_prefixes = 4;

Parameter
Name Description
value ByteString

The bytes of the versionNamePrefixes to add.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

build()

public CleanupPolicyCondition build()
Returns
Type Description
CleanupPolicyCondition

buildPartial()

public CleanupPolicyCondition buildPartial()
Returns
Type Description
CleanupPolicyCondition

clear()

public CleanupPolicyCondition.Builder clear()
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CleanupPolicyCondition.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

clearNewerThan()

public CleanupPolicyCondition.Builder clearNewerThan()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
Type Description
CleanupPolicyCondition.Builder

clearOlderThan()

public CleanupPolicyCondition.Builder clearOlderThan()

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Returns
Type Description
CleanupPolicyCondition.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public CleanupPolicyCondition.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

clearPackageNamePrefixes()

public CleanupPolicyCondition.Builder clearPackageNamePrefixes()

Match versions by package prefix. Applied on any prefix match.

repeated string package_name_prefixes = 5;

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

clearTagPrefixes()

public CleanupPolicyCondition.Builder clearTagPrefixes()

Match versions by tag prefix. Applied on any prefix match.

repeated string tag_prefixes = 3;

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

clearTagState()

public CleanupPolicyCondition.Builder clearTagState()

Match versions by tag status.

optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

clearVersionNamePrefixes()

public CleanupPolicyCondition.Builder clearVersionNamePrefixes()

Match versions by version name prefix. Applied on any prefix match.

repeated string version_name_prefixes = 4;

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

clone()

public CleanupPolicyCondition.Builder clone()
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

getDefaultInstanceForType()

public CleanupPolicyCondition getDefaultInstanceForType()
Returns
Type Description
CleanupPolicyCondition

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getNewerThan()

public Duration getNewerThan()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
Type Description
Duration

The newerThan.

getNewerThanBuilder()

public Duration.Builder getNewerThanBuilder()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
Type Description
Builder

getNewerThanOrBuilder()

public DurationOrBuilder getNewerThanOrBuilder()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
Type Description
DurationOrBuilder

getOlderThan()

public Duration getOlderThan()

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Returns
Type Description
Duration

The olderThan.

getOlderThanBuilder()

public Duration.Builder getOlderThanBuilder()

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Returns
Type Description
Builder

getOlderThanOrBuilder()

public DurationOrBuilder getOlderThanOrBuilder()

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Returns
Type Description
DurationOrBuilder

getPackageNamePrefixes(int index)

public String getPackageNamePrefixes(int index)

Match versions by package prefix. Applied on any prefix match.

repeated string package_name_prefixes = 5;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The packageNamePrefixes at the given index.

getPackageNamePrefixesBytes(int index)

public ByteString getPackageNamePrefixesBytes(int index)

Match versions by package prefix. Applied on any prefix match.

repeated string package_name_prefixes = 5;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the packageNamePrefixes at the given index.

getPackageNamePrefixesCount()

public int getPackageNamePrefixesCount()

Match versions by package prefix. Applied on any prefix match.

repeated string package_name_prefixes = 5;

Returns
Type Description
int

The count of packageNamePrefixes.

getPackageNamePrefixesList()

public ProtocolStringList getPackageNamePrefixesList()

Match versions by package prefix. Applied on any prefix match.

repeated string package_name_prefixes = 5;

Returns
Type Description
ProtocolStringList

A list containing the packageNamePrefixes.

getTagPrefixes(int index)

public String getTagPrefixes(int index)

Match versions by tag prefix. Applied on any prefix match.

repeated string tag_prefixes = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The tagPrefixes at the given index.

getTagPrefixesBytes(int index)

public ByteString getTagPrefixesBytes(int index)

Match versions by tag prefix. Applied on any prefix match.

repeated string tag_prefixes = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the tagPrefixes at the given index.

getTagPrefixesCount()

public int getTagPrefixesCount()

Match versions by tag prefix. Applied on any prefix match.

repeated string tag_prefixes = 3;

Returns
Type Description
int

The count of tagPrefixes.

getTagPrefixesList()

public ProtocolStringList getTagPrefixesList()

Match versions by tag prefix. Applied on any prefix match.

repeated string tag_prefixes = 3;

Returns
Type Description
ProtocolStringList

A list containing the tagPrefixes.

getTagState()

public CleanupPolicyCondition.TagState getTagState()

Match versions by tag status.

optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;

Returns
Type Description
CleanupPolicyCondition.TagState

The tagState.

getTagStateValue()

public int getTagStateValue()

Match versions by tag status.

optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;

Returns
Type Description
int

The enum numeric value on the wire for tagState.

getVersionNamePrefixes(int index)

public String getVersionNamePrefixes(int index)

Match versions by version name prefix. Applied on any prefix match.

repeated string version_name_prefixes = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The versionNamePrefixes at the given index.

getVersionNamePrefixesBytes(int index)

public ByteString getVersionNamePrefixesBytes(int index)

Match versions by version name prefix. Applied on any prefix match.

repeated string version_name_prefixes = 4;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the versionNamePrefixes at the given index.

getVersionNamePrefixesCount()

public int getVersionNamePrefixesCount()

Match versions by version name prefix. Applied on any prefix match.

repeated string version_name_prefixes = 4;

Returns
Type Description
int

The count of versionNamePrefixes.

getVersionNamePrefixesList()

public ProtocolStringList getVersionNamePrefixesList()

Match versions by version name prefix. Applied on any prefix match.

repeated string version_name_prefixes = 4;

Returns
Type Description
ProtocolStringList

A list containing the versionNamePrefixes.

hasNewerThan()

public boolean hasNewerThan()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
Type Description
boolean

Whether the newerThan field is set.

hasOlderThan()

public boolean hasOlderThan()

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Returns
Type Description
boolean

Whether the olderThan field is set.

hasTagState()

public boolean hasTagState()

Match versions by tag status.

optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;

Returns
Type Description
boolean

Whether the tagState field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CleanupPolicyCondition other)

public CleanupPolicyCondition.Builder mergeFrom(CleanupPolicyCondition other)
Parameter
Name Description
other CleanupPolicyCondition
Returns
Type Description
CleanupPolicyCondition.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CleanupPolicyCondition.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CleanupPolicyCondition.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

mergeNewerThan(Duration value)

public CleanupPolicyCondition.Builder mergeNewerThan(Duration value)

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Parameter
Name Description
value Duration
Returns
Type Description
CleanupPolicyCondition.Builder

mergeOlderThan(Duration value)

public CleanupPolicyCondition.Builder mergeOlderThan(Duration value)

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Parameter
Name Description
value Duration
Returns
Type Description
CleanupPolicyCondition.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CleanupPolicyCondition.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public CleanupPolicyCondition.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

setNewerThan(Duration value)

public CleanupPolicyCondition.Builder setNewerThan(Duration value)

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Parameter
Name Description
value Duration
Returns
Type Description
CleanupPolicyCondition.Builder

setNewerThan(Duration.Builder builderForValue)

public CleanupPolicyCondition.Builder setNewerThan(Duration.Builder builderForValue)

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CleanupPolicyCondition.Builder

setOlderThan(Duration value)

public CleanupPolicyCondition.Builder setOlderThan(Duration value)

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Parameter
Name Description
value Duration
Returns
Type Description
CleanupPolicyCondition.Builder

setOlderThan(Duration.Builder builderForValue)

public CleanupPolicyCondition.Builder setOlderThan(Duration.Builder builderForValue)

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CleanupPolicyCondition.Builder

setPackageNamePrefixes(int index, String value)

public CleanupPolicyCondition.Builder setPackageNamePrefixes(int index, String value)

Match versions by package prefix. Applied on any prefix match.

repeated string package_name_prefixes = 5;

Parameters
Name Description
index int

The index to set the value at.

value String

The packageNamePrefixes to set.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CleanupPolicyCondition.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

setTagPrefixes(int index, String value)

public CleanupPolicyCondition.Builder setTagPrefixes(int index, String value)

Match versions by tag prefix. Applied on any prefix match.

repeated string tag_prefixes = 3;

Parameters
Name Description
index int

The index to set the value at.

value String

The tagPrefixes to set.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

setTagState(CleanupPolicyCondition.TagState value)

public CleanupPolicyCondition.Builder setTagState(CleanupPolicyCondition.TagState value)

Match versions by tag status.

optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;

Parameter
Name Description
value CleanupPolicyCondition.TagState

The tagState to set.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

setTagStateValue(int value)

public CleanupPolicyCondition.Builder setTagStateValue(int value)

Match versions by tag status.

optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;

Parameter
Name Description
value int

The enum numeric value on the wire for tagState to set.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CleanupPolicyCondition.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CleanupPolicyCondition.Builder
Overrides

setVersionNamePrefixes(int index, String value)

public CleanupPolicyCondition.Builder setVersionNamePrefixes(int index, String value)

Match versions by version name prefix. Applied on any prefix match.

repeated string version_name_prefixes = 4;

Parameters
Name Description
index int

The index to set the value at.

value String

The versionNamePrefixes to set.

Returns
Type Description
CleanupPolicyCondition.Builder

This builder for chaining.