All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.securitycenter.v2.File Maven / Gradle / Ivy

There is a newer version: 2.62.0
Show newest version
/*
 * Copyright 2024 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/securitycenter/v2/file.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.securitycenter.v2;

/**
 *
 *
 * 
 * File information about the related binary/library used by an executable, or
 * the script used by a script interpreter
 * 
* * Protobuf type {@code google.cloud.securitycenter.v2.File} */ public final class File extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.File) FileOrBuilder { private static final long serialVersionUID = 0L; // Use File.newBuilder() to construct. private File(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private File() { path_ = ""; sha256_ = ""; contents_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new File(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v2.File.class, com.google.cloud.securitycenter.v2.File.Builder.class); } public interface DiskPathOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.File.DiskPath) com.google.protobuf.MessageOrBuilder { /** * * *
     * UUID of the partition (format
     * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
     * 
* * string partition_uuid = 1; * * @return The partitionUuid. */ java.lang.String getPartitionUuid(); /** * * *
     * UUID of the partition (format
     * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
     * 
* * string partition_uuid = 1; * * @return The bytes for partitionUuid. */ com.google.protobuf.ByteString getPartitionUuidBytes(); /** * * *
     * Relative path of the file in the partition as a JSON encoded string.
     * Example: /home/user1/executable_file.sh
     * 
* * string relative_path = 2; * * @return The relativePath. */ java.lang.String getRelativePath(); /** * * *
     * Relative path of the file in the partition as a JSON encoded string.
     * Example: /home/user1/executable_file.sh
     * 
* * string relative_path = 2; * * @return The bytes for relativePath. */ com.google.protobuf.ByteString getRelativePathBytes(); } /** * * *
   * Path of the file in terms of underlying disk/partition identifiers.
   * 
* * Protobuf type {@code google.cloud.securitycenter.v2.File.DiskPath} */ public static final class DiskPath extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.File.DiskPath) DiskPathOrBuilder { private static final long serialVersionUID = 0L; // Use DiskPath.newBuilder() to construct. private DiskPath(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private DiskPath() { partitionUuid_ = ""; relativePath_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new DiskPath(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_DiskPath_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_DiskPath_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v2.File.DiskPath.class, com.google.cloud.securitycenter.v2.File.DiskPath.Builder.class); } public static final int PARTITION_UUID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object partitionUuid_ = ""; /** * * *
     * UUID of the partition (format
     * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
     * 
* * string partition_uuid = 1; * * @return The partitionUuid. */ @java.lang.Override public java.lang.String getPartitionUuid() { java.lang.Object ref = partitionUuid_; 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(); partitionUuid_ = s; return s; } } /** * * *
     * UUID of the partition (format
     * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
     * 
* * string partition_uuid = 1; * * @return The bytes for partitionUuid. */ @java.lang.Override public com.google.protobuf.ByteString getPartitionUuidBytes() { java.lang.Object ref = partitionUuid_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); partitionUuid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RELATIVE_PATH_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object relativePath_ = ""; /** * * *
     * Relative path of the file in the partition as a JSON encoded string.
     * Example: /home/user1/executable_file.sh
     * 
* * string relative_path = 2; * * @return The relativePath. */ @java.lang.Override public java.lang.String getRelativePath() { java.lang.Object ref = relativePath_; 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(); relativePath_ = s; return s; } } /** * * *
     * Relative path of the file in the partition as a JSON encoded string.
     * Example: /home/user1/executable_file.sh
     * 
* * string relative_path = 2; * * @return The bytes for relativePath. */ @java.lang.Override public com.google.protobuf.ByteString getRelativePathBytes() { java.lang.Object ref = relativePath_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); relativePath_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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(partitionUuid_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, partitionUuid_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePath_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, relativePath_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionUuid_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, partitionUuid_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePath_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, relativePath_); } size += getUnknownFields().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.securitycenter.v2.File.DiskPath)) { return super.equals(obj); } com.google.cloud.securitycenter.v2.File.DiskPath other = (com.google.cloud.securitycenter.v2.File.DiskPath) obj; if (!getPartitionUuid().equals(other.getPartitionUuid())) return false; if (!getRelativePath().equals(other.getRelativePath())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARTITION_UUID_FIELD_NUMBER; hash = (53 * hash) + getPartitionUuid().hashCode(); hash = (37 * hash) + RELATIVE_PATH_FIELD_NUMBER; hash = (53 * hash) + getRelativePath().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.securitycenter.v2.File.DiskPath parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v2.File.DiskPath 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.securitycenter.v2.File.DiskPath parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v2.File.DiskPath 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.securitycenter.v2.File.DiskPath parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v2.File.DiskPath parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v2.File.DiskPath parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v2.File.DiskPath 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.securitycenter.v2.File.DiskPath parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v2.File.DiskPath 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.securitycenter.v2.File.DiskPath parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v2.File.DiskPath 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.securitycenter.v2.File.DiskPath 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; } /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * Protobuf type {@code google.cloud.securitycenter.v2.File.DiskPath} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.File.DiskPath) com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_DiskPath_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_DiskPath_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v2.File.DiskPath.class, com.google.cloud.securitycenter.v2.File.DiskPath.Builder.class); } // Construct using com.google.cloud.securitycenter.v2.File.DiskPath.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; partitionUuid_ = ""; relativePath_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_DiskPath_descriptor; } @java.lang.Override public com.google.cloud.securitycenter.v2.File.DiskPath getDefaultInstanceForType() { return com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance(); } @java.lang.Override public com.google.cloud.securitycenter.v2.File.DiskPath build() { com.google.cloud.securitycenter.v2.File.DiskPath result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.securitycenter.v2.File.DiskPath buildPartial() { com.google.cloud.securitycenter.v2.File.DiskPath result = new com.google.cloud.securitycenter.v2.File.DiskPath(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.securitycenter.v2.File.DiskPath result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.partitionUuid_ = partitionUuid_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.relativePath_ = relativePath_; } } @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.securitycenter.v2.File.DiskPath) { return mergeFrom((com.google.cloud.securitycenter.v2.File.DiskPath) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.securitycenter.v2.File.DiskPath other) { if (other == com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance()) return this; if (!other.getPartitionUuid().isEmpty()) { partitionUuid_ = other.partitionUuid_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getRelativePath().isEmpty()) { relativePath_ = other.relativePath_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { partitionUuid_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { relativePath_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object partitionUuid_ = ""; /** * * *
       * UUID of the partition (format
       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
       * 
* * string partition_uuid = 1; * * @return The partitionUuid. */ public java.lang.String getPartitionUuid() { java.lang.Object ref = partitionUuid_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); partitionUuid_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * UUID of the partition (format
       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
       * 
* * string partition_uuid = 1; * * @return The bytes for partitionUuid. */ public com.google.protobuf.ByteString getPartitionUuidBytes() { java.lang.Object ref = partitionUuid_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); partitionUuid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * UUID of the partition (format
       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
       * 
* * string partition_uuid = 1; * * @param value The partitionUuid to set. * @return This builder for chaining. */ public Builder setPartitionUuid(java.lang.String value) { if (value == null) { throw new NullPointerException(); } partitionUuid_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * UUID of the partition (format
       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
       * 
* * string partition_uuid = 1; * * @return This builder for chaining. */ public Builder clearPartitionUuid() { partitionUuid_ = getDefaultInstance().getPartitionUuid(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * UUID of the partition (format
       * https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)
       * 
* * string partition_uuid = 1; * * @param value The bytes for partitionUuid to set. * @return This builder for chaining. */ public Builder setPartitionUuidBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); partitionUuid_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object relativePath_ = ""; /** * * *
       * Relative path of the file in the partition as a JSON encoded string.
       * Example: /home/user1/executable_file.sh
       * 
* * string relative_path = 2; * * @return The relativePath. */ public java.lang.String getRelativePath() { java.lang.Object ref = relativePath_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); relativePath_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Relative path of the file in the partition as a JSON encoded string.
       * Example: /home/user1/executable_file.sh
       * 
* * string relative_path = 2; * * @return The bytes for relativePath. */ public com.google.protobuf.ByteString getRelativePathBytes() { java.lang.Object ref = relativePath_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); relativePath_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Relative path of the file in the partition as a JSON encoded string.
       * Example: /home/user1/executable_file.sh
       * 
* * string relative_path = 2; * * @param value The relativePath to set. * @return This builder for chaining. */ public Builder setRelativePath(java.lang.String value) { if (value == null) { throw new NullPointerException(); } relativePath_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Relative path of the file in the partition as a JSON encoded string.
       * Example: /home/user1/executable_file.sh
       * 
* * string relative_path = 2; * * @return This builder for chaining. */ public Builder clearRelativePath() { relativePath_ = getDefaultInstance().getRelativePath(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
       * Relative path of the file in the partition as a JSON encoded string.
       * Example: /home/user1/executable_file.sh
       * 
* * string relative_path = 2; * * @param value The bytes for relativePath to set. * @return This builder for chaining. */ public Builder setRelativePathBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); relativePath_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } @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.securitycenter.v2.File.DiskPath) } // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.File.DiskPath) private static final com.google.cloud.securitycenter.v2.File.DiskPath DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.File.DiskPath(); } public static com.google.cloud.securitycenter.v2.File.DiskPath getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DiskPath parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; 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.securitycenter.v2.File.DiskPath getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int PATH_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object path_ = ""; /** * * *
   * Absolute path of the file as a JSON encoded string.
   * 
* * string path = 1; * * @return The path. */ @java.lang.Override public java.lang.String getPath() { java.lang.Object ref = path_; 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(); path_ = s; return s; } } /** * * *
   * Absolute path of the file as a JSON encoded string.
   * 
* * string path = 1; * * @return The bytes for path. */ @java.lang.Override public com.google.protobuf.ByteString getPathBytes() { java.lang.Object ref = path_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SIZE_FIELD_NUMBER = 2; private long size_ = 0L; /** * * *
   * Size of the file in bytes.
   * 
* * int64 size = 2; * * @return The size. */ @java.lang.Override public long getSize() { return size_; } public static final int SHA256_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object sha256_ = ""; /** * * *
   * SHA256 hash of the first hashed_size bytes of the file encoded as a
   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
   * of the entire file.
   * 
* * string sha256 = 3; * * @return The sha256. */ @java.lang.Override public java.lang.String getSha256() { java.lang.Object ref = sha256_; 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(); sha256_ = s; return s; } } /** * * *
   * SHA256 hash of the first hashed_size bytes of the file encoded as a
   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
   * of the entire file.
   * 
* * string sha256 = 3; * * @return The bytes for sha256. */ @java.lang.Override public com.google.protobuf.ByteString getSha256Bytes() { java.lang.Object ref = sha256_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); sha256_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int HASHED_SIZE_FIELD_NUMBER = 4; private long hashedSize_ = 0L; /** * * *
   * The length in bytes of the file prefix that was hashed.  If
   * hashed_size == size, any hashes reported represent the entire
   * file.
   * 
* * int64 hashed_size = 4; * * @return The hashedSize. */ @java.lang.Override public long getHashedSize() { return hashedSize_; } public static final int PARTIALLY_HASHED_FIELD_NUMBER = 5; private boolean partiallyHashed_ = false; /** * * *
   * True when the hash covers only a prefix of the file.
   * 
* * bool partially_hashed = 5; * * @return The partiallyHashed. */ @java.lang.Override public boolean getPartiallyHashed() { return partiallyHashed_; } public static final int CONTENTS_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object contents_ = ""; /** * * *
   * Prefix of the file contents as a JSON-encoded string.
   * 
* * string contents = 6; * * @return The contents. */ @java.lang.Override public java.lang.String getContents() { java.lang.Object ref = contents_; 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(); contents_ = s; return s; } } /** * * *
   * Prefix of the file contents as a JSON-encoded string.
   * 
* * string contents = 6; * * @return The bytes for contents. */ @java.lang.Override public com.google.protobuf.ByteString getContentsBytes() { java.lang.Object ref = contents_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); contents_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DISK_PATH_FIELD_NUMBER = 7; private com.google.cloud.securitycenter.v2.File.DiskPath diskPath_; /** * * *
   * Path of the file in terms of underlying disk/partition identifiers.
   * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; * * @return Whether the diskPath field is set. */ @java.lang.Override public boolean hasDiskPath() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Path of the file in terms of underlying disk/partition identifiers.
   * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; * * @return The diskPath. */ @java.lang.Override public com.google.cloud.securitycenter.v2.File.DiskPath getDiskPath() { return diskPath_ == null ? com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance() : diskPath_; } /** * * *
   * Path of the file in terms of underlying disk/partition identifiers.
   * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; */ @java.lang.Override public com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder getDiskPathOrBuilder() { return diskPath_ == null ? com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance() : diskPath_; } 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(path_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); } if (size_ != 0L) { output.writeInt64(2, size_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sha256_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sha256_); } if (hashedSize_ != 0L) { output.writeInt64(4, hashedSize_); } if (partiallyHashed_ != false) { output.writeBool(5, partiallyHashed_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contents_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, contents_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(7, getDiskPath()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); } if (size_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, size_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sha256_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sha256_); } if (hashedSize_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, hashedSize_); } if (partiallyHashed_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, partiallyHashed_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contents_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, contents_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDiskPath()); } size += getUnknownFields().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.securitycenter.v2.File)) { return super.equals(obj); } com.google.cloud.securitycenter.v2.File other = (com.google.cloud.securitycenter.v2.File) obj; if (!getPath().equals(other.getPath())) return false; if (getSize() != other.getSize()) return false; if (!getSha256().equals(other.getSha256())) return false; if (getHashedSize() != other.getHashedSize()) return false; if (getPartiallyHashed() != other.getPartiallyHashed()) return false; if (!getContents().equals(other.getContents())) return false; if (hasDiskPath() != other.hasDiskPath()) return false; if (hasDiskPath()) { if (!getDiskPath().equals(other.getDiskPath())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSize()); hash = (37 * hash) + SHA256_FIELD_NUMBER; hash = (53 * hash) + getSha256().hashCode(); hash = (37 * hash) + HASHED_SIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getHashedSize()); hash = (37 * hash) + PARTIALLY_HASHED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPartiallyHashed()); hash = (37 * hash) + CONTENTS_FIELD_NUMBER; hash = (53 * hash) + getContents().hashCode(); if (hasDiskPath()) { hash = (37 * hash) + DISK_PATH_FIELD_NUMBER; hash = (53 * hash) + getDiskPath().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.securitycenter.v2.File parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v2.File 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.securitycenter.v2.File parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v2.File 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.securitycenter.v2.File parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v2.File parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v2.File parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v2.File 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.securitycenter.v2.File parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v2.File 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.securitycenter.v2.File parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v2.File 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.securitycenter.v2.File 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; } /** * * *
   * File information about the related binary/library used by an executable, or
   * the script used by a script interpreter
   * 
* * Protobuf type {@code google.cloud.securitycenter.v2.File} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.File) com.google.cloud.securitycenter.v2.FileOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v2.File.class, com.google.cloud.securitycenter.v2.File.Builder.class); } // Construct using com.google.cloud.securitycenter.v2.File.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getDiskPathFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; path_ = ""; size_ = 0L; sha256_ = ""; hashedSize_ = 0L; partiallyHashed_ = false; contents_ = ""; diskPath_ = null; if (diskPathBuilder_ != null) { diskPathBuilder_.dispose(); diskPathBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.securitycenter.v2.FileProto .internal_static_google_cloud_securitycenter_v2_File_descriptor; } @java.lang.Override public com.google.cloud.securitycenter.v2.File getDefaultInstanceForType() { return com.google.cloud.securitycenter.v2.File.getDefaultInstance(); } @java.lang.Override public com.google.cloud.securitycenter.v2.File build() { com.google.cloud.securitycenter.v2.File result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.securitycenter.v2.File buildPartial() { com.google.cloud.securitycenter.v2.File result = new com.google.cloud.securitycenter.v2.File(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.securitycenter.v2.File result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.path_ = path_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.size_ = size_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.sha256_ = sha256_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.hashedSize_ = hashedSize_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.partiallyHashed_ = partiallyHashed_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.contents_ = contents_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000040) != 0)) { result.diskPath_ = diskPathBuilder_ == null ? diskPath_ : diskPathBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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.securitycenter.v2.File) { return mergeFrom((com.google.cloud.securitycenter.v2.File) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.securitycenter.v2.File other) { if (other == com.google.cloud.securitycenter.v2.File.getDefaultInstance()) return this; if (!other.getPath().isEmpty()) { path_ = other.path_; bitField0_ |= 0x00000001; onChanged(); } if (other.getSize() != 0L) { setSize(other.getSize()); } if (!other.getSha256().isEmpty()) { sha256_ = other.sha256_; bitField0_ |= 0x00000004; onChanged(); } if (other.getHashedSize() != 0L) { setHashedSize(other.getHashedSize()); } if (other.getPartiallyHashed() != false) { setPartiallyHashed(other.getPartiallyHashed()); } if (!other.getContents().isEmpty()) { contents_ = other.contents_; bitField0_ |= 0x00000020; onChanged(); } if (other.hasDiskPath()) { mergeDiskPath(other.getDiskPath()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { path_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { size_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 case 26: { sha256_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 32: { hashedSize_ = input.readInt64(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { partiallyHashed_ = input.readBool(); bitField0_ |= 0x00000010; break; } // case 40 case 50: { contents_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 50 case 58: { input.readMessage(getDiskPathFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object path_ = ""; /** * * *
     * Absolute path of the file as a JSON encoded string.
     * 
* * string path = 1; * * @return The path. */ public java.lang.String getPath() { java.lang.Object ref = path_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); path_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Absolute path of the file as a JSON encoded string.
     * 
* * string path = 1; * * @return The bytes for path. */ public com.google.protobuf.ByteString getPathBytes() { java.lang.Object ref = path_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Absolute path of the file as a JSON encoded string.
     * 
* * string path = 1; * * @param value The path to set. * @return This builder for chaining. */ public Builder setPath(java.lang.String value) { if (value == null) { throw new NullPointerException(); } path_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Absolute path of the file as a JSON encoded string.
     * 
* * string path = 1; * * @return This builder for chaining. */ public Builder clearPath() { path_ = getDefaultInstance().getPath(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Absolute path of the file as a JSON encoded string.
     * 
* * string path = 1; * * @param value The bytes for path to set. * @return This builder for chaining. */ public Builder setPathBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); path_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private long size_; /** * * *
     * Size of the file in bytes.
     * 
* * int64 size = 2; * * @return The size. */ @java.lang.Override public long getSize() { return size_; } /** * * *
     * Size of the file in bytes.
     * 
* * int64 size = 2; * * @param value The size to set. * @return This builder for chaining. */ public Builder setSize(long value) { size_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Size of the file in bytes.
     * 
* * int64 size = 2; * * @return This builder for chaining. */ public Builder clearSize() { bitField0_ = (bitField0_ & ~0x00000002); size_ = 0L; onChanged(); return this; } private java.lang.Object sha256_ = ""; /** * * *
     * SHA256 hash of the first hashed_size bytes of the file encoded as a
     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
     * of the entire file.
     * 
* * string sha256 = 3; * * @return The sha256. */ public java.lang.String getSha256() { java.lang.Object ref = sha256_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); sha256_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * SHA256 hash of the first hashed_size bytes of the file encoded as a
     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
     * of the entire file.
     * 
* * string sha256 = 3; * * @return The bytes for sha256. */ public com.google.protobuf.ByteString getSha256Bytes() { java.lang.Object ref = sha256_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); sha256_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * SHA256 hash of the first hashed_size bytes of the file encoded as a
     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
     * of the entire file.
     * 
* * string sha256 = 3; * * @param value The sha256 to set. * @return This builder for chaining. */ public Builder setSha256(java.lang.String value) { if (value == null) { throw new NullPointerException(); } sha256_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * SHA256 hash of the first hashed_size bytes of the file encoded as a
     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
     * of the entire file.
     * 
* * string sha256 = 3; * * @return This builder for chaining. */ public Builder clearSha256() { sha256_ = getDefaultInstance().getSha256(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * SHA256 hash of the first hashed_size bytes of the file encoded as a
     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
     * of the entire file.
     * 
* * string sha256 = 3; * * @param value The bytes for sha256 to set. * @return This builder for chaining. */ public Builder setSha256Bytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); sha256_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private long hashedSize_; /** * * *
     * The length in bytes of the file prefix that was hashed.  If
     * hashed_size == size, any hashes reported represent the entire
     * file.
     * 
* * int64 hashed_size = 4; * * @return The hashedSize. */ @java.lang.Override public long getHashedSize() { return hashedSize_; } /** * * *
     * The length in bytes of the file prefix that was hashed.  If
     * hashed_size == size, any hashes reported represent the entire
     * file.
     * 
* * int64 hashed_size = 4; * * @param value The hashedSize to set. * @return This builder for chaining. */ public Builder setHashedSize(long value) { hashedSize_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * The length in bytes of the file prefix that was hashed.  If
     * hashed_size == size, any hashes reported represent the entire
     * file.
     * 
* * int64 hashed_size = 4; * * @return This builder for chaining. */ public Builder clearHashedSize() { bitField0_ = (bitField0_ & ~0x00000008); hashedSize_ = 0L; onChanged(); return this; } private boolean partiallyHashed_; /** * * *
     * True when the hash covers only a prefix of the file.
     * 
* * bool partially_hashed = 5; * * @return The partiallyHashed. */ @java.lang.Override public boolean getPartiallyHashed() { return partiallyHashed_; } /** * * *
     * True when the hash covers only a prefix of the file.
     * 
* * bool partially_hashed = 5; * * @param value The partiallyHashed to set. * @return This builder for chaining. */ public Builder setPartiallyHashed(boolean value) { partiallyHashed_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * True when the hash covers only a prefix of the file.
     * 
* * bool partially_hashed = 5; * * @return This builder for chaining. */ public Builder clearPartiallyHashed() { bitField0_ = (bitField0_ & ~0x00000010); partiallyHashed_ = false; onChanged(); return this; } private java.lang.Object contents_ = ""; /** * * *
     * Prefix of the file contents as a JSON-encoded string.
     * 
* * string contents = 6; * * @return The contents. */ public java.lang.String getContents() { java.lang.Object ref = contents_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); contents_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Prefix of the file contents as a JSON-encoded string.
     * 
* * string contents = 6; * * @return The bytes for contents. */ public com.google.protobuf.ByteString getContentsBytes() { java.lang.Object ref = contents_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); contents_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Prefix of the file contents as a JSON-encoded string.
     * 
* * string contents = 6; * * @param value The contents to set. * @return This builder for chaining. */ public Builder setContents(java.lang.String value) { if (value == null) { throw new NullPointerException(); } contents_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Prefix of the file contents as a JSON-encoded string.
     * 
* * string contents = 6; * * @return This builder for chaining. */ public Builder clearContents() { contents_ = getDefaultInstance().getContents(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
     * Prefix of the file contents as a JSON-encoded string.
     * 
* * string contents = 6; * * @param value The bytes for contents to set. * @return This builder for chaining. */ public Builder setContentsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); contents_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.cloud.securitycenter.v2.File.DiskPath diskPath_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v2.File.DiskPath, com.google.cloud.securitycenter.v2.File.DiskPath.Builder, com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder> diskPathBuilder_; /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; * * @return Whether the diskPath field is set. */ public boolean hasDiskPath() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; * * @return The diskPath. */ public com.google.cloud.securitycenter.v2.File.DiskPath getDiskPath() { if (diskPathBuilder_ == null) { return diskPath_ == null ? com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance() : diskPath_; } else { return diskPathBuilder_.getMessage(); } } /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; */ public Builder setDiskPath(com.google.cloud.securitycenter.v2.File.DiskPath value) { if (diskPathBuilder_ == null) { if (value == null) { throw new NullPointerException(); } diskPath_ = value; } else { diskPathBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; */ public Builder setDiskPath( com.google.cloud.securitycenter.v2.File.DiskPath.Builder builderForValue) { if (diskPathBuilder_ == null) { diskPath_ = builderForValue.build(); } else { diskPathBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; */ public Builder mergeDiskPath(com.google.cloud.securitycenter.v2.File.DiskPath value) { if (diskPathBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0) && diskPath_ != null && diskPath_ != com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance()) { getDiskPathBuilder().mergeFrom(value); } else { diskPath_ = value; } } else { diskPathBuilder_.mergeFrom(value); } if (diskPath_ != null) { bitField0_ |= 0x00000040; onChanged(); } return this; } /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; */ public Builder clearDiskPath() { bitField0_ = (bitField0_ & ~0x00000040); diskPath_ = null; if (diskPathBuilder_ != null) { diskPathBuilder_.dispose(); diskPathBuilder_ = null; } onChanged(); return this; } /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; */ public com.google.cloud.securitycenter.v2.File.DiskPath.Builder getDiskPathBuilder() { bitField0_ |= 0x00000040; onChanged(); return getDiskPathFieldBuilder().getBuilder(); } /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; */ public com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder getDiskPathOrBuilder() { if (diskPathBuilder_ != null) { return diskPathBuilder_.getMessageOrBuilder(); } else { return diskPath_ == null ? com.google.cloud.securitycenter.v2.File.DiskPath.getDefaultInstance() : diskPath_; } } /** * * *
     * Path of the file in terms of underlying disk/partition identifiers.
     * 
* * .google.cloud.securitycenter.v2.File.DiskPath disk_path = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v2.File.DiskPath, com.google.cloud.securitycenter.v2.File.DiskPath.Builder, com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder> getDiskPathFieldBuilder() { if (diskPathBuilder_ == null) { diskPathBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v2.File.DiskPath, com.google.cloud.securitycenter.v2.File.DiskPath.Builder, com.google.cloud.securitycenter.v2.File.DiskPathOrBuilder>( getDiskPath(), getParentForChildren(), isClean()); diskPath_ = null; } return diskPathBuilder_; } @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.securitycenter.v2.File) } // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.File) private static final com.google.cloud.securitycenter.v2.File DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.File(); } public static com.google.cloud.securitycenter.v2.File getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public File parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; 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.securitycenter.v2.File getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy