Share via


GcmCredential Class

  • java.lang.Object
    • com.azure.resourcemanager.notificationhubs.models.GcmCredential

Implements

public final class GcmCredential
implements JsonSerializable<GcmCredential>

Description of a NotificationHub GcmCredential.

Constructor Summary

Constructor Description
GcmCredential()

Creates an instance of GcmCredential class.

Method Summary

Modifier and Type Method and Description
static GcmCredential fromJson(JsonReader jsonReader)

Reads an instance of GcmCredential from the JsonReader.

String gcmEndpoint()

Get the gcmEndpoint property: The FCM legacy endpoint.

String googleApiKey()

Get the googleApiKey property: The Google API key.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

GcmCredential withGcmEndpoint(String gcmEndpoint)

Set the gcmEndpoint property: The FCM legacy endpoint.

GcmCredential withGoogleApiKey(String googleApiKey)

Set the googleApiKey property: The Google API key.

Methods inherited from java.lang.Object

Constructor Details

GcmCredential

public GcmCredential()

Creates an instance of GcmCredential class.

Method Details

fromJson

public static GcmCredential fromJson(JsonReader jsonReader)

Reads an instance of GcmCredential from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of GcmCredential if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the GcmCredential.

gcmEndpoint

public String gcmEndpoint()

Get the gcmEndpoint property: The FCM legacy endpoint. Default value is 'https://fcm.googleapis.com/fcm/send'.

Returns:

the gcmEndpoint value.

googleApiKey

public String googleApiKey()

Get the googleApiKey property: The Google API key.

Returns:

the googleApiKey value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withGcmEndpoint

public GcmCredential withGcmEndpoint(String gcmEndpoint)

Set the gcmEndpoint property: The FCM legacy endpoint. Default value is 'https://fcm.googleapis.com/fcm/send'.

Parameters:

gcmEndpoint - the gcmEndpoint value to set.

Returns:

the GcmCredential object itself.

withGoogleApiKey

public GcmCredential withGoogleApiKey(String googleApiKey)

Set the googleApiKey property: The Google API key.

Parameters:

googleApiKey - the googleApiKey value to set.

Returns:

the GcmCredential object itself.

Applies to