# Interface ResourceDescriptorOrBuilder (2.72.0)

2.72.0 (latest) 2.70.0 2.67.0 2.66.0 2.65.1 2.64.1 2.63.2 2.62.0 2.61.3 2.60.0 2.59.2 2.58.0 2.57.0 2.56.0 2.54.1 2.53.0 2.52.0 2.51.0 2.50.1 2.49.0 2.48.0 2.46.0 2.45.1 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.1 2.38.0 2.37.1 2.36.0 2.34.0 2.33.0 2.32.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.1 2.22.1 2.21.1 2.15.0 2.14.3 2.13.0 2.12.0 2.11.0 2.10.0 2.9.6 2.8.4 2.7.4

    public interface ResourceDescriptorOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getHistory()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.api.ResourceDescriptor.History` | The history. |

### getHistoryValue()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for history. |

### getNameField()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The nameField. |

### getNameFieldBytes()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for nameField. |

### getPattern(int index)

    public abstract 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;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The pattern at the given index. |

### getPatternBytes(int index)

    public abstract 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;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the pattern at the given index. |

### getPatternCount()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of pattern. |

### getPatternList()

    public abstract List<String> 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the pattern. |

### getPlural()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The plural. |

### getPluralBytes()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for plural. |

### getSingular()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The singular. |

### getSingularBytes()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for singular. |

### getStyle(int index)

    public abstract 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;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.api.ResourceDescriptor.Style` | The style at the given index. |

### getStyleCount()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of style. |

### getStyleList()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.api.ResourceDescriptor.Style>` | A list containing the style. |

### getStyleValue(int index)

    public abstract 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;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire of style at the given index. |

### getStyleValueList()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html>` | A list containing the enum numeric values on the wire for style. |

### getType()

    public abstract 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+/. 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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The type. |

### getTypeBytes()

    public abstract 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+/. 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** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for type. |