com.amazonaws.services.appstream.model.CreateDirectoryConfigRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-appstream Show documentation
/*
* Copyright 2013-2018 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.appstream.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 CreateDirectoryConfigRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The fully qualified name of the directory (for example, corp.example.com).
*
*/
private String directoryName;
/**
*
* The distinguished names of the organizational units for computer accounts.
*
*/
private java.util.List organizationalUnitDistinguishedNames;
/**
*
* The credentials for the service account used by the streaming instance to connect to the directory.
*
*/
private ServiceAccountCredentials serviceAccountCredentials;
/**
*
* The fully qualified name of the directory (for example, corp.example.com).
*
*
* @param directoryName
* The fully qualified name of the directory (for example, corp.example.com).
*/
public void setDirectoryName(String directoryName) {
this.directoryName = directoryName;
}
/**
*
* The fully qualified name of the directory (for example, corp.example.com).
*
*
* @return The fully qualified name of the directory (for example, corp.example.com).
*/
public String getDirectoryName() {
return this.directoryName;
}
/**
*
* The fully qualified name of the directory (for example, corp.example.com).
*
*
* @param directoryName
* The fully qualified name of the directory (for example, corp.example.com).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryConfigRequest withDirectoryName(String directoryName) {
setDirectoryName(directoryName);
return this;
}
/**
*
* The distinguished names of the organizational units for computer accounts.
*
*
* @return The distinguished names of the organizational units for computer accounts.
*/
public java.util.List getOrganizationalUnitDistinguishedNames() {
return organizationalUnitDistinguishedNames;
}
/**
*
* The distinguished names of the organizational units for computer accounts.
*
*
* @param organizationalUnitDistinguishedNames
* The distinguished names of the organizational units for computer accounts.
*/
public void setOrganizationalUnitDistinguishedNames(java.util.Collection organizationalUnitDistinguishedNames) {
if (organizationalUnitDistinguishedNames == null) {
this.organizationalUnitDistinguishedNames = null;
return;
}
this.organizationalUnitDistinguishedNames = new java.util.ArrayList(organizationalUnitDistinguishedNames);
}
/**
*
* The distinguished names of the organizational units for computer accounts.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOrganizationalUnitDistinguishedNames(java.util.Collection)} or
* {@link #withOrganizationalUnitDistinguishedNames(java.util.Collection)} if you want to override the existing
* values.
*
*
* @param organizationalUnitDistinguishedNames
* The distinguished names of the organizational units for computer accounts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryConfigRequest withOrganizationalUnitDistinguishedNames(String... organizationalUnitDistinguishedNames) {
if (this.organizationalUnitDistinguishedNames == null) {
setOrganizationalUnitDistinguishedNames(new java.util.ArrayList(organizationalUnitDistinguishedNames.length));
}
for (String ele : organizationalUnitDistinguishedNames) {
this.organizationalUnitDistinguishedNames.add(ele);
}
return this;
}
/**
*
* The distinguished names of the organizational units for computer accounts.
*
*
* @param organizationalUnitDistinguishedNames
* The distinguished names of the organizational units for computer accounts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryConfigRequest withOrganizationalUnitDistinguishedNames(java.util.Collection organizationalUnitDistinguishedNames) {
setOrganizationalUnitDistinguishedNames(organizationalUnitDistinguishedNames);
return this;
}
/**
*
* The credentials for the service account used by the streaming instance to connect to the directory.
*
*
* @param serviceAccountCredentials
* The credentials for the service account used by the streaming instance to connect to the directory.
*/
public void setServiceAccountCredentials(ServiceAccountCredentials serviceAccountCredentials) {
this.serviceAccountCredentials = serviceAccountCredentials;
}
/**
*
* The credentials for the service account used by the streaming instance to connect to the directory.
*
*
* @return The credentials for the service account used by the streaming instance to connect to the directory.
*/
public ServiceAccountCredentials getServiceAccountCredentials() {
return this.serviceAccountCredentials;
}
/**
*
* The credentials for the service account used by the streaming instance to connect to the directory.
*
*
* @param serviceAccountCredentials
* The credentials for the service account used by the streaming instance to connect to the directory.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDirectoryConfigRequest withServiceAccountCredentials(ServiceAccountCredentials serviceAccountCredentials) {
setServiceAccountCredentials(serviceAccountCredentials);
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 (getDirectoryName() != null)
sb.append("DirectoryName: ").append(getDirectoryName()).append(",");
if (getOrganizationalUnitDistinguishedNames() != null)
sb.append("OrganizationalUnitDistinguishedNames: ").append(getOrganizationalUnitDistinguishedNames()).append(",");
if (getServiceAccountCredentials() != null)
sb.append("ServiceAccountCredentials: ").append(getServiceAccountCredentials());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDirectoryConfigRequest == false)
return false;
CreateDirectoryConfigRequest other = (CreateDirectoryConfigRequest) obj;
if (other.getDirectoryName() == null ^ this.getDirectoryName() == null)
return false;
if (other.getDirectoryName() != null && other.getDirectoryName().equals(this.getDirectoryName()) == false)
return false;
if (other.getOrganizationalUnitDistinguishedNames() == null ^ this.getOrganizationalUnitDistinguishedNames() == null)
return false;
if (other.getOrganizationalUnitDistinguishedNames() != null
&& other.getOrganizationalUnitDistinguishedNames().equals(this.getOrganizationalUnitDistinguishedNames()) == false)
return false;
if (other.getServiceAccountCredentials() == null ^ this.getServiceAccountCredentials() == null)
return false;
if (other.getServiceAccountCredentials() != null && other.getServiceAccountCredentials().equals(this.getServiceAccountCredentials()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDirectoryName() == null) ? 0 : getDirectoryName().hashCode());
hashCode = prime * hashCode + ((getOrganizationalUnitDistinguishedNames() == null) ? 0 : getOrganizationalUnitDistinguishedNames().hashCode());
hashCode = prime * hashCode + ((getServiceAccountCredentials() == null) ? 0 : getServiceAccountCredentials().hashCode());
return hashCode;
}
@Override
public CreateDirectoryConfigRequest clone() {
return (CreateDirectoryConfigRequest) super.clone();
}
}