/* * Copyright 2018-2023 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.verifiedpermissions.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains a list of principal types, resource types, and actions that can be specified in policies stored in the same
* policy store. If the validation mode for the policy store is set to STRICT
, then policies that can't be
* validated by this schema are rejected by Verified Permissions and can't be stored in the policy store.
*
* A JSON string representation of the schema supported by applications that use this policy store. For more * information, see Policy * store schema in the Amazon Verified Permissions User Guide. *
*/ private String cedarJson; /** ** A JSON string representation of the schema supported by applications that use this policy store. For more * information, see Policy * store schema in the Amazon Verified Permissions User Guide. *
* * @param cedarJson * A JSON string representation of the schema supported by applications that use this policy store. For more * information, see Policy store * schema in the Amazon Verified Permissions User Guide. */ public void setCedarJson(String cedarJson) { this.cedarJson = cedarJson; } /** ** A JSON string representation of the schema supported by applications that use this policy store. For more * information, see Policy * store schema in the Amazon Verified Permissions User Guide. *
* * @return A JSON string representation of the schema supported by applications that use this policy store. For more * information, see Policy store * schema in the Amazon Verified Permissions User Guide. */ public String getCedarJson() { return this.cedarJson; } /** ** A JSON string representation of the schema supported by applications that use this policy store. For more * information, see Policy * store schema in the Amazon Verified Permissions User Guide. *
* * @param cedarJson * A JSON string representation of the schema supported by applications that use this policy store. For more * information, see Policy store * schema in the Amazon Verified Permissions User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public SchemaDefinition withCedarJson(String cedarJson) { setCedarJson(cedarJson); 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 (getCedarJson() != null) sb.append("CedarJson: ").append(getCedarJson()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SchemaDefinition == false) return false; SchemaDefinition other = (SchemaDefinition) obj; if (other.getCedarJson() == null ^ this.getCedarJson() == null) return false; if (other.getCedarJson() != null && other.getCedarJson().equals(this.getCedarJson()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCedarJson() == null) ? 0 : getCedarJson().hashCode()); return hashCode; } @Override public SchemaDefinition clone() { try { return (SchemaDefinition) 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.verifiedpermissions.model.transform.SchemaDefinitionMarshaller.getInstance().marshall(this, protocolMarshaller); } }