Class Source.Builder (2.37.0)

public static final class Source.Builder extends GeneratedMessageV3.Builder<Source.Builder> implements SourceOrBuilder

Security Command Center finding source. A finding source is an entity or a mechanism that can produce a finding. A source is like a container of findings that come from the same scanner, logger, monitor, and other tools.

Protobuf type google.cloud.securitycenter.v1.Source

Implements

SourceOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Source.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Source.Builder
Overrides

build()

public Source build()
Returns
TypeDescription
Source

buildPartial()

public Source buildPartial()
Returns
TypeDescription
Source

clear()

public Source.Builder clear()
Returns
TypeDescription
Source.Builder
Overrides

clearCanonicalName()

public Source.Builder clearCanonicalName()

The canonical name of the finding. It's either "organizations/{organization_id}/sources/{source_id}", "folders/{folder_id}/sources/{source_id}" or "projects/{project_number}/sources/{source_id}", depending on the closest CRM ancestor of the resource associated with the finding.

string canonical_name = 14;

Returns
TypeDescription
Source.Builder

This builder for chaining.

clearDescription()

public Source.Builder clearDescription()

The description of the source (max of 1024 characters). Example: "Web Security Scanner is a web security scanner for common vulnerabilities in App Engine applications. It can automatically scan and detect four common vulnerabilities, including cross-site-scripting (XSS), Flash injection, mixed content (HTTP in HTTPS), and outdated or insecure libraries."

string description = 3;

Returns
TypeDescription
Source.Builder

This builder for chaining.

clearDisplayName()

public Source.Builder clearDisplayName()

The source's display name. A source's display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must have a length between 1 and 64 characters (inclusive).

string display_name = 2;

Returns
TypeDescription
Source.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Source.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Source.Builder
Overrides

clearName()

public Source.Builder clearName()

The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}"

string name = 1;

Returns
TypeDescription
Source.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Source.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Source.Builder
Overrides

clone()

public Source.Builder clone()
Returns
TypeDescription
Source.Builder
Overrides

getCanonicalName()

public String getCanonicalName()

The canonical name of the finding. It's either "organizations/{organization_id}/sources/{source_id}", "folders/{folder_id}/sources/{source_id}" or "projects/{project_number}/sources/{source_id}", depending on the closest CRM ancestor of the resource associated with the finding.

string canonical_name = 14;

Returns
TypeDescription
String

The canonicalName.

getCanonicalNameBytes()

public ByteString getCanonicalNameBytes()

The canonical name of the finding. It's either "organizations/{organization_id}/sources/{source_id}", "folders/{folder_id}/sources/{source_id}" or "projects/{project_number}/sources/{source_id}", depending on the closest CRM ancestor of the resource associated with the finding.

string canonical_name = 14;

Returns
TypeDescription
ByteString

The bytes for canonicalName.

getDefaultInstanceForType()

public Source getDefaultInstanceForType()
Returns
TypeDescription
Source

getDescription()

public String getDescription()

The description of the source (max of 1024 characters). Example: "Web Security Scanner is a web security scanner for common vulnerabilities in App Engine applications. It can automatically scan and detect four common vulnerabilities, including cross-site-scripting (XSS), Flash injection, mixed content (HTTP in HTTPS), and outdated or insecure libraries."

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

The description of the source (max of 1024 characters). Example: "Web Security Scanner is a web security scanner for common vulnerabilities in App Engine applications. It can automatically scan and detect four common vulnerabilities, including cross-site-scripting (XSS), Flash injection, mixed content (HTTP in HTTPS), and outdated or insecure libraries."

string description = 3;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

The source's display name. A source's display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must have a length between 1 and 64 characters (inclusive).

string display_name = 2;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The source's display name. A source's display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must have a length between 1 and 64 characters (inclusive).

string display_name = 2;

Returns
TypeDescription
ByteString

The bytes for displayName.

getName()

public String getName()

The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}"

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}"

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Source other)

public Source.Builder mergeFrom(Source other)
Parameter
NameDescription
otherSource
Returns
TypeDescription
Source.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Source.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Source.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Source.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Source.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Source.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Source.Builder
Overrides

setCanonicalName(String value)

public Source.Builder setCanonicalName(String value)

The canonical name of the finding. It's either "organizations/{organization_id}/sources/{source_id}", "folders/{folder_id}/sources/{source_id}" or "projects/{project_number}/sources/{source_id}", depending on the closest CRM ancestor of the resource associated with the finding.

string canonical_name = 14;

Parameter
NameDescription
valueString

The canonicalName to set.

Returns
TypeDescription
Source.Builder

This builder for chaining.

setCanonicalNameBytes(ByteString value)

public Source.Builder setCanonicalNameBytes(ByteString value)

The canonical name of the finding. It's either "organizations/{organization_id}/sources/{source_id}", "folders/{folder_id}/sources/{source_id}" or "projects/{project_number}/sources/{source_id}", depending on the closest CRM ancestor of the resource associated with the finding.

string canonical_name = 14;

Parameter
NameDescription
valueByteString

The bytes for canonicalName to set.

Returns
TypeDescription
Source.Builder

This builder for chaining.

setDescription(String value)

public Source.Builder setDescription(String value)

The description of the source (max of 1024 characters). Example: "Web Security Scanner is a web security scanner for common vulnerabilities in App Engine applications. It can automatically scan and detect four common vulnerabilities, including cross-site-scripting (XSS), Flash injection, mixed content (HTTP in HTTPS), and outdated or insecure libraries."

string description = 3;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Source.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Source.Builder setDescriptionBytes(ByteString value)

The description of the source (max of 1024 characters). Example: "Web Security Scanner is a web security scanner for common vulnerabilities in App Engine applications. It can automatically scan and detect four common vulnerabilities, including cross-site-scripting (XSS), Flash injection, mixed content (HTTP in HTTPS), and outdated or insecure libraries."

string description = 3;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Source.Builder

This builder for chaining.

setDisplayName(String value)

public Source.Builder setDisplayName(String value)

The source's display name. A source's display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must have a length between 1 and 64 characters (inclusive).

string display_name = 2;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
Source.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Source.Builder setDisplayNameBytes(ByteString value)

The source's display name. A source's display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must have a length between 1 and 64 characters (inclusive).

string display_name = 2;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Source.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Source.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Source.Builder
Overrides

setName(String value)

public Source.Builder setName(String value)

The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}"

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Source.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Source.Builder setNameBytes(ByteString value)

The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}"

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Source.Builder

This builder for chaining.

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

public Source.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Source.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Source.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Source.Builder
Overrides