com.amazonaws.services.inspector2.model.UpdateConfigurationRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-inspector2 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.inspector2.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 UpdateConfigurationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* Specifies how the Amazon EC2 automated scan will be updated for your environment.
*
*/
private Ec2Configuration ec2Configuration;
/**
*
* Specifies how the ECR automated re-scan will be updated for your environment.
*
*/
private EcrConfiguration ecrConfiguration;
/**
*
* Specifies how the Amazon EC2 automated scan will be updated for your environment.
*
*
* @param ec2Configuration
* Specifies how the Amazon EC2 automated scan will be updated for your environment.
*/
public void setEc2Configuration(Ec2Configuration ec2Configuration) {
this.ec2Configuration = ec2Configuration;
}
/**
*
* Specifies how the Amazon EC2 automated scan will be updated for your environment.
*
*
* @return Specifies how the Amazon EC2 automated scan will be updated for your environment.
*/
public Ec2Configuration getEc2Configuration() {
return this.ec2Configuration;
}
/**
*
* Specifies how the Amazon EC2 automated scan will be updated for your environment.
*
*
* @param ec2Configuration
* Specifies how the Amazon EC2 automated scan will be updated for your environment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateConfigurationRequest withEc2Configuration(Ec2Configuration ec2Configuration) {
setEc2Configuration(ec2Configuration);
return this;
}
/**
*
* Specifies how the ECR automated re-scan will be updated for your environment.
*
*
* @param ecrConfiguration
* Specifies how the ECR automated re-scan will be updated for your environment.
*/
public void setEcrConfiguration(EcrConfiguration ecrConfiguration) {
this.ecrConfiguration = ecrConfiguration;
}
/**
*
* Specifies how the ECR automated re-scan will be updated for your environment.
*
*
* @return Specifies how the ECR automated re-scan will be updated for your environment.
*/
public EcrConfiguration getEcrConfiguration() {
return this.ecrConfiguration;
}
/**
*
* Specifies how the ECR automated re-scan will be updated for your environment.
*
*
* @param ecrConfiguration
* Specifies how the ECR automated re-scan will be updated for your environment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateConfigurationRequest withEcrConfiguration(EcrConfiguration ecrConfiguration) {
setEcrConfiguration(ecrConfiguration);
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 (getEc2Configuration() != null)
sb.append("Ec2Configuration: ").append(getEc2Configuration()).append(",");
if (getEcrConfiguration() != null)
sb.append("EcrConfiguration: ").append(getEcrConfiguration());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateConfigurationRequest == false)
return false;
UpdateConfigurationRequest other = (UpdateConfigurationRequest) obj;
if (other.getEc2Configuration() == null ^ this.getEc2Configuration() == null)
return false;
if (other.getEc2Configuration() != null && other.getEc2Configuration().equals(this.getEc2Configuration()) == false)
return false;
if (other.getEcrConfiguration() == null ^ this.getEcrConfiguration() == null)
return false;
if (other.getEcrConfiguration() != null && other.getEcrConfiguration().equals(this.getEcrConfiguration()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEc2Configuration() == null) ? 0 : getEc2Configuration().hashCode());
hashCode = prime * hashCode + ((getEcrConfiguration() == null) ? 0 : getEcrConfiguration().hashCode());
return hashCode;
}
@Override
public UpdateConfigurationRequest clone() {
return (UpdateConfigurationRequest) super.clone();
}
}