Class GuestPolicies.AptRepository.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GuestPolicies.AptRepository.Builder>
com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.Builder
All Implemented Interfaces:
GuestPolicies.AptRepositoryOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
GuestPolicies.AptRepository

public static final class GuestPolicies.AptRepository.Builder extends com.google.protobuf.GeneratedMessage.Builder<GuestPolicies.AptRepository.Builder> implements GuestPolicies.AptRepositoryOrBuilder
 Represents a single Apt package repository. This repository is added to
 a repo file that is stored at
 `/etc/apt/sources.list.d/google_osconfig.list`.
 
Protobuf type google.cloud.osconfig.v1beta.AptRepository
  • 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<GuestPolicies.AptRepository.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<GuestPolicies.AptRepository.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<GuestPolicies.AptRepository.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public GuestPolicies.AptRepository.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<GuestPolicies.AptRepository.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<GuestPolicies.AptRepository.Builder>
    • mergeFrom

      public GuestPolicies.AptRepository.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<GuestPolicies.AptRepository.Builder>
      Throws:
      IOException
    • getArchiveTypeValue

      public int getArchiveTypeValue()
       Type of archive files in this repository. The default behavior is DEB.
       
      .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1;
      Specified by:
      getArchiveTypeValue in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      The enum numeric value on the wire for archiveType.
    • setArchiveTypeValue

      public GuestPolicies.AptRepository.Builder setArchiveTypeValue(int value)
       Type of archive files in this repository. The default behavior is DEB.
       
      .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1;
      Parameters:
      value - The enum numeric value on the wire for archiveType to set.
      Returns:
      This builder for chaining.
    • getArchiveType

      public GuestPolicies.AptRepository.ArchiveType getArchiveType()
       Type of archive files in this repository. The default behavior is DEB.
       
      .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1;
      Specified by:
      getArchiveType in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      The archiveType.
    • setArchiveType

       Type of archive files in this repository. The default behavior is DEB.
       
      .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1;
      Parameters:
      value - The archiveType to set.
      Returns:
      This builder for chaining.
    • clearArchiveType

      public GuestPolicies.AptRepository.Builder clearArchiveType()
       Type of archive files in this repository. The default behavior is DEB.
       
      .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1;
      Returns:
      This builder for chaining.
    • getUri

      public String getUri()
       Required. URI for this repository.
       
      string uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getUri in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      The uri.
    • getUriBytes

      public com.google.protobuf.ByteString getUriBytes()
       Required. URI for this repository.
       
      string uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getUriBytes in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      The bytes for uri.
    • setUri

       Required. URI for this repository.
       
      string uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The uri to set.
      Returns:
      This builder for chaining.
    • clearUri

       Required. URI for this repository.
       
      string uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setUriBytes

      public GuestPolicies.AptRepository.Builder setUriBytes(com.google.protobuf.ByteString value)
       Required. URI for this repository.
       
      string uri = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.
    • getDistribution

      public String getDistribution()
       Required. Distribution of this repository.
       
      string distribution = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDistribution in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      The distribution.
    • getDistributionBytes

      public com.google.protobuf.ByteString getDistributionBytes()
       Required. Distribution of this repository.
       
      string distribution = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDistributionBytes in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      The bytes for distribution.
    • setDistribution

      public GuestPolicies.AptRepository.Builder setDistribution(String value)
       Required. Distribution of this repository.
       
      string distribution = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The distribution to set.
      Returns:
      This builder for chaining.
    • clearDistribution

      public GuestPolicies.AptRepository.Builder clearDistribution()
       Required. Distribution of this repository.
       
      string distribution = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setDistributionBytes

      public GuestPolicies.AptRepository.Builder setDistributionBytes(com.google.protobuf.ByteString value)
       Required. Distribution of this repository.
       
      string distribution = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for distribution to set.
      Returns:
      This builder for chaining.
    • getComponentsList

      public com.google.protobuf.ProtocolStringList getComponentsList()
       Required. List of components for this repository. Must contain at least one item.
       
      repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getComponentsList in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      A list containing the components.
    • getComponentsCount

      public int getComponentsCount()
       Required. List of components for this repository. Must contain at least one item.
       
      repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getComponentsCount in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      The count of components.
    • getComponents

      public String getComponents(int index)
       Required. List of components for this repository. Must contain at least one item.
       
      repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getComponents in interface GuestPolicies.AptRepositoryOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The components at the given index.
    • getComponentsBytes

      public com.google.protobuf.ByteString getComponentsBytes(int index)
       Required. List of components for this repository. Must contain at least one item.
       
      repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getComponentsBytes in interface GuestPolicies.AptRepositoryOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the components at the given index.
    • setComponents

      public GuestPolicies.AptRepository.Builder setComponents(int index, String value)
       Required. List of components for this repository. Must contain at least one item.
       
      repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The components to set.
      Returns:
      This builder for chaining.
    • addComponents

      public GuestPolicies.AptRepository.Builder addComponents(String value)
       Required. List of components for this repository. Must contain at least one item.
       
      repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The components to add.
      Returns:
      This builder for chaining.
    • addAllComponents

      public GuestPolicies.AptRepository.Builder addAllComponents(Iterable<String> values)
       Required. List of components for this repository. Must contain at least one item.
       
      repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The components to add.
      Returns:
      This builder for chaining.
    • clearComponents

      public GuestPolicies.AptRepository.Builder clearComponents()
       Required. List of components for this repository. Must contain at least one item.
       
      repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • addComponentsBytes

      public GuestPolicies.AptRepository.Builder addComponentsBytes(com.google.protobuf.ByteString value)
       Required. List of components for this repository. Must contain at least one item.
       
      repeated string components = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes of the components to add.
      Returns:
      This builder for chaining.
    • getGpgKey

      public String getGpgKey()
       URI of the key file for this repository. The agent maintains
       a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
       all the keys in any applied guest policy.
       
      string gpg_key = 5;
      Specified by:
      getGpgKey in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      The gpgKey.
    • getGpgKeyBytes

      public com.google.protobuf.ByteString getGpgKeyBytes()
       URI of the key file for this repository. The agent maintains
       a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
       all the keys in any applied guest policy.
       
      string gpg_key = 5;
      Specified by:
      getGpgKeyBytes in interface GuestPolicies.AptRepositoryOrBuilder
      Returns:
      The bytes for gpgKey.
    • setGpgKey

      public GuestPolicies.AptRepository.Builder setGpgKey(String value)
       URI of the key file for this repository. The agent maintains
       a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
       all the keys in any applied guest policy.
       
      string gpg_key = 5;
      Parameters:
      value - The gpgKey to set.
      Returns:
      This builder for chaining.
    • clearGpgKey

       URI of the key file for this repository. The agent maintains
       a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
       all the keys in any applied guest policy.
       
      string gpg_key = 5;
      Returns:
      This builder for chaining.
    • setGpgKeyBytes

      public GuestPolicies.AptRepository.Builder setGpgKeyBytes(com.google.protobuf.ByteString value)
       URI of the key file for this repository. The agent maintains
       a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
       all the keys in any applied guest policy.
       
      string gpg_key = 5;
      Parameters:
      value - The bytes for gpgKey to set.
      Returns:
      This builder for chaining.