Class Resource.Builder (2.42.0)

publicstaticfinalclass Resource.BuilderextendsGeneratedMessageV3.Builder<Resource.Builder>implementsResourceOrBuilder

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

Protobuf type grafeas.v1beta1.Resource

Implements

ResourceOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicResource.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Resource.Builder
Overrides

build()

publicResourcebuild()
Returns
Type Description
Resource

buildPartial()

publicResourcebuildPartial()
Returns
Type Description
Resource

clear()

publicResource.Builderclear()
Returns
Type Description
Resource.Builder
Overrides

clearContentHash()

publicResource.BuilderclearContentHash()

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)

publicResource.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Resource.Builder
Overrides

clearName()

publicResource.BuilderclearName()

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)

publicResource.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Resource.Builder
Overrides

clearUri()

publicResource.BuilderclearUri()

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()

publicResource.Builderclone()
Returns
Type Description
Resource.Builder
Overrides

getContentHash()

publicHashgetContentHash()

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()

publicHash.BuildergetContentHashBuilder()

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

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

Returns
Type Description
Hash.Builder

getContentHashOrBuilder()

publicHashOrBuildergetContentHashOrBuilder()

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

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

Returns
Type Description
HashOrBuilder

getDefaultInstanceForType()

publicResourcegetDefaultInstanceForType()
Returns
Type Description
Resource

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

publicStringgetName()

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

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

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()

publicStringgetUri()

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()

publicByteStringgetUriBytes()

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()

publicbooleanhasContentHash()

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()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeContentHash(Hash value)

publicResource.BuildermergeContentHash(Hashvalue)

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)

publicResource.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Resource.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicResource.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Resource.Builder
Overrides

mergeFrom(Resource other)

publicResource.BuildermergeFrom(Resourceother)
Parameter
Name Description
other Resource
Returns
Type Description
Resource.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalResource.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Resource.Builder
Overrides

setContentHash(Hash value)

publicResource.BuildersetContentHash(Hashvalue)

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)

publicResource.BuildersetContentHash(Hash.BuilderbuilderForValue)

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)

publicResource.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Resource.Builder
Overrides

setName(String value)

publicResource.BuildersetName(Stringvalue)

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)

publicResource.BuildersetNameBytes(ByteStringvalue)

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)

publicResource.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Resource.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalResource.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Resource.Builder
Overrides

setUri(String value)

publicResource.BuildersetUri(Stringvalue)

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)

publicResource.BuildersetUriBytes(ByteStringvalue)

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.