Class ContactMethod
- java.lang.Object
-
- software.amazon.awssdk.services.lightsail.model.ContactMethod
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ContactMethod.Builder,ContactMethod>
@Generated("software.amazon.awssdk:codegen") public final class ContactMethod extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ContactMethod.Builder,ContactMethod>
Describes a contact method.
A contact method is a way to send you notifications. For more information, see Notifications in Amazon Lightsail.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceContactMethod.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringarn()The Amazon Resource Name (ARN) of the contact method.static ContactMethod.Builderbuilder()StringcontactEndpoint()The destination of the contact method, such as an email address or a mobile phone number.InstantcreatedAt()The timestamp when the contact method was created.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()ResourceLocationlocation()An object that describes the location of the contact method, such as the Amazon Web Services Region and Availability Zone.Stringname()The name of the contact method.ContactProtocolprotocol()The protocol of the contact method, such as email or SMS (text messaging).StringprotocolAsString()The protocol of the contact method, such as email or SMS (text messaging).ResourceTyperesourceType()The Lightsail resource type of the contact method.StringresourceTypeAsString()The Lightsail resource type of the contact method.List<SdkField<?>>sdkFields()static Class<? extends ContactMethod.Builder>serializableBuilderClass()ContactMethodStatusstatus()The current status of the contact method.StringstatusAsString()The current status of the contact method.StringsupportCode()The support code.ContactMethod.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
contactEndpoint
public final String contactEndpoint()
The destination of the contact method, such as an email address or a mobile phone number.
- Returns:
- The destination of the contact method, such as an email address or a mobile phone number.
-
status
public final ContactMethodStatus status()
The current status of the contact method.
A contact method has the following possible status:
-
PendingVerification- The contact method has not yet been verified, and the verification has not yet expired. -
Valid- The contact method has been verified. -
InValid- An attempt was made to verify the contact method, but the verification has expired.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnContactMethodStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- The current status of the contact method.
A contact method has the following possible status:
-
PendingVerification- The contact method has not yet been verified, and the verification has not yet expired. -
Valid- The contact method has been verified. -
InValid- An attempt was made to verify the contact method, but the verification has expired.
-
- See Also:
ContactMethodStatus
-
-
statusAsString
public final String statusAsString()
The current status of the contact method.
A contact method has the following possible status:
-
PendingVerification- The contact method has not yet been verified, and the verification has not yet expired. -
Valid- The contact method has been verified. -
InValid- An attempt was made to verify the contact method, but the verification has expired.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnContactMethodStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- The current status of the contact method.
A contact method has the following possible status:
-
PendingVerification- The contact method has not yet been verified, and the verification has not yet expired. -
Valid- The contact method has been verified. -
InValid- An attempt was made to verify the contact method, but the verification has expired.
-
- See Also:
ContactMethodStatus
-
-
protocol
public final ContactProtocol protocol()
The protocol of the contact method, such as email or SMS (text messaging).
If the service returns an enum value that is not available in the current SDK version,
protocolwill returnContactProtocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromprotocolAsString().- Returns:
- The protocol of the contact method, such as email or SMS (text messaging).
- See Also:
ContactProtocol
-
protocolAsString
public final String protocolAsString()
The protocol of the contact method, such as email or SMS (text messaging).
If the service returns an enum value that is not available in the current SDK version,
protocolwill returnContactProtocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromprotocolAsString().- Returns:
- The protocol of the contact method, such as email or SMS (text messaging).
- See Also:
ContactProtocol
-
name
public final String name()
The name of the contact method.
- Returns:
- The name of the contact method.
-
arn
public final String arn()
The Amazon Resource Name (ARN) of the contact method.
- Returns:
- The Amazon Resource Name (ARN) of the contact method.
-
createdAt
public final Instant createdAt()
The timestamp when the contact method was created.
- Returns:
- The timestamp when the contact method was created.
-
location
public final ResourceLocation location()
An object that describes the location of the contact method, such as the Amazon Web Services Region and Availability Zone.
- Returns:
- An object that describes the location of the contact method, such as the Amazon Web Services Region and Availability Zone.
-
resourceType
public final ResourceType resourceType()
The Lightsail resource type of the contact method.
If the service returns an enum value that is not available in the current SDK version,
resourceTypewill returnResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromresourceTypeAsString().- Returns:
- The Lightsail resource type of the contact method.
- See Also:
ResourceType
-
resourceTypeAsString
public final String resourceTypeAsString()
The Lightsail resource type of the contact method.
If the service returns an enum value that is not available in the current SDK version,
resourceTypewill returnResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromresourceTypeAsString().- Returns:
- The Lightsail resource type of the contact method.
- See Also:
ResourceType
-
supportCode
public final String supportCode()
The support code. Include this code in your email to support when you have questions about your Lightsail contact method. This code enables our support team to look up your Lightsail information more easily.
- Returns:
- The support code. Include this code in your email to support when you have questions about your Lightsail contact method. This code enables our support team to look up your Lightsail information more easily.
-
toBuilder
public ContactMethod.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<ContactMethod.Builder,ContactMethod>
-
builder
public static ContactMethod.Builder builder()
-
serializableBuilderClass
public static Class<? extends ContactMethod.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-