Class CleanupPolicy.Builder (1.45.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CleanupPolicy build()
Returns
Type Description
CleanupPolicy

buildPartial()

public CleanupPolicy buildPartial()
Returns
Type Description
CleanupPolicy

clear()

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

clearAction()

public CleanupPolicy.Builder clearAction()

Policy action.

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

Returns
Type Description
CleanupPolicy.Builder

This builder for chaining.

clearCondition()

public CleanupPolicy.Builder clearCondition()

Policy condition for matching versions.

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

Returns
Type Description
CleanupPolicy.Builder

clearConditionType()

public CleanupPolicy.Builder clearConditionType()
Returns
Type Description
CleanupPolicy.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearId()

public CleanupPolicy.Builder clearId()

The user-provided ID of the cleanup policy.

string id = 1;

Returns
Type Description
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
Type Description
CleanupPolicy.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getAction()

public CleanupPolicy.Action getAction()

Policy action.

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

Returns
Type Description
CleanupPolicy.Action

The action.

getActionValue()

public int getActionValue()

Policy action.

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

Returns
Type Description
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
Type Description
CleanupPolicyCondition

The condition.

getConditionBuilder()

public CleanupPolicyCondition.Builder getConditionBuilder()

Policy condition for matching versions.

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

Returns
Type Description
CleanupPolicyCondition.Builder

getConditionOrBuilder()

public CleanupPolicyConditionOrBuilder getConditionOrBuilder()

Policy condition for matching versions.

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

Returns
Type Description
CleanupPolicyConditionOrBuilder

getConditionTypeCase()

public CleanupPolicy.ConditionTypeCase getConditionTypeCase()
Returns
Type Description
CleanupPolicy.ConditionTypeCase

getDefaultInstanceForType()

public CleanupPolicy getDefaultInstanceForType()
Returns
Type Description
CleanupPolicy

getDescriptorForType()

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

getId()

public String getId()

The user-provided ID of the cleanup policy.

string id = 1;

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

The user-provided ID of the cleanup policy.

string id = 1;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
CleanupPolicyMostRecentVersionsOrBuilder

hasCondition()

public boolean hasCondition()

Policy condition for matching versions.

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

Returns
Type Description
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
Type Description
boolean

Whether the mostRecentVersions field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCondition(CleanupPolicyCondition value)

public CleanupPolicy.Builder mergeCondition(CleanupPolicyCondition value)

Policy condition for matching versions.

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

Parameter
Name Description
value CleanupPolicyCondition
Returns
Type Description
CleanupPolicy.Builder

mergeFrom(CleanupPolicy other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public CleanupPolicy.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value CleanupPolicyMostRecentVersions
Returns
Type Description
CleanupPolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CleanupPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value CleanupPolicy.Action

The action to set.

Returns
Type Description
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
Name Description
value int

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

Returns
Type Description
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
Name Description
value CleanupPolicyCondition
Returns
Type Description
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
Name Description
builderForValue CleanupPolicyCondition.Builder
Returns
Type Description
CleanupPolicy.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setId(String value)

public CleanupPolicy.Builder setId(String value)

The user-provided ID of the cleanup policy.

string id = 1;

Parameter
Name Description
value String

The id to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
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
Name Description
value CleanupPolicyMostRecentVersions
Returns
Type Description
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
Name Description
builderForValue CleanupPolicyMostRecentVersions.Builder
Returns
Type Description
CleanupPolicy.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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