Class Package.Builder (2.53.0)

public static final class Package.Builder extends GeneratedMessageV3.Builder<Package.Builder> implements PackageOrBuilder

Package is a generic definition of a package.

Protobuf type google.cloud.securitycenter.v1.Package

Implements

PackageOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Package.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Package.Builder
Overrides

build()

public Package build()
Returns
Type Description
Package

buildPartial()

public Package buildPartial()
Returns
Type Description
Package

clear()

public Package.Builder clear()
Returns
Type Description
Package.Builder
Overrides

clearCpeUri()

public Package.Builder clearCpeUri()

The CPE URI where the vulnerability was detected.

string cpe_uri = 2;

Returns
Type Description
Package.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Package.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Package.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Package.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Package.Builder
Overrides

clearPackageName()

public Package.Builder clearPackageName()

The name of the package where the vulnerability was detected.

string package_name = 1;

Returns
Type Description
Package.Builder

This builder for chaining.

clearPackageType()

public Package.Builder clearPackageType()

Type of package, for example, os, maven, or go.

string package_type = 3;

Returns
Type Description
Package.Builder

This builder for chaining.

clearPackageVersion()

public Package.Builder clearPackageVersion()

The version of the package.

string package_version = 4;

Returns
Type Description
Package.Builder

This builder for chaining.

clone()

public Package.Builder clone()
Returns
Type Description
Package.Builder
Overrides

getCpeUri()

public String getCpeUri()

The CPE URI where the vulnerability was detected.

string cpe_uri = 2;

Returns
Type Description
String

The cpeUri.

getCpeUriBytes()

public ByteString getCpeUriBytes()

The CPE URI where the vulnerability was detected.

string cpe_uri = 2;

Returns
Type Description
ByteString

The bytes for cpeUri.

getDefaultInstanceForType()

public Package getDefaultInstanceForType()
Returns
Type Description
Package

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getPackageName()

public String getPackageName()

The name of the package where the vulnerability was detected.

string package_name = 1;

Returns
Type Description
String

The packageName.

getPackageNameBytes()

public ByteString getPackageNameBytes()

The name of the package where the vulnerability was detected.

string package_name = 1;

Returns
Type Description
ByteString

The bytes for packageName.

getPackageType()

public String getPackageType()

Type of package, for example, os, maven, or go.

string package_type = 3;

Returns
Type Description
String

The packageType.

getPackageTypeBytes()

public ByteString getPackageTypeBytes()

Type of package, for example, os, maven, or go.

string package_type = 3;

Returns
Type Description
ByteString

The bytes for packageType.

getPackageVersion()

public String getPackageVersion()

The version of the package.

string package_version = 4;

Returns
Type Description
String

The packageVersion.

getPackageVersionBytes()

public ByteString getPackageVersionBytes()

The version of the package.

string package_version = 4;

Returns
Type Description
ByteString

The bytes for packageVersion.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Package other)

public Package.Builder mergeFrom(Package other)
Parameter
Name Description
other Package
Returns
Type Description
Package.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Package.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Package.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Package.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Package.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Package.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Package.Builder
Overrides

setCpeUri(String value)

public Package.Builder setCpeUri(String value)

The CPE URI where the vulnerability was detected.

string cpe_uri = 2;

Parameter
Name Description
value String

The cpeUri to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setCpeUriBytes(ByteString value)

public Package.Builder setCpeUriBytes(ByteString value)

The CPE URI where the vulnerability was detected.

string cpe_uri = 2;

Parameter
Name Description
value ByteString

The bytes for cpeUri to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Package.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Package.Builder
Overrides

setPackageName(String value)

public Package.Builder setPackageName(String value)

The name of the package where the vulnerability was detected.

string package_name = 1;

Parameter
Name Description
value String

The packageName to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setPackageNameBytes(ByteString value)

public Package.Builder setPackageNameBytes(ByteString value)

The name of the package where the vulnerability was detected.

string package_name = 1;

Parameter
Name Description
value ByteString

The bytes for packageName to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setPackageType(String value)

public Package.Builder setPackageType(String value)

Type of package, for example, os, maven, or go.

string package_type = 3;

Parameter
Name Description
value String

The packageType to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setPackageTypeBytes(ByteString value)

public Package.Builder setPackageTypeBytes(ByteString value)

Type of package, for example, os, maven, or go.

string package_type = 3;

Parameter
Name Description
value ByteString

The bytes for packageType to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setPackageVersion(String value)

public Package.Builder setPackageVersion(String value)

The version of the package.

string package_version = 4;

Parameter
Name Description
value String

The packageVersion to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setPackageVersionBytes(ByteString value)

public Package.Builder setPackageVersionBytes(ByteString value)

The version of the package.

string package_version = 4;

Parameter
Name Description
value ByteString

The bytes for packageVersion to set.

Returns
Type Description
Package.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Package.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Package.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Package.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Package.Builder
Overrides