public static final class ResourceReference.Builder extends GeneratedMessageV3.Builder<ResourceReference.Builder> implements ResourceReferenceOrBuilder
Defines a proto annotation that describes a string field that refers to an API resource.
Protobuf type google.api.ResourceReference
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > ResourceReference.BuilderImplements
ResourceReferenceOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ResourceReference.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ResourceReference.Builder |
build()
public ResourceReference build()
Type | Description |
ResourceReference |
buildPartial()
public ResourceReference buildPartial()
Type | Description |
ResourceReference |
clear()
public ResourceReference.Builder clear()
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;
Type | Description |
ResourceReference.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public ResourceReference.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
ResourceReference.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public ResourceReference.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
ResourceReference.Builder |
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;
Type | Description |
ResourceReference.Builder | This builder for chaining. |
clone()
public ResourceReference.Builder clone()
Type | Description |
ResourceReference.Builder |
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;
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;
Type | Description |
ByteString | The bytes for childType. |
getDefaultInstanceForType()
public ResourceReference getDefaultInstanceForType()
Type | Description |
ResourceReference |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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;
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;
Type | Description |
ByteString | The bytes for type. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(ResourceReference other)
public ResourceReference.Builder mergeFrom(ResourceReference other)
Name | Description |
other | ResourceReference |
Type | Description |
ResourceReference.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ResourceReference.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ResourceReference.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public ResourceReference.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
ResourceReference.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ResourceReference.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
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;
Name | Description |
value | String The childType to set. |
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;
Name | Description |
value | ByteString The bytes for childType to set. |
Type | Description |
ResourceReference.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public ResourceReference.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ResourceReference.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ResourceReference.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
ResourceReference.Builder |
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;
Name | Description |
value | String The type to set. |
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;
Name | Description |
value | ByteString The bytes for type to set. |
Type | Description |
ResourceReference.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final ResourceReference.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
ResourceReference.Builder |