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

KubernetesResource contains the YAML manifests and configuration for
Membership Kubernetes resources in the cluster. After CreateMembership or
UpdateMembership, these resources should be re-applied in the cluster.

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

## Namespace

Google \\ Cloud \\ GkeHub \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ membership_cr_manifest` | `string` Input only. The YAML representation of the Membership CR. This field is ignored for GKE clusters where Hub can read the CR directly. Callers should provide the CR that is currently present in the cluster during CreateMembership or UpdateMembership, or leave this field empty if none exists. The CR manifest is used to validate the cluster has not been registered with another Membership. |
| `↳ membership_resources` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.ResourceManifest>` Output only. Additional Kubernetes resources that need to be applied to the cluster after Membership creation, and after every update. This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask. |
| `↳ connect_resources` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.ResourceManifest>` Output only. The Kubernetes resources for installing the GKE Connect agent This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask. |
| `↳ resource_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.ResourceOptions` Optional. Options for Kubernetes resource generation. |

### getMembershipCrManifest

Input only. The YAML representation of the Membership CR. This field is
ignored for GKE clusters where Hub can read the CR directly.

Callers should provide the CR that is currently present in the cluster
during CreateMembership or UpdateMembership, or leave this field empty if
none exists. The CR manifest is used to validate the cluster has not been
registered with another Membership.

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

### setMembershipCrManifest

Input only. The YAML representation of the Membership CR. This field is
ignored for GKE clusters where Hub can read the CR directly.

Callers should provide the CR that is currently present in the cluster
during CreateMembership or UpdateMembership, or leave this field empty if
none exists. The CR manifest is used to validate the cluster has not been
registered with another Membership.

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

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

### getMembershipResources

Output only. Additional Kubernetes resources that need to be applied to the
cluster after Membership creation, and after every update.

This field is only populated in the Membership returned from a successful
long-running operation from CreateMembership or UpdateMembership. It is not
populated during normal GetMembership or ListMemberships requests. To get
the resource manifest after the initial registration, the caller should
make a UpdateMembership call with an empty field mask.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.ResourceManifest>` |   |

### setMembershipResources

Output only. Additional Kubernetes resources that need to be applied to the
cluster after Membership creation, and after every update.

This field is only populated in the Membership returned from a successful
long-running operation from CreateMembership or UpdateMembership. It is not
populated during normal GetMembership or ListMemberships requests. To get
the resource manifest after the initial registration, the caller should
make a UpdateMembership call with an empty field mask.

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

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

### getConnectResources

Output only. The Kubernetes resources for installing the GKE Connect agent
This field is only populated in the Membership returned from a successful
long-running operation from CreateMembership or UpdateMembership. It is not
populated during normal GetMembership or ListMemberships requests. To get
the resource manifest after the initial registration, the caller should
make a UpdateMembership call with an empty field mask.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.ResourceManifest>` |   |

### setConnectResources

Output only. The Kubernetes resources for installing the GKE Connect agent
This field is only populated in the Membership returned from a successful
long-running operation from CreateMembership or UpdateMembership. It is not
populated during normal GetMembership or ListMemberships requests. To get
the resource manifest after the initial registration, the caller should
make a UpdateMembership call with an empty field mask.

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

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

### getResourceOptions

Optional. Options for Kubernetes resource generation.

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

### hasResourceOptions

### clearResourceOptions

### setResourceOptions

Optional. Options for Kubernetes resource generation.

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

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