public static final class ResourceReference.Builder extends GeneratedMessage.Builder<ResourceReference.Builder> implements ResourceReferenceOrBuilderDefines a proto annotation that describes a string field that refers to an API resource.
Protobuf type google.api.ResourceReference
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > ResourceReference.BuilderImplements
ResourceReferenceOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public ResourceReference build()| Returns | |
|---|---|
| Type | Description |
ResourceReference |
|
buildPartial()
public ResourceReference buildPartial()| Returns | |
|---|---|
| Type | Description |
ResourceReference |
|
clear()
public ResourceReference.Builder clear()| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
|
clearChildType()
public ResourceReference.Builder clearChildType() The resource type of a child collection that the annotated field
references. This is useful for annotating the parent field that
doesn't have a fixed resource type.
Example:
message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: "logging.googleapis.com/LogEntry" }; }
string child_type = 2;
| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
This builder for chaining. |
clearType()
public ResourceReference.Builder clearType()The resource type that the annotated field references.
Example:
message Subscription { string topic = 2 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }]; }
Occasionally, a field may reference an arbitrary resource. In this case, APIs use the special value * in their resource reference.
Example:
message GetIamPolicyRequest { string resource = 2 [(google.api.resource_reference) = { type: "*" }]; }
string type = 1;
| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
This builder for chaining. |
getChildType()
public String getChildType() The resource type of a child collection that the annotated field
references. This is useful for annotating the parent field that
doesn't have a fixed resource type.
Example:
message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: "logging.googleapis.com/LogEntry" }; }
string child_type = 2;
| Returns | |
|---|---|
| Type | Description |
String |
The childType. |
getChildTypeBytes()
public ByteString getChildTypeBytes() The resource type of a child collection that the annotated field
references. This is useful for annotating the parent field that
doesn't have a fixed resource type.
Example:
message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: "logging.googleapis.com/LogEntry" }; }
string child_type = 2;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for childType. |
getDefaultInstanceForType()
public ResourceReference getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ResourceReference |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getType()
public String getType()The resource type that the annotated field references.
Example:
message Subscription { string topic = 2 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }]; }
Occasionally, a field may reference an arbitrary resource. In this case, APIs use the special value * in their resource reference.
Example:
message GetIamPolicyRequest { string resource = 2 [(google.api.resource_reference) = { type: "*" }]; }
string type = 1;
| Returns | |
|---|---|
| Type | Description |
String |
The type. |
getTypeBytes()
public ByteString getTypeBytes()The resource type that the annotated field references.
Example:
message Subscription { string topic = 2 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }]; }
Occasionally, a field may reference an arbitrary resource. In this case, APIs use the special value * in their resource reference.
Example:
message GetIamPolicyRequest { string resource = 2 [(google.api.resource_reference) = { type: "*" }]; }
string type = 1;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for type. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(ResourceReference other)
public ResourceReference.Builder mergeFrom(ResourceReference other)| Parameter | |
|---|---|
| Name | Description |
other |
ResourceReference |
| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ResourceReference.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ResourceReference.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
|
setChildType(String value)
public ResourceReference.Builder setChildType(String value) The resource type of a child collection that the annotated field
references. This is useful for annotating the parent field that
doesn't have a fixed resource type.
Example:
message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: "logging.googleapis.com/LogEntry" }; }
string child_type = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe childType to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
This builder for chaining. |
setChildTypeBytes(ByteString value)
public ResourceReference.Builder setChildTypeBytes(ByteString value) The resource type of a child collection that the annotated field
references. This is useful for annotating the parent field that
doesn't have a fixed resource type.
Example:
message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: "logging.googleapis.com/LogEntry" }; }
string child_type = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for childType to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
This builder for chaining. |
setType(String value)
public ResourceReference.Builder setType(String value)The resource type that the annotated field references.
Example:
message Subscription { string topic = 2 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }]; }
Occasionally, a field may reference an arbitrary resource. In this case, APIs use the special value * in their resource reference.
Example:
message GetIamPolicyRequest { string resource = 2 [(google.api.resource_reference) = { type: "*" }]; }
string type = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe type to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
This builder for chaining. |
setTypeBytes(ByteString value)
public ResourceReference.Builder setTypeBytes(ByteString value)The resource type that the annotated field references.
Example:
message Subscription { string topic = 2 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }]; }
Occasionally, a field may reference an arbitrary resource. In this case, APIs use the special value * in their resource reference.
Example:
message GetIamPolicyRequest { string resource = 2 [(google.api.resource_reference) = { type: "*" }]; }
string type = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for type to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceReference.Builder |
This builder for chaining. |