public final class ResourceProto extends Object
| Modifier and Type | Field and Description |
|---|---|
static com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FieldOptions,Resource> |
resource
A representation of the resource.
|
static int |
RESOURCE_DEFINITION_FIELD_NUMBER |
static int |
RESOURCE_FIELD_NUMBER |
static int |
RESOURCE_REFERENCE_FIELD_NUMBER |
static com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FileOptions,List<Resource>> |
resourceDefinition
A representation of a resource.
|
static com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FieldOptions,String> |
resourceReference
The fully qualified message name of the type that this field references.
|
| Modifier and Type | Method and Description |
|---|---|
static com.google.protobuf.Descriptors.FileDescriptor |
getDescriptor() |
static void |
registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) |
static void |
registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) |
public static final int RESOURCE_FIELD_NUMBER
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FieldOptions,Resource> resource
A representation of the resource.
This is generally intended to be attached to the "name" field of
the message representing the resource.
Example:
message Topic {
string name = 1 [(google.api.resource) = {
pattern: "projects/{project}/topics/{topic}"
}];
}
Only one of {`resource`, `resource_reference`} may be set.
extend .google.protobuf.FieldOptions { ... }public static final int RESOURCE_REFERENCE_FIELD_NUMBER
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FieldOptions,String> resourceReference
The fully qualified message name of the type that this field references.
Marks this as a field referring to a resource in another message.
Example:
message Subscription {
string topic = 2
[(google.api.resource_reference) = "google.pubsub.v1.Topic"];
}
If the referenced message is in the same proto package, the package
may be omitted:
message Subscription {
string topic = 2
[(google.api.resource_reference) = "Topic"];
}
Only one of {`resource`, `resource_reference`} may be set.
extend .google.protobuf.FieldOptions { ... }public static final int RESOURCE_DEFINITION_FIELD_NUMBER
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FileOptions,List<Resource>> resourceDefinition
A representation of a resource. At a file level, this is generally used to define information for a resource from another API, or for a resource that does not have an associated proto message. See the example of `google.api.Project` and `google.api.Organization` at the bottom of this file.
extend .google.protobuf.FileOptions { ... }public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry)
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry)
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor()