# Google Shopping Merchant Accounts V1beta Client - Class User (1.4.1)

1.4.1 (latest) 1.4.0 1.3.1 1.2.2 1.1.0 1.0.0 0.10.0 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.3 0.2.0 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Shopping Merchant Accounts V1beta Client class User.

A [user](https://support.google.com/merchants/answer/12160472).

Generated from protobuf message `google.shopping.merchant.accounts.v1beta.User`

## Namespace

Google \\ Shopping \\ Merchant \\ Accounts \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the user. Format: `accounts/{account}/user/{email}` Use `me` to refer to your own email address, for example `accounts/{account}/users/me`. |
| `↳ state` | `int` Output only. The state of the user. |
| `↳ access_rights` | `int[]` Optional. The [access rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) the user has. |

### getName

Identifier. The resource name of the user.

Format: `accounts/{account}/user/{email}`
Use `me` to refer to your own email address, for example
`accounts/{account}/users/me`.

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

### setName

Identifier. The resource name of the user.

Format: `accounts/{account}/user/{email}`
Use `me` to refer to your own email address, for example
`accounts/{account}/users/me`.

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

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

### getState

Output only. The state of the user.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1beta.User.State). |

### setState

Output only. The state of the user.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1beta.User.State). |

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

### getAccessRights

Optional. The [access
rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes)
the user has.

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

### setAccessRights

Optional. The [access
rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes)
the user has.

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

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