com.amazonaws.services.cognitoidp.model.SetLogDeliveryConfigurationRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cognitoidp Show documentation
/*
* 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.cognitoidp.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 SetLogDeliveryConfigurationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ID of the user pool where you want to configure detailed activity logging .
*
*/
private String userPoolId;
/**
*
* A collection of all of the detailed activity logging configurations for a user pool.
*
*/
private java.util.List logConfigurations;
/**
*
* The ID of the user pool where you want to configure detailed activity logging .
*
*
* @param userPoolId
* The ID of the user pool where you want to configure detailed activity logging .
*/
public void setUserPoolId(String userPoolId) {
this.userPoolId = userPoolId;
}
/**
*
* The ID of the user pool where you want to configure detailed activity logging .
*
*
* @return The ID of the user pool where you want to configure detailed activity logging .
*/
public String getUserPoolId() {
return this.userPoolId;
}
/**
*
* The ID of the user pool where you want to configure detailed activity logging .
*
*
* @param userPoolId
* The ID of the user pool where you want to configure detailed activity logging .
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SetLogDeliveryConfigurationRequest withUserPoolId(String userPoolId) {
setUserPoolId(userPoolId);
return this;
}
/**
*
* A collection of all of the detailed activity logging configurations for a user pool.
*
*
* @return A collection of all of the detailed activity logging configurations for a user pool.
*/
public java.util.List getLogConfigurations() {
return logConfigurations;
}
/**
*
* A collection of all of the detailed activity logging configurations for a user pool.
*
*
* @param logConfigurations
* A collection of all of the detailed activity logging configurations for a user pool.
*/
public void setLogConfigurations(java.util.Collection logConfigurations) {
if (logConfigurations == null) {
this.logConfigurations = null;
return;
}
this.logConfigurations = new java.util.ArrayList(logConfigurations);
}
/**
*
* A collection of all of the detailed activity logging configurations for a user pool.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLogConfigurations(java.util.Collection)} or {@link #withLogConfigurations(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param logConfigurations
* A collection of all of the detailed activity logging configurations for a user pool.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SetLogDeliveryConfigurationRequest withLogConfigurations(LogConfigurationType... logConfigurations) {
if (this.logConfigurations == null) {
setLogConfigurations(new java.util.ArrayList(logConfigurations.length));
}
for (LogConfigurationType ele : logConfigurations) {
this.logConfigurations.add(ele);
}
return this;
}
/**
*
* A collection of all of the detailed activity logging configurations for a user pool.
*
*
* @param logConfigurations
* A collection of all of the detailed activity logging configurations for a user pool.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SetLogDeliveryConfigurationRequest withLogConfigurations(java.util.Collection logConfigurations) {
setLogConfigurations(logConfigurations);
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 (getUserPoolId() != null)
sb.append("UserPoolId: ").append(getUserPoolId()).append(",");
if (getLogConfigurations() != null)
sb.append("LogConfigurations: ").append(getLogConfigurations());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SetLogDeliveryConfigurationRequest == false)
return false;
SetLogDeliveryConfigurationRequest other = (SetLogDeliveryConfigurationRequest) obj;
if (other.getUserPoolId() == null ^ this.getUserPoolId() == null)
return false;
if (other.getUserPoolId() != null && other.getUserPoolId().equals(this.getUserPoolId()) == false)
return false;
if (other.getLogConfigurations() == null ^ this.getLogConfigurations() == null)
return false;
if (other.getLogConfigurations() != null && other.getLogConfigurations().equals(this.getLogConfigurations()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getUserPoolId() == null) ? 0 : getUserPoolId().hashCode());
hashCode = prime * hashCode + ((getLogConfigurations() == null) ? 0 : getLogConfigurations().hashCode());
return hashCode;
}
@Override
public SetLogDeliveryConfigurationRequest clone() {
return (SetLogDeliveryConfigurationRequest) super.clone();
}
}