# Service enfonica.voice.v1beta1.Users

## Methods

| CreateUser |
| -- |
| <span class="e-code">rpc CreateUser(<span class="e-code">[CreateUserRequest](#createuserrequest)</span>) returns (<span class="e-code">[User](#resource-user)</span>)</span><br/><br/>Creates a user.<br/><br/>The caller must have `voice.users.create` permission on the project. |

| DeleteUser |
| -- |
| <span class="e-code">rpc DeleteUser(<span class="e-code">[DeleteUserRequest](#deleteuserrequest)</span>) returns (<span class="e-code"><a href="https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty" target="_blank">google.protobuf.Empty</a></span>)</span><br/><br/>Deletes the specified user.<br/><br/>The caller must have `voice.users.delete` permission on the project. |

| GetUser |
| -- |
| <span class="e-code">rpc GetUser(<span class="e-code">[GetUserRequest](#getuserrequest)</span>) returns (<span class="e-code">[User](#resource-user)</span>)</span><br/><br/>Retrieves a user identified by the supplied resource name.<br/><br/>The caller must have `voice.users.get` permission on the project. |

| ListUsers |
| -- |
| <span class="e-code">rpc ListUsers(<span class="e-code">[ListUsersRequest](#listusersrequest)</span>) returns (<span class="e-code">[ListUsersResponse](#listusersresponse)</span>)</span><br/><br/>Lists all Users. List returns user sorted by create_time descending.<br/><br/>The caller must have `voice.users.list` permission on the project. |

| UpdateUser |
| -- |
| <span class="e-code">rpc UpdateUser(<span class="e-code">[UpdateUserRequest](#updateuserrequest)</span>) returns (<span class="e-code">[User](#resource-user)</span>)</span><br/><br/>Updates a user.<br/><br/>The caller must have `voice.users.update` permission on the project. |

## Resource: User

The User resource.

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Resource name of the user. It is of the form `projects/{project_id}/sipDomains/{sip_domain_id}/users/{user_id}`.
<span class="e-code">user_id</span> | <span class="e-code">string</span><br/>Output only. The username. This is a convenience field for the `user_id` component of the resource name. This forms the user's address of record, in the form `{user_id}@{fqdn}`.
<span class="e-code">password</span> | <span class="e-code">string</span><br/>Input only. The password. It must be a minimum of 12 characters, consisting of uppercase and lowercase letters and digits. Once the password is set, it cannot be retrieved. It is stored hashed.
<span class="e-code">address</span> | <span class="e-code">string</span><br/>Output only. The address represented by this user. This is the user's address of record, in the form {user_id}@{fqdn}.
<span class="e-code">create_time</span> | <span class="e-code"><a href="https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#timestamp" target="_blank">google.protobuf.Timestamp</a></span><br/>Output only. The creation time of the user.

## CreateUserRequest

Request to create a new user.

Fields | &nbsp;
--|--
<span class="e-code">parent</span> | <span class="e-code">string</span><br/>Required. The SIP domain under which to create the user in the form `projects/*/sipDomains/*`.
<span class="e-code">user</span> | <span class="e-code">[User](#resource-user)</span><br/>Required. The user resource to be created.
<span class="e-code">user_id</span> | <span class="e-code">string</span><br/>Required. The username of the user, and also the {user_id} component of the created resource's name, which will be of the form `projects/{project_id}/sipDomains/{sip_domain_id}/users/{user_id}`.<br/><br/>This must be lowercase alpha-numeric or hyphens and must start and end with an alpha-numeric character, and must be a minimum of 2 and maximum of 30 characters. This is captured in the following regular expression: ^[a-z0-9][a-z0-9-]{0,28}[a-z0-9]$

## GetUserRequest

The GetUser request message.

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Required. The resource name of the user to retrieve. Must be of the form `projects/*/sipDomains/*/users/*`.

## ListUsersRequest

The ListUsers request.

Fields | &nbsp;
--|--
<span class="e-code">parent</span> | <span class="e-code">string</span><br/>Required. The SIP domain under which to list users, in the form `projects/*/sipDomains/*`.
<span class="e-code">page_size</span> | <span class="e-code">int32</span><br/>The maximum number of users to return in the response. Default value of 10 and maximum value of 100.
<span class="e-code">page_token</span> | <span class="e-code">string</span><br/>A pagination token returned from a previous call to `ListUsers` that indicates where this listing should continue from.

## ListUsersResponse

The ListUsers response.

Fields | &nbsp;
--|--
<span class="e-code">users[]</span> | <span class="e-code">[User](#resource-user)</span><br/>A possibly paginated list of user that are direct descendants of the specified parent resource.
<span class="e-code">next_page_token</span> | <span class="e-code">string</span><br/>A pagination token returned from a previous call to `ListUsers` that indicates from where listing should continue.

## UpdateUserRequest

The request message for updating a user's properties.

Fields | &nbsp;
--|--
<span class="e-code">user</span> | <span class="e-code">[User](#resource-user)</span><br/>Required. The new definition of the User.
<span class="e-code">update_mask</span> | <span class="e-code"><a href="https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" target="_blank">google.protobuf.FieldMask</a></span><br/>Fields to be updated.

## DeleteUserRequest

The DeleteUser request message.

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Required. The resource name of the user to be deleted. Must be of the form `projects/*/sipDomains/*/users/*`.

