com.amazonaws.services.opensearchserverless.model.GetPoliciesStatsResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-opensearchserverless 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.opensearchserverless.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetPoliciesStatsResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* Information about the data access policies in your account.
*
*/
private AccessPolicyStats accessPolicyStats;
/**
*
* Information about the lifecycle policies in your account.
*
*/
private LifecyclePolicyStats lifecyclePolicyStats;
/**
*
* Information about the security configurations in your account.
*
*/
private SecurityConfigStats securityConfigStats;
/**
*
* Information about the security policies in your account.
*
*/
private SecurityPolicyStats securityPolicyStats;
/**
*
* The total number of OpenSearch Serverless security policies and configurations in your account.
*
*/
private Long totalPolicyCount;
/**
*
* Information about the data access policies in your account.
*
*
* @param accessPolicyStats
* Information about the data access policies in your account.
*/
public void setAccessPolicyStats(AccessPolicyStats accessPolicyStats) {
this.accessPolicyStats = accessPolicyStats;
}
/**
*
* Information about the data access policies in your account.
*
*
* @return Information about the data access policies in your account.
*/
public AccessPolicyStats getAccessPolicyStats() {
return this.accessPolicyStats;
}
/**
*
* Information about the data access policies in your account.
*
*
* @param accessPolicyStats
* Information about the data access policies in your account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPoliciesStatsResult withAccessPolicyStats(AccessPolicyStats accessPolicyStats) {
setAccessPolicyStats(accessPolicyStats);
return this;
}
/**
*
* Information about the lifecycle policies in your account.
*
*
* @param lifecyclePolicyStats
* Information about the lifecycle policies in your account.
*/
public void setLifecyclePolicyStats(LifecyclePolicyStats lifecyclePolicyStats) {
this.lifecyclePolicyStats = lifecyclePolicyStats;
}
/**
*
* Information about the lifecycle policies in your account.
*
*
* @return Information about the lifecycle policies in your account.
*/
public LifecyclePolicyStats getLifecyclePolicyStats() {
return this.lifecyclePolicyStats;
}
/**
*
* Information about the lifecycle policies in your account.
*
*
* @param lifecyclePolicyStats
* Information about the lifecycle policies in your account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPoliciesStatsResult withLifecyclePolicyStats(LifecyclePolicyStats lifecyclePolicyStats) {
setLifecyclePolicyStats(lifecyclePolicyStats);
return this;
}
/**
*
* Information about the security configurations in your account.
*
*
* @param securityConfigStats
* Information about the security configurations in your account.
*/
public void setSecurityConfigStats(SecurityConfigStats securityConfigStats) {
this.securityConfigStats = securityConfigStats;
}
/**
*
* Information about the security configurations in your account.
*
*
* @return Information about the security configurations in your account.
*/
public SecurityConfigStats getSecurityConfigStats() {
return this.securityConfigStats;
}
/**
*
* Information about the security configurations in your account.
*
*
* @param securityConfigStats
* Information about the security configurations in your account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPoliciesStatsResult withSecurityConfigStats(SecurityConfigStats securityConfigStats) {
setSecurityConfigStats(securityConfigStats);
return this;
}
/**
*
* Information about the security policies in your account.
*
*
* @param securityPolicyStats
* Information about the security policies in your account.
*/
public void setSecurityPolicyStats(SecurityPolicyStats securityPolicyStats) {
this.securityPolicyStats = securityPolicyStats;
}
/**
*
* Information about the security policies in your account.
*
*
* @return Information about the security policies in your account.
*/
public SecurityPolicyStats getSecurityPolicyStats() {
return this.securityPolicyStats;
}
/**
*
* Information about the security policies in your account.
*
*
* @param securityPolicyStats
* Information about the security policies in your account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPoliciesStatsResult withSecurityPolicyStats(SecurityPolicyStats securityPolicyStats) {
setSecurityPolicyStats(securityPolicyStats);
return this;
}
/**
*
* The total number of OpenSearch Serverless security policies and configurations in your account.
*
*
* @param totalPolicyCount
* The total number of OpenSearch Serverless security policies and configurations in your account.
*/
public void setTotalPolicyCount(Long totalPolicyCount) {
this.totalPolicyCount = totalPolicyCount;
}
/**
*
* The total number of OpenSearch Serverless security policies and configurations in your account.
*
*
* @return The total number of OpenSearch Serverless security policies and configurations in your account.
*/
public Long getTotalPolicyCount() {
return this.totalPolicyCount;
}
/**
*
* The total number of OpenSearch Serverless security policies and configurations in your account.
*
*
* @param totalPolicyCount
* The total number of OpenSearch Serverless security policies and configurations in your account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPoliciesStatsResult withTotalPolicyCount(Long totalPolicyCount) {
setTotalPolicyCount(totalPolicyCount);
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 (getAccessPolicyStats() != null)
sb.append("AccessPolicyStats: ").append(getAccessPolicyStats()).append(",");
if (getLifecyclePolicyStats() != null)
sb.append("LifecyclePolicyStats: ").append(getLifecyclePolicyStats()).append(",");
if (getSecurityConfigStats() != null)
sb.append("SecurityConfigStats: ").append(getSecurityConfigStats()).append(",");
if (getSecurityPolicyStats() != null)
sb.append("SecurityPolicyStats: ").append(getSecurityPolicyStats()).append(",");
if (getTotalPolicyCount() != null)
sb.append("TotalPolicyCount: ").append(getTotalPolicyCount());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetPoliciesStatsResult == false)
return false;
GetPoliciesStatsResult other = (GetPoliciesStatsResult) obj;
if (other.getAccessPolicyStats() == null ^ this.getAccessPolicyStats() == null)
return false;
if (other.getAccessPolicyStats() != null && other.getAccessPolicyStats().equals(this.getAccessPolicyStats()) == false)
return false;
if (other.getLifecyclePolicyStats() == null ^ this.getLifecyclePolicyStats() == null)
return false;
if (other.getLifecyclePolicyStats() != null && other.getLifecyclePolicyStats().equals(this.getLifecyclePolicyStats()) == false)
return false;
if (other.getSecurityConfigStats() == null ^ this.getSecurityConfigStats() == null)
return false;
if (other.getSecurityConfigStats() != null && other.getSecurityConfigStats().equals(this.getSecurityConfigStats()) == false)
return false;
if (other.getSecurityPolicyStats() == null ^ this.getSecurityPolicyStats() == null)
return false;
if (other.getSecurityPolicyStats() != null && other.getSecurityPolicyStats().equals(this.getSecurityPolicyStats()) == false)
return false;
if (other.getTotalPolicyCount() == null ^ this.getTotalPolicyCount() == null)
return false;
if (other.getTotalPolicyCount() != null && other.getTotalPolicyCount().equals(this.getTotalPolicyCount()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAccessPolicyStats() == null) ? 0 : getAccessPolicyStats().hashCode());
hashCode = prime * hashCode + ((getLifecyclePolicyStats() == null) ? 0 : getLifecyclePolicyStats().hashCode());
hashCode = prime * hashCode + ((getSecurityConfigStats() == null) ? 0 : getSecurityConfigStats().hashCode());
hashCode = prime * hashCode + ((getSecurityPolicyStats() == null) ? 0 : getSecurityPolicyStats().hashCode());
hashCode = prime * hashCode + ((getTotalPolicyCount() == null) ? 0 : getTotalPolicyCount().hashCode());
return hashCode;
}
@Override
public GetPoliciesStatsResult clone() {
try {
return (GetPoliciesStatsResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}