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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ResourceReference.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public ResourceReference build()
buildPartial()
public ResourceReference buildPartial()
clear()
public ResourceReference.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public ResourceReference.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public ResourceReference.Builder clearOneof(Descriptors.OneofDescriptor oneof)
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;
clone()
public ResourceReference.Builder clone()
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 |
---|
Type | Description |
ByteString | The bytes for childType.
|
getDefaultInstanceForType()
public ResourceReference getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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 |
---|
Type | Description |
ByteString | The bytes for type.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(ResourceReference other)
public ResourceReference.Builder mergeFrom(ResourceReference other)
public ResourceReference.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public ResourceReference.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ResourceReference.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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.
|
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.
|
setField(Descriptors.FieldDescriptor field, Object value)
public ResourceReference.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ResourceReference.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
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.
|
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.
|
setUnknownFields(UnknownFieldSet unknownFields)
public final ResourceReference.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides