# Grafeas V1 Client - Class Note (1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.0 1.3.2 1.2.2 1.1.3 1.0.0 0.10.3 0.9.0 0.8.3 0.7.1 0.6.0 0.5.0 0.4.4 Reference documentation and code samples for the Grafeas V1 Client class Note.

A type of analysis that can be done for a resource.

Generated from protobuf message `grafeas.v1.Note`

## Namespace

Grafeas \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. |
| `↳ short_description` | `string` A one sentence description of this note. |
| `↳ long_description` | `string` A detailed description of this note. |
| `↳ kind` | `int` Output only. The type of analysis. This field can be used as a filter in list requests. |
| `↳ related_url` | `array<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.RelatedUrl>` URLs associated with this note. |
| `↳ expiration_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Time of expiration for this note. Empty if note does not expire. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time this note was created. This field can be used as a filter in list requests. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time this note was last updated. This field can be used as a filter in list requests. |
| `↳ related_note_names` | `string[]` Other notes related to this note. |
| `↳ vulnerability` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.VulnerabilityNote` A note describing a package vulnerability. |
| `↳ build` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.BuildNote` A note describing build provenance for a verifiable build. |
| `↳ image` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.ImageNote` A note describing a base image. |
| `↳ package` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.PackageNote` A note describing a package hosted by various package managers. |
| `↳ deployment` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DeploymentNote` A note describing something that can be deployed. |
| `↳ discovery` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DiscoveryNote` A note describing the initial analysis of a resource. |
| `↳ attestation` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.AttestationNote` A note describing an attestation role. |
| `↳ upgrade` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.UpgradeNote` A note describing available package upgrades. |
| `↳ compliance` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.ComplianceNote` A note describing a compliance check. |
| `↳ dsse_attestation` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DSSEAttestationNote` A note describing a dsse attestation note. |
| `↳ vulnerability_assessment` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.VulnerabilityAssessmentNote` A note describing a vulnerability assessment. |
| `↳ sbom_reference` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.SBOMReferenceNote` A note describing an SBOM reference. |
| `↳ secret` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.SecretNote` A note describing a secret. |

### getName

Output only. The name of the note in the form of
`projects/[PROVIDER_ID]/notes/[NOTE_ID]`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Output only. The name of the note in the form of
`projects/[PROVIDER_ID]/notes/[NOTE_ID]`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getShortDescription

A one sentence description of this note.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setShortDescription

A one sentence description of this note.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLongDescription

A detailed description of this note.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setLongDescription

A detailed description of this note.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKind

Output only. The type of analysis. This field can be used as a filter in
list requests.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setKind

Output only. The type of analysis. This field can be used as a filter in
list requests.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRelatedUrl

URLs associated with this note.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.RelatedUrl>` |   |

### setRelatedUrl

URLs associated with this note.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.RelatedUrl>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getExpirationTime

Time of expiration for this note. Empty if note does not expire.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasExpirationTime

### clearExpirationTime

### setExpirationTime

Time of expiration for this note. Empty if note does not expire.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. The time this note was created. This field can be used as a
filter in list requests.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time this note was created. This field can be used as a
filter in list requests.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

Output only. The time this note was last updated. This field can be used as
a filter in list requests.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The time this note was last updated. This field can be used as
a filter in list requests.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRelatedNoteNames

Other notes related to this note.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setRelatedNoteNames

Other notes related to this note.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVulnerability

A note describing a package vulnerability.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.VulnerabilityNote|null` |   |

### hasVulnerability

### setVulnerability

A note describing a package vulnerability.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.VulnerabilityNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBuild

A note describing build provenance for a verifiable build.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.BuildNote|null` |   |

### hasBuild

### setBuild

A note describing build provenance for a verifiable build.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.BuildNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getImage

A note describing a base image.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.ImageNote|null` |   |

### hasImage

### setImage

A note describing a base image.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.ImageNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPackage

A note describing a package hosted by various package managers.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.PackageNote|null` |   |

### hasPackage

### setPackage

A note describing a package hosted by various package managers.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.PackageNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDeployment

A note describing something that can be deployed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DeploymentNote|null` |   |

### hasDeployment

### setDeployment

A note describing something that can be deployed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DeploymentNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDiscovery

A note describing the initial analysis of a resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DiscoveryNote|null` |   |

### hasDiscovery

### setDiscovery

A note describing the initial analysis of a resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DiscoveryNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAttestation

A note describing an attestation role.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.AttestationNote|null` |   |

### hasAttestation

### setAttestation

A note describing an attestation role.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.AttestationNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpgrade

A note describing available package upgrades.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.UpgradeNote|null` |   |

### hasUpgrade

### setUpgrade

A note describing available package upgrades.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.UpgradeNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCompliance

A note describing a compliance check.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.ComplianceNote|null` |   |

### hasCompliance

### setCompliance

A note describing a compliance check.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.ComplianceNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDsseAttestation

A note describing a dsse attestation note.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DSSEAttestationNote|null` |   |

### hasDsseAttestation

### setDsseAttestation

A note describing a dsse attestation note.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DSSEAttestationNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVulnerabilityAssessment

A note describing a vulnerability assessment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.VulnerabilityAssessmentNote|null` |   |

### hasVulnerabilityAssessment

### setVulnerabilityAssessment

A note describing a vulnerability assessment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.VulnerabilityAssessmentNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSbomReference

A note describing an SBOM reference.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.SBOMReferenceNote|null` |   |

### hasSbomReference

### setSbomReference

A note describing an SBOM reference.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.SBOMReferenceNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSecret

A note describing a secret.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.SecretNote|null` |   |

### hasSecret

### setSecret

A note describing a secret.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.SecretNote` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getType

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |