All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.bedrockruntime.model.GuardrailUsage Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Bedrock Runtime module holds the client classes that are used for communicating with Amazon Bedrock Runtime Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.bedrockruntime.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The details on the use of the guardrail. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GuardrailUsage implements Serializable, Cloneable, StructuredPojo { /** *

* The topic policy units processed by the guardrail. *

*/ private Integer topicPolicyUnits; /** *

* The content policy units processed by the guardrail. *

*/ private Integer contentPolicyUnits; /** *

* The word policy units processed by the guardrail. *

*/ private Integer wordPolicyUnits; /** *

* The sensitive information policy units processed by the guardrail. *

*/ private Integer sensitiveInformationPolicyUnits; /** *

* The sensitive information policy free units processed by the guardrail. *

*/ private Integer sensitiveInformationPolicyFreeUnits; /** *

* The contextual grounding policy units processed by the guardrail. *

*/ private Integer contextualGroundingPolicyUnits; /** *

* The topic policy units processed by the guardrail. *

* * @param topicPolicyUnits * The topic policy units processed by the guardrail. */ public void setTopicPolicyUnits(Integer topicPolicyUnits) { this.topicPolicyUnits = topicPolicyUnits; } /** *

* The topic policy units processed by the guardrail. *

* * @return The topic policy units processed by the guardrail. */ public Integer getTopicPolicyUnits() { return this.topicPolicyUnits; } /** *

* The topic policy units processed by the guardrail. *

* * @param topicPolicyUnits * The topic policy units processed by the guardrail. * @return Returns a reference to this object so that method calls can be chained together. */ public GuardrailUsage withTopicPolicyUnits(Integer topicPolicyUnits) { setTopicPolicyUnits(topicPolicyUnits); return this; } /** *

* The content policy units processed by the guardrail. *

* * @param contentPolicyUnits * The content policy units processed by the guardrail. */ public void setContentPolicyUnits(Integer contentPolicyUnits) { this.contentPolicyUnits = contentPolicyUnits; } /** *

* The content policy units processed by the guardrail. *

* * @return The content policy units processed by the guardrail. */ public Integer getContentPolicyUnits() { return this.contentPolicyUnits; } /** *

* The content policy units processed by the guardrail. *

* * @param contentPolicyUnits * The content policy units processed by the guardrail. * @return Returns a reference to this object so that method calls can be chained together. */ public GuardrailUsage withContentPolicyUnits(Integer contentPolicyUnits) { setContentPolicyUnits(contentPolicyUnits); return this; } /** *

* The word policy units processed by the guardrail. *

* * @param wordPolicyUnits * The word policy units processed by the guardrail. */ public void setWordPolicyUnits(Integer wordPolicyUnits) { this.wordPolicyUnits = wordPolicyUnits; } /** *

* The word policy units processed by the guardrail. *

* * @return The word policy units processed by the guardrail. */ public Integer getWordPolicyUnits() { return this.wordPolicyUnits; } /** *

* The word policy units processed by the guardrail. *

* * @param wordPolicyUnits * The word policy units processed by the guardrail. * @return Returns a reference to this object so that method calls can be chained together. */ public GuardrailUsage withWordPolicyUnits(Integer wordPolicyUnits) { setWordPolicyUnits(wordPolicyUnits); return this; } /** *

* The sensitive information policy units processed by the guardrail. *

* * @param sensitiveInformationPolicyUnits * The sensitive information policy units processed by the guardrail. */ public void setSensitiveInformationPolicyUnits(Integer sensitiveInformationPolicyUnits) { this.sensitiveInformationPolicyUnits = sensitiveInformationPolicyUnits; } /** *

* The sensitive information policy units processed by the guardrail. *

* * @return The sensitive information policy units processed by the guardrail. */ public Integer getSensitiveInformationPolicyUnits() { return this.sensitiveInformationPolicyUnits; } /** *

* The sensitive information policy units processed by the guardrail. *

* * @param sensitiveInformationPolicyUnits * The sensitive information policy units processed by the guardrail. * @return Returns a reference to this object so that method calls can be chained together. */ public GuardrailUsage withSensitiveInformationPolicyUnits(Integer sensitiveInformationPolicyUnits) { setSensitiveInformationPolicyUnits(sensitiveInformationPolicyUnits); return this; } /** *

* The sensitive information policy free units processed by the guardrail. *

* * @param sensitiveInformationPolicyFreeUnits * The sensitive information policy free units processed by the guardrail. */ public void setSensitiveInformationPolicyFreeUnits(Integer sensitiveInformationPolicyFreeUnits) { this.sensitiveInformationPolicyFreeUnits = sensitiveInformationPolicyFreeUnits; } /** *

* The sensitive information policy free units processed by the guardrail. *

* * @return The sensitive information policy free units processed by the guardrail. */ public Integer getSensitiveInformationPolicyFreeUnits() { return this.sensitiveInformationPolicyFreeUnits; } /** *

* The sensitive information policy free units processed by the guardrail. *

* * @param sensitiveInformationPolicyFreeUnits * The sensitive information policy free units processed by the guardrail. * @return Returns a reference to this object so that method calls can be chained together. */ public GuardrailUsage withSensitiveInformationPolicyFreeUnits(Integer sensitiveInformationPolicyFreeUnits) { setSensitiveInformationPolicyFreeUnits(sensitiveInformationPolicyFreeUnits); return this; } /** *

* The contextual grounding policy units processed by the guardrail. *

* * @param contextualGroundingPolicyUnits * The contextual grounding policy units processed by the guardrail. */ public void setContextualGroundingPolicyUnits(Integer contextualGroundingPolicyUnits) { this.contextualGroundingPolicyUnits = contextualGroundingPolicyUnits; } /** *

* The contextual grounding policy units processed by the guardrail. *

* * @return The contextual grounding policy units processed by the guardrail. */ public Integer getContextualGroundingPolicyUnits() { return this.contextualGroundingPolicyUnits; } /** *

* The contextual grounding policy units processed by the guardrail. *

* * @param contextualGroundingPolicyUnits * The contextual grounding policy units processed by the guardrail. * @return Returns a reference to this object so that method calls can be chained together. */ public GuardrailUsage withContextualGroundingPolicyUnits(Integer contextualGroundingPolicyUnits) { setContextualGroundingPolicyUnits(contextualGroundingPolicyUnits); 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 (getTopicPolicyUnits() != null) sb.append("TopicPolicyUnits: ").append(getTopicPolicyUnits()).append(","); if (getContentPolicyUnits() != null) sb.append("ContentPolicyUnits: ").append(getContentPolicyUnits()).append(","); if (getWordPolicyUnits() != null) sb.append("WordPolicyUnits: ").append(getWordPolicyUnits()).append(","); if (getSensitiveInformationPolicyUnits() != null) sb.append("SensitiveInformationPolicyUnits: ").append(getSensitiveInformationPolicyUnits()).append(","); if (getSensitiveInformationPolicyFreeUnits() != null) sb.append("SensitiveInformationPolicyFreeUnits: ").append(getSensitiveInformationPolicyFreeUnits()).append(","); if (getContextualGroundingPolicyUnits() != null) sb.append("ContextualGroundingPolicyUnits: ").append(getContextualGroundingPolicyUnits()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GuardrailUsage == false) return false; GuardrailUsage other = (GuardrailUsage) obj; if (other.getTopicPolicyUnits() == null ^ this.getTopicPolicyUnits() == null) return false; if (other.getTopicPolicyUnits() != null && other.getTopicPolicyUnits().equals(this.getTopicPolicyUnits()) == false) return false; if (other.getContentPolicyUnits() == null ^ this.getContentPolicyUnits() == null) return false; if (other.getContentPolicyUnits() != null && other.getContentPolicyUnits().equals(this.getContentPolicyUnits()) == false) return false; if (other.getWordPolicyUnits() == null ^ this.getWordPolicyUnits() == null) return false; if (other.getWordPolicyUnits() != null && other.getWordPolicyUnits().equals(this.getWordPolicyUnits()) == false) return false; if (other.getSensitiveInformationPolicyUnits() == null ^ this.getSensitiveInformationPolicyUnits() == null) return false; if (other.getSensitiveInformationPolicyUnits() != null && other.getSensitiveInformationPolicyUnits().equals(this.getSensitiveInformationPolicyUnits()) == false) return false; if (other.getSensitiveInformationPolicyFreeUnits() == null ^ this.getSensitiveInformationPolicyFreeUnits() == null) return false; if (other.getSensitiveInformationPolicyFreeUnits() != null && other.getSensitiveInformationPolicyFreeUnits().equals(this.getSensitiveInformationPolicyFreeUnits()) == false) return false; if (other.getContextualGroundingPolicyUnits() == null ^ this.getContextualGroundingPolicyUnits() == null) return false; if (other.getContextualGroundingPolicyUnits() != null && other.getContextualGroundingPolicyUnits().equals(this.getContextualGroundingPolicyUnits()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTopicPolicyUnits() == null) ? 0 : getTopicPolicyUnits().hashCode()); hashCode = prime * hashCode + ((getContentPolicyUnits() == null) ? 0 : getContentPolicyUnits().hashCode()); hashCode = prime * hashCode + ((getWordPolicyUnits() == null) ? 0 : getWordPolicyUnits().hashCode()); hashCode = prime * hashCode + ((getSensitiveInformationPolicyUnits() == null) ? 0 : getSensitiveInformationPolicyUnits().hashCode()); hashCode = prime * hashCode + ((getSensitiveInformationPolicyFreeUnits() == null) ? 0 : getSensitiveInformationPolicyFreeUnits().hashCode()); hashCode = prime * hashCode + ((getContextualGroundingPolicyUnits() == null) ? 0 : getContextualGroundingPolicyUnits().hashCode()); return hashCode; } @Override public GuardrailUsage clone() { try { return (GuardrailUsage) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.bedrockruntime.model.transform.GuardrailUsageMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy