Class ResourceInfo.Builder (1.42.0)

public static final class ResourceInfo.Builder extends GeneratedMessageV3.Builder<ResourceInfo.Builder> implements ResourceInfoOrBuilder

Describes a resource referenced in the request.

Protobuf type google.api.servicecontrol.v2.ResourceInfo

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ResourceInfo build()
Returns
Type Description
ResourceInfo

buildPartial()

public ResourceInfo buildPartial()
Returns
Type Description
ResourceInfo

clear()

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

clearContainer()

public ResourceInfo.Builder clearContainer()

Optional. The identifier of the container of this resource. For Google Cloud APIs, the resource container must be one of the following formats:

  • projects/<project-id or project-number>
  • folders/<folder-id>
  • organizations/<organization-id> For the policy enforcement on the container level (VPCSC and Location Policy check), this field takes precedence on the container extracted from name when presents.

string container = 4;

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearLocation()

public ResourceInfo.Builder clearLocation()

Optional. The location of the resource. The value must be a valid zone, region or multiregion. For example: "europe-west4" or "northamerica-northeast1-a"

string location = 5;

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

clearName()

public ResourceInfo.Builder clearName()

The name of the resource referenced in the request.

string name = 1;

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPermission()

public ResourceInfo.Builder clearPermission()

The resource permission needed for this request. The format must be "{service}/{plural}.{verb}".

string permission = 3;

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

clearType()

public ResourceInfo.Builder clearType()

The resource type in the format of "{service}/{kind}".

string type = 2;

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

clone()

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

getContainer()

public String getContainer()

Optional. The identifier of the container of this resource. For Google Cloud APIs, the resource container must be one of the following formats:

  • projects/<project-id or project-number>
  • folders/<folder-id>
  • organizations/<organization-id> For the policy enforcement on the container level (VPCSC and Location Policy check), this field takes precedence on the container extracted from name when presents.

string container = 4;

Returns
Type Description
String

The container.

getContainerBytes()

public ByteString getContainerBytes()

Optional. The identifier of the container of this resource. For Google Cloud APIs, the resource container must be one of the following formats:

  • projects/<project-id or project-number>
  • folders/<folder-id>
  • organizations/<organization-id> For the policy enforcement on the container level (VPCSC and Location Policy check), this field takes precedence on the container extracted from name when presents.

string container = 4;

Returns
Type Description
ByteString

The bytes for container.

getDefaultInstanceForType()

public ResourceInfo getDefaultInstanceForType()
Returns
Type Description
ResourceInfo

getDescriptorForType()

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

getLocation()

public String getLocation()

Optional. The location of the resource. The value must be a valid zone, region or multiregion. For example: "europe-west4" or "northamerica-northeast1-a"

string location = 5;

Returns
Type Description
String

The location.

getLocationBytes()

public ByteString getLocationBytes()

Optional. The location of the resource. The value must be a valid zone, region or multiregion. For example: "europe-west4" or "northamerica-northeast1-a"

string location = 5;

Returns
Type Description
ByteString

The bytes for location.

getName()

public String getName()

The name of the resource referenced in the request.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the resource referenced in the request.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getPermission()

public String getPermission()

The resource permission needed for this request. The format must be "{service}/{plural}.{verb}".

string permission = 3;

Returns
Type Description
String

The permission.

getPermissionBytes()

public ByteString getPermissionBytes()

The resource permission needed for this request. The format must be "{service}/{plural}.{verb}".

string permission = 3;

Returns
Type Description
ByteString

The bytes for permission.

getType()

public String getType()

The resource type in the format of "{service}/{kind}".

string type = 2;

Returns
Type Description
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

The resource type in the format of "{service}/{kind}".

string type = 2;

Returns
Type Description
ByteString

The bytes for type.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ResourceInfo other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setContainer(String value)

public ResourceInfo.Builder setContainer(String value)

Optional. The identifier of the container of this resource. For Google Cloud APIs, the resource container must be one of the following formats:

  • projects/<project-id or project-number>
  • folders/<folder-id>
  • organizations/<organization-id> For the policy enforcement on the container level (VPCSC and Location Policy check), this field takes precedence on the container extracted from name when presents.

string container = 4;

Parameter
Name Description
value String

The container to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

setContainerBytes(ByteString value)

public ResourceInfo.Builder setContainerBytes(ByteString value)

Optional. The identifier of the container of this resource. For Google Cloud APIs, the resource container must be one of the following formats:

  • projects/<project-id or project-number>
  • folders/<folder-id>
  • organizations/<organization-id> For the policy enforcement on the container level (VPCSC and Location Policy check), this field takes precedence on the container extracted from name when presents.

string container = 4;

Parameter
Name Description
value ByteString

The bytes for container to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setLocation(String value)

public ResourceInfo.Builder setLocation(String value)

Optional. The location of the resource. The value must be a valid zone, region or multiregion. For example: "europe-west4" or "northamerica-northeast1-a"

string location = 5;

Parameter
Name Description
value String

The location to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

setLocationBytes(ByteString value)

public ResourceInfo.Builder setLocationBytes(ByteString value)

Optional. The location of the resource. The value must be a valid zone, region or multiregion. For example: "europe-west4" or "northamerica-northeast1-a"

string location = 5;

Parameter
Name Description
value ByteString

The bytes for location to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

setName(String value)

public ResourceInfo.Builder setName(String value)

The name of the resource referenced in the request.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ResourceInfo.Builder setNameBytes(ByteString value)

The name of the resource referenced in the request.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

setPermission(String value)

public ResourceInfo.Builder setPermission(String value)

The resource permission needed for this request. The format must be "{service}/{plural}.{verb}".

string permission = 3;

Parameter
Name Description
value String

The permission to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

setPermissionBytes(ByteString value)

public ResourceInfo.Builder setPermissionBytes(ByteString value)

The resource permission needed for this request. The format must be "{service}/{plural}.{verb}".

string permission = 3;

Parameter
Name Description
value ByteString

The bytes for permission to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

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

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

setType(String value)

public ResourceInfo.Builder setType(String value)

The resource type in the format of "{service}/{kind}".

string type = 2;

Parameter
Name Description
value String

The type to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

setTypeBytes(ByteString value)

public ResourceInfo.Builder setTypeBytes(ByteString value)

The resource type in the format of "{service}/{kind}".

string type = 2;

Parameter
Name Description
value ByteString

The bytes for type to set.

Returns
Type Description
ResourceInfo.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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