Class SourceContext.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SourceContext.Builder>
io.grafeas.v1beta1.source.SourceContext.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, SourceContextOrBuilder, Cloneable
Enclosing class:
SourceContext

public static final class SourceContext.Builder extends com.google.protobuf.GeneratedMessage.Builder<SourceContext.Builder> implements SourceContextOrBuilder
 A SourceContext is a reference to a tree of files. A SourceContext together
 with a path point to a unique revision of a single file or directory.
 
Protobuf type grafeas.v1beta1.source.SourceContext
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SourceContext.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SourceContext.Builder>
    • internalGetFieldAccessorTable

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

      public SourceContext.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<SourceContext.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<SourceContext.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public SourceContext.Builder mergeFrom(SourceContext other)
    • isInitialized

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

      public SourceContext.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<SourceContext.Builder>
      Throws:
      IOException
    • getContextCase

      public SourceContext.ContextCase getContextCase()
      Specified by:
      getContextCase in interface SourceContextOrBuilder
    • clearContext

      public SourceContext.Builder clearContext()
    • hasCloudRepo

      public boolean hasCloudRepo()
       A SourceContext referring to a revision in a Google Cloud Source Repo.
       
      .grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;
      Specified by:
      hasCloudRepo in interface SourceContextOrBuilder
      Returns:
      Whether the cloudRepo field is set.
    • getCloudRepo

      public CloudRepoSourceContext getCloudRepo()
       A SourceContext referring to a revision in a Google Cloud Source Repo.
       
      .grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;
      Specified by:
      getCloudRepo in interface SourceContextOrBuilder
      Returns:
      The cloudRepo.
    • setCloudRepo

      public SourceContext.Builder setCloudRepo(CloudRepoSourceContext value)
       A SourceContext referring to a revision in a Google Cloud Source Repo.
       
      .grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;
    • setCloudRepo

      public SourceContext.Builder setCloudRepo(CloudRepoSourceContext.Builder builderForValue)
       A SourceContext referring to a revision in a Google Cloud Source Repo.
       
      .grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;
    • mergeCloudRepo

      public SourceContext.Builder mergeCloudRepo(CloudRepoSourceContext value)
       A SourceContext referring to a revision in a Google Cloud Source Repo.
       
      .grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;
    • clearCloudRepo

      public SourceContext.Builder clearCloudRepo()
       A SourceContext referring to a revision in a Google Cloud Source Repo.
       
      .grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;
    • getCloudRepoBuilder

      public CloudRepoSourceContext.Builder getCloudRepoBuilder()
       A SourceContext referring to a revision in a Google Cloud Source Repo.
       
      .grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;
    • getCloudRepoOrBuilder

      public CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder()
       A SourceContext referring to a revision in a Google Cloud Source Repo.
       
      .grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;
      Specified by:
      getCloudRepoOrBuilder in interface SourceContextOrBuilder
    • hasGerrit

      public boolean hasGerrit()
       A SourceContext referring to a Gerrit project.
       
      .grafeas.v1beta1.source.GerritSourceContext gerrit = 2;
      Specified by:
      hasGerrit in interface SourceContextOrBuilder
      Returns:
      Whether the gerrit field is set.
    • getGerrit

      public GerritSourceContext getGerrit()
       A SourceContext referring to a Gerrit project.
       
      .grafeas.v1beta1.source.GerritSourceContext gerrit = 2;
      Specified by:
      getGerrit in interface SourceContextOrBuilder
      Returns:
      The gerrit.
    • setGerrit

      public SourceContext.Builder setGerrit(GerritSourceContext value)
       A SourceContext referring to a Gerrit project.
       
      .grafeas.v1beta1.source.GerritSourceContext gerrit = 2;
    • setGerrit

      public SourceContext.Builder setGerrit(GerritSourceContext.Builder builderForValue)
       A SourceContext referring to a Gerrit project.
       
      .grafeas.v1beta1.source.GerritSourceContext gerrit = 2;
    • mergeGerrit

      public SourceContext.Builder mergeGerrit(GerritSourceContext value)
       A SourceContext referring to a Gerrit project.
       
      .grafeas.v1beta1.source.GerritSourceContext gerrit = 2;
    • clearGerrit

      public SourceContext.Builder clearGerrit()
       A SourceContext referring to a Gerrit project.
       
      .grafeas.v1beta1.source.GerritSourceContext gerrit = 2;
    • getGerritBuilder

      public GerritSourceContext.Builder getGerritBuilder()
       A SourceContext referring to a Gerrit project.
       
      .grafeas.v1beta1.source.GerritSourceContext gerrit = 2;
    • getGerritOrBuilder

      public GerritSourceContextOrBuilder getGerritOrBuilder()
       A SourceContext referring to a Gerrit project.
       
      .grafeas.v1beta1.source.GerritSourceContext gerrit = 2;
      Specified by:
      getGerritOrBuilder in interface SourceContextOrBuilder
    • hasGit

      public boolean hasGit()
       A SourceContext referring to any third party Git repo (e.g., GitHub).
       
      .grafeas.v1beta1.source.GitSourceContext git = 3;
      Specified by:
      hasGit in interface SourceContextOrBuilder
      Returns:
      Whether the git field is set.
    • getGit

      public GitSourceContext getGit()
       A SourceContext referring to any third party Git repo (e.g., GitHub).
       
      .grafeas.v1beta1.source.GitSourceContext git = 3;
      Specified by:
      getGit in interface SourceContextOrBuilder
      Returns:
      The git.
    • setGit

      public SourceContext.Builder setGit(GitSourceContext value)
       A SourceContext referring to any third party Git repo (e.g., GitHub).
       
      .grafeas.v1beta1.source.GitSourceContext git = 3;
    • setGit

      public SourceContext.Builder setGit(GitSourceContext.Builder builderForValue)
       A SourceContext referring to any third party Git repo (e.g., GitHub).
       
      .grafeas.v1beta1.source.GitSourceContext git = 3;
    • mergeGit

      public SourceContext.Builder mergeGit(GitSourceContext value)
       A SourceContext referring to any third party Git repo (e.g., GitHub).
       
      .grafeas.v1beta1.source.GitSourceContext git = 3;
    • clearGit

      public SourceContext.Builder clearGit()
       A SourceContext referring to any third party Git repo (e.g., GitHub).
       
      .grafeas.v1beta1.source.GitSourceContext git = 3;
    • getGitBuilder

      public GitSourceContext.Builder getGitBuilder()
       A SourceContext referring to any third party Git repo (e.g., GitHub).
       
      .grafeas.v1beta1.source.GitSourceContext git = 3;
    • getGitOrBuilder

      public GitSourceContextOrBuilder getGitOrBuilder()
       A SourceContext referring to any third party Git repo (e.g., GitHub).
       
      .grafeas.v1beta1.source.GitSourceContext git = 3;
      Specified by:
      getGitOrBuilder in interface SourceContextOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: SourceContextOrBuilder
       Labels with user defined metadata.
       
      map<string, string> labels = 4;
      Specified by:
      getLabelsCount in interface SourceContextOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels with user defined metadata.
       
      map<string, string> labels = 4;
      Specified by:
      containsLabels in interface SourceContextOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface SourceContextOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels with user defined metadata.
       
      map<string, string> labels = 4;
      Specified by:
      getLabelsMap in interface SourceContextOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels with user defined metadata.
       
      map<string, string> labels = 4;
      Specified by:
      getLabelsOrDefault in interface SourceContextOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels with user defined metadata.
       
      map<string, string> labels = 4;
      Specified by:
      getLabelsOrThrow in interface SourceContextOrBuilder
    • clearLabels

      public SourceContext.Builder clearLabels()
    • removeLabels

      public SourceContext.Builder removeLabels(String key)
       Labels with user defined metadata.
       
      map<string, string> labels = 4;
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public SourceContext.Builder putLabels(String key, String value)
       Labels with user defined metadata.
       
      map<string, string> labels = 4;
    • putAllLabels

      public SourceContext.Builder putAllLabels(Map<String,String> values)
       Labels with user defined metadata.
       
      map<string, string> labels = 4;