Class ResourceInfo.Builder (1.41.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ResourceInfo build()
Returns
TypeDescription
ResourceInfo

buildPartial()

public ResourceInfo buildPartial()
Returns
TypeDescription
ResourceInfo

clear()

public ResourceInfo.Builder clear()
Returns
TypeDescription
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
TypeDescription
ResourceInfo.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ResourceInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
ResourceInfo.Builder

This builder for chaining.

clearName()

public ResourceInfo.Builder clearName()

The name of the resource referenced in the request.

string name = 1;

Returns
TypeDescription
ResourceInfo.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ResourceInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
ResourceInfo.Builder

This builder for chaining.

clearType()

public ResourceInfo.Builder clearType()

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

string type = 2;

Returns
TypeDescription
ResourceInfo.Builder

This builder for chaining.

clone()

public ResourceInfo.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for container.

getDefaultInstanceForType()

public ResourceInfo getDefaultInstanceForType()
Returns
TypeDescription
ResourceInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for location.

getName()

public String getName()

The name of the resource referenced in the request.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the resource referenced in the request.

string name = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for permission.

getType()

public String getType()

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

string type = 2;

Returns
TypeDescription
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

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

string type = 2;

Returns
TypeDescription
ByteString

The bytes for type.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ResourceInfo other)

public ResourceInfo.Builder mergeFrom(ResourceInfo other)
Parameter
NameDescription
otherResourceInfo
Returns
TypeDescription
ResourceInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ResourceInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The container to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for container to set.

Returns
TypeDescription
ResourceInfo.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ResourceInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The location to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for location to set.

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valueString

The permission to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for permission to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The type to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for type to set.

Returns
TypeDescription
ResourceInfo.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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