# Identity and Access Management (IAM) v1 API - Class ListRolesResponse (2.5.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.5.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.ListRolesResponse)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.4.0/Google.Cloud.Iam.Admin.V1.ListRolesResponse)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.3.0/Google.Cloud.Iam.Admin.V1.ListRolesResponse)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.2.0/Google.Cloud.Iam.Admin.V1.ListRolesResponse)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.1.0/Google.Cloud.Iam.Admin.V1.ListRolesResponse)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.0.0/Google.Cloud.Iam.Admin.V1.ListRolesResponse)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.2.0/Google.Cloud.Iam.Admin.V1.ListRolesResponse)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.1.0/Google.Cloud.Iam.Admin.V1.ListRolesResponse)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.0.0/Google.Cloud.Iam.Admin.V1.ListRolesResponse)

    public sealed class ListRolesResponse : IMessage<ListRolesResponse>, IEquatable<ListRolesResponse>, IDeepCloneable<ListRolesResponse>, IBufferMessage, IMessage, IPageResponse<Role>, IEnumerable<Role>, IEnumerable

Reference documentation and code samples for the Identity and Access Management (IAM) v1 API class ListRolesResponse.

The response containing the roles defined under a resource.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ListRolesResponse

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ListRolesResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.ListRolesResponse), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ListRolesResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.ListRolesResponse), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ListRolesResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.ListRolesResponse), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html), [IPageResponse](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.IPageResponse-1.html)[Role](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.Role), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)[Role](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.Role), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Iam.Admin.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1)

## Assembly

Google.Cloud.Iam.Admin.V1.dll

## Constructors

### ListRolesResponse()

    public ListRolesResponse()

### ListRolesResponse(ListRolesResponse)

    public ListRolesResponse(ListRolesResponse other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.ListRolesResponse` |

## Properties

### NextPageToken

    public string NextPageToken { get; set; }

To retrieve the next page of results, set
`ListRolesRequest.page_token` to this value.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Roles

    public RepeatedField<Role> Roles { get; }

The Roles defined on this resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.Role` |   |

## Methods

### GetEnumerator()

    public IEnumerator<Role> GetEnumerator()

Returns an enumerator that iterates through the resources in this response.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.Role` |   |