# Class AssignRoleRequest | EchoHub Documentation

# Class AssignRoleRequest

Namespace
  EchoHub.Core.DTOs

Assembly
  EchoHub.Core.dll

    public record AssignRoleRequest : IEquatable<AssignRoleRequest>

Inheritance
  object
  AssignRoleRequest

Implements
  IEquatable<AssignRoleRequest>

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.Equals(object, object)
  object.ReferenceEquals(object, object)

## Constructors

### AssignRoleRequest(AssignRoleRequest)

    protected AssignRoleRequest(AssignRoleRequest original)

#### Parameters

`original` AssignRoleRequest

### AssignRoleRequest(string, ServerRole)

    public AssignRoleRequest(string Username, ServerRole Role)

#### Parameters

`Username` string
`Role` ServerRole

## Properties

### EqualityContract

    protected virtual Type EqualityContract { get; }

#### Property Value

Type

### Role

    public ServerRole Role { get; init; }

#### Property Value

ServerRole

### Username

    public string Username { get; init; }

#### Property Value

string

## Methods

### Deconstruct(out string, out ServerRole)

    public void Deconstruct(out string Username, out ServerRole Role)

#### Parameters

`Username` string
`Role` ServerRole

### Equals(AssignRoleRequest?)

    public virtual bool Equals(AssignRoleRequest? other)

#### Parameters

`other` AssignRoleRequest

#### Returns

bool

### Equals(object?)

    public override bool Equals(object? obj)

#### Parameters

`obj` object

#### Returns

bool

### GetHashCode()

    public override int GetHashCode()

#### Returns

int

### PrintMembers(StringBuilder)

    protected virtual bool PrintMembers(StringBuilder builder)

#### Parameters

`builder` StringBuilder

#### Returns

bool

### ToString()

    public override string ToString()

#### Returns

string

## Operators

### operator ==(AssignRoleRequest?, AssignRoleRequest?)

    public static bool operator ==(AssignRoleRequest? left, AssignRoleRequest? right)

#### Parameters

`left` AssignRoleRequest
`right` AssignRoleRequest

#### Returns

bool

### operator !=(AssignRoleRequest?, AssignRoleRequest?)

    public static bool operator !=(AssignRoleRequest? left, AssignRoleRequest? right)

#### Parameters

`left` AssignRoleRequest
`right` AssignRoleRequest

#### Returns

bool