Package com.google.api
Class ResourceDescriptor.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
- com.google.api.ResourceDescriptor.Builder
-
- All Implemented Interfaces:
ResourceDescriptorOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- ResourceDescriptor
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" pattern: "projects/{project}/topics/{topic}" }; } The ResourceDescriptor Yaml config will look like: resources: - type: "pubsub.googleapis.com/Topic" pattern: "projects/{project}/topics/{topic}" 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" pattern: "projects/{project}/logs/{log}" pattern: "folders/{folder}/logs/{log}" pattern: "organizations/{organization}/logs/{log}" pattern: "billingAccounts/{billing_account}/logs/{log}" }; } The ResourceDescriptor Yaml config will look like: resources: - type: 'logging.googleapis.com/LogEntry' pattern: "projects/{project}/logs/{log}" pattern: "folders/{folder}/logs/{log}" pattern: "organizations/{organization}/logs/{log}" pattern: "billingAccounts/{billing_account}/logs/{log}"Protobuf typegoogle.api.ResourceDescriptor
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceDescriptor.BuilderaddAllPattern(Iterable<String> values)Optional.ResourceDescriptor.BuilderaddAllStyle(Iterable<? extends ResourceDescriptor.Style> values)Style flag(s) for this resource.ResourceDescriptor.BuilderaddAllStyleValue(Iterable<Integer> values)Style flag(s) for this resource.ResourceDescriptor.BuilderaddPattern(String value)Optional.ResourceDescriptor.BuilderaddPatternBytes(com.google.protobuf.ByteString value)Optional.ResourceDescriptor.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)ResourceDescriptor.BuilderaddStyle(ResourceDescriptor.Style value)Style flag(s) for this resource.ResourceDescriptor.BuilderaddStyleValue(int value)Style flag(s) for this resource.ResourceDescriptorbuild()ResourceDescriptorbuildPartial()ResourceDescriptor.Builderclear()ResourceDescriptor.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)ResourceDescriptor.BuilderclearHistory()Optional.ResourceDescriptor.BuilderclearNameField()Optional.ResourceDescriptor.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)ResourceDescriptor.BuilderclearPattern()Optional.ResourceDescriptor.BuilderclearPlural()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.BuilderclearSingular()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.BuilderclearStyle()Style flag(s) for this resource.ResourceDescriptor.BuilderclearType()The resource type.ResourceDescriptor.Builderclone()ResourceDescriptorgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()ResourceDescriptor.HistorygetHistory()Optional.intgetHistoryValue()Optional.StringgetNameField()Optional.com.google.protobuf.ByteStringgetNameFieldBytes()Optional.StringgetPattern(int index)Optional.com.google.protobuf.ByteStringgetPatternBytes(int index)Optional.intgetPatternCount()Optional.com.google.protobuf.ProtocolStringListgetPatternList()Optional.StringgetPlural()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.ByteStringgetPluralBytes()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'.StringgetSingular()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.ByteStringgetSingularBytes()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.StylegetStyle(int index)Style flag(s) for this resource.intgetStyleCount()Style flag(s) for this resource.List<ResourceDescriptor.Style>getStyleList()Style flag(s) for this resource.intgetStyleValue(int index)Style flag(s) for this resource.List<Integer>getStyleValueList()Style flag(s) for this resource.StringgetType()The resource type.com.google.protobuf.ByteStringgetTypeBytes()The resource type.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()ResourceDescriptor.BuildermergeFrom(ResourceDescriptor other)ResourceDescriptor.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)ResourceDescriptor.BuildermergeFrom(com.google.protobuf.Message other)ResourceDescriptor.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)ResourceDescriptor.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)ResourceDescriptor.BuildersetHistory(ResourceDescriptor.History value)Optional.ResourceDescriptor.BuildersetHistoryValue(int value)Optional.ResourceDescriptor.BuildersetNameField(String value)Optional.ResourceDescriptor.BuildersetNameFieldBytes(com.google.protobuf.ByteString value)Optional.ResourceDescriptor.BuildersetPattern(int index, String value)Optional.ResourceDescriptor.BuildersetPlural(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.BuildersetPluralBytes(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.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)ResourceDescriptor.BuildersetSingular(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.BuildersetSingularBytes(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.BuildersetStyle(int index, ResourceDescriptor.Style value)Style flag(s) for this resource.ResourceDescriptor.BuildersetStyleValue(int index, int value)Style flag(s) for this resource.ResourceDescriptor.BuildersetType(String value)The resource type.ResourceDescriptor.BuildersetTypeBytes(com.google.protobuf.ByteString value)The resource type.ResourceDescriptor.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
clear
public ResourceDescriptor.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
getDefaultInstanceForType
public ResourceDescriptor getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public ResourceDescriptor build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ResourceDescriptor buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ResourceDescriptor.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
setField
public ResourceDescriptor.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
clearField
public ResourceDescriptor.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
clearOneof
public ResourceDescriptor.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
setRepeatedField
public ResourceDescriptor.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
addRepeatedField
public ResourceDescriptor.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
mergeFrom
public ResourceDescriptor.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ResourceDescriptor.Builder>
-
mergeFrom
public ResourceDescriptor.Builder mergeFrom(ResourceDescriptor other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
mergeFrom
public ResourceDescriptor.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ResourceDescriptor.Builder>- Throws:
IOException
-
getType
public 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;- Specified by:
getTypein interfaceResourceDescriptorOrBuilder- Returns:
- The type.
-
getTypeBytes
public 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;- Specified by:
getTypeBytesin interfaceResourceDescriptorOrBuilder- Returns:
- The bytes for type.
-
setType
public 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;- Parameters:
value- The type to set.- Returns:
- This builder for chaining.
-
clearType
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;- Returns:
- This builder for chaining.
-
setTypeBytes
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;- Parameters:
value- The bytes for type to set.- Returns:
- This builder for chaining.
-
getPatternList
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;- Specified by:
getPatternListin interfaceResourceDescriptorOrBuilder- Returns:
- A list containing the pattern.
-
getPatternCount
public 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;- Specified by:
getPatternCountin interfaceResourceDescriptorOrBuilder- Returns:
- The count of pattern.
-
getPattern
public 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;- Specified by:
getPatternin interfaceResourceDescriptorOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The pattern at the given index.
-
getPatternBytes
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;- Specified by:
getPatternBytesin interfaceResourceDescriptorOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the pattern at the given index.
-
setPattern
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;- Parameters:
index- The index to set the value at.value- The pattern to set.- Returns:
- This builder for chaining.
-
addPattern
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;- Parameters:
value- The pattern to add.- Returns:
- This builder for chaining.
-
addAllPattern
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;- Parameters:
values- The pattern to add.- Returns:
- This builder for chaining.
-
clearPattern
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;- Returns:
- This builder for chaining.
-
addPatternBytes
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;- Parameters:
value- The bytes of the pattern to add.- Returns:
- This builder for chaining.
-
getNameField
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;- Specified by:
getNameFieldin interfaceResourceDescriptorOrBuilder- Returns:
- The nameField.
-
getNameFieldBytes
public 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;- Specified by:
getNameFieldBytesin interfaceResourceDescriptorOrBuilder- Returns:
- The bytes for nameField.
-
setNameField
public 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;- Parameters:
value- The nameField to set.- Returns:
- This builder for chaining.
-
clearNameField
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;- Returns:
- This builder for chaining.
-
setNameFieldBytes
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;- Parameters:
value- The bytes for nameField to set.- Returns:
- This builder for chaining.
-
getHistoryValue
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;- Specified by:
getHistoryValuein interfaceResourceDescriptorOrBuilder- Returns:
- The enum numeric value on the wire for history.
-
setHistoryValue
public 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;- Parameters:
value- The enum numeric value on the wire for history to set.- Returns:
- This builder for chaining.
-
getHistory
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;- Specified by:
getHistoryin interfaceResourceDescriptorOrBuilder- Returns:
- The history.
-
setHistory
public 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;- Parameters:
value- The history to set.- Returns:
- This builder for chaining.
-
clearHistory
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;- Returns:
- This builder for chaining.
-
getPlural
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/156string plural = 5;- Specified by:
getPluralin interfaceResourceDescriptorOrBuilder- Returns:
- The plural.
-
getPluralBytes
public 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/156string plural = 5;- Specified by:
getPluralBytesin interfaceResourceDescriptorOrBuilder- Returns:
- The bytes for plural.
-
setPlural
public 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/156string plural = 5;- Parameters:
value- The plural to set.- Returns:
- This builder for chaining.
-
clearPlural
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/156string plural = 5;- Returns:
- This builder for chaining.
-
setPluralBytes
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/156string plural = 5;- Parameters:
value- The bytes for plural to set.- Returns:
- This builder for chaining.
-
getSingular
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;- Specified by:
getSingularin interfaceResourceDescriptorOrBuilder- Returns:
- The singular.
-
getSingularBytes
public 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;- Specified by:
getSingularBytesin interfaceResourceDescriptorOrBuilder- Returns:
- The bytes for singular.
-
setSingular
public 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;- Parameters:
value- The singular to set.- Returns:
- This builder for chaining.
-
clearSingular
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;- Returns:
- This builder for chaining.
-
setSingularBytes
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;- Parameters:
value- The bytes for singular to set.- Returns:
- This builder for chaining.
-
getStyleList
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;- Specified by:
getStyleListin interfaceResourceDescriptorOrBuilder- Returns:
- A list containing the style.
-
getStyleCount
public 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;- Specified by:
getStyleCountin interfaceResourceDescriptorOrBuilder- Returns:
- The count of style.
-
getStyle
public 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;- Specified by:
getStylein interfaceResourceDescriptorOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The style at the given index.
-
setStyle
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;- Parameters:
index- The index to set the value at.value- The style to set.- Returns:
- This builder for chaining.
-
addStyle
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;- Parameters:
value- The style to add.- Returns:
- This builder for chaining.
-
addAllStyle
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;- Parameters:
values- The style to add.- Returns:
- This builder for chaining.
-
clearStyle
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;- Returns:
- This builder for chaining.
-
getStyleValueList
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;- Specified by:
getStyleValueListin interfaceResourceDescriptorOrBuilder- Returns:
- A list containing the enum numeric values on the wire for style.
-
getStyleValue
public 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;- Specified by:
getStyleValuein interfaceResourceDescriptorOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of style at the given index.
-
setStyleValue
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;- Parameters:
index- The index to set the value at.value- The enum numeric value on the wire for style to set.- Returns:
- This builder for chaining.
-
addStyleValue
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;- Parameters:
value- The enum numeric value on the wire for style to add.- Returns:
- This builder for chaining.
-
addAllStyleValue
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;- Parameters:
values- The enum numeric values on the wire for style to add.- Returns:
- This builder for chaining.
-
setUnknownFields
public final ResourceDescriptor.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
mergeUnknownFields
public final ResourceDescriptor.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
-