Class CleanupPolicy.Builder (1.32.0)

public static final class CleanupPolicy.Builder extends GeneratedMessageV3.Builder<CleanupPolicy.Builder> implements CleanupPolicyOrBuilder

Artifact policy configuration for repository cleanup policies.

Protobuf type google.devtools.artifactregistry.v1.CleanupPolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CleanupPolicy build()
Returns
TypeDescription
CleanupPolicy

buildPartial()

public CleanupPolicy buildPartial()
Returns
TypeDescription
CleanupPolicy

clear()

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

clearAction()

public CleanupPolicy.Builder clearAction()

Policy action.

.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;

Returns
TypeDescription
CleanupPolicy.Builder

This builder for chaining.

clearCondition()

public CleanupPolicy.Builder clearCondition()

Policy condition for matching versions.

.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;

Returns
TypeDescription
CleanupPolicy.Builder

clearConditionType()

public CleanupPolicy.Builder clearConditionType()
Returns
TypeDescription
CleanupPolicy.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearId()

public CleanupPolicy.Builder clearId()

The user-provided ID of the cleanup policy.

string id = 1;

Returns
TypeDescription
CleanupPolicy.Builder

This builder for chaining.

clearMostRecentVersions()

public CleanupPolicy.Builder clearMostRecentVersions()

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;

Returns
TypeDescription
CleanupPolicy.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public CleanupPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
CleanupPolicy.Builder
Overrides

clone()

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

getAction()

public CleanupPolicy.Action getAction()

Policy action.

.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;

Returns
TypeDescription
CleanupPolicy.Action

The action.

getActionValue()

public int getActionValue()

Policy action.

.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;

Returns
TypeDescription
int

The enum numeric value on the wire for action.

getCondition()

public CleanupPolicyCondition getCondition()

Policy condition for matching versions.

.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;

Returns
TypeDescription
CleanupPolicyCondition

The condition.

getConditionBuilder()

public CleanupPolicyCondition.Builder getConditionBuilder()

Policy condition for matching versions.

.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;

Returns
TypeDescription
CleanupPolicyCondition.Builder

getConditionOrBuilder()

public CleanupPolicyConditionOrBuilder getConditionOrBuilder()

Policy condition for matching versions.

.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;

Returns
TypeDescription
CleanupPolicyConditionOrBuilder

getConditionTypeCase()

public CleanupPolicy.ConditionTypeCase getConditionTypeCase()
Returns
TypeDescription
CleanupPolicy.ConditionTypeCase

getDefaultInstanceForType()

public CleanupPolicy getDefaultInstanceForType()
Returns
TypeDescription
CleanupPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getId()

public String getId()

The user-provided ID of the cleanup policy.

string id = 1;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

The user-provided ID of the cleanup policy.

string id = 1;

Returns
TypeDescription
ByteString

The bytes for id.

getMostRecentVersions()

public CleanupPolicyMostRecentVersions getMostRecentVersions()

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;

Returns
TypeDescription
CleanupPolicyMostRecentVersions

The mostRecentVersions.

getMostRecentVersionsBuilder()

public CleanupPolicyMostRecentVersions.Builder getMostRecentVersionsBuilder()

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;

Returns
TypeDescription
CleanupPolicyMostRecentVersions.Builder

getMostRecentVersionsOrBuilder()

public CleanupPolicyMostRecentVersionsOrBuilder getMostRecentVersionsOrBuilder()

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;

Returns
TypeDescription
CleanupPolicyMostRecentVersionsOrBuilder

hasCondition()

public boolean hasCondition()

Policy condition for matching versions.

.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;

Returns
TypeDescription
boolean

Whether the condition field is set.

hasMostRecentVersions()

public boolean hasMostRecentVersions()

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;

Returns
TypeDescription
boolean

Whether the mostRecentVersions field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCondition(CleanupPolicyCondition value)

public CleanupPolicy.Builder mergeCondition(CleanupPolicyCondition value)

Policy condition for matching versions.

.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;

Parameter
NameDescription
valueCleanupPolicyCondition
Returns
TypeDescription
CleanupPolicy.Builder

mergeFrom(CleanupPolicy other)

public CleanupPolicy.Builder mergeFrom(CleanupPolicy other)
Parameter
NameDescription
otherCleanupPolicy
Returns
TypeDescription
CleanupPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeMostRecentVersions(CleanupPolicyMostRecentVersions value)

public CleanupPolicy.Builder mergeMostRecentVersions(CleanupPolicyMostRecentVersions value)

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;

Parameter
NameDescription
valueCleanupPolicyMostRecentVersions
Returns
TypeDescription
CleanupPolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAction(CleanupPolicy.Action value)

public CleanupPolicy.Builder setAction(CleanupPolicy.Action value)

Policy action.

.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;

Parameter
NameDescription
valueCleanupPolicy.Action

The action to set.

Returns
TypeDescription
CleanupPolicy.Builder

This builder for chaining.

setActionValue(int value)

public CleanupPolicy.Builder setActionValue(int value)

Policy action.

.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
CleanupPolicy.Builder

This builder for chaining.

setCondition(CleanupPolicyCondition value)

public CleanupPolicy.Builder setCondition(CleanupPolicyCondition value)

Policy condition for matching versions.

.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;

Parameter
NameDescription
valueCleanupPolicyCondition
Returns
TypeDescription
CleanupPolicy.Builder

setCondition(CleanupPolicyCondition.Builder builderForValue)

public CleanupPolicy.Builder setCondition(CleanupPolicyCondition.Builder builderForValue)

Policy condition for matching versions.

.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;

Parameter
NameDescription
builderForValueCleanupPolicyCondition.Builder
Returns
TypeDescription
CleanupPolicy.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setId(String value)

public CleanupPolicy.Builder setId(String value)

The user-provided ID of the cleanup policy.

string id = 1;

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
CleanupPolicy.Builder

This builder for chaining.

setIdBytes(ByteString value)

public CleanupPolicy.Builder setIdBytes(ByteString value)

The user-provided ID of the cleanup policy.

string id = 1;

Parameter
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
CleanupPolicy.Builder

This builder for chaining.

setMostRecentVersions(CleanupPolicyMostRecentVersions value)

public CleanupPolicy.Builder setMostRecentVersions(CleanupPolicyMostRecentVersions value)

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;

Parameter
NameDescription
valueCleanupPolicyMostRecentVersions
Returns
TypeDescription
CleanupPolicy.Builder

setMostRecentVersions(CleanupPolicyMostRecentVersions.Builder builderForValue)

public CleanupPolicy.Builder setMostRecentVersions(CleanupPolicyMostRecentVersions.Builder builderForValue)

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;

Parameter
NameDescription
builderForValueCleanupPolicyMostRecentVersions.Builder
Returns
TypeDescription
CleanupPolicy.Builder

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

public CleanupPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CleanupPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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