Class ContactMethod
- All Implemented Interfaces:
Serializable
,SdkPojo
,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:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal String
arn()
The Amazon Resource Name (ARN) of the contact method.static ContactMethod.Builder
builder()
final String
The destination of the contact method, such as an email address or a mobile phone number.final Instant
The timestamp when the contact method was created.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
final ResourceLocation
location()
An object that describes the location of the contact method, such as the Amazon Web Services Region and Availability Zone.final String
name()
The name of the contact method.final ContactProtocol
protocol()
The protocol of the contact method, such as email or SMS (text messaging).final String
The protocol of the contact method, such as email or SMS (text messaging).final ResourceType
The Lightsail resource type of the contact method.final String
The Lightsail resource type of the contact method.static Class
<? extends ContactMethod.Builder> final ContactMethodStatus
status()
The current status of the contact method.final String
The current status of the contact method.final String
The support code.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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
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 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:
-
-
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 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:
-
-
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 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:
-
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 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:
-
name
The name of the contact method.
- Returns:
- The name of the contact method.
-
arn
The Amazon Resource Name (ARN) of the contact method.
- Returns:
- The Amazon Resource Name (ARN) of the contact method.
-
createdAt
The timestamp when the contact method was created.
- Returns:
- The timestamp when the contact method was created.
-
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
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 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:
-
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 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:
-
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
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 interfaceToCopyableBuilder<ContactMethod.Builder,
ContactMethod> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
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 anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
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. -
getValueForField
-
sdkFields
-