Class SourceContext

  • All Implemented Interfaces:
    SourceContextOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class SourceContext
    extends com.google.protobuf.GeneratedMessageV3
    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 google.devtools.source.v1.SourceContext
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasCloudRepo

        public boolean hasCloudRepo()
         A SourceContext referring to a revision in a cloud repo.
         
        .google.devtools.source.v1.CloudRepoSourceContext cloud_repo = 1;
        Specified by:
        hasCloudRepo in interface SourceContextOrBuilder
        Returns:
        Whether the cloudRepo field is set.
      • hasCloudWorkspace

        public boolean hasCloudWorkspace()
         A SourceContext referring to a snapshot in a cloud workspace.
         
        .google.devtools.source.v1.CloudWorkspaceSourceContext cloud_workspace = 2;
        Specified by:
        hasCloudWorkspace in interface SourceContextOrBuilder
        Returns:
        Whether the cloudWorkspace field is set.
      • hasGerrit

        public boolean hasGerrit()
         A SourceContext referring to a Gerrit project.
         
        .google.devtools.source.v1.GerritSourceContext gerrit = 3;
        Specified by:
        hasGerrit in interface SourceContextOrBuilder
        Returns:
        Whether the gerrit field is set.
      • hasGit

        public boolean hasGit()
         A SourceContext referring to any third party Git repo (e.g. GitHub).
         
        .google.devtools.source.v1.GitSourceContext git = 6;
        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).
         
        .google.devtools.source.v1.GitSourceContext git = 6;
        Specified by:
        getGit in interface SourceContextOrBuilder
        Returns:
        The git.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static SourceContext parseFrom​(ByteBuffer data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SourceContext parseFrom​(ByteBuffer data,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SourceContext parseFrom​(com.google.protobuf.ByteString data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SourceContext parseFrom​(com.google.protobuf.ByteString data,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SourceContext parseFrom​(byte[] data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SourceContext parseFrom​(byte[] data,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SourceContext parseFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

        protected SourceContext.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static SourceContext getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<SourceContext> parser()
      • getParserForType

        public com.google.protobuf.Parser<SourceContext> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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