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:
  • Method Details

    • 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, status will return ContactMethodStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      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:
    • 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, status will return ContactMethodStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      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:
    • 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, protocol will return ContactProtocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from protocolAsString().

      Returns:
      The protocol of the contact method, such as email or SMS (text messaging).
      See Also:
    • 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, protocol will return ContactProtocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from protocolAsString().

      Returns:
      The protocol of the contact method, such as email or SMS (text messaging).
      See Also:
    • 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, resourceType will return ResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from resourceTypeAsString().

      Returns:
      The Lightsail resource type of the contact method.
      See Also:
    • 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, resourceType will return ResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from resourceTypeAsString().

      Returns:
      The Lightsail resource type of the contact method.
      See Also:
    • 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()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<ContactMethod.Builder,ContactMethod>
      Returns:
      a builder for type T
    • builder

      public static ContactMethod.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ContactMethod.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.