Class CleanupPolicyCondition.Builder (1.38.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
TypeDescription
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
NameDescription
valuesIterable<String>

The packageNamePrefixes to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The tagPrefixes to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The versionNamePrefixes to add.

Returns
TypeDescription
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
NameDescription
valueString

The packageNamePrefixes to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the packageNamePrefixes to add.

Returns
TypeDescription
CleanupPolicyCondition.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CleanupPolicyCondition.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The tagPrefixes to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the tagPrefixes to add.

Returns
TypeDescription
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
NameDescription
valueString

The versionNamePrefixes to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the versionNamePrefixes to add.

Returns
TypeDescription
CleanupPolicyCondition.Builder

This builder for chaining.

build()

public CleanupPolicyCondition build()
Returns
TypeDescription
CleanupPolicyCondition

buildPartial()

public CleanupPolicyCondition buildPartial()
Returns
TypeDescription
CleanupPolicyCondition

clear()

public CleanupPolicyCondition.Builder clear()
Returns
TypeDescription
CleanupPolicyCondition.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CleanupPolicyCondition.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CleanupPolicyCondition.Builder
Overrides

clearNewerThan()

public CleanupPolicyCondition.Builder clearNewerThan()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
TypeDescription
CleanupPolicyCondition.Builder

clearOlderThan()

public CleanupPolicyCondition.Builder clearOlderThan()

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Returns
TypeDescription
CleanupPolicyCondition.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public CleanupPolicyCondition.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CleanupPolicyCondition.Builder

This builder for chaining.

clone()

public CleanupPolicyCondition.Builder clone()
Returns
TypeDescription
CleanupPolicyCondition.Builder
Overrides

getDefaultInstanceForType()

public CleanupPolicyCondition getDefaultInstanceForType()
Returns
TypeDescription
CleanupPolicyCondition

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getNewerThan()

public Duration getNewerThan()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
TypeDescription
Duration

The newerThan.

getNewerThanBuilder()

public Duration.Builder getNewerThanBuilder()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
TypeDescription
Builder

getNewerThanOrBuilder()

public DurationOrBuilder getNewerThanOrBuilder()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
TypeDescription
DurationOrBuilder

getOlderThan()

public Duration getOlderThan()

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Returns
TypeDescription
Duration

The olderThan.

getOlderThanBuilder()

public Duration.Builder getOlderThanBuilder()

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Returns
TypeDescription
Builder

getOlderThanOrBuilder()

public DurationOrBuilder getOlderThanOrBuilder()

Match versions older than a duration.

optional .google.protobuf.Duration older_than = 6;

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CleanupPolicyCondition.TagState

The tagState.

getTagStateValue()

public int getTagStateValue()

Match versions by tag status.

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

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the versionNamePrefixes.

hasNewerThan()

public boolean hasNewerThan()

Match versions newer than a duration.

optional .google.protobuf.Duration newer_than = 7;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the tagState field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CleanupPolicyCondition other)

public CleanupPolicyCondition.Builder mergeFrom(CleanupPolicyCondition other)
Parameter
NameDescription
otherCleanupPolicyCondition
Returns
TypeDescription
CleanupPolicyCondition.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CleanupPolicyCondition.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CleanupPolicyCondition.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CleanupPolicyCondition.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueDuration
Returns
TypeDescription
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
NameDescription
valueDuration
Returns
TypeDescription
CleanupPolicyCondition.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CleanupPolicyCondition.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CleanupPolicyCondition.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public CleanupPolicyCondition.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueDuration
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueDuration
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The packageNamePrefixes to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The tagPrefixes to set.

Returns
TypeDescription
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
NameDescription
valueCleanupPolicyCondition.TagState

The tagState to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
CleanupPolicyCondition.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CleanupPolicyCondition.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The versionNamePrefixes to set.

Returns
TypeDescription
CleanupPolicyCondition.Builder

This builder for chaining.