Class Resource.Builder (2.44.0)

public static final class Resource.Builder extends GeneratedMessageV3.Builder<Resource.Builder> implements ResourceOrBuilder

An entity that can have metadata. For example, a Docker image.

Protobuf type grafeas.v1beta1.Resource

Implements

ResourceOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Resource build()
Returns
Type Description
Resource

buildPartial()

public Resource buildPartial()
Returns
Type Description
Resource

clear()

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

clearContentHash()

public Resource.Builder clearContentHash()

The hash of the resource content. For example, the Docker digest.

.grafeas.v1beta1.provenance.Hash content_hash = 3;

Returns
Type Description
Resource.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Resource.Builder clearName()

The name of the resource. For example, the name of a Docker image - "Debian".

string name = 1;

Returns
Type Description
Resource.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUri()

public Resource.Builder clearUri()

Required. The unique URI of the resource. For example, https://gcr.io/project/image@sha256:foo for a Docker image.

string uri = 2;

Returns
Type Description
Resource.Builder

This builder for chaining.

clone()

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

getContentHash()

public Hash getContentHash()

The hash of the resource content. For example, the Docker digest.

.grafeas.v1beta1.provenance.Hash content_hash = 3;

Returns
Type Description
Hash

The contentHash.

getContentHashBuilder()

public Hash.Builder getContentHashBuilder()

The hash of the resource content. For example, the Docker digest.

.grafeas.v1beta1.provenance.Hash content_hash = 3;

Returns
Type Description
Hash.Builder

getContentHashOrBuilder()

public HashOrBuilder getContentHashOrBuilder()

The hash of the resource content. For example, the Docker digest.

.grafeas.v1beta1.provenance.Hash content_hash = 3;

Returns
Type Description
HashOrBuilder

getDefaultInstanceForType()

public Resource getDefaultInstanceForType()
Returns
Type Description
Resource

getDescriptorForType()

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

getName()

public String getName()

The name of the resource. For example, the name of a Docker image - "Debian".

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the resource. For example, the name of a Docker image - "Debian".

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getUri()

public String getUri()

Required. The unique URI of the resource. For example, https://gcr.io/project/image@sha256:foo for a Docker image.

string uri = 2;

Returns
Type Description
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Required. The unique URI of the resource. For example, https://gcr.io/project/image@sha256:foo for a Docker image.

string uri = 2;

Returns
Type Description
ByteString

The bytes for uri.

hasContentHash()

public boolean hasContentHash()

The hash of the resource content. For example, the Docker digest.

.grafeas.v1beta1.provenance.Hash content_hash = 3;

Returns
Type Description
boolean

Whether the contentHash field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeContentHash(Hash value)

public Resource.Builder mergeContentHash(Hash value)

The hash of the resource content. For example, the Docker digest.

.grafeas.v1beta1.provenance.Hash content_hash = 3;

Parameter
Name Description
value Hash
Returns
Type Description
Resource.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(Resource other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setContentHash(Hash value)

public Resource.Builder setContentHash(Hash value)

The hash of the resource content. For example, the Docker digest.

.grafeas.v1beta1.provenance.Hash content_hash = 3;

Parameter
Name Description
value Hash
Returns
Type Description
Resource.Builder

setContentHash(Hash.Builder builderForValue)

public Resource.Builder setContentHash(Hash.Builder builderForValue)

The hash of the resource content. For example, the Docker digest.

.grafeas.v1beta1.provenance.Hash content_hash = 3;

Parameter
Name Description
builderForValue Hash.Builder
Returns
Type Description
Resource.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Resource.Builder setName(String value)

The name of the resource. For example, the name of a Docker image - "Debian".

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Resource.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Resource.Builder setNameBytes(ByteString value)

The name of the resource. For example, the name of a Docker image - "Debian".

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Resource.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUri(String value)

public Resource.Builder setUri(String value)

Required. The unique URI of the resource. For example, https://gcr.io/project/image@sha256:foo for a Docker image.

string uri = 2;

Parameter
Name Description
value String

The uri to set.

Returns
Type Description
Resource.Builder

This builder for chaining.

setUriBytes(ByteString value)

public Resource.Builder setUriBytes(ByteString value)

Required. The unique URI of the resource. For example, https://gcr.io/project/image@sha256:foo for a Docker image.

string uri = 2;

Parameter
Name Description
value ByteString

The bytes for uri to set.

Returns
Type Description
Resource.Builder

This builder for chaining.