Package com.google.api
Class ResourceDescriptor.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
- com.google.api.ResourceDescriptor.Builder
-
- All Implemented Interfaces:
ResourceDescriptorOrBuilder
,com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.lang.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.Builder
addAllPattern(java.lang.Iterable<java.lang.String> values)
Optional.ResourceDescriptor.Builder
addAllStyle(java.lang.Iterable<? extends ResourceDescriptor.Style> values)
Style flag(s) for this resource.ResourceDescriptor.Builder
addAllStyleValue(java.lang.Iterable<java.lang.Integer> values)
Style flag(s) for this resource.ResourceDescriptor.Builder
addPattern(java.lang.String value)
Optional.ResourceDescriptor.Builder
addPatternBytes(com.google.protobuf.ByteString value)
Optional.ResourceDescriptor.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.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.java.lang.String
getNameField()
Optional.com.google.protobuf.ByteString
getNameFieldBytes()
Optional.java.lang.String
getPattern(int index)
Optional.com.google.protobuf.ByteString
getPatternBytes(int index)
Optional.int
getPatternCount()
Optional.com.google.protobuf.ProtocolStringList
getPatternList()
Optional.java.lang.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'.java.lang.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.java.util.List<ResourceDescriptor.Style>
getStyleList()
Style flag(s) for this resource.int
getStyleValue(int index)
Style flag(s) for this resource.java.util.List<java.lang.Integer>
getStyleValueList()
Style flag(s) for this resource.java.lang.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(ResourceDescriptor other)
ResourceDescriptor.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
ResourceDescriptor.Builder
mergeFrom(com.google.protobuf.Message other)
ResourceDescriptor.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
ResourceDescriptor.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
ResourceDescriptor.Builder
setHistory(ResourceDescriptor.History value)
Optional.ResourceDescriptor.Builder
setHistoryValue(int value)
Optional.ResourceDescriptor.Builder
setNameField(java.lang.String value)
Optional.ResourceDescriptor.Builder
setNameFieldBytes(com.google.protobuf.ByteString value)
Optional.ResourceDescriptor.Builder
setPattern(int index, java.lang.String value)
Optional.ResourceDescriptor.Builder
setPlural(java.lang.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, java.lang.Object value)
ResourceDescriptor.Builder
setSingular(java.lang.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(java.lang.String value)
The resource type.ResourceDescriptor.Builder
setTypeBytes(com.google.protobuf.ByteString value)
The resource type.ResourceDescriptor.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableBuilder
addExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasField, mergeExtensionFields, newBuilderForField, parseUnknownField, setExtension, setExtension
-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
getOneofFieldDescriptor, getUnknownFields, getUnknownFieldSetBuilder, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, onBuilt, onChanged, 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()
- Overrides:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
clear
public ResourceDescriptor.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<ResourceDescriptor.Builder>
-
getDefaultInstanceForType
public ResourceDescriptor getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public ResourceDescriptor build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ResourceDescriptor buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ResourceDescriptor.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
setField
public ResourceDescriptor.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
clearField
public ResourceDescriptor.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
clearOneof
public ResourceDescriptor.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
setRepeatedField
public ResourceDescriptor.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
addRepeatedField
public ResourceDescriptor.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
mergeFrom
public ResourceDescriptor.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ResourceDescriptor.Builder>
-
mergeFrom
public ResourceDescriptor.Builder mergeFrom(ResourceDescriptor other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,ResourceDescriptor.Builder>
-
mergeFrom
public ResourceDescriptor.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ResourceDescriptor.Builder>
- Throws:
java.io.IOException
-
getType
public java.lang.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:
getType
in 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:
getTypeBytes
in interfaceResourceDescriptorOrBuilder
- Returns:
- The bytes for type.
-
setType
public ResourceDescriptor.Builder setType(java.lang.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:
getPatternList
in 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:
getPatternCount
in interfaceResourceDescriptorOrBuilder
- Returns:
- The count of pattern.
-
getPattern
public java.lang.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:
getPattern
in 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:
getPatternBytes
in 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, java.lang.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(java.lang.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(java.lang.Iterable<java.lang.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 java.lang.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:
getNameField
in 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:
getNameFieldBytes
in interfaceResourceDescriptorOrBuilder
- Returns:
- The bytes for nameField.
-
setNameField
public ResourceDescriptor.Builder setNameField(java.lang.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:
getHistoryValue
in 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:
getHistory
in 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 java.lang.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'. One exception to this is for Nested Collections that have stuttering names, as defined in [AIP-122](https://google.aip.dev/122#nested-collections), where the collection ID in the resource name pattern does not necessarily directly match the `plural` value. 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;
- Specified by:
getPlural
in 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'. One exception to this is for Nested Collections that have stuttering names, as defined in [AIP-122](https://google.aip.dev/122#nested-collections), where the collection ID in the resource name pattern does not necessarily directly match the `plural` value. 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;
- Specified by:
getPluralBytes
in interfaceResourceDescriptorOrBuilder
- Returns:
- The bytes for plural.
-
setPlural
public ResourceDescriptor.Builder setPlural(java.lang.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'. One exception to this is for Nested Collections that have stuttering names, as defined in [AIP-122](https://google.aip.dev/122#nested-collections), where the collection ID in the resource name pattern does not necessarily directly match the `plural` value. 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;
- 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'. One exception to this is for Nested Collections that have stuttering names, as defined in [AIP-122](https://google.aip.dev/122#nested-collections), where the collection ID in the resource name pattern does not necessarily directly match the `plural` value. 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;
- 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'. One exception to this is for Nested Collections that have stuttering names, as defined in [AIP-122](https://google.aip.dev/122#nested-collections), where the collection ID in the resource name pattern does not necessarily directly match the `plural` value. 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;
- Parameters:
value
- The bytes for plural to set.- Returns:
- This builder for chaining.
-
getSingular
public java.lang.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:
getSingular
in 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:
getSingularBytes
in interfaceResourceDescriptorOrBuilder
- Returns:
- The bytes for singular.
-
setSingular
public ResourceDescriptor.Builder setSingular(java.lang.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 java.util.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:
getStyleList
in 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:
getStyleCount
in 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:
getStyle
in 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(java.lang.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 java.util.List<java.lang.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:
getStyleValueList
in 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:
getStyleValue
in 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(java.lang.Iterable<java.lang.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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
mergeUnknownFields
public final ResourceDescriptor.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
-
-