diff --git a/java-websecurityscanner/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1/package-info.java b/java-websecurityscanner/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1/package-info.java index c33cd767612f..d6a9036307be 100644 --- a/java-websecurityscanner/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1/package-info.java +++ b/java-websecurityscanner/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to Web Security Scanner API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= WebSecurityScannerClient ======================= * diff --git a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/ScanRunLog.java b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/ScanRunLog.java new file mode 100644 index 000000000000..41c4f17967c4 --- /dev/null +++ b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/ScanRunLog.java @@ -0,0 +1,1534 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/websecurityscanner/v1/scan_run_log.proto + +package com.google.cloud.websecurityscanner.v1; + +/** + * + * + *

+ * A ScanRunLog is an output-only proto used for Stackdriver customer logging.
+ * It is used for logs covering the start and end of scan pipelines.
+ * Other than an added summary, this is a subset of the ScanRun.
+ * Representation in logs is either a proto Struct, or converted to JSON.
+ * Next id: 9
+ * 
+ * + * Protobuf type {@code google.cloud.websecurityscanner.v1.ScanRunLog} + */ +public final class ScanRunLog extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.websecurityscanner.v1.ScanRunLog) + ScanRunLogOrBuilder { + private static final long serialVersionUID = 0L; + // Use ScanRunLog.newBuilder() to construct. + private ScanRunLog(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ScanRunLog() { + summary_ = ""; + name_ = ""; + executionState_ = 0; + resultState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ScanRunLog(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ScanRunLog( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + summary_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + executionState_ = rawValue; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + resultState_ = rawValue; + break; + } + case 40: + { + urlsCrawledCount_ = input.readInt64(); + break; + } + case 48: + { + urlsTestedCount_ = input.readInt64(); + break; + } + case 56: + { + hasFindings_ = input.readBool(); + break; + } + case 66: + { + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Builder subBuilder = null; + if (errorTrace_ != null) { + subBuilder = errorTrace_.toBuilder(); + } + errorTrace_ = + input.readMessage( + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(errorTrace_); + errorTrace_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.websecurityscanner.v1.ScanRunLogProto + .internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.websecurityscanner.v1.ScanRunLogProto + .internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.websecurityscanner.v1.ScanRunLog.class, + com.google.cloud.websecurityscanner.v1.ScanRunLog.Builder.class); + } + + public static final int SUMMARY_FIELD_NUMBER = 1; + private volatile java.lang.Object summary_; + /** + * + * + *
+   * Human friendly message about the event.
+   * 
+ * + * string summary = 1; + * + * @return The summary. + */ + @java.lang.Override + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } + } + /** + * + * + *
+   * Human friendly message about the event.
+   * 
+ * + * string summary = 1; + * + * @return The bytes for summary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the ScanRun being logged.
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the ScanRun being logged.
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_STATE_FIELD_NUMBER = 3; + private int executionState_; + /** + * + * + *
+   * The execution state of the ScanRun.
+   * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * + * @return The enum numeric value on the wire for executionState. + */ + @java.lang.Override + public int getExecutionStateValue() { + return executionState_; + } + /** + * + * + *
+   * The execution state of the ScanRun.
+   * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * + * @return The executionState. + */ + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState getExecutionState() { + @SuppressWarnings("deprecation") + com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState result = + com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState.valueOf(executionState_); + return result == null + ? com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState.UNRECOGNIZED + : result; + } + + public static final int RESULT_STATE_FIELD_NUMBER = 4; + private int resultState_; + /** + * + * + *
+   * The result state of the ScanRun.
+   * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * + * @return The enum numeric value on the wire for resultState. + */ + @java.lang.Override + public int getResultStateValue() { + return resultState_; + } + /** + * + * + *
+   * The result state of the ScanRun.
+   * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * + * @return The resultState. + */ + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRun.ResultState getResultState() { + @SuppressWarnings("deprecation") + com.google.cloud.websecurityscanner.v1.ScanRun.ResultState result = + com.google.cloud.websecurityscanner.v1.ScanRun.ResultState.valueOf(resultState_); + return result == null + ? com.google.cloud.websecurityscanner.v1.ScanRun.ResultState.UNRECOGNIZED + : result; + } + + public static final int URLS_CRAWLED_COUNT_FIELD_NUMBER = 5; + private long urlsCrawledCount_; + /** + * int64 urls_crawled_count = 5; + * + * @return The urlsCrawledCount. + */ + @java.lang.Override + public long getUrlsCrawledCount() { + return urlsCrawledCount_; + } + + public static final int URLS_TESTED_COUNT_FIELD_NUMBER = 6; + private long urlsTestedCount_; + /** + * int64 urls_tested_count = 6; + * + * @return The urlsTestedCount. + */ + @java.lang.Override + public long getUrlsTestedCount() { + return urlsTestedCount_; + } + + public static final int HAS_FINDINGS_FIELD_NUMBER = 7; + private boolean hasFindings_; + /** + * bool has_findings = 7; + * + * @return The hasFindings. + */ + @java.lang.Override + public boolean getHasFindings() { + return hasFindings_; + } + + public static final int ERROR_TRACE_FIELD_NUMBER = 8; + private com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace errorTrace_; + /** + * .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; + * + * @return Whether the errorTrace field is set. + */ + @java.lang.Override + public boolean hasErrorTrace() { + return errorTrace_ != null; + } + /** + * .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; + * + * @return The errorTrace. + */ + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace getErrorTrace() { + return errorTrace_ == null + ? com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.getDefaultInstance() + : errorTrace_; + } + /** .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRunErrorTraceOrBuilder + getErrorTraceOrBuilder() { + return getErrorTrace(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, summary_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (executionState_ + != com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState.EXECUTION_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, executionState_); + } + if (resultState_ + != com.google.cloud.websecurityscanner.v1.ScanRun.ResultState.RESULT_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, resultState_); + } + if (urlsCrawledCount_ != 0L) { + output.writeInt64(5, urlsCrawledCount_); + } + if (urlsTestedCount_ != 0L) { + output.writeInt64(6, urlsTestedCount_); + } + if (hasFindings_ != false) { + output.writeBool(7, hasFindings_); + } + if (errorTrace_ != null) { + output.writeMessage(8, getErrorTrace()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, summary_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (executionState_ + != com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState.EXECUTION_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, executionState_); + } + if (resultState_ + != com.google.cloud.websecurityscanner.v1.ScanRun.ResultState.RESULT_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, resultState_); + } + if (urlsCrawledCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, urlsCrawledCount_); + } + if (urlsTestedCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, urlsTestedCount_); + } + if (hasFindings_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, hasFindings_); + } + if (errorTrace_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getErrorTrace()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.websecurityscanner.v1.ScanRunLog)) { + return super.equals(obj); + } + com.google.cloud.websecurityscanner.v1.ScanRunLog other = + (com.google.cloud.websecurityscanner.v1.ScanRunLog) obj; + + if (!getSummary().equals(other.getSummary())) return false; + if (!getName().equals(other.getName())) return false; + if (executionState_ != other.executionState_) return false; + if (resultState_ != other.resultState_) return false; + if (getUrlsCrawledCount() != other.getUrlsCrawledCount()) return false; + if (getUrlsTestedCount() != other.getUrlsTestedCount()) return false; + if (getHasFindings() != other.getHasFindings()) return false; + if (hasErrorTrace() != other.hasErrorTrace()) return false; + if (hasErrorTrace()) { + if (!getErrorTrace().equals(other.getErrorTrace())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + EXECUTION_STATE_FIELD_NUMBER; + hash = (53 * hash) + executionState_; + hash = (37 * hash) + RESULT_STATE_FIELD_NUMBER; + hash = (53 * hash) + resultState_; + hash = (37 * hash) + URLS_CRAWLED_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUrlsCrawledCount()); + hash = (37 * hash) + URLS_TESTED_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUrlsTestedCount()); + hash = (37 * hash) + HAS_FINDINGS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHasFindings()); + if (hasErrorTrace()) { + hash = (37 * hash) + ERROR_TRACE_FIELD_NUMBER; + hash = (53 * hash) + getErrorTrace().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.websecurityscanner.v1.ScanRunLog prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A ScanRunLog is an output-only proto used for Stackdriver customer logging.
+   * It is used for logs covering the start and end of scan pipelines.
+   * Other than an added summary, this is a subset of the ScanRun.
+   * Representation in logs is either a proto Struct, or converted to JSON.
+   * Next id: 9
+   * 
+ * + * Protobuf type {@code google.cloud.websecurityscanner.v1.ScanRunLog} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.websecurityscanner.v1.ScanRunLog) + com.google.cloud.websecurityscanner.v1.ScanRunLogOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.websecurityscanner.v1.ScanRunLogProto + .internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.websecurityscanner.v1.ScanRunLogProto + .internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.websecurityscanner.v1.ScanRunLog.class, + com.google.cloud.websecurityscanner.v1.ScanRunLog.Builder.class); + } + + // Construct using com.google.cloud.websecurityscanner.v1.ScanRunLog.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + summary_ = ""; + + name_ = ""; + + executionState_ = 0; + + resultState_ = 0; + + urlsCrawledCount_ = 0L; + + urlsTestedCount_ = 0L; + + hasFindings_ = false; + + if (errorTraceBuilder_ == null) { + errorTrace_ = null; + } else { + errorTrace_ = null; + errorTraceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.websecurityscanner.v1.ScanRunLogProto + .internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_descriptor; + } + + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRunLog getDefaultInstanceForType() { + return com.google.cloud.websecurityscanner.v1.ScanRunLog.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRunLog build() { + com.google.cloud.websecurityscanner.v1.ScanRunLog result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRunLog buildPartial() { + com.google.cloud.websecurityscanner.v1.ScanRunLog result = + new com.google.cloud.websecurityscanner.v1.ScanRunLog(this); + result.summary_ = summary_; + result.name_ = name_; + result.executionState_ = executionState_; + result.resultState_ = resultState_; + result.urlsCrawledCount_ = urlsCrawledCount_; + result.urlsTestedCount_ = urlsTestedCount_; + result.hasFindings_ = hasFindings_; + if (errorTraceBuilder_ == null) { + result.errorTrace_ = errorTrace_; + } else { + result.errorTrace_ = errorTraceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.websecurityscanner.v1.ScanRunLog) { + return mergeFrom((com.google.cloud.websecurityscanner.v1.ScanRunLog) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.websecurityscanner.v1.ScanRunLog other) { + if (other == com.google.cloud.websecurityscanner.v1.ScanRunLog.getDefaultInstance()) + return this; + if (!other.getSummary().isEmpty()) { + summary_ = other.summary_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.executionState_ != 0) { + setExecutionStateValue(other.getExecutionStateValue()); + } + if (other.resultState_ != 0) { + setResultStateValue(other.getResultStateValue()); + } + if (other.getUrlsCrawledCount() != 0L) { + setUrlsCrawledCount(other.getUrlsCrawledCount()); + } + if (other.getUrlsTestedCount() != 0L) { + setUrlsTestedCount(other.getUrlsTestedCount()); + } + if (other.getHasFindings() != false) { + setHasFindings(other.getHasFindings()); + } + if (other.hasErrorTrace()) { + mergeErrorTrace(other.getErrorTrace()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.websecurityscanner.v1.ScanRunLog parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.websecurityscanner.v1.ScanRunLog) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object summary_ = ""; + /** + * + * + *
+     * Human friendly message about the event.
+     * 
+ * + * string summary = 1; + * + * @return The summary. + */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human friendly message about the event.
+     * 
+ * + * string summary = 1; + * + * @return The bytes for summary. + */ + public com.google.protobuf.ByteString getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human friendly message about the event.
+     * 
+ * + * string summary = 1; + * + * @param value The summary to set. + * @return This builder for chaining. + */ + public Builder setSummary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + summary_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Human friendly message about the event.
+     * 
+ * + * string summary = 1; + * + * @return This builder for chaining. + */ + public Builder clearSummary() { + + summary_ = getDefaultInstance().getSummary(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human friendly message about the event.
+     * 
+ * + * string summary = 1; + * + * @param value The bytes for summary to set. + * @return This builder for chaining. + */ + public Builder setSummaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + summary_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the ScanRun being logged.
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the ScanRun being logged.
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the ScanRun being logged.
+     * 
+ * + * string name = 2; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the ScanRun being logged.
+     * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the ScanRun being logged.
+     * 
+ * + * string name = 2; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int executionState_ = 0; + /** + * + * + *
+     * The execution state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * + * @return The enum numeric value on the wire for executionState. + */ + @java.lang.Override + public int getExecutionStateValue() { + return executionState_; + } + /** + * + * + *
+     * The execution state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * + * @param value The enum numeric value on the wire for executionState to set. + * @return This builder for chaining. + */ + public Builder setExecutionStateValue(int value) { + + executionState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The execution state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * + * @return The executionState. + */ + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState getExecutionState() { + @SuppressWarnings("deprecation") + com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState result = + com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState.valueOf(executionState_); + return result == null + ? com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The execution state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * + * @param value The executionState to set. + * @return This builder for chaining. + */ + public Builder setExecutionState( + com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState value) { + if (value == null) { + throw new NullPointerException(); + } + + executionState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The execution state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * + * @return This builder for chaining. + */ + public Builder clearExecutionState() { + + executionState_ = 0; + onChanged(); + return this; + } + + private int resultState_ = 0; + /** + * + * + *
+     * The result state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * + * @return The enum numeric value on the wire for resultState. + */ + @java.lang.Override + public int getResultStateValue() { + return resultState_; + } + /** + * + * + *
+     * The result state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * + * @param value The enum numeric value on the wire for resultState to set. + * @return This builder for chaining. + */ + public Builder setResultStateValue(int value) { + + resultState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The result state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * + * @return The resultState. + */ + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRun.ResultState getResultState() { + @SuppressWarnings("deprecation") + com.google.cloud.websecurityscanner.v1.ScanRun.ResultState result = + com.google.cloud.websecurityscanner.v1.ScanRun.ResultState.valueOf(resultState_); + return result == null + ? com.google.cloud.websecurityscanner.v1.ScanRun.ResultState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The result state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * + * @param value The resultState to set. + * @return This builder for chaining. + */ + public Builder setResultState( + com.google.cloud.websecurityscanner.v1.ScanRun.ResultState value) { + if (value == null) { + throw new NullPointerException(); + } + + resultState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The result state of the ScanRun.
+     * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * + * @return This builder for chaining. + */ + public Builder clearResultState() { + + resultState_ = 0; + onChanged(); + return this; + } + + private long urlsCrawledCount_; + /** + * int64 urls_crawled_count = 5; + * + * @return The urlsCrawledCount. + */ + @java.lang.Override + public long getUrlsCrawledCount() { + return urlsCrawledCount_; + } + /** + * int64 urls_crawled_count = 5; + * + * @param value The urlsCrawledCount to set. + * @return This builder for chaining. + */ + public Builder setUrlsCrawledCount(long value) { + + urlsCrawledCount_ = value; + onChanged(); + return this; + } + /** + * int64 urls_crawled_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearUrlsCrawledCount() { + + urlsCrawledCount_ = 0L; + onChanged(); + return this; + } + + private long urlsTestedCount_; + /** + * int64 urls_tested_count = 6; + * + * @return The urlsTestedCount. + */ + @java.lang.Override + public long getUrlsTestedCount() { + return urlsTestedCount_; + } + /** + * int64 urls_tested_count = 6; + * + * @param value The urlsTestedCount to set. + * @return This builder for chaining. + */ + public Builder setUrlsTestedCount(long value) { + + urlsTestedCount_ = value; + onChanged(); + return this; + } + /** + * int64 urls_tested_count = 6; + * + * @return This builder for chaining. + */ + public Builder clearUrlsTestedCount() { + + urlsTestedCount_ = 0L; + onChanged(); + return this; + } + + private boolean hasFindings_; + /** + * bool has_findings = 7; + * + * @return The hasFindings. + */ + @java.lang.Override + public boolean getHasFindings() { + return hasFindings_; + } + /** + * bool has_findings = 7; + * + * @param value The hasFindings to set. + * @return This builder for chaining. + */ + public Builder setHasFindings(boolean value) { + + hasFindings_ = value; + onChanged(); + return this; + } + /** + * bool has_findings = 7; + * + * @return This builder for chaining. + */ + public Builder clearHasFindings() { + + hasFindings_ = false; + onChanged(); + return this; + } + + private com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace errorTrace_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace, + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Builder, + com.google.cloud.websecurityscanner.v1.ScanRunErrorTraceOrBuilder> + errorTraceBuilder_; + /** + * .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; + * + * @return Whether the errorTrace field is set. + */ + public boolean hasErrorTrace() { + return errorTraceBuilder_ != null || errorTrace_ != null; + } + /** + * .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; + * + * @return The errorTrace. + */ + public com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace getErrorTrace() { + if (errorTraceBuilder_ == null) { + return errorTrace_ == null + ? com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.getDefaultInstance() + : errorTrace_; + } else { + return errorTraceBuilder_.getMessage(); + } + } + /** .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ + public Builder setErrorTrace(com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace value) { + if (errorTraceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + errorTrace_ = value; + onChanged(); + } else { + errorTraceBuilder_.setMessage(value); + } + + return this; + } + /** .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ + public Builder setErrorTrace( + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Builder builderForValue) { + if (errorTraceBuilder_ == null) { + errorTrace_ = builderForValue.build(); + onChanged(); + } else { + errorTraceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ + public Builder mergeErrorTrace(com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace value) { + if (errorTraceBuilder_ == null) { + if (errorTrace_ != null) { + errorTrace_ = + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.newBuilder(errorTrace_) + .mergeFrom(value) + .buildPartial(); + } else { + errorTrace_ = value; + } + onChanged(); + } else { + errorTraceBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ + public Builder clearErrorTrace() { + if (errorTraceBuilder_ == null) { + errorTrace_ = null; + onChanged(); + } else { + errorTrace_ = null; + errorTraceBuilder_ = null; + } + + return this; + } + /** .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ + public com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Builder getErrorTraceBuilder() { + + onChanged(); + return getErrorTraceFieldBuilder().getBuilder(); + } + /** .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ + public com.google.cloud.websecurityscanner.v1.ScanRunErrorTraceOrBuilder + getErrorTraceOrBuilder() { + if (errorTraceBuilder_ != null) { + return errorTraceBuilder_.getMessageOrBuilder(); + } else { + return errorTrace_ == null + ? com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.getDefaultInstance() + : errorTrace_; + } + } + /** .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace, + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Builder, + com.google.cloud.websecurityscanner.v1.ScanRunErrorTraceOrBuilder> + getErrorTraceFieldBuilder() { + if (errorTraceBuilder_ == null) { + errorTraceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace, + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Builder, + com.google.cloud.websecurityscanner.v1.ScanRunErrorTraceOrBuilder>( + getErrorTrace(), getParentForChildren(), isClean()); + errorTrace_ = null; + } + return errorTraceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.websecurityscanner.v1.ScanRunLog) + } + + // @@protoc_insertion_point(class_scope:google.cloud.websecurityscanner.v1.ScanRunLog) + private static final com.google.cloud.websecurityscanner.v1.ScanRunLog DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.websecurityscanner.v1.ScanRunLog(); + } + + public static com.google.cloud.websecurityscanner.v1.ScanRunLog getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ScanRunLog parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ScanRunLog(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.websecurityscanner.v1.ScanRunLog getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/ScanRunLogOrBuilder.java b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/ScanRunLogOrBuilder.java new file mode 100644 index 000000000000..6f48da207bcc --- /dev/null +++ b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/ScanRunLogOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/websecurityscanner/v1/scan_run_log.proto + +package com.google.cloud.websecurityscanner.v1; + +public interface ScanRunLogOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.websecurityscanner.v1.ScanRunLog) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Human friendly message about the event.
+   * 
+ * + * string summary = 1; + * + * @return The summary. + */ + java.lang.String getSummary(); + /** + * + * + *
+   * Human friendly message about the event.
+   * 
+ * + * string summary = 1; + * + * @return The bytes for summary. + */ + com.google.protobuf.ByteString getSummaryBytes(); + + /** + * + * + *
+   * The resource name of the ScanRun being logged.
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the ScanRun being logged.
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The execution state of the ScanRun.
+   * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * + * @return The enum numeric value on the wire for executionState. + */ + int getExecutionStateValue(); + /** + * + * + *
+   * The execution state of the ScanRun.
+   * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * + * @return The executionState. + */ + com.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState getExecutionState(); + + /** + * + * + *
+   * The result state of the ScanRun.
+   * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * + * @return The enum numeric value on the wire for resultState. + */ + int getResultStateValue(); + /** + * + * + *
+   * The result state of the ScanRun.
+   * 
+ * + * .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * + * @return The resultState. + */ + com.google.cloud.websecurityscanner.v1.ScanRun.ResultState getResultState(); + + /** + * int64 urls_crawled_count = 5; + * + * @return The urlsCrawledCount. + */ + long getUrlsCrawledCount(); + + /** + * int64 urls_tested_count = 6; + * + * @return The urlsTestedCount. + */ + long getUrlsTestedCount(); + + /** + * bool has_findings = 7; + * + * @return The hasFindings. + */ + boolean getHasFindings(); + + /** + * .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; + * + * @return Whether the errorTrace field is set. + */ + boolean hasErrorTrace(); + /** + * .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; + * + * @return The errorTrace. + */ + com.google.cloud.websecurityscanner.v1.ScanRunErrorTrace getErrorTrace(); + /** .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ + com.google.cloud.websecurityscanner.v1.ScanRunErrorTraceOrBuilder getErrorTraceOrBuilder(); +} diff --git a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/ScanRunLogProto.java b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/ScanRunLogProto.java new file mode 100644 index 000000000000..f1f55738ac7c --- /dev/null +++ b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/ScanRunLogProto.java @@ -0,0 +1,92 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/websecurityscanner/v1/scan_run_log.proto + +package com.google.cloud.websecurityscanner.v1; + +public final class ScanRunLogProto { + private ScanRunLogProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/websecurityscanner/v1/sca" + + "n_run_log.proto\022\"google.cloud.websecurit" + + "yscanner.v1\0321google/cloud/websecuritysca" + + "nner/v1/scan_run.proto\032=google/cloud/web" + + "securityscanner/v1/scan_run_error_trace." + + "proto\"\350\002\n\nScanRunLog\022\017\n\007summary\030\001 \001(\t\022\014\n" + + "\004name\030\002 \001(\t\022S\n\017execution_state\030\003 \001(\0162:.g" + + "oogle.cloud.websecurityscanner.v1.ScanRu" + + "n.ExecutionState\022M\n\014result_state\030\004 \001(\01627" + + ".google.cloud.websecurityscanner.v1.Scan" + + "Run.ResultState\022\032\n\022urls_crawled_count\030\005 " + + "\001(\003\022\031\n\021urls_tested_count\030\006 \001(\003\022\024\n\014has_fi" + + "ndings\030\007 \001(\010\022J\n\013error_trace\030\010 \001(\01325.goog" + + "le.cloud.websecurityscanner.v1.ScanRunEr" + + "rorTraceB\203\002\n&com.google.cloud.websecurit" + + "yscanner.v1B\017ScanRunLogProtoP\001ZTgoogle.g" + + "olang.org/genproto/googleapis/cloud/webs" + + "ecurityscanner/v1;websecurityscanner\252\002\"G" + + "oogle.Cloud.WebSecurityScanner.V1\312\002\"Goog" + + "le\\Cloud\\WebSecurityScanner\\V1\352\002%Google:" + + ":Cloud::WebSecurityScanner::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.websecurityscanner.v1.ScanRunProto.getDescriptor(), + com.google.cloud.websecurityscanner.v1.ScanRunErrorTraceProto.getDescriptor(), + }); + internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_websecurityscanner_v1_ScanRunLog_descriptor, + new java.lang.String[] { + "Summary", + "Name", + "ExecutionState", + "ResultState", + "UrlsCrawledCount", + "UrlsTestedCount", + "HasFindings", + "ErrorTrace", + }); + com.google.cloud.websecurityscanner.v1.ScanRunProto.getDescriptor(); + com.google.cloud.websecurityscanner.v1.ScanRunErrorTraceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/proto/google/cloud/websecurityscanner/v1/scan_run_log.proto b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/proto/google/cloud/websecurityscanner/v1/scan_run_log.proto new file mode 100644 index 000000000000..1ff167e3f3dd --- /dev/null +++ b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/src/main/proto/google/cloud/websecurityscanner/v1/scan_run_log.proto @@ -0,0 +1,55 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.websecurityscanner.v1; + +import "google/cloud/websecurityscanner/v1/scan_run.proto"; +import "google/cloud/websecurityscanner/v1/scan_run_error_trace.proto"; + +option csharp_namespace = "Google.Cloud.WebSecurityScanner.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner"; +option java_multiple_files = true; +option java_outer_classname = "ScanRunLogProto"; +option java_package = "com.google.cloud.websecurityscanner.v1"; +option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1"; +option ruby_package = "Google::Cloud::WebSecurityScanner::V1"; + +// A ScanRunLog is an output-only proto used for Stackdriver customer logging. +// It is used for logs covering the start and end of scan pipelines. +// Other than an added summary, this is a subset of the ScanRun. +// Representation in logs is either a proto Struct, or converted to JSON. +// Next id: 9 +message ScanRunLog { + // Human friendly message about the event. + string summary = 1; + + // The resource name of the ScanRun being logged. + string name = 2; + + // The execution state of the ScanRun. + google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + + // The result state of the ScanRun. + google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + + int64 urls_crawled_count = 5; + + int64 urls_tested_count = 6; + + bool has_findings = 7; + + google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; +}