# Google Cloud Gke Hub V1 Client - Class Feature (1.3.1)

1.3.1 (latest) 1.3.0 1.2.2 1.1.0 1.0.6 0.10.0 0.9.5 0.8.2 0.7.1 0.6.3 0.5.6 Reference documentation and code samples for the Google Cloud Gke Hub V1 Client class Feature.

Feature represents the settings and status of any Fleet Feature.

Generated from protobuf message `google.cloud.gkehub.v1.Feature`

## Namespace

Google \\ Cloud \\ GkeHub \\ V1

## Methods

### __construct

Constructor.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getName

Output only. The full, unique name of this Feature resource in the format
`projects/*/locations/*/features/*`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Output only. The full, unique name of this Feature resource in the format
`projects/*/locations/*/features/*`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLabels

Labels for this Feature.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Labels for this Feature.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getResourceState

Output only. State of the Feature resource itself.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.FeatureResourceState|null` |   |

### hasResourceState

### clearResourceState

### setResourceState

Output only. State of the Feature resource itself.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.FeatureResourceState` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSpec

Optional. Fleet-wide Feature configuration. If this Feature does not
support any Fleet-wide configuration, this field may be unused.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.CommonFeatureSpec|null` |   |

### hasSpec

### clearSpec

### setSpec

Optional. Fleet-wide Feature configuration. If this Feature does not
support any Fleet-wide configuration, this field may be unused.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.CommonFeatureSpec` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMembershipSpecs

Optional. Membership-specific configuration for this Feature. If this
Feature does not support any per-Membership configuration, this field may
be unused.

The keys indicate which Membership the configuration is for, in the form:
`projects/{p}/locations/{l}/memberships/{m}`
Where {p} is the project, {l} is a valid location and {m} is a valid
Membership in this project at that location. {p} WILL match the Feature's
project.
{p} will always be returned as the project number, but the project ID is
also accepted during input. If the same Membership is specified in the map
twice (using the project ID form, and the project number form), exactly
ONE of the entries will be saved, with no guarantees as to which. For this
reason, it is recommended the same format be used for all entries when
mutating a Feature.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setMembershipSpecs

Optional. Membership-specific configuration for this Feature. If this
Feature does not support any per-Membership configuration, this field may
be unused.

The keys indicate which Membership the configuration is for, in the form:
`projects/{p}/locations/{l}/memberships/{m}`
Where {p} is the project, {l} is a valid location and {m} is a valid
Membership in this project at that location. {p} WILL match the Feature's
project.
{p} will always be returned as the project number, but the project ID is
also accepted during input. If the same Membership is specified in the map
twice (using the project ID form, and the project number form), exactly
ONE of the entries will be saved, with no guarantees as to which. For this
reason, it is recommended the same format be used for all entries when
mutating a Feature.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getState

Output only. The Fleet-wide Feature state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.CommonFeatureState|null` |   |

### hasState

### clearState

### setState

Output only. The Fleet-wide Feature state.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.CommonFeatureState` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMembershipStates

Output only. Membership-specific Feature status. If this Feature does
report any per-Membership status, this field may be unused.

The keys indicate which Membership the state is for, in the form:
`projects/{p}/locations/{l}/memberships/{m}`
Where {p} is the project number, {l} is a valid location and {m} is a valid
Membership in this project at that location. {p} MUST match the Feature's
project number.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setMembershipStates

Output only. Membership-specific Feature status. If this Feature does
report any per-Membership status, this field may be unused.

The keys indicate which Membership the state is for, in the form:
`projects/{p}/locations/{l}/memberships/{m}`
Where {p} is the project number, {l} is a valid location and {m} is a valid
Membership in this project at that location. {p} MUST match the Feature's
project number.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. When the Feature resource was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. When the Feature resource was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

Output only. When the Feature resource was last updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. When the Feature resource was last updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDeleteTime

Output only. When the Feature resource was deleted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasDeleteTime

### clearDeleteTime

### setDeleteTime

Output only. When the Feature resource was deleted.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getScopeSpecs

Optional. Scope-specific configuration for this Feature. If this Feature
does not support any per-Scope configuration, this field may be unused.

The keys indicate which Scope the configuration is for, in the form:
`projects/{p}/locations/global/scopes/{s}`
Where {p} is the project, {s} is a valid Scope in this project.
{p} WILL match the Feature's project.
{p} will always be returned as the project number, but the project ID is
also accepted during input. If the same Scope is specified in the map
twice (using the project ID form, and the project number form), exactly
ONE of the entries will be saved, with no guarantees as to which. For this
reason, it is recommended the same format be used for all entries when
mutating a Feature.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setScopeSpecs

Optional. Scope-specific configuration for this Feature. If this Feature
does not support any per-Scope configuration, this field may be unused.

The keys indicate which Scope the configuration is for, in the form:
`projects/{p}/locations/global/scopes/{s}`
Where {p} is the project, {s} is a valid Scope in this project.
{p} WILL match the Feature's project.
{p} will always be returned as the project number, but the project ID is
also accepted during input. If the same Scope is specified in the map
twice (using the project ID form, and the project number form), exactly
ONE of the entries will be saved, with no guarantees as to which. For this
reason, it is recommended the same format be used for all entries when
mutating a Feature.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getScopeStates

Output only. Scope-specific Feature status. If this Feature does
report any per-Scope status, this field may be unused.

The keys indicate which Scope the state is for, in the form:
`projects/{p}/locations/global/scopes/{s}`
Where {p} is the project, {s} is a valid Scope in this project.
{p} WILL match the Feature's project.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setScopeStates

Output only. Scope-specific Feature status. If this Feature does
report any per-Scope status, this field may be unused.

The keys indicate which Scope the state is for, in the form:
`projects/{p}/locations/global/scopes/{s}`
Where {p} is the project, {s} is a valid Scope in this project.
{p} WILL match the Feature's project.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUnreachable

Output only. List of locations that could not be reached while fetching
this feature.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setUnreachable

Output only. List of locations that could not be reached while fetching
this feature.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |