Class ScanRun.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ScanRun.Builder>
com.google.cloud.websecurityscanner.v1alpha.ScanRun.Builder
All Implemented Interfaces:
ScanRunOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ScanRun

public static final class ScanRun.Builder extends com.google.protobuf.GeneratedMessage.Builder<ScanRun.Builder> implements ScanRunOrBuilder
 A ScanRun is a output-only resource representing an actual run of the scan.
 
Protobuf type google.cloud.websecurityscanner.v1alpha.ScanRun
  • 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<ScanRun.Builder>
    • clear

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

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

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

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

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

      public ScanRun.Builder mergeFrom(ScanRun other)
    • isInitialized

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

      public ScanRun.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<ScanRun.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The resource name of the ScanRun. The name follows the format of
       'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
       The ScanRun IDs are generated by the system.
       
      string name = 1;
      Specified by:
      getName in interface ScanRunOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The resource name of the ScanRun. The name follows the format of
       'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
       The ScanRun IDs are generated by the system.
       
      string name = 1;
      Specified by:
      getNameBytes in interface ScanRunOrBuilder
      Returns:
      The bytes for name.
    • setName

      public ScanRun.Builder setName(String value)
       The resource name of the ScanRun. The name follows the format of
       'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
       The ScanRun IDs are generated by the system.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public ScanRun.Builder clearName()
       The resource name of the ScanRun. The name follows the format of
       'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
       The ScanRun IDs are generated by the system.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public ScanRun.Builder setNameBytes(com.google.protobuf.ByteString value)
       The resource name of the ScanRun. The name follows the format of
       'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
       The ScanRun IDs are generated by the system.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getExecutionStateValue

      public int getExecutionStateValue()
       The execution state of the ScanRun.
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState execution_state = 2;
      Specified by:
      getExecutionStateValue in interface ScanRunOrBuilder
      Returns:
      The enum numeric value on the wire for executionState.
    • setExecutionStateValue

      public ScanRun.Builder setExecutionStateValue(int value)
       The execution state of the ScanRun.
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState execution_state = 2;
      Parameters:
      value - The enum numeric value on the wire for executionState to set.
      Returns:
      This builder for chaining.
    • getExecutionState

      public ScanRun.ExecutionState getExecutionState()
       The execution state of the ScanRun.
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState execution_state = 2;
      Specified by:
      getExecutionState in interface ScanRunOrBuilder
      Returns:
      The executionState.
    • setExecutionState

      public ScanRun.Builder setExecutionState(ScanRun.ExecutionState value)
       The execution state of the ScanRun.
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState execution_state = 2;
      Parameters:
      value - The executionState to set.
      Returns:
      This builder for chaining.
    • clearExecutionState

      public ScanRun.Builder clearExecutionState()
       The execution state of the ScanRun.
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState execution_state = 2;
      Returns:
      This builder for chaining.
    • getResultStateValue

      public int getResultStateValue()
       The result state of the ScanRun. This field is only available after the
       execution state reaches "FINISHED".
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState result_state = 3;
      Specified by:
      getResultStateValue in interface ScanRunOrBuilder
      Returns:
      The enum numeric value on the wire for resultState.
    • setResultStateValue

      public ScanRun.Builder setResultStateValue(int value)
       The result state of the ScanRun. This field is only available after the
       execution state reaches "FINISHED".
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState result_state = 3;
      Parameters:
      value - The enum numeric value on the wire for resultState to set.
      Returns:
      This builder for chaining.
    • getResultState

      public ScanRun.ResultState getResultState()
       The result state of the ScanRun. This field is only available after the
       execution state reaches "FINISHED".
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState result_state = 3;
      Specified by:
      getResultState in interface ScanRunOrBuilder
      Returns:
      The resultState.
    • setResultState

      public ScanRun.Builder setResultState(ScanRun.ResultState value)
       The result state of the ScanRun. This field is only available after the
       execution state reaches "FINISHED".
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState result_state = 3;
      Parameters:
      value - The resultState to set.
      Returns:
      This builder for chaining.
    • clearResultState

      public ScanRun.Builder clearResultState()
       The result state of the ScanRun. This field is only available after the
       execution state reaches "FINISHED".
       
      .google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState result_state = 3;
      Returns:
      This builder for chaining.
    • hasStartTime

      public boolean hasStartTime()
       The time at which the ScanRun started.
       
      .google.protobuf.Timestamp start_time = 4;
      Specified by:
      hasStartTime in interface ScanRunOrBuilder
      Returns:
      Whether the startTime field is set.
    • getStartTime

      public com.google.protobuf.Timestamp getStartTime()
       The time at which the ScanRun started.
       
      .google.protobuf.Timestamp start_time = 4;
      Specified by:
      getStartTime in interface ScanRunOrBuilder
      Returns:
      The startTime.
    • setStartTime

      public ScanRun.Builder setStartTime(com.google.protobuf.Timestamp value)
       The time at which the ScanRun started.
       
      .google.protobuf.Timestamp start_time = 4;
    • setStartTime

      public ScanRun.Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
       The time at which the ScanRun started.
       
      .google.protobuf.Timestamp start_time = 4;
    • mergeStartTime

      public ScanRun.Builder mergeStartTime(com.google.protobuf.Timestamp value)
       The time at which the ScanRun started.
       
      .google.protobuf.Timestamp start_time = 4;
    • clearStartTime

      public ScanRun.Builder clearStartTime()
       The time at which the ScanRun started.
       
      .google.protobuf.Timestamp start_time = 4;
    • getStartTimeBuilder

      public com.google.protobuf.Timestamp.Builder getStartTimeBuilder()
       The time at which the ScanRun started.
       
      .google.protobuf.Timestamp start_time = 4;
    • getStartTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder()
       The time at which the ScanRun started.
       
      .google.protobuf.Timestamp start_time = 4;
      Specified by:
      getStartTimeOrBuilder in interface ScanRunOrBuilder
    • hasEndTime

      public boolean hasEndTime()
       The time at which the ScanRun reached termination state - that the ScanRun
       is either finished or stopped by user.
       
      .google.protobuf.Timestamp end_time = 5;
      Specified by:
      hasEndTime in interface ScanRunOrBuilder
      Returns:
      Whether the endTime field is set.
    • getEndTime

      public com.google.protobuf.Timestamp getEndTime()
       The time at which the ScanRun reached termination state - that the ScanRun
       is either finished or stopped by user.
       
      .google.protobuf.Timestamp end_time = 5;
      Specified by:
      getEndTime in interface ScanRunOrBuilder
      Returns:
      The endTime.
    • setEndTime

      public ScanRun.Builder setEndTime(com.google.protobuf.Timestamp value)
       The time at which the ScanRun reached termination state - that the ScanRun
       is either finished or stopped by user.
       
      .google.protobuf.Timestamp end_time = 5;
    • setEndTime

      public ScanRun.Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
       The time at which the ScanRun reached termination state - that the ScanRun
       is either finished or stopped by user.
       
      .google.protobuf.Timestamp end_time = 5;
    • mergeEndTime

      public ScanRun.Builder mergeEndTime(com.google.protobuf.Timestamp value)
       The time at which the ScanRun reached termination state - that the ScanRun
       is either finished or stopped by user.
       
      .google.protobuf.Timestamp end_time = 5;
    • clearEndTime

      public ScanRun.Builder clearEndTime()
       The time at which the ScanRun reached termination state - that the ScanRun
       is either finished or stopped by user.
       
      .google.protobuf.Timestamp end_time = 5;
    • getEndTimeBuilder

      public com.google.protobuf.Timestamp.Builder getEndTimeBuilder()
       The time at which the ScanRun reached termination state - that the ScanRun
       is either finished or stopped by user.
       
      .google.protobuf.Timestamp end_time = 5;
    • getEndTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
       The time at which the ScanRun reached termination state - that the ScanRun
       is either finished or stopped by user.
       
      .google.protobuf.Timestamp end_time = 5;
      Specified by:
      getEndTimeOrBuilder in interface ScanRunOrBuilder
    • getUrlsCrawledCount

      public long getUrlsCrawledCount()
       The number of URLs crawled during this ScanRun. If the scan is in progress,
       the value represents the number of URLs crawled up to now.
       
      int64 urls_crawled_count = 6;
      Specified by:
      getUrlsCrawledCount in interface ScanRunOrBuilder
      Returns:
      The urlsCrawledCount.
    • setUrlsCrawledCount

      public ScanRun.Builder setUrlsCrawledCount(long value)
       The number of URLs crawled during this ScanRun. If the scan is in progress,
       the value represents the number of URLs crawled up to now.
       
      int64 urls_crawled_count = 6;
      Parameters:
      value - The urlsCrawledCount to set.
      Returns:
      This builder for chaining.
    • clearUrlsCrawledCount

      public ScanRun.Builder clearUrlsCrawledCount()
       The number of URLs crawled during this ScanRun. If the scan is in progress,
       the value represents the number of URLs crawled up to now.
       
      int64 urls_crawled_count = 6;
      Returns:
      This builder for chaining.
    • getUrlsTestedCount

      public long getUrlsTestedCount()
       The number of URLs tested during this ScanRun. If the scan is in progress,
       the value represents the number of URLs tested up to now. The number of
       URLs tested is usually larger than the number URLS crawled because
       typically a crawled URL is tested with multiple test payloads.
       
      int64 urls_tested_count = 7;
      Specified by:
      getUrlsTestedCount in interface ScanRunOrBuilder
      Returns:
      The urlsTestedCount.
    • setUrlsTestedCount

      public ScanRun.Builder setUrlsTestedCount(long value)
       The number of URLs tested during this ScanRun. If the scan is in progress,
       the value represents the number of URLs tested up to now. The number of
       URLs tested is usually larger than the number URLS crawled because
       typically a crawled URL is tested with multiple test payloads.
       
      int64 urls_tested_count = 7;
      Parameters:
      value - The urlsTestedCount to set.
      Returns:
      This builder for chaining.
    • clearUrlsTestedCount

      public ScanRun.Builder clearUrlsTestedCount()
       The number of URLs tested during this ScanRun. If the scan is in progress,
       the value represents the number of URLs tested up to now. The number of
       URLs tested is usually larger than the number URLS crawled because
       typically a crawled URL is tested with multiple test payloads.
       
      int64 urls_tested_count = 7;
      Returns:
      This builder for chaining.
    • getHasVulnerabilities

      public boolean getHasVulnerabilities()
       Whether the scan run has found any vulnerabilities.
       
      bool has_vulnerabilities = 8;
      Specified by:
      getHasVulnerabilities in interface ScanRunOrBuilder
      Returns:
      The hasVulnerabilities.
    • setHasVulnerabilities

      public ScanRun.Builder setHasVulnerabilities(boolean value)
       Whether the scan run has found any vulnerabilities.
       
      bool has_vulnerabilities = 8;
      Parameters:
      value - The hasVulnerabilities to set.
      Returns:
      This builder for chaining.
    • clearHasVulnerabilities

      public ScanRun.Builder clearHasVulnerabilities()
       Whether the scan run has found any vulnerabilities.
       
      bool has_vulnerabilities = 8;
      Returns:
      This builder for chaining.
    • getProgressPercent

      public int getProgressPercent()
       The percentage of total completion ranging from 0 to 100.
       If the scan is in queue, the value is 0.
       If the scan is running, the value ranges from 0 to 100.
       If the scan is finished, the value is 100.
       
      int32 progress_percent = 9;
      Specified by:
      getProgressPercent in interface ScanRunOrBuilder
      Returns:
      The progressPercent.
    • setProgressPercent

      public ScanRun.Builder setProgressPercent(int value)
       The percentage of total completion ranging from 0 to 100.
       If the scan is in queue, the value is 0.
       If the scan is running, the value ranges from 0 to 100.
       If the scan is finished, the value is 100.
       
      int32 progress_percent = 9;
      Parameters:
      value - The progressPercent to set.
      Returns:
      This builder for chaining.
    • clearProgressPercent

      public ScanRun.Builder clearProgressPercent()
       The percentage of total completion ranging from 0 to 100.
       If the scan is in queue, the value is 0.
       If the scan is running, the value ranges from 0 to 100.
       If the scan is finished, the value is 100.
       
      int32 progress_percent = 9;
      Returns:
      This builder for chaining.