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

The packageNamePrefixes to add.

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

The packageNamePrefixes to add.

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

The bytes of the packageNamePrefixes to add.

Returns
TypeDescription
CleanupPolicyMostRecentVersions.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CleanupPolicyMostRecentVersions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CleanupPolicyMostRecentVersions.Builder
Overrides

build()

public CleanupPolicyMostRecentVersions build()
Returns
TypeDescription
CleanupPolicyMostRecentVersions

buildPartial()

public CleanupPolicyMostRecentVersions buildPartial()
Returns
TypeDescription
CleanupPolicyMostRecentVersions

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearKeepCount()

public CleanupPolicyMostRecentVersions.Builder clearKeepCount()

Minimum number of versions to keep.

optional int32 keep_count = 2;

Returns
TypeDescription
CleanupPolicyMostRecentVersions.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public CleanupPolicyMostRecentVersions getDefaultInstanceForType()
Returns
TypeDescription
CleanupPolicyMostRecentVersions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKeepCount()

public int getKeepCount()

Minimum number of versions to keep.

optional int32 keep_count = 2;

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

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

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

List of package name prefixes that will apply this rule.

repeated string package_name_prefixes = 1;

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

A list containing the packageNamePrefixes.

hasKeepCount()

public boolean hasKeepCount()

Minimum number of versions to keep.

optional int32 keep_count = 2;

Returns
TypeDescription
boolean

Whether the keepCount field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CleanupPolicyMostRecentVersions other)

public CleanupPolicyMostRecentVersions.Builder mergeFrom(CleanupPolicyMostRecentVersions other)
Parameter
NameDescription
otherCleanupPolicyMostRecentVersions
Returns
TypeDescription
CleanupPolicyMostRecentVersions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public CleanupPolicyMostRecentVersions.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
CleanupPolicyMostRecentVersions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public CleanupPolicyMostRecentVersions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CleanupPolicyMostRecentVersions.Builder
Overrides

setKeepCount(int value)

public CleanupPolicyMostRecentVersions.Builder setKeepCount(int value)

Minimum number of versions to keep.

optional int32 keep_count = 2;

Parameter
NameDescription
valueint

The keepCount to set.

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

The index to set the value at.

valueString

The packageNamePrefixes to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CleanupPolicyMostRecentVersions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CleanupPolicyMostRecentVersions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CleanupPolicyMostRecentVersions.Builder
Overrides