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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
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()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ResourceReference.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public ResourceReference build()
Returns
buildPartial()
public ResourceReference buildPartial()
Returns
clear()
public ResourceReference.Builder clear()
Returns
Overrides
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
clearField(Descriptors.FieldDescriptor field)
public ResourceReference.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public ResourceReference.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
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
clone()
public ResourceReference.Builder clone()
Returns
Overrides
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
getDefaultInstanceForType()
public ResourceReference getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(ResourceReference other)
public ResourceReference.Builder mergeFrom(ResourceReference other)
Parameter
Returns
public ResourceReference.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public ResourceReference.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ResourceReference.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
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 | String
The childType to set.
|
Returns
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 | ByteString
The bytes for childType to set.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public ResourceReference.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ResourceReference.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
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 | String
The type to set.
|
Returns
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 | ByteString
The bytes for type to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final ResourceReference.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides