public static final class ResourceDescriptor.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder> implements ResourceDescriptorOrBuilder
A simple descriptor of a resource type.
ResourceDescriptor annotates a resource message (either by means of a
protobuf annotation or use in the service config), and associates the
resource's schema, the resource type, and the pattern of the resource name.
Example:
message Topic {
// Indicates this message defines a resource schema.
// Declares the resource type in the format of {service}/{kind}.
// For Kubernetes resources, the format is {api group}/{kind}.
option (google.api.resource) = {
type: "pubsub.googleapis.com/Topic"
name_descriptor: {
pattern: "projects/{project}/topics/{topic}"
parent_type: "cloudresourcemanager.googleapis.com/Project"
parent_name_extractor: "projects/{project}"
}
};
}
The ResourceDescriptor Yaml config will look like:
resources:
- type: "pubsub.googleapis.com/Topic"
name_descriptor:
- pattern: "projects/{project}/topics/{topic}"
parent_type: "cloudresourcemanager.googleapis.com/Project"
parent_name_extractor: "projects/{project}"
Sometimes, resources have multiple patterns, typically because they can
live under multiple parents.
Example:
message LogEntry {
option (google.api.resource) = {
type: "logging.googleapis.com/LogEntry"
name_descriptor: {
pattern: "projects/{project}/logs/{log}"
parent_type: "cloudresourcemanager.googleapis.com/Project"
parent_name_extractor: "projects/{project}"
}
name_descriptor: {
pattern: "folders/{folder}/logs/{log}"
parent_type: "cloudresourcemanager.googleapis.com/Folder"
parent_name_extractor: "folders/{folder}"
}
name_descriptor: {
pattern: "organizations/{organization}/logs/{log}"
parent_type: "cloudresourcemanager.googleapis.com/Organization"
parent_name_extractor: "organizations/{organization}"
}
name_descriptor: {
pattern: "billingAccounts/{billing_account}/logs/{log}"
parent_type: "billing.googleapis.com/BillingAccount"
parent_name_extractor: "billingAccounts/{billing_account}"
}
};
}
The ResourceDescriptor Yaml config will look like:
resources:
- type: 'logging.googleapis.com/LogEntry'
name_descriptor:
- pattern: "projects/{project}/logs/{log}"
parent_type: "cloudresourcemanager.googleapis.com/Project"
parent_name_extractor: "projects/{project}"
- pattern: "folders/{folder}/logs/{log}"
parent_type: "cloudresourcemanager.googleapis.com/Folder"
parent_name_extractor: "folders/{folder}"
- pattern: "organizations/{organization}/logs/{log}"
parent_type: "cloudresourcemanager.googleapis.com/Organization"
parent_name_extractor: "organizations/{organization}"
- pattern: "billingAccounts/{billing_account}/logs/{log}"
parent_type: "billing.googleapis.com/BillingAccount"
parent_name_extractor: "billingAccounts/{billing_account}"
For flexible resources, the resource name doesn't contain parent names, but
the resource itself has parents for policy evaluation.
Example:
message Shelf {
option (google.api.resource) = {
type: "library.googleapis.com/Shelf"
name_descriptor: {
pattern: "shelves/{shelf}"
parent_type: "cloudresourcemanager.googleapis.com/Project"
}
name_descriptor: {
pattern: "shelves/{shelf}"
parent_type: "cloudresourcemanager.googleapis.com/Folder"
}
};
}
The ResourceDescriptor Yaml config will look like:
resources:
- type: 'library.googleapis.com/Shelf'
name_descriptor:
- pattern: "shelves/{shelf}"
parent_type: "cloudresourcemanager.googleapis.com/Project"
- pattern: "shelves/{shelf}"
parent_type: "cloudresourcemanager.googleapis.com/Folder"
Protobuf type google.api.ResourceDescriptor| Modifier and Type | Method and Description |
|---|---|
ResourceDescriptor.Builder |
addAllPattern(Iterable<String> values)
Optional.
|
ResourceDescriptor.Builder |
addAllStyle(Iterable<? extends ResourceDescriptor.Style> values)
Style flag(s) for this resource.
|
ResourceDescriptor.Builder |
addAllStyleValue(Iterable<Integer> values)
Style flag(s) for this resource.
|
ResourceDescriptor.Builder |
addPattern(String value)
Optional.
|
ResourceDescriptor.Builder |
addPatternBytes(com.google.protobuf.ByteString value)
Optional.
|
ResourceDescriptor.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
ResourceDescriptor.Builder |
addStyle(ResourceDescriptor.Style value)
Style flag(s) for this resource.
|
ResourceDescriptor.Builder |
addStyleValue(int value)
Style flag(s) for this resource.
|
ResourceDescriptor |
build() |
ResourceDescriptor |
buildPartial() |
ResourceDescriptor.Builder |
clear() |
ResourceDescriptor.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
ResourceDescriptor.Builder |
clearHistory()
Optional.
|
ResourceDescriptor.Builder |
clearNameField()
Optional.
|
ResourceDescriptor.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
ResourceDescriptor.Builder |
clearPattern()
Optional.
|
ResourceDescriptor.Builder |
clearPlural()
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'.
|
ResourceDescriptor.Builder |
clearSingular()
The same concept of the `singular` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
ResourceDescriptor.Builder |
clearStyle()
Style flag(s) for this resource.
|
ResourceDescriptor.Builder |
clearType()
The resource type.
|
ResourceDescriptor.Builder |
clone() |
ResourceDescriptor |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
ResourceDescriptor.History |
getHistory()
Optional.
|
int |
getHistoryValue()
Optional.
|
String |
getNameField()
Optional.
|
com.google.protobuf.ByteString |
getNameFieldBytes()
Optional.
|
String |
getPattern(int index)
Optional.
|
com.google.protobuf.ByteString |
getPatternBytes(int index)
Optional.
|
int |
getPatternCount()
Optional.
|
com.google.protobuf.ProtocolStringList |
getPatternList()
Optional.
|
String |
getPlural()
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'.
|
com.google.protobuf.ByteString |
getPluralBytes()
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'.
|
String |
getSingular()
The same concept of the `singular` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
com.google.protobuf.ByteString |
getSingularBytes()
The same concept of the `singular` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
ResourceDescriptor.Style |
getStyle(int index)
Style flag(s) for this resource.
|
int |
getStyleCount()
Style flag(s) for this resource.
|
List<ResourceDescriptor.Style> |
getStyleList()
Style flag(s) for this resource.
|
int |
getStyleValue(int index)
Style flag(s) for this resource.
|
List<Integer> |
getStyleValueList()
Style flag(s) for this resource.
|
String |
getType()
The resource type.
|
com.google.protobuf.ByteString |
getTypeBytes()
The resource type.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
ResourceDescriptor.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
ResourceDescriptor.Builder |
mergeFrom(com.google.protobuf.Message other) |
ResourceDescriptor.Builder |
mergeFrom(ResourceDescriptor other) |
ResourceDescriptor.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
ResourceDescriptor.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
ResourceDescriptor.Builder |
setHistory(ResourceDescriptor.History value)
Optional.
|
ResourceDescriptor.Builder |
setHistoryValue(int value)
Optional.
|
ResourceDescriptor.Builder |
setNameField(String value)
Optional.
|
ResourceDescriptor.Builder |
setNameFieldBytes(com.google.protobuf.ByteString value)
Optional.
|
ResourceDescriptor.Builder |
setPattern(int index,
String value)
Optional.
|
ResourceDescriptor.Builder |
setPlural(String value)
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'.
|
ResourceDescriptor.Builder |
setPluralBytes(com.google.protobuf.ByteString value)
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'.
|
ResourceDescriptor.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
ResourceDescriptor.Builder |
setSingular(String value)
The same concept of the `singular` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
ResourceDescriptor.Builder |
setSingularBytes(com.google.protobuf.ByteString value)
The same concept of the `singular` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
ResourceDescriptor.Builder |
setStyle(int index,
ResourceDescriptor.Style value)
Style flag(s) for this resource.
|
ResourceDescriptor.Builder |
setStyleValue(int index,
int value)
Style flag(s) for this resource.
|
ResourceDescriptor.Builder |
setType(String value)
The resource type.
|
ResourceDescriptor.Builder |
setTypeBytes(com.google.protobuf.ByteString value)
The resource type.
|
ResourceDescriptor.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public ResourceDescriptor.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public ResourceDescriptor getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic ResourceDescriptor build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic ResourceDescriptor buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic ResourceDescriptor.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public ResourceDescriptor.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public ResourceDescriptor.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public ResourceDescriptor.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public ResourceDescriptor.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public ResourceDescriptor.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public ResourceDescriptor.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceDescriptor.Builder>public ResourceDescriptor.Builder mergeFrom(ResourceDescriptor other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public ResourceDescriptor.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceDescriptor.Builder>IOExceptionpublic String getType()
The resource type. It must be in the format of
{service_name}/{resource_type_kind}. The `resource_type_kind` must be
singular and must not include version numbers.
Example: `storage.googleapis.com/Bucket`
The value of the resource_type_kind must follow the regular expression
/[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
should use PascalCase (UpperCamelCase). The maximum number of
characters allowed for the `resource_type_kind` is 100.
string type = 1;getType in interface ResourceDescriptorOrBuilderpublic com.google.protobuf.ByteString getTypeBytes()
The resource type. It must be in the format of
{service_name}/{resource_type_kind}. The `resource_type_kind` must be
singular and must not include version numbers.
Example: `storage.googleapis.com/Bucket`
The value of the resource_type_kind must follow the regular expression
/[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
should use PascalCase (UpperCamelCase). The maximum number of
characters allowed for the `resource_type_kind` is 100.
string type = 1;getTypeBytes in interface ResourceDescriptorOrBuilderpublic ResourceDescriptor.Builder setType(String value)
The resource type. It must be in the format of
{service_name}/{resource_type_kind}. The `resource_type_kind` must be
singular and must not include version numbers.
Example: `storage.googleapis.com/Bucket`
The value of the resource_type_kind must follow the regular expression
/[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
should use PascalCase (UpperCamelCase). The maximum number of
characters allowed for the `resource_type_kind` is 100.
string type = 1;value - The type to set.public ResourceDescriptor.Builder clearType()
The resource type. It must be in the format of
{service_name}/{resource_type_kind}. The `resource_type_kind` must be
singular and must not include version numbers.
Example: `storage.googleapis.com/Bucket`
The value of the resource_type_kind must follow the regular expression
/[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
should use PascalCase (UpperCamelCase). The maximum number of
characters allowed for the `resource_type_kind` is 100.
string type = 1;public ResourceDescriptor.Builder setTypeBytes(com.google.protobuf.ByteString value)
The resource type. It must be in the format of
{service_name}/{resource_type_kind}. The `resource_type_kind` must be
singular and must not include version numbers.
Example: `storage.googleapis.com/Bucket`
The value of the resource_type_kind must follow the regular expression
/[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
should use PascalCase (UpperCamelCase). The maximum number of
characters allowed for the `resource_type_kind` is 100.
string type = 1;value - The bytes for type to set.public com.google.protobuf.ProtocolStringList getPatternList()
Optional. The relative resource name pattern associated with this resource
type. The DNS prefix of the full resource name shouldn't be specified here.
The path pattern must follow the syntax, which aligns with HTTP binding
syntax:
Template = Segment { "/" Segment } ;
Segment = LITERAL | Variable ;
Variable = "{" LITERAL "}" ;
Examples:
- "projects/{project}/topics/{topic}"
- "projects/{project}/knowledgeBases/{knowledge_base}"
The components in braces correspond to the IDs for each resource in the
hierarchy. It is expected that, if multiple patterns are provided,
the same component name (e.g. "project") refers to IDs of the same
type of resource.
repeated string pattern = 2;getPatternList in interface ResourceDescriptorOrBuilderpublic int getPatternCount()
Optional. The relative resource name pattern associated with this resource
type. The DNS prefix of the full resource name shouldn't be specified here.
The path pattern must follow the syntax, which aligns with HTTP binding
syntax:
Template = Segment { "/" Segment } ;
Segment = LITERAL | Variable ;
Variable = "{" LITERAL "}" ;
Examples:
- "projects/{project}/topics/{topic}"
- "projects/{project}/knowledgeBases/{knowledge_base}"
The components in braces correspond to the IDs for each resource in the
hierarchy. It is expected that, if multiple patterns are provided,
the same component name (e.g. "project") refers to IDs of the same
type of resource.
repeated string pattern = 2;getPatternCount in interface ResourceDescriptorOrBuilderpublic String getPattern(int index)
Optional. The relative resource name pattern associated with this resource
type. The DNS prefix of the full resource name shouldn't be specified here.
The path pattern must follow the syntax, which aligns with HTTP binding
syntax:
Template = Segment { "/" Segment } ;
Segment = LITERAL | Variable ;
Variable = "{" LITERAL "}" ;
Examples:
- "projects/{project}/topics/{topic}"
- "projects/{project}/knowledgeBases/{knowledge_base}"
The components in braces correspond to the IDs for each resource in the
hierarchy. It is expected that, if multiple patterns are provided,
the same component name (e.g. "project") refers to IDs of the same
type of resource.
repeated string pattern = 2;getPattern in interface ResourceDescriptorOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getPatternBytes(int index)
Optional. The relative resource name pattern associated with this resource
type. The DNS prefix of the full resource name shouldn't be specified here.
The path pattern must follow the syntax, which aligns with HTTP binding
syntax:
Template = Segment { "/" Segment } ;
Segment = LITERAL | Variable ;
Variable = "{" LITERAL "}" ;
Examples:
- "projects/{project}/topics/{topic}"
- "projects/{project}/knowledgeBases/{knowledge_base}"
The components in braces correspond to the IDs for each resource in the
hierarchy. It is expected that, if multiple patterns are provided,
the same component name (e.g. "project") refers to IDs of the same
type of resource.
repeated string pattern = 2;getPatternBytes in interface ResourceDescriptorOrBuilderindex - The index of the value to return.public ResourceDescriptor.Builder setPattern(int index, String value)
Optional. The relative resource name pattern associated with this resource
type. The DNS prefix of the full resource name shouldn't be specified here.
The path pattern must follow the syntax, which aligns with HTTP binding
syntax:
Template = Segment { "/" Segment } ;
Segment = LITERAL | Variable ;
Variable = "{" LITERAL "}" ;
Examples:
- "projects/{project}/topics/{topic}"
- "projects/{project}/knowledgeBases/{knowledge_base}"
The components in braces correspond to the IDs for each resource in the
hierarchy. It is expected that, if multiple patterns are provided,
the same component name (e.g. "project") refers to IDs of the same
type of resource.
repeated string pattern = 2;index - The index to set the value at.value - The pattern to set.public ResourceDescriptor.Builder addPattern(String value)
Optional. The relative resource name pattern associated with this resource
type. The DNS prefix of the full resource name shouldn't be specified here.
The path pattern must follow the syntax, which aligns with HTTP binding
syntax:
Template = Segment { "/" Segment } ;
Segment = LITERAL | Variable ;
Variable = "{" LITERAL "}" ;
Examples:
- "projects/{project}/topics/{topic}"
- "projects/{project}/knowledgeBases/{knowledge_base}"
The components in braces correspond to the IDs for each resource in the
hierarchy. It is expected that, if multiple patterns are provided,
the same component name (e.g. "project") refers to IDs of the same
type of resource.
repeated string pattern = 2;value - The pattern to add.public ResourceDescriptor.Builder addAllPattern(Iterable<String> values)
Optional. The relative resource name pattern associated with this resource
type. The DNS prefix of the full resource name shouldn't be specified here.
The path pattern must follow the syntax, which aligns with HTTP binding
syntax:
Template = Segment { "/" Segment } ;
Segment = LITERAL | Variable ;
Variable = "{" LITERAL "}" ;
Examples:
- "projects/{project}/topics/{topic}"
- "projects/{project}/knowledgeBases/{knowledge_base}"
The components in braces correspond to the IDs for each resource in the
hierarchy. It is expected that, if multiple patterns are provided,
the same component name (e.g. "project") refers to IDs of the same
type of resource.
repeated string pattern = 2;values - The pattern to add.public ResourceDescriptor.Builder clearPattern()
Optional. The relative resource name pattern associated with this resource
type. The DNS prefix of the full resource name shouldn't be specified here.
The path pattern must follow the syntax, which aligns with HTTP binding
syntax:
Template = Segment { "/" Segment } ;
Segment = LITERAL | Variable ;
Variable = "{" LITERAL "}" ;
Examples:
- "projects/{project}/topics/{topic}"
- "projects/{project}/knowledgeBases/{knowledge_base}"
The components in braces correspond to the IDs for each resource in the
hierarchy. It is expected that, if multiple patterns are provided,
the same component name (e.g. "project") refers to IDs of the same
type of resource.
repeated string pattern = 2;public ResourceDescriptor.Builder addPatternBytes(com.google.protobuf.ByteString value)
Optional. The relative resource name pattern associated with this resource
type. The DNS prefix of the full resource name shouldn't be specified here.
The path pattern must follow the syntax, which aligns with HTTP binding
syntax:
Template = Segment { "/" Segment } ;
Segment = LITERAL | Variable ;
Variable = "{" LITERAL "}" ;
Examples:
- "projects/{project}/topics/{topic}"
- "projects/{project}/knowledgeBases/{knowledge_base}"
The components in braces correspond to the IDs for each resource in the
hierarchy. It is expected that, if multiple patterns are provided,
the same component name (e.g. "project") refers to IDs of the same
type of resource.
repeated string pattern = 2;value - The bytes of the pattern to add.public String getNameField()
Optional. The field on the resource that designates the resource name field. If omitted, this is assumed to be "name".
string name_field = 3;getNameField in interface ResourceDescriptorOrBuilderpublic com.google.protobuf.ByteString getNameFieldBytes()
Optional. The field on the resource that designates the resource name field. If omitted, this is assumed to be "name".
string name_field = 3;getNameFieldBytes in interface ResourceDescriptorOrBuilderpublic ResourceDescriptor.Builder setNameField(String value)
Optional. The field on the resource that designates the resource name field. If omitted, this is assumed to be "name".
string name_field = 3;value - The nameField to set.public ResourceDescriptor.Builder clearNameField()
Optional. The field on the resource that designates the resource name field. If omitted, this is assumed to be "name".
string name_field = 3;public ResourceDescriptor.Builder setNameFieldBytes(com.google.protobuf.ByteString value)
Optional. The field on the resource that designates the resource name field. If omitted, this is assumed to be "name".
string name_field = 3;value - The bytes for nameField to set.public int getHistoryValue()
Optional. The historical or future-looking state of the resource pattern.
Example:
// The InspectTemplate message originally only supported resource
// names with organization, and project was added later.
message InspectTemplate {
option (google.api.resource) = {
type: "dlp.googleapis.com/InspectTemplate"
pattern:
"organizations/{organization}/inspectTemplates/{inspect_template}"
pattern: "projects/{project}/inspectTemplates/{inspect_template}"
history: ORIGINALLY_SINGLE_PATTERN
};
}
.google.api.ResourceDescriptor.History history = 4;getHistoryValue in interface ResourceDescriptorOrBuilderpublic ResourceDescriptor.Builder setHistoryValue(int value)
Optional. The historical or future-looking state of the resource pattern.
Example:
// The InspectTemplate message originally only supported resource
// names with organization, and project was added later.
message InspectTemplate {
option (google.api.resource) = {
type: "dlp.googleapis.com/InspectTemplate"
pattern:
"organizations/{organization}/inspectTemplates/{inspect_template}"
pattern: "projects/{project}/inspectTemplates/{inspect_template}"
history: ORIGINALLY_SINGLE_PATTERN
};
}
.google.api.ResourceDescriptor.History history = 4;value - The enum numeric value on the wire for history to set.public ResourceDescriptor.History getHistory()
Optional. The historical or future-looking state of the resource pattern.
Example:
// The InspectTemplate message originally only supported resource
// names with organization, and project was added later.
message InspectTemplate {
option (google.api.resource) = {
type: "dlp.googleapis.com/InspectTemplate"
pattern:
"organizations/{organization}/inspectTemplates/{inspect_template}"
pattern: "projects/{project}/inspectTemplates/{inspect_template}"
history: ORIGINALLY_SINGLE_PATTERN
};
}
.google.api.ResourceDescriptor.History history = 4;getHistory in interface ResourceDescriptorOrBuilderpublic ResourceDescriptor.Builder setHistory(ResourceDescriptor.History value)
Optional. The historical or future-looking state of the resource pattern.
Example:
// The InspectTemplate message originally only supported resource
// names with organization, and project was added later.
message InspectTemplate {
option (google.api.resource) = {
type: "dlp.googleapis.com/InspectTemplate"
pattern:
"organizations/{organization}/inspectTemplates/{inspect_template}"
pattern: "projects/{project}/inspectTemplates/{inspect_template}"
history: ORIGINALLY_SINGLE_PATTERN
};
}
.google.api.ResourceDescriptor.History history = 4;value - The history to set.public ResourceDescriptor.Builder clearHistory()
Optional. The historical or future-looking state of the resource pattern.
Example:
// The InspectTemplate message originally only supported resource
// names with organization, and project was added later.
message InspectTemplate {
option (google.api.resource) = {
type: "dlp.googleapis.com/InspectTemplate"
pattern:
"organizations/{organization}/inspectTemplates/{inspect_template}"
pattern: "projects/{project}/inspectTemplates/{inspect_template}"
history: ORIGINALLY_SINGLE_PATTERN
};
}
.google.api.ResourceDescriptor.History history = 4;public String getPlural()
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
concept of the `plural` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Note: The plural form is required even for singleton resources. See
https://aip.dev/156
string plural = 5;getPlural in interface ResourceDescriptorOrBuilderpublic com.google.protobuf.ByteString getPluralBytes()
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
concept of the `plural` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Note: The plural form is required even for singleton resources. See
https://aip.dev/156
string plural = 5;getPluralBytes in interface ResourceDescriptorOrBuilderpublic ResourceDescriptor.Builder setPlural(String value)
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
concept of the `plural` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Note: The plural form is required even for singleton resources. See
https://aip.dev/156
string plural = 5;value - The plural to set.public ResourceDescriptor.Builder clearPlural()
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
concept of the `plural` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Note: The plural form is required even for singleton resources. See
https://aip.dev/156
string plural = 5;public ResourceDescriptor.Builder setPluralBytes(com.google.protobuf.ByteString value)
The plural name used in the resource name and permission names, such as
'projects' for the resource name of 'projects/{project}' and the permission
name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
concept of the `plural` field in k8s CRD spec
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
Note: The plural form is required even for singleton resources. See
https://aip.dev/156
string plural = 5;value - The bytes for plural to set.public String getSingular()
The same concept of the `singular` field in k8s CRD spec https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ Such as "project" for the `resourcemanager.googleapis.com/Project` type.
string singular = 6;getSingular in interface ResourceDescriptorOrBuilderpublic com.google.protobuf.ByteString getSingularBytes()
The same concept of the `singular` field in k8s CRD spec https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ Such as "project" for the `resourcemanager.googleapis.com/Project` type.
string singular = 6;getSingularBytes in interface ResourceDescriptorOrBuilderpublic ResourceDescriptor.Builder setSingular(String value)
The same concept of the `singular` field in k8s CRD spec https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ Such as "project" for the `resourcemanager.googleapis.com/Project` type.
string singular = 6;value - The singular to set.public ResourceDescriptor.Builder clearSingular()
The same concept of the `singular` field in k8s CRD spec https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ Such as "project" for the `resourcemanager.googleapis.com/Project` type.
string singular = 6;public ResourceDescriptor.Builder setSingularBytes(com.google.protobuf.ByteString value)
The same concept of the `singular` field in k8s CRD spec https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ Such as "project" for the `resourcemanager.googleapis.com/Project` type.
string singular = 6;value - The bytes for singular to set.public List<ResourceDescriptor.Style> getStyleList()
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;getStyleList in interface ResourceDescriptorOrBuilderpublic int getStyleCount()
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;getStyleCount in interface ResourceDescriptorOrBuilderpublic ResourceDescriptor.Style getStyle(int index)
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;getStyle in interface ResourceDescriptorOrBuilderindex - The index of the element to return.public ResourceDescriptor.Builder setStyle(int index, ResourceDescriptor.Style value)
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;index - The index to set the value at.value - The style to set.public ResourceDescriptor.Builder addStyle(ResourceDescriptor.Style value)
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;value - The style to add.public ResourceDescriptor.Builder addAllStyle(Iterable<? extends ResourceDescriptor.Style> values)
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;values - The style to add.public ResourceDescriptor.Builder clearStyle()
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;public List<Integer> getStyleValueList()
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;getStyleValueList in interface ResourceDescriptorOrBuilderpublic int getStyleValue(int index)
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;getStyleValue in interface ResourceDescriptorOrBuilderindex - The index of the value to return.public ResourceDescriptor.Builder setStyleValue(int index, int value)
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;index - The index of the value to return.public ResourceDescriptor.Builder addStyleValue(int value)
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;value - The enum numeric value on the wire for style to add.public ResourceDescriptor.Builder addAllStyleValue(Iterable<Integer> values)
Style flag(s) for this resource. These indicate that a resource is expected to conform to a given style. See the specific style flags for additional information.
repeated .google.api.ResourceDescriptor.Style style = 10;values - The enum numeric values on the wire for style to add.public final ResourceDescriptor.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>public final ResourceDescriptor.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>Copyright © 2020 Google LLC. All rights reserved.