Class CleanupPolicyCondition.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CleanupPolicyCondition.Builder>
com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder
All Implemented Interfaces:
CleanupPolicyConditionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CleanupPolicyCondition

public static final class CleanupPolicyCondition.Builder extends com.google.protobuf.GeneratedMessage.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
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CleanupPolicyCondition.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<CleanupPolicyCondition.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<CleanupPolicyCondition.Builder>
    • getDefaultInstanceForType

      public CleanupPolicyCondition getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public CleanupPolicyCondition build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public CleanupPolicyCondition buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public CleanupPolicyCondition.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CleanupPolicyCondition.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<CleanupPolicyCondition.Builder>
    • mergeFrom

      public CleanupPolicyCondition.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CleanupPolicyCondition.Builder>
      Throws:
      IOException
    • hasTagState

      public boolean hasTagState()
       Match versions by tag status.
       
      optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
      Specified by:
      hasTagState in interface CleanupPolicyConditionOrBuilder
      Returns:
      Whether the tagState field is set.
    • getTagStateValue

      public int getTagStateValue()
       Match versions by tag status.
       
      optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
      Specified by:
      getTagStateValue in interface CleanupPolicyConditionOrBuilder
      Returns:
      The enum numeric value on the wire for tagState.
    • setTagStateValue

      public CleanupPolicyCondition.Builder setTagStateValue(int value)
       Match versions by tag status.
       
      optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
      Parameters:
      value - The enum numeric value on the wire for tagState to set.
      Returns:
      This builder for chaining.
    • getTagState

      public CleanupPolicyCondition.TagState getTagState()
       Match versions by tag status.
       
      optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
      Specified by:
      getTagState in interface CleanupPolicyConditionOrBuilder
      Returns:
      The tagState.
    • setTagState

       Match versions by tag status.
       
      optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
      Parameters:
      value - The tagState to set.
      Returns:
      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:
      This builder for chaining.
    • getTagPrefixesList

      public com.google.protobuf.ProtocolStringList getTagPrefixesList()
       Match versions by tag prefix. Applied on any prefix match.
       
      repeated string tag_prefixes = 3;
      Specified by:
      getTagPrefixesList in interface CleanupPolicyConditionOrBuilder
      Returns:
      A list containing the tagPrefixes.
    • getTagPrefixesCount

      public int getTagPrefixesCount()
       Match versions by tag prefix. Applied on any prefix match.
       
      repeated string tag_prefixes = 3;
      Specified by:
      getTagPrefixesCount in interface CleanupPolicyConditionOrBuilder
      Returns:
      The count of tagPrefixes.
    • getTagPrefixes

      public String getTagPrefixes(int index)
       Match versions by tag prefix. Applied on any prefix match.
       
      repeated string tag_prefixes = 3;
      Specified by:
      getTagPrefixes in interface CleanupPolicyConditionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The tagPrefixes at the given index.
    • getTagPrefixesBytes

      public com.google.protobuf.ByteString getTagPrefixesBytes(int index)
       Match versions by tag prefix. Applied on any prefix match.
       
      repeated string tag_prefixes = 3;
      Specified by:
      getTagPrefixesBytes in interface CleanupPolicyConditionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the tagPrefixes at the given index.
    • setTagPrefixes

      public CleanupPolicyCondition.Builder setTagPrefixes(int index, String value)
       Match versions by tag prefix. Applied on any prefix match.
       
      repeated string tag_prefixes = 3;
      Parameters:
      index - The index to set the value at.
      value - The tagPrefixes to set.
      Returns:
      This builder for chaining.
    • addTagPrefixes

      public CleanupPolicyCondition.Builder addTagPrefixes(String value)
       Match versions by tag prefix. Applied on any prefix match.
       
      repeated string tag_prefixes = 3;
      Parameters:
      value - The tagPrefixes to add.
      Returns:
      This builder for chaining.
    • addAllTagPrefixes

      public CleanupPolicyCondition.Builder addAllTagPrefixes(Iterable<String> values)
       Match versions by tag prefix. Applied on any prefix match.
       
      repeated string tag_prefixes = 3;
      Parameters:
      values - The tagPrefixes to add.
      Returns:
      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:
      This builder for chaining.
    • addTagPrefixesBytes

      public CleanupPolicyCondition.Builder addTagPrefixesBytes(com.google.protobuf.ByteString value)
       Match versions by tag prefix. Applied on any prefix match.
       
      repeated string tag_prefixes = 3;
      Parameters:
      value - The bytes of the tagPrefixes to add.
      Returns:
      This builder for chaining.
    • getVersionNamePrefixesList

      public com.google.protobuf.ProtocolStringList getVersionNamePrefixesList()
       Match versions by version name prefix. Applied on any prefix match.
       
      repeated string version_name_prefixes = 4;
      Specified by:
      getVersionNamePrefixesList in interface CleanupPolicyConditionOrBuilder
      Returns:
      A list containing the versionNamePrefixes.
    • getVersionNamePrefixesCount

      public int getVersionNamePrefixesCount()
       Match versions by version name prefix. Applied on any prefix match.
       
      repeated string version_name_prefixes = 4;
      Specified by:
      getVersionNamePrefixesCount in interface CleanupPolicyConditionOrBuilder
      Returns:
      The count of versionNamePrefixes.
    • getVersionNamePrefixes

      public String getVersionNamePrefixes(int index)
       Match versions by version name prefix. Applied on any prefix match.
       
      repeated string version_name_prefixes = 4;
      Specified by:
      getVersionNamePrefixes in interface CleanupPolicyConditionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The versionNamePrefixes at the given index.
    • getVersionNamePrefixesBytes

      public com.google.protobuf.ByteString getVersionNamePrefixesBytes(int index)
       Match versions by version name prefix. Applied on any prefix match.
       
      repeated string version_name_prefixes = 4;
      Specified by:
      getVersionNamePrefixesBytes in interface CleanupPolicyConditionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the versionNamePrefixes at the given index.
    • setVersionNamePrefixes

      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:
      index - The index to set the value at.
      value - The versionNamePrefixes to set.
      Returns:
      This builder for chaining.
    • addVersionNamePrefixes

      public CleanupPolicyCondition.Builder addVersionNamePrefixes(String value)
       Match versions by version name prefix. Applied on any prefix match.
       
      repeated string version_name_prefixes = 4;
      Parameters:
      value - The versionNamePrefixes to add.
      Returns:
      This builder for chaining.
    • addAllVersionNamePrefixes

      public CleanupPolicyCondition.Builder addAllVersionNamePrefixes(Iterable<String> values)
       Match versions by version name prefix. Applied on any prefix match.
       
      repeated string version_name_prefixes = 4;
      Parameters:
      values - The versionNamePrefixes to add.
      Returns:
      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:
      This builder for chaining.
    • addVersionNamePrefixesBytes

      public CleanupPolicyCondition.Builder addVersionNamePrefixesBytes(com.google.protobuf.ByteString value)
       Match versions by version name prefix. Applied on any prefix match.
       
      repeated string version_name_prefixes = 4;
      Parameters:
      value - The bytes of the versionNamePrefixes to add.
      Returns:
      This builder for chaining.
    • getPackageNamePrefixesList

      public com.google.protobuf.ProtocolStringList getPackageNamePrefixesList()
       Match versions by package prefix. Applied on any prefix match.
       
      repeated string package_name_prefixes = 5;
      Specified by:
      getPackageNamePrefixesList in interface CleanupPolicyConditionOrBuilder
      Returns:
      A list containing the packageNamePrefixes.
    • getPackageNamePrefixesCount

      public int getPackageNamePrefixesCount()
       Match versions by package prefix. Applied on any prefix match.
       
      repeated string package_name_prefixes = 5;
      Specified by:
      getPackageNamePrefixesCount in interface CleanupPolicyConditionOrBuilder
      Returns:
      The count of packageNamePrefixes.
    • getPackageNamePrefixes

      public String getPackageNamePrefixes(int index)
       Match versions by package prefix. Applied on any prefix match.
       
      repeated string package_name_prefixes = 5;
      Specified by:
      getPackageNamePrefixes in interface CleanupPolicyConditionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The packageNamePrefixes at the given index.
    • getPackageNamePrefixesBytes

      public com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index)
       Match versions by package prefix. Applied on any prefix match.
       
      repeated string package_name_prefixes = 5;
      Specified by:
      getPackageNamePrefixesBytes in interface CleanupPolicyConditionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the packageNamePrefixes at the given index.
    • setPackageNamePrefixes

      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:
      index - The index to set the value at.
      value - The packageNamePrefixes to set.
      Returns:
      This builder for chaining.
    • addPackageNamePrefixes

      public CleanupPolicyCondition.Builder addPackageNamePrefixes(String value)
       Match versions by package prefix. Applied on any prefix match.
       
      repeated string package_name_prefixes = 5;
      Parameters:
      value - The packageNamePrefixes to add.
      Returns:
      This builder for chaining.
    • addAllPackageNamePrefixes

      public CleanupPolicyCondition.Builder addAllPackageNamePrefixes(Iterable<String> values)
       Match versions by package prefix. Applied on any prefix match.
       
      repeated string package_name_prefixes = 5;
      Parameters:
      values - The packageNamePrefixes to add.
      Returns:
      This builder for chaining.
    • clearPackageNamePrefixes

      public CleanupPolicyCondition.Builder clearPackageNamePrefixes()
       Match versions by package prefix. Applied on any prefix match.
       
      repeated string package_name_prefixes = 5;
      Returns:
      This builder for chaining.
    • addPackageNamePrefixesBytes

      public CleanupPolicyCondition.Builder addPackageNamePrefixesBytes(com.google.protobuf.ByteString value)
       Match versions by package prefix. Applied on any prefix match.
       
      repeated string package_name_prefixes = 5;
      Parameters:
      value - The bytes of the packageNamePrefixes to add.
      Returns:
      This builder for chaining.
    • hasOlderThan

      public boolean hasOlderThan()
       Match versions older than a duration.
       
      optional .google.protobuf.Duration older_than = 6;
      Specified by:
      hasOlderThan in interface CleanupPolicyConditionOrBuilder
      Returns:
      Whether the olderThan field is set.
    • getOlderThan

      public com.google.protobuf.Duration getOlderThan()
       Match versions older than a duration.
       
      optional .google.protobuf.Duration older_than = 6;
      Specified by:
      getOlderThan in interface CleanupPolicyConditionOrBuilder
      Returns:
      The olderThan.
    • setOlderThan

      public CleanupPolicyCondition.Builder setOlderThan(com.google.protobuf.Duration value)
       Match versions older than a duration.
       
      optional .google.protobuf.Duration older_than = 6;
    • setOlderThan

      public CleanupPolicyCondition.Builder setOlderThan(com.google.protobuf.Duration.Builder builderForValue)
       Match versions older than a duration.
       
      optional .google.protobuf.Duration older_than = 6;
    • mergeOlderThan

      public CleanupPolicyCondition.Builder mergeOlderThan(com.google.protobuf.Duration value)
       Match versions older than a duration.
       
      optional .google.protobuf.Duration older_than = 6;
    • clearOlderThan

      public CleanupPolicyCondition.Builder clearOlderThan()
       Match versions older than a duration.
       
      optional .google.protobuf.Duration older_than = 6;
    • getOlderThanBuilder

      public com.google.protobuf.Duration.Builder getOlderThanBuilder()
       Match versions older than a duration.
       
      optional .google.protobuf.Duration older_than = 6;
    • getOlderThanOrBuilder

      public com.google.protobuf.DurationOrBuilder getOlderThanOrBuilder()
       Match versions older than a duration.
       
      optional .google.protobuf.Duration older_than = 6;
      Specified by:
      getOlderThanOrBuilder in interface CleanupPolicyConditionOrBuilder
    • hasNewerThan

      public boolean hasNewerThan()
       Match versions newer than a duration.
       
      optional .google.protobuf.Duration newer_than = 7;
      Specified by:
      hasNewerThan in interface CleanupPolicyConditionOrBuilder
      Returns:
      Whether the newerThan field is set.
    • getNewerThan

      public com.google.protobuf.Duration getNewerThan()
       Match versions newer than a duration.
       
      optional .google.protobuf.Duration newer_than = 7;
      Specified by:
      getNewerThan in interface CleanupPolicyConditionOrBuilder
      Returns:
      The newerThan.
    • setNewerThan

      public CleanupPolicyCondition.Builder setNewerThan(com.google.protobuf.Duration value)
       Match versions newer than a duration.
       
      optional .google.protobuf.Duration newer_than = 7;
    • setNewerThan

      public CleanupPolicyCondition.Builder setNewerThan(com.google.protobuf.Duration.Builder builderForValue)
       Match versions newer than a duration.
       
      optional .google.protobuf.Duration newer_than = 7;
    • mergeNewerThan

      public CleanupPolicyCondition.Builder mergeNewerThan(com.google.protobuf.Duration value)
       Match versions newer than a duration.
       
      optional .google.protobuf.Duration newer_than = 7;
    • clearNewerThan

      public CleanupPolicyCondition.Builder clearNewerThan()
       Match versions newer than a duration.
       
      optional .google.protobuf.Duration newer_than = 7;
    • getNewerThanBuilder

      public com.google.protobuf.Duration.Builder getNewerThanBuilder()
       Match versions newer than a duration.
       
      optional .google.protobuf.Duration newer_than = 7;
    • getNewerThanOrBuilder

      public com.google.protobuf.DurationOrBuilder getNewerThanOrBuilder()
       Match versions newer than a duration.
       
      optional .google.protobuf.Duration newer_than = 7;
      Specified by:
      getNewerThanOrBuilder in interface CleanupPolicyConditionOrBuilder