Package com.twilio.rest.chat.v2
Class CredentialUpdater
- java.lang.Object
-
- com.twilio.base.Updater<Credential>
-
- com.twilio.rest.chat.v2.CredentialUpdater
-
public class CredentialUpdater extends Updater<Credential>
-
-
Constructor Summary
Constructors Constructor Description CredentialUpdater(String pathSid)
Construct a new CredentialUpdater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CredentialUpdater
setApiKey(String apiKey)
[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential..CredentialUpdater
setCertificate(String certificate)
[APN only] The URL encoded representation of the certificate.CredentialUpdater
setFriendlyName(String friendlyName)
A descriptive string that you create to describe the resource.CredentialUpdater
setPrivateKey(String privateKey)
[APN only] The URL encoded representation of the private key.CredentialUpdater
setSandbox(Boolean sandbox)
[APN only] Whether to send the credential to sandbox APNs.CredentialUpdater
setSecret(String secret)
[FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging..Credential
update(TwilioRestClient client)
Make the request to the Twilio API to perform the update.-
Methods inherited from class com.twilio.base.Updater
update, updateAsync, updateAsync
-
-
-
-
Constructor Detail
-
CredentialUpdater
public CredentialUpdater(String pathSid)
Construct a new CredentialUpdater.- Parameters:
pathSid
- The unique string that identifies the resource
-
-
Method Detail
-
setFriendlyName
public CredentialUpdater setFriendlyName(String friendlyName)
A descriptive string that you create to describe the resource. It can be up to 64 characters long..- Parameters:
friendlyName
- A string to describe the resource- Returns:
- this
-
setCertificate
public CredentialUpdater setCertificate(String certificate)
[APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----`.- Parameters:
certificate
- [APN only] The URL encoded representation of the certificate- Returns:
- this
-
setPrivateKey
public CredentialUpdater setPrivateKey(String privateKey)
[APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----`.- Parameters:
privateKey
- [APN only] The URL encoded representation of the private key- Returns:
- this
-
setSandbox
public CredentialUpdater setSandbox(Boolean sandbox)
[APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production..- Parameters:
sandbox
- [APN only] Whether to send the credential to sandbox APNs- Returns:
- this
-
setApiKey
public CredentialUpdater setApiKey(String apiKey)
[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential..- Parameters:
apiKey
- [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential- Returns:
- this
-
setSecret
public CredentialUpdater setSecret(String secret)
[FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging..- Parameters:
secret
- [FCM only] The Server key of your project from Firebase console- Returns:
- this
-
update
public Credential update(TwilioRestClient client)
Make the request to the Twilio API to perform the update.- Specified by:
update
in classUpdater<Credential>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- Updated Credential
-
-