
com.amazonaws.services.organizations.model.InviteAccountToOrganizationRequest Maven / Gradle / Ivy
/*
* Copyright 2012-2017 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.organizations.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class InviteAccountToOrganizationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON object
* that contains the following elements:
*
*
* { "Type": "ACCOUNT", "Id": "< account id number >" }
*
*
* If you use the AWS CLI, you can submit this as a single string, similar to the following example:
*
*
* --target id=123456789012,type=ACCOUNT
*
*
* If you specify "Type": "ACCOUNT"
, then you must provide the AWS account ID number as the
* Id
. If you specify "Type": "EMAIL"
, then you must specify the email address that is
* associated with the account.
*
*
* --target [email protected],type=EMAIL
*
*/
private HandshakeParty target;
/**
*
* Additional information that you want to include in the generated email to the recipient account owner.
*
*/
private String notes;
/**
*
* The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON object
* that contains the following elements:
*
*
* { "Type": "ACCOUNT", "Id": "< account id number >" }
*
*
* If you use the AWS CLI, you can submit this as a single string, similar to the following example:
*
*
* --target id=123456789012,type=ACCOUNT
*
*
* If you specify "Type": "ACCOUNT"
, then you must provide the AWS account ID number as the
* Id
. If you specify "Type": "EMAIL"
, then you must specify the email address that is
* associated with the account.
*
*
* --target [email protected],type=EMAIL
*
*
* @param target
* The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON
* object that contains the following elements:
*
* { "Type": "ACCOUNT", "Id": "< account id number >" }
*
*
* If you use the AWS CLI, you can submit this as a single string, similar to the following example:
*
*
* --target id=123456789012,type=ACCOUNT
*
*
* If you specify "Type": "ACCOUNT"
, then you must provide the AWS account ID number as the
* Id
. If you specify "Type": "EMAIL"
, then you must specify the email address that
* is associated with the account.
*
*
* --target [email protected],type=EMAIL
*/
public void setTarget(HandshakeParty target) {
this.target = target;
}
/**
*
* The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON object
* that contains the following elements:
*
*
* { "Type": "ACCOUNT", "Id": "< account id number >" }
*
*
* If you use the AWS CLI, you can submit this as a single string, similar to the following example:
*
*
* --target id=123456789012,type=ACCOUNT
*
*
* If you specify "Type": "ACCOUNT"
, then you must provide the AWS account ID number as the
* Id
. If you specify "Type": "EMAIL"
, then you must specify the email address that is
* associated with the account.
*
*
* --target [email protected],type=EMAIL
*
*
* @return The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON
* object that contains the following elements:
*
* { "Type": "ACCOUNT", "Id": "< account id number >" }
*
*
* If you use the AWS CLI, you can submit this as a single string, similar to the following example:
*
*
* --target id=123456789012,type=ACCOUNT
*
*
* If you specify "Type": "ACCOUNT"
, then you must provide the AWS account ID number as the
* Id
. If you specify "Type": "EMAIL"
, then you must specify the email address
* that is associated with the account.
*
*
* --target [email protected],type=EMAIL
*/
public HandshakeParty getTarget() {
return this.target;
}
/**
*
* The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON object
* that contains the following elements:
*
*
* { "Type": "ACCOUNT", "Id": "< account id number >" }
*
*
* If you use the AWS CLI, you can submit this as a single string, similar to the following example:
*
*
* --target id=123456789012,type=ACCOUNT
*
*
* If you specify "Type": "ACCOUNT"
, then you must provide the AWS account ID number as the
* Id
. If you specify "Type": "EMAIL"
, then you must specify the email address that is
* associated with the account.
*
*
* --target [email protected],type=EMAIL
*
*
* @param target
* The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON
* object that contains the following elements:
*
* { "Type": "ACCOUNT", "Id": "< account id number >" }
*
*
* If you use the AWS CLI, you can submit this as a single string, similar to the following example:
*
*
* --target id=123456789012,type=ACCOUNT
*
*
* If you specify "Type": "ACCOUNT"
, then you must provide the AWS account ID number as the
* Id
. If you specify "Type": "EMAIL"
, then you must specify the email address that
* is associated with the account.
*
*
* --target [email protected],type=EMAIL
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InviteAccountToOrganizationRequest withTarget(HandshakeParty target) {
setTarget(target);
return this;
}
/**
*
* Additional information that you want to include in the generated email to the recipient account owner.
*
*
* @param notes
* Additional information that you want to include in the generated email to the recipient account owner.
*/
public void setNotes(String notes) {
this.notes = notes;
}
/**
*
* Additional information that you want to include in the generated email to the recipient account owner.
*
*
* @return Additional information that you want to include in the generated email to the recipient account owner.
*/
public String getNotes() {
return this.notes;
}
/**
*
* Additional information that you want to include in the generated email to the recipient account owner.
*
*
* @param notes
* Additional information that you want to include in the generated email to the recipient account owner.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InviteAccountToOrganizationRequest withNotes(String notes) {
setNotes(notes);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getTarget() != null)
sb.append("Target: ").append(getTarget()).append(",");
if (getNotes() != null)
sb.append("Notes: ").append(getNotes());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof InviteAccountToOrganizationRequest == false)
return false;
InviteAccountToOrganizationRequest other = (InviteAccountToOrganizationRequest) obj;
if (other.getTarget() == null ^ this.getTarget() == null)
return false;
if (other.getTarget() != null && other.getTarget().equals(this.getTarget()) == false)
return false;
if (other.getNotes() == null ^ this.getNotes() == null)
return false;
if (other.getNotes() != null && other.getNotes().equals(this.getNotes()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTarget() == null) ? 0 : getTarget().hashCode());
hashCode = prime * hashCode + ((getNotes() == null) ? 0 : getNotes().hashCode());
return hashCode;
}
@Override
public InviteAccountToOrganizationRequest clone() {
return (InviteAccountToOrganizationRequest) super.clone();
}
}