com.amazonaws.services.workspaces.model.ModifySamlPropertiesRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workspaces Show documentation
/*
* Copyright 2017-2022 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.workspaces.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 ModifySamlPropertiesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The directory identifier for which you want to configure SAML properties.
*
*/
private String resourceId;
/**
*
* The properties for configuring SAML 2.0 authentication.
*
*/
private SamlProperties samlProperties;
/**
*
* The SAML properties to delete as part of your request.
*
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
*
*/
private com.amazonaws.internal.SdkInternalList propertiesToDelete;
/**
*
* The directory identifier for which you want to configure SAML properties.
*
*
* @param resourceId
* The directory identifier for which you want to configure SAML properties.
*/
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
/**
*
* The directory identifier for which you want to configure SAML properties.
*
*
* @return The directory identifier for which you want to configure SAML properties.
*/
public String getResourceId() {
return this.resourceId;
}
/**
*
* The directory identifier for which you want to configure SAML properties.
*
*
* @param resourceId
* The directory identifier for which you want to configure SAML properties.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifySamlPropertiesRequest withResourceId(String resourceId) {
setResourceId(resourceId);
return this;
}
/**
*
* The properties for configuring SAML 2.0 authentication.
*
*
* @param samlProperties
* The properties for configuring SAML 2.0 authentication.
*/
public void setSamlProperties(SamlProperties samlProperties) {
this.samlProperties = samlProperties;
}
/**
*
* The properties for configuring SAML 2.0 authentication.
*
*
* @return The properties for configuring SAML 2.0 authentication.
*/
public SamlProperties getSamlProperties() {
return this.samlProperties;
}
/**
*
* The properties for configuring SAML 2.0 authentication.
*
*
* @param samlProperties
* The properties for configuring SAML 2.0 authentication.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifySamlPropertiesRequest withSamlProperties(SamlProperties samlProperties) {
setSamlProperties(samlProperties);
return this;
}
/**
*
* The SAML properties to delete as part of your request.
*
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
*
*
* @return The SAML properties to delete as part of your request.
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
* @see DeletableSamlProperty
*/
public java.util.List getPropertiesToDelete() {
if (propertiesToDelete == null) {
propertiesToDelete = new com.amazonaws.internal.SdkInternalList();
}
return propertiesToDelete;
}
/**
*
* The SAML properties to delete as part of your request.
*
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
*
*
* @param propertiesToDelete
* The SAML properties to delete as part of your request.
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
* @see DeletableSamlProperty
*/
public void setPropertiesToDelete(java.util.Collection propertiesToDelete) {
if (propertiesToDelete == null) {
this.propertiesToDelete = null;
return;
}
this.propertiesToDelete = new com.amazonaws.internal.SdkInternalList(propertiesToDelete);
}
/**
*
* The SAML properties to delete as part of your request.
*
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setPropertiesToDelete(java.util.Collection)} or {@link #withPropertiesToDelete(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param propertiesToDelete
* The SAML properties to delete as part of your request.
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeletableSamlProperty
*/
public ModifySamlPropertiesRequest withPropertiesToDelete(String... propertiesToDelete) {
if (this.propertiesToDelete == null) {
setPropertiesToDelete(new com.amazonaws.internal.SdkInternalList(propertiesToDelete.length));
}
for (String ele : propertiesToDelete) {
this.propertiesToDelete.add(ele);
}
return this;
}
/**
*
* The SAML properties to delete as part of your request.
*
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
*
*
* @param propertiesToDelete
* The SAML properties to delete as part of your request.
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeletableSamlProperty
*/
public ModifySamlPropertiesRequest withPropertiesToDelete(java.util.Collection propertiesToDelete) {
setPropertiesToDelete(propertiesToDelete);
return this;
}
/**
*
* The SAML properties to delete as part of your request.
*
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
*
*
* @param propertiesToDelete
* The SAML properties to delete as part of your request.
*
* Specify one of the following options:
*
*
* -
*
* SAML_PROPERTIES_USER_ACCESS_URL
to delete the user access URL.
*
*
* -
*
* SAML_PROPERTIES_RELAY_STATE_PARAMETER_NAME
to delete the relay state parameter name.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeletableSamlProperty
*/
public ModifySamlPropertiesRequest withPropertiesToDelete(DeletableSamlProperty... propertiesToDelete) {
com.amazonaws.internal.SdkInternalList propertiesToDeleteCopy = new com.amazonaws.internal.SdkInternalList(propertiesToDelete.length);
for (DeletableSamlProperty value : propertiesToDelete) {
propertiesToDeleteCopy.add(value.toString());
}
if (getPropertiesToDelete() == null) {
setPropertiesToDelete(propertiesToDeleteCopy);
} else {
getPropertiesToDelete().addAll(propertiesToDeleteCopy);
}
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 (getResourceId() != null)
sb.append("ResourceId: ").append(getResourceId()).append(",");
if (getSamlProperties() != null)
sb.append("SamlProperties: ").append(getSamlProperties()).append(",");
if (getPropertiesToDelete() != null)
sb.append("PropertiesToDelete: ").append(getPropertiesToDelete());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ModifySamlPropertiesRequest == false)
return false;
ModifySamlPropertiesRequest other = (ModifySamlPropertiesRequest) obj;
if (other.getResourceId() == null ^ this.getResourceId() == null)
return false;
if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false)
return false;
if (other.getSamlProperties() == null ^ this.getSamlProperties() == null)
return false;
if (other.getSamlProperties() != null && other.getSamlProperties().equals(this.getSamlProperties()) == false)
return false;
if (other.getPropertiesToDelete() == null ^ this.getPropertiesToDelete() == null)
return false;
if (other.getPropertiesToDelete() != null && other.getPropertiesToDelete().equals(this.getPropertiesToDelete()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode());
hashCode = prime * hashCode + ((getSamlProperties() == null) ? 0 : getSamlProperties().hashCode());
hashCode = prime * hashCode + ((getPropertiesToDelete() == null) ? 0 : getPropertiesToDelete().hashCode());
return hashCode;
}
@Override
public ModifySamlPropertiesRequest clone() {
return (ModifySamlPropertiesRequest) super.clone();
}
}