Class CleanupPolicyMostRecentVersions.Builder (1.41.0)

public static final class CleanupPolicyMostRecentVersions.Builder extends GeneratedMessageV3.Builder<CleanupPolicyMostRecentVersions.Builder> implements CleanupPolicyMostRecentVersionsOrBuilder

CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy for retaining a minimum number of versions.

Protobuf type google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions

Static Methods

getDescriptor()

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

Methods

addAllPackageNamePrefixes(Iterable<String> values)

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

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

Parameter
Name Description
values Iterable<String>

The packageNamePrefixes to add.

Returns
Type Description
CleanupPolicyMostRecentVersions.Builder

This builder for chaining.

addPackageNamePrefixes(String value)

public CleanupPolicyMostRecentVersions.Builder addPackageNamePrefixes(String value)

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

Parameter
Name Description
value String

The packageNamePrefixes to add.

Returns
Type Description
CleanupPolicyMostRecentVersions.Builder

This builder for chaining.

addPackageNamePrefixesBytes(ByteString value)

public CleanupPolicyMostRecentVersions.Builder addPackageNamePrefixesBytes(ByteString value)

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

Parameter
Name Description
value ByteString

The bytes of the packageNamePrefixes to add.

Returns
Type Description
CleanupPolicyMostRecentVersions.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CleanupPolicyMostRecentVersions build()
Returns
Type Description
CleanupPolicyMostRecentVersions

buildPartial()

public CleanupPolicyMostRecentVersions buildPartial()
Returns
Type Description
CleanupPolicyMostRecentVersions

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearKeepCount()

public CleanupPolicyMostRecentVersions.Builder clearKeepCount()

Minimum number of versions to keep.

optional int32 keep_count = 2;

Returns
Type Description
CleanupPolicyMostRecentVersions.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPackageNamePrefixes()

public CleanupPolicyMostRecentVersions.Builder clearPackageNamePrefixes()

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

Returns
Type Description
CleanupPolicyMostRecentVersions.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public CleanupPolicyMostRecentVersions getDefaultInstanceForType()
Returns
Type Description
CleanupPolicyMostRecentVersions

getDescriptorForType()

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

getKeepCount()

public int getKeepCount()

Minimum number of versions to keep.

optional int32 keep_count = 2;

Returns
Type Description
int

The keepCount.

getPackageNamePrefixes(int index)

public String getPackageNamePrefixes(int index)

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

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)

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

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()

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

Returns
Type Description
int

The count of packageNamePrefixes.

getPackageNamePrefixesList()

public ProtocolStringList getPackageNamePrefixesList()

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

Returns
Type Description
ProtocolStringList

A list containing the packageNamePrefixes.

hasKeepCount()

public boolean hasKeepCount()

Minimum number of versions to keep.

optional int32 keep_count = 2;

Returns
Type Description
boolean

Whether the keepCount field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CleanupPolicyMostRecentVersions other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setKeepCount(int value)

public CleanupPolicyMostRecentVersions.Builder setKeepCount(int value)

Minimum number of versions to keep.

optional int32 keep_count = 2;

Parameter
Name Description
value int

The keepCount to set.

Returns
Type Description
CleanupPolicyMostRecentVersions.Builder

This builder for chaining.

setPackageNamePrefixes(int index, String value)

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

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

Parameters
Name Description
index int

The index to set the value at.

value String

The packageNamePrefixes to set.

Returns
Type Description
CleanupPolicyMostRecentVersions.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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