# Google Cloud Gke Hub V1 Client - Class MembershipSpec (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 MembershipSpec.

**Anthos Config Management**: Configuration for a single cluster.

Intended to parallel the ConfigManagement CR.

Generated from protobuf message `google.cloud.gkehub.configmanagement.v1.MembershipSpec`

## Namespace

Google \\ Cloud \\ GkeHub \\ ConfigManagement \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ config_sync` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/ConfigManagement.V1.ConfigSync` Config Sync configuration for the cluster. |
| `↳ policy_controller` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/ConfigManagement.V1.PolicyController` Policy Controller configuration for the cluster. |
| `↳ hierarchy_controller` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/ConfigManagement.V1.HierarchyControllerConfig` Hierarchy Controller configuration for the cluster. |
| `↳ version` | `string` Version of ACM installed. |
| `↳ cluster` | `string` The user-specified cluster name used by Config Sync cluster-name-selector annotation or ClusterSelector, for applying configs to only a subset of clusters. Omit this field if the cluster's fleet membership name is used by Config Sync cluster-name-selector annotation or ClusterSelector. Set this field if a name different from the cluster's fleet membership name is used by Config Sync cluster-name-selector annotation or ClusterSelector. |
| `↳ management` | `int` Enables automatic Feature management. |

### getConfigSync

Config Sync configuration for the cluster.

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

### hasConfigSync

### clearConfigSync

### setConfigSync

Config Sync configuration for the cluster.

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

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

### getPolicyController

Policy Controller configuration for the cluster.

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

### hasPolicyController

### clearPolicyController

### setPolicyController

Policy Controller configuration for the cluster.

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

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

### getHierarchyController

Hierarchy Controller configuration for the cluster.

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

### hasHierarchyController

### clearHierarchyController

### setHierarchyController

Hierarchy Controller configuration for the cluster.

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

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

### getVersion

Version of ACM installed.

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

### setVersion

Version of ACM installed.

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

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

### getCluster

The user-specified cluster name used by Config Sync cluster-name-selector
annotation or ClusterSelector, for applying configs to only a subset
of clusters.

Omit this field if the cluster's fleet membership name is used by Config
Sync cluster-name-selector annotation or ClusterSelector.
Set this field if a name different from the cluster's fleet membership name
is used by Config Sync cluster-name-selector annotation or ClusterSelector.

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

### setCluster

The user-specified cluster name used by Config Sync cluster-name-selector
annotation or ClusterSelector, for applying configs to only a subset
of clusters.

Omit this field if the cluster's fleet membership name is used by Config
Sync cluster-name-selector annotation or ClusterSelector.
Set this field if a name different from the cluster's fleet membership name
is used by Config Sync cluster-name-selector annotation or ClusterSelector.

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

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

### getManagement

Enables automatic Feature management.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Management](https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/ConfigManagement.V1.MembershipSpec.Management). |

### setManagement

Enables automatic Feature management.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Management](https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/ConfigManagement.V1.MembershipSpec.Management). |

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