com.amazonaws.services.auditmanager.model.ListControlsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-auditmanager 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.auditmanager.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 ListControlsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A filter that narrows the list of controls to a specific type.
*
*/
private String controlType;
/**
*
* The pagination token that's used to fetch the next set of results.
*
*/
private String nextToken;
/**
*
* The maximum number of results on a page or for an API request call.
*
*/
private Integer maxResults;
/**
*
* A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog.
*
*
* To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain,
* a control objective, or a common control. For information about how to find the ARNs for these resources, see
* ListDomains
,
* ListObjectives
, and
* ListCommonControls
.
*
*
*
* You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently
* supported. If you want to filter by more than one ARN, we recommend that you run the ListControls
* operation separately for each ARN.
*
*
*
* Alternatively, specify UNCATEGORIZED
to list controls that aren't mapped to a Control Catalog
* resource. For example, this operation might return a list of custom controls that don't belong to any control
* domain or control objective.
*
*/
private String controlCatalogId;
/**
*
* A filter that narrows the list of controls to a specific type.
*
*
* @param controlType
* A filter that narrows the list of controls to a specific type.
* @see ControlType
*/
public void setControlType(String controlType) {
this.controlType = controlType;
}
/**
*
* A filter that narrows the list of controls to a specific type.
*
*
* @return A filter that narrows the list of controls to a specific type.
* @see ControlType
*/
public String getControlType() {
return this.controlType;
}
/**
*
* A filter that narrows the list of controls to a specific type.
*
*
* @param controlType
* A filter that narrows the list of controls to a specific type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ControlType
*/
public ListControlsRequest withControlType(String controlType) {
setControlType(controlType);
return this;
}
/**
*
* A filter that narrows the list of controls to a specific type.
*
*
* @param controlType
* A filter that narrows the list of controls to a specific type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ControlType
*/
public ListControlsRequest withControlType(ControlType controlType) {
this.controlType = controlType.toString();
return this;
}
/**
*
* The pagination token that's used to fetch the next set of results.
*
*
* @param nextToken
* The pagination token that's used to fetch the next set of results.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* The pagination token that's used to fetch the next set of results.
*
*
* @return The pagination token that's used to fetch the next set of results.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* The pagination token that's used to fetch the next set of results.
*
*
* @param nextToken
* The pagination token that's used to fetch the next set of results.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListControlsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* The maximum number of results on a page or for an API request call.
*
*
* @param maxResults
* The maximum number of results on a page or for an API request call.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of results on a page or for an API request call.
*
*
* @return The maximum number of results on a page or for an API request call.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of results on a page or for an API request call.
*
*
* @param maxResults
* The maximum number of results on a page or for an API request call.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListControlsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
*
* A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog.
*
*
* To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain,
* a control objective, or a common control. For information about how to find the ARNs for these resources, see
* ListDomains
,
* ListObjectives
, and
* ListCommonControls
.
*
*
*
* You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently
* supported. If you want to filter by more than one ARN, we recommend that you run the ListControls
* operation separately for each ARN.
*
*
*
* Alternatively, specify UNCATEGORIZED
to list controls that aren't mapped to a Control Catalog
* resource. For example, this operation might return a list of custom controls that don't belong to any control
* domain or control objective.
*
*
* @param controlCatalogId
* A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control
* Catalog.
*
* To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control
* domain, a control objective, or a common control. For information about how to find the ARNs for these
* resources, see
* ListDomains
,
* ListObjectives
, and
* ListCommonControls
.
*
*
*
* You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t
* currently supported. If you want to filter by more than one ARN, we recommend that you run the
* ListControls
operation separately for each ARN.
*
*
*
* Alternatively, specify UNCATEGORIZED
to list controls that aren't mapped to a Control Catalog
* resource. For example, this operation might return a list of custom controls that don't belong to any
* control domain or control objective.
*/
public void setControlCatalogId(String controlCatalogId) {
this.controlCatalogId = controlCatalogId;
}
/**
*
* A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog.
*
*
* To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain,
* a control objective, or a common control. For information about how to find the ARNs for these resources, see
* ListDomains
,
* ListObjectives
, and
* ListCommonControls
.
*
*
*
* You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently
* supported. If you want to filter by more than one ARN, we recommend that you run the ListControls
* operation separately for each ARN.
*
*
*
* Alternatively, specify UNCATEGORIZED
to list controls that aren't mapped to a Control Catalog
* resource. For example, this operation might return a list of custom controls that don't belong to any control
* domain or control objective.
*
*
* @return A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control
* Catalog.
*
* To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control
* domain, a control objective, or a common control. For information about how to find the ARNs for these
* resources, see
* ListDomains
,
* ListObjectives
, and
* ListCommonControls
.
*
*
*
* You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t
* currently supported. If you want to filter by more than one ARN, we recommend that you run the
* ListControls
operation separately for each ARN.
*
*
*
* Alternatively, specify UNCATEGORIZED
to list controls that aren't mapped to a Control
* Catalog resource. For example, this operation might return a list of custom controls that don't belong to
* any control domain or control objective.
*/
public String getControlCatalogId() {
return this.controlCatalogId;
}
/**
*
* A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog.
*
*
* To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain,
* a control objective, or a common control. For information about how to find the ARNs for these resources, see
* ListDomains
,
* ListObjectives
, and
* ListCommonControls
.
*
*
*
* You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently
* supported. If you want to filter by more than one ARN, we recommend that you run the ListControls
* operation separately for each ARN.
*
*
*
* Alternatively, specify UNCATEGORIZED
to list controls that aren't mapped to a Control Catalog
* resource. For example, this operation might return a list of custom controls that don't belong to any control
* domain or control objective.
*
*
* @param controlCatalogId
* A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control
* Catalog.
*
* To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control
* domain, a control objective, or a common control. For information about how to find the ARNs for these
* resources, see
* ListDomains
,
* ListObjectives
, and
* ListCommonControls
.
*
*
*
* You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t
* currently supported. If you want to filter by more than one ARN, we recommend that you run the
* ListControls
operation separately for each ARN.
*
*
*
* Alternatively, specify UNCATEGORIZED
to list controls that aren't mapped to a Control Catalog
* resource. For example, this operation might return a list of custom controls that don't belong to any
* control domain or control objective.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListControlsRequest withControlCatalogId(String controlCatalogId) {
setControlCatalogId(controlCatalogId);
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 (getControlType() != null)
sb.append("ControlType: ").append(getControlType()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getControlCatalogId() != null)
sb.append("ControlCatalogId: ").append(getControlCatalogId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListControlsRequest == false)
return false;
ListControlsRequest other = (ListControlsRequest) obj;
if (other.getControlType() == null ^ this.getControlType() == null)
return false;
if (other.getControlType() != null && other.getControlType().equals(this.getControlType()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
return false;
if (other.getControlCatalogId() == null ^ this.getControlCatalogId() == null)
return false;
if (other.getControlCatalogId() != null && other.getControlCatalogId().equals(this.getControlCatalogId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getControlType() == null) ? 0 : getControlType().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getControlCatalogId() == null) ? 0 : getControlCatalogId().hashCode());
return hashCode;
}
@Override
public ListControlsRequest clone() {
return (ListControlsRequest) super.clone();
}
}