All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ssmcontacts.model.ContactChannel Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Systems Manager Incident Manager Contacts module holds the client classes that are used for communicating with AWS Systems Manager Incident Manager Contacts Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.ssmcontacts.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The method that Incident Manager uses to engage a contact. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ContactChannel implements Serializable, Cloneable, StructuredPojo { /** *

* The Amazon Resource Name (ARN) of the contact channel. *

*/ private String contactChannelArn; /** *

* The ARN of the contact that contains the contact channel. *

*/ private String contactArn; /** *

* The name of the contact channel. *

*/ private String name; /** *

* The type of the contact channel. Incident Manager supports three contact methods: *

*
    *
  • *

    * SMS *

    *
  • *
  • *

    * VOICE *

    *
  • *
  • *

    * EMAIL *

    *
  • *
*/ private String type; /** *

* The details that Incident Manager uses when trying to engage the contact channel. *

*/ private ContactChannelAddress deliveryAddress; /** *

* A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't * activated, Incident Manager can't engage the contact through it. *

*/ private String activationStatus; /** *

* The Amazon Resource Name (ARN) of the contact channel. *

* * @param contactChannelArn * The Amazon Resource Name (ARN) of the contact channel. */ public void setContactChannelArn(String contactChannelArn) { this.contactChannelArn = contactChannelArn; } /** *

* The Amazon Resource Name (ARN) of the contact channel. *

* * @return The Amazon Resource Name (ARN) of the contact channel. */ public String getContactChannelArn() { return this.contactChannelArn; } /** *

* The Amazon Resource Name (ARN) of the contact channel. *

* * @param contactChannelArn * The Amazon Resource Name (ARN) of the contact channel. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactChannel withContactChannelArn(String contactChannelArn) { setContactChannelArn(contactChannelArn); return this; } /** *

* The ARN of the contact that contains the contact channel. *

* * @param contactArn * The ARN of the contact that contains the contact channel. */ public void setContactArn(String contactArn) { this.contactArn = contactArn; } /** *

* The ARN of the contact that contains the contact channel. *

* * @return The ARN of the contact that contains the contact channel. */ public String getContactArn() { return this.contactArn; } /** *

* The ARN of the contact that contains the contact channel. *

* * @param contactArn * The ARN of the contact that contains the contact channel. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactChannel withContactArn(String contactArn) { setContactArn(contactArn); return this; } /** *

* The name of the contact channel. *

* * @param name * The name of the contact channel. */ public void setName(String name) { this.name = name; } /** *

* The name of the contact channel. *

* * @return The name of the contact channel. */ public String getName() { return this.name; } /** *

* The name of the contact channel. *

* * @param name * The name of the contact channel. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactChannel withName(String name) { setName(name); return this; } /** *

* The type of the contact channel. Incident Manager supports three contact methods: *

*
    *
  • *

    * SMS *

    *
  • *
  • *

    * VOICE *

    *
  • *
  • *

    * EMAIL *

    *
  • *
* * @param type * The type of the contact channel. Incident Manager supports three contact methods:

*
    *
  • *

    * SMS *

    *
  • *
  • *

    * VOICE *

    *
  • *
  • *

    * EMAIL *

    *
  • * @see ChannelType */ public void setType(String type) { this.type = type; } /** *

    * The type of the contact channel. Incident Manager supports three contact methods: *

    *
      *
    • *

      * SMS *

      *
    • *
    • *

      * VOICE *

      *
    • *
    • *

      * EMAIL *

      *
    • *
    * * @return The type of the contact channel. Incident Manager supports three contact methods:

    *
      *
    • *

      * SMS *

      *
    • *
    • *

      * VOICE *

      *
    • *
    • *

      * EMAIL *

      *
    • * @see ChannelType */ public String getType() { return this.type; } /** *

      * The type of the contact channel. Incident Manager supports three contact methods: *

      *
        *
      • *

        * SMS *

        *
      • *
      • *

        * VOICE *

        *
      • *
      • *

        * EMAIL *

        *
      • *
      * * @param type * The type of the contact channel. Incident Manager supports three contact methods:

      *
        *
      • *

        * SMS *

        *
      • *
      • *

        * VOICE *

        *
      • *
      • *

        * EMAIL *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see ChannelType */ public ContactChannel withType(String type) { setType(type); return this; } /** *

        * The type of the contact channel. Incident Manager supports three contact methods: *

        *
          *
        • *

          * SMS *

          *
        • *
        • *

          * VOICE *

          *
        • *
        • *

          * EMAIL *

          *
        • *
        * * @param type * The type of the contact channel. Incident Manager supports three contact methods:

        *
          *
        • *

          * SMS *

          *
        • *
        • *

          * VOICE *

          *
        • *
        • *

          * EMAIL *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see ChannelType */ public ContactChannel withType(ChannelType type) { this.type = type.toString(); return this; } /** *

          * The details that Incident Manager uses when trying to engage the contact channel. *

          * * @param deliveryAddress * The details that Incident Manager uses when trying to engage the contact channel. */ public void setDeliveryAddress(ContactChannelAddress deliveryAddress) { this.deliveryAddress = deliveryAddress; } /** *

          * The details that Incident Manager uses when trying to engage the contact channel. *

          * * @return The details that Incident Manager uses when trying to engage the contact channel. */ public ContactChannelAddress getDeliveryAddress() { return this.deliveryAddress; } /** *

          * The details that Incident Manager uses when trying to engage the contact channel. *

          * * @param deliveryAddress * The details that Incident Manager uses when trying to engage the contact channel. * @return Returns a reference to this object so that method calls can be chained together. */ public ContactChannel withDeliveryAddress(ContactChannelAddress deliveryAddress) { setDeliveryAddress(deliveryAddress); return this; } /** *

          * A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't * activated, Incident Manager can't engage the contact through it. *

          * * @param activationStatus * A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't * activated, Incident Manager can't engage the contact through it. * @see ActivationStatus */ public void setActivationStatus(String activationStatus) { this.activationStatus = activationStatus; } /** *

          * A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't * activated, Incident Manager can't engage the contact through it. *

          * * @return A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't * activated, Incident Manager can't engage the contact through it. * @see ActivationStatus */ public String getActivationStatus() { return this.activationStatus; } /** *

          * A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't * activated, Incident Manager can't engage the contact through it. *

          * * @param activationStatus * A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't * activated, Incident Manager can't engage the contact through it. * @return Returns a reference to this object so that method calls can be chained together. * @see ActivationStatus */ public ContactChannel withActivationStatus(String activationStatus) { setActivationStatus(activationStatus); return this; } /** *

          * A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't * activated, Incident Manager can't engage the contact through it. *

          * * @param activationStatus * A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't * activated, Incident Manager can't engage the contact through it. * @return Returns a reference to this object so that method calls can be chained together. * @see ActivationStatus */ public ContactChannel withActivationStatus(ActivationStatus activationStatus) { this.activationStatus = activationStatus.toString(); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getContactChannelArn() != null) sb.append("ContactChannelArn: ").append(getContactChannelArn()).append(","); if (getContactArn() != null) sb.append("ContactArn: ").append(getContactArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getDeliveryAddress() != null) sb.append("DeliveryAddress: ").append(getDeliveryAddress()).append(","); if (getActivationStatus() != null) sb.append("ActivationStatus: ").append(getActivationStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ContactChannel == false) return false; ContactChannel other = (ContactChannel) obj; if (other.getContactChannelArn() == null ^ this.getContactChannelArn() == null) return false; if (other.getContactChannelArn() != null && other.getContactChannelArn().equals(this.getContactChannelArn()) == false) return false; if (other.getContactArn() == null ^ this.getContactArn() == null) return false; if (other.getContactArn() != null && other.getContactArn().equals(this.getContactArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getDeliveryAddress() == null ^ this.getDeliveryAddress() == null) return false; if (other.getDeliveryAddress() != null && other.getDeliveryAddress().equals(this.getDeliveryAddress()) == false) return false; if (other.getActivationStatus() == null ^ this.getActivationStatus() == null) return false; if (other.getActivationStatus() != null && other.getActivationStatus().equals(this.getActivationStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContactChannelArn() == null) ? 0 : getContactChannelArn().hashCode()); hashCode = prime * hashCode + ((getContactArn() == null) ? 0 : getContactArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getDeliveryAddress() == null) ? 0 : getDeliveryAddress().hashCode()); hashCode = prime * hashCode + ((getActivationStatus() == null) ? 0 : getActivationStatus().hashCode()); return hashCode; } @Override public ContactChannel clone() { try { return (ContactChannel) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.ssmcontacts.model.transform.ContactChannelMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy