# ResolveServiceRequest

public final class **ResolveServiceRequest** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
implements [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) Request for DNS-SD resolution to indicate information about the service to be
resolved.

### Constant Summary

|---|---|---|
| [String](https://developer.android.com/reference/java/lang/String.html) | [SERVICE_TYPE_COMMISSIONABLE](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#SERVICE_TYPE_COMMISSIONABLE) | DNS-SD service type for a commissionable Matter service. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [SERVICE_TYPE_OPERATIONAL](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#SERVICE_TYPE_OPERATIONAL) | DNS-SD service type for an operational Matter service. |

### Inherited Constant Summary

From interface android.os.Parcelable

|---|---|---|
| int | CONTENTS_FILE_DESCRIPTOR |   |
| int | PARCELABLE_STABILITY_LOCAL |   |
| int | PARCELABLE_STABILITY_VINTF |   |
| int | PARCELABLE_WRITE_RETURN_VALUE |   |

### Public Method Summary

|---|---|
| static [ResolveServiceRequest](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest) | [create](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#create(java.lang.String,%20java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) instanceName, [String](https://developer.android.com/reference/java/lang/String.html) serviceType) Creates a new `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest`. |
| boolean | [equals](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) o) |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getInstanceName](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#getInstanceName())() Returns the DNS-SD instance name. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getServiceType](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#getServiceType())() Returns the DNS-SD service type. |
| int | [hashCode](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#hashCode())() |
| [String](https://developer.android.com/reference/java/lang/String.html) | [toString](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#toString())() |
| void | [writeToParcel](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#writeToParcel(android.os.Parcel,%20int))([Parcel](https://developer.android.com/reference/android/os/Parcel.html) dest, int flags) |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface android.os.Parcelable

|---|---|
| abstract int | describeContents() |
| abstract void | writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |

## Constants

#### public static final [String](https://developer.android.com/reference/java/lang/String.html)
**SERVICE_TYPE_COMMISSIONABLE**

DNS-SD service type for a commissionable Matter service.
Constant Value: "_matterc._udp"

#### public static final [String](https://developer.android.com/reference/java/lang/String.html)
**SERVICE_TYPE_OPERATIONAL**

DNS-SD service type for an operational Matter service.
Constant Value: "_matter._tcp"

## Public Methods

#### public static [ResolveServiceRequest](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest) **create**
([String](https://developer.android.com/reference/java/lang/String.html) instanceName, [String](https://developer.android.com/reference/java/lang/String.html) serviceType)

Creates a new `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest`.

##### Parameters

| instanceName | the DNS-SD instance name of the service to resolve |
| serviceType | the type of the service to discover (one of `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#SERVICE_TYPE_COMMISSIONABLE`, one of `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/discovery/ResolveServiceRequest#SERVICE_TYPE_OPERATIONAL`) |
|---|---|

##### Throws

| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | if `serviceType` or `instanceName` are empty |
|---|---|

#### public boolean **equals** ([Object](https://developer.android.com/reference/java/lang/Object.html) o)

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getInstanceName** ()

Returns the DNS-SD instance name.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getServiceType** ()

Returns the DNS-SD service type.

#### public int **hashCode** ()

#### public [String](https://developer.android.com/reference/java/lang/String.html) **toString** ()

#### public void **writeToParcel** ([Parcel](https://developer.android.com/reference/android/os/Parcel.html) dest, int flags)