Class GitFileSource.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GitFileSource.Builder>
com.google.cloudbuild.v1.GitFileSource.Builder
All Implemented Interfaces:
GitFileSourceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
GitFileSource

public static final class GitFileSource.Builder extends com.google.protobuf.GeneratedMessage.Builder<GitFileSource.Builder> implements GitFileSourceOrBuilder
 GitFileSource describes a file within a (possibly remote) code repository.
 
Protobuf type google.devtools.cloudbuild.v1.GitFileSource
  • 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<GitFileSource.Builder>
    • clear

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

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

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

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

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

      public GitFileSource.Builder mergeFrom(GitFileSource other)
    • isInitialized

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

      public GitFileSource.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<GitFileSource.Builder>
      Throws:
      IOException
    • getSourceCase

      public GitFileSource.SourceCase getSourceCase()
      Specified by:
      getSourceCase in interface GitFileSourceOrBuilder
    • clearSource

      public GitFileSource.Builder clearSource()
    • getEnterpriseConfigCase

      public GitFileSource.EnterpriseConfigCase getEnterpriseConfigCase()
      Specified by:
      getEnterpriseConfigCase in interface GitFileSourceOrBuilder
    • clearEnterpriseConfig

      public GitFileSource.Builder clearEnterpriseConfig()
    • getPath

      public String getPath()
       The path of the file, with the repo root as the root of the path.
       
      string path = 1;
      Specified by:
      getPath in interface GitFileSourceOrBuilder
      Returns:
      The path.
    • getPathBytes

      public com.google.protobuf.ByteString getPathBytes()
       The path of the file, with the repo root as the root of the path.
       
      string path = 1;
      Specified by:
      getPathBytes in interface GitFileSourceOrBuilder
      Returns:
      The bytes for path.
    • setPath

      public GitFileSource.Builder setPath(String value)
       The path of the file, with the repo root as the root of the path.
       
      string path = 1;
      Parameters:
      value - The path to set.
      Returns:
      This builder for chaining.
    • clearPath

      public GitFileSource.Builder clearPath()
       The path of the file, with the repo root as the root of the path.
       
      string path = 1;
      Returns:
      This builder for chaining.
    • setPathBytes

      public GitFileSource.Builder setPathBytes(com.google.protobuf.ByteString value)
       The path of the file, with the repo root as the root of the path.
       
      string path = 1;
      Parameters:
      value - The bytes for path to set.
      Returns:
      This builder for chaining.
    • getUri

      public String getUri()
       The URI of the repo.
       Either uri or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string uri = 2;
      Specified by:
      getUri in interface GitFileSourceOrBuilder
      Returns:
      The uri.
    • getUriBytes

      public com.google.protobuf.ByteString getUriBytes()
       The URI of the repo.
       Either uri or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string uri = 2;
      Specified by:
      getUriBytes in interface GitFileSourceOrBuilder
      Returns:
      The bytes for uri.
    • setUri

      public GitFileSource.Builder setUri(String value)
       The URI of the repo.
       Either uri or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string uri = 2;
      Parameters:
      value - The uri to set.
      Returns:
      This builder for chaining.
    • clearUri

      public GitFileSource.Builder clearUri()
       The URI of the repo.
       Either uri or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string uri = 2;
      Returns:
      This builder for chaining.
    • setUriBytes

      public GitFileSource.Builder setUriBytes(com.google.protobuf.ByteString value)
       The URI of the repo.
       Either uri or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string uri = 2;
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.
    • hasRepository

      public boolean hasRepository()
       The fully qualified resource name of the Repos API repository.
       Either URI or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string repository = 7 [(.google.api.resource_reference) = { ... }
      Specified by:
      hasRepository in interface GitFileSourceOrBuilder
      Returns:
      Whether the repository field is set.
    • getRepository

      public String getRepository()
       The fully qualified resource name of the Repos API repository.
       Either URI or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string repository = 7 [(.google.api.resource_reference) = { ... }
      Specified by:
      getRepository in interface GitFileSourceOrBuilder
      Returns:
      The repository.
    • getRepositoryBytes

      public com.google.protobuf.ByteString getRepositoryBytes()
       The fully qualified resource name of the Repos API repository.
       Either URI or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string repository = 7 [(.google.api.resource_reference) = { ... }
      Specified by:
      getRepositoryBytes in interface GitFileSourceOrBuilder
      Returns:
      The bytes for repository.
    • setRepository

      public GitFileSource.Builder setRepository(String value)
       The fully qualified resource name of the Repos API repository.
       Either URI or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string repository = 7 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The repository to set.
      Returns:
      This builder for chaining.
    • clearRepository

      public GitFileSource.Builder clearRepository()
       The fully qualified resource name of the Repos API repository.
       Either URI or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string repository = 7 [(.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setRepositoryBytes

      public GitFileSource.Builder setRepositoryBytes(com.google.protobuf.ByteString value)
       The fully qualified resource name of the Repos API repository.
       Either URI or repository can be specified.
       If unspecified, the repo from which the trigger invocation originated is
       assumed to be the repo from which to read the specified path.
       
      string repository = 7 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for repository to set.
      Returns:
      This builder for chaining.
    • getRepoTypeValue

      public int getRepoTypeValue()
       See RepoType above.
       
      .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;
      Specified by:
      getRepoTypeValue in interface GitFileSourceOrBuilder
      Returns:
      The enum numeric value on the wire for repoType.
    • setRepoTypeValue

      public GitFileSource.Builder setRepoTypeValue(int value)
       See RepoType above.
       
      .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;
      Parameters:
      value - The enum numeric value on the wire for repoType to set.
      Returns:
      This builder for chaining.
    • getRepoType

      public GitFileSource.RepoType getRepoType()
       See RepoType above.
       
      .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;
      Specified by:
      getRepoType in interface GitFileSourceOrBuilder
      Returns:
      The repoType.
    • setRepoType

      public GitFileSource.Builder setRepoType(GitFileSource.RepoType value)
       See RepoType above.
       
      .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;
      Parameters:
      value - The repoType to set.
      Returns:
      This builder for chaining.
    • clearRepoType

      public GitFileSource.Builder clearRepoType()
       See RepoType above.
       
      .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;
      Returns:
      This builder for chaining.
    • getRevision

      public String getRevision()
       The branch, tag, arbitrary ref, or SHA version of the repo to use when
       resolving the filename (optional).
       This field respects the same syntax/resolution as described here:
       https://git-scm.com/docs/gitrevisions
       If unspecified, the revision from which the trigger invocation originated
       is assumed to be the revision from which to read the specified path.
       
      string revision = 4;
      Specified by:
      getRevision in interface GitFileSourceOrBuilder
      Returns:
      The revision.
    • getRevisionBytes

      public com.google.protobuf.ByteString getRevisionBytes()
       The branch, tag, arbitrary ref, or SHA version of the repo to use when
       resolving the filename (optional).
       This field respects the same syntax/resolution as described here:
       https://git-scm.com/docs/gitrevisions
       If unspecified, the revision from which the trigger invocation originated
       is assumed to be the revision from which to read the specified path.
       
      string revision = 4;
      Specified by:
      getRevisionBytes in interface GitFileSourceOrBuilder
      Returns:
      The bytes for revision.
    • setRevision

      public GitFileSource.Builder setRevision(String value)
       The branch, tag, arbitrary ref, or SHA version of the repo to use when
       resolving the filename (optional).
       This field respects the same syntax/resolution as described here:
       https://git-scm.com/docs/gitrevisions
       If unspecified, the revision from which the trigger invocation originated
       is assumed to be the revision from which to read the specified path.
       
      string revision = 4;
      Parameters:
      value - The revision to set.
      Returns:
      This builder for chaining.
    • clearRevision

      public GitFileSource.Builder clearRevision()
       The branch, tag, arbitrary ref, or SHA version of the repo to use when
       resolving the filename (optional).
       This field respects the same syntax/resolution as described here:
       https://git-scm.com/docs/gitrevisions
       If unspecified, the revision from which the trigger invocation originated
       is assumed to be the revision from which to read the specified path.
       
      string revision = 4;
      Returns:
      This builder for chaining.
    • setRevisionBytes

      public GitFileSource.Builder setRevisionBytes(com.google.protobuf.ByteString value)
       The branch, tag, arbitrary ref, or SHA version of the repo to use when
       resolving the filename (optional).
       This field respects the same syntax/resolution as described here:
       https://git-scm.com/docs/gitrevisions
       If unspecified, the revision from which the trigger invocation originated
       is assumed to be the revision from which to read the specified path.
       
      string revision = 4;
      Parameters:
      value - The bytes for revision to set.
      Returns:
      This builder for chaining.
    • hasGithubEnterpriseConfig

      public boolean hasGithubEnterpriseConfig()
       The full resource name of the github enterprise config.
       Format:
       `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
       `projects/{project}/githubEnterpriseConfigs/{id}`.
       
      string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... }
      Specified by:
      hasGithubEnterpriseConfig in interface GitFileSourceOrBuilder
      Returns:
      Whether the githubEnterpriseConfig field is set.
    • getGithubEnterpriseConfig

      public String getGithubEnterpriseConfig()
       The full resource name of the github enterprise config.
       Format:
       `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
       `projects/{project}/githubEnterpriseConfigs/{id}`.
       
      string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... }
      Specified by:
      getGithubEnterpriseConfig in interface GitFileSourceOrBuilder
      Returns:
      The githubEnterpriseConfig.
    • getGithubEnterpriseConfigBytes

      public com.google.protobuf.ByteString getGithubEnterpriseConfigBytes()
       The full resource name of the github enterprise config.
       Format:
       `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
       `projects/{project}/githubEnterpriseConfigs/{id}`.
       
      string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... }
      Specified by:
      getGithubEnterpriseConfigBytes in interface GitFileSourceOrBuilder
      Returns:
      The bytes for githubEnterpriseConfig.
    • setGithubEnterpriseConfig

      public GitFileSource.Builder setGithubEnterpriseConfig(String value)
       The full resource name of the github enterprise config.
       Format:
       `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
       `projects/{project}/githubEnterpriseConfigs/{id}`.
       
      string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The githubEnterpriseConfig to set.
      Returns:
      This builder for chaining.
    • clearGithubEnterpriseConfig

      public GitFileSource.Builder clearGithubEnterpriseConfig()
       The full resource name of the github enterprise config.
       Format:
       `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
       `projects/{project}/githubEnterpriseConfigs/{id}`.
       
      string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setGithubEnterpriseConfigBytes

      public GitFileSource.Builder setGithubEnterpriseConfigBytes(com.google.protobuf.ByteString value)
       The full resource name of the github enterprise config.
       Format:
       `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
       `projects/{project}/githubEnterpriseConfigs/{id}`.
       
      string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for githubEnterpriseConfig to set.
      Returns:
      This builder for chaining.