
com.symphony.oss.models.fundmental.canon.TraceTransactionEntity Maven / Gradle / Ivy
/**
* GENERATED CODE - DO NOT EDIT OR CHECK IN TO SOURCE CODE CONTROL
*
* Copyright 2020 Symphony Communication Services, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License 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.
*
*----------------------------------------------------------------------------------------------------
* Generated from
* Input source file:/Users/bruce/symphony/git-SymphonyOSF/oss-models/target/checkout/fundamental-model/src/main/resources/canon/fundamental.json
* Template groupId org.symphonyoss.s2.canon
* artifactId canon-template-java
* Template name template/java/Object/_Entity.java.ftl
* At 2020-01-28 16:55:36 GMT
*----------------------------------------------------------------------------------------------------
*/
package com.symphony.oss.models.fundmental.canon;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import org.symphonyoss.s2.common.immutable.ImmutableByteArray;
import org.symphonyoss.s2.canon.runtime.IEntity;
import org.symphonyoss.s2.canon.runtime.IModelRegistry;
import org.symphonyoss.s2.canon.runtime.CanonRuntime;
import org.symphonyoss.s2.canon.runtime.Entity;
import org.symphonyoss.s2.canon.runtime.EntityBuilder;
import org.symphonyoss.s2.canon.runtime.EntityFactory;
import org.symphonyoss.s2.canon.runtime.IBuilderFactory;
import org.symphonyoss.s2.common.type.provider.IBooleanProvider;
import org.symphonyoss.s2.common.type.provider.IStringProvider;
import org.symphonyoss.s2.common.type.provider.IIntegerProvider;
import org.symphonyoss.s2.common.type.provider.ILongProvider;
import org.symphonyoss.s2.common.type.provider.IFloatProvider;
import org.symphonyoss.s2.common.type.provider.IDoubleProvider;
import org.symphonyoss.s2.common.type.provider.IImmutableByteArrayProvider;
import org.symphonyoss.s2.common.dom.json.IJsonDomNode;
import org.symphonyoss.s2.common.dom.json.IImmutableJsonDomNode;
import org.symphonyoss.s2.common.dom.json.ImmutableJsonList;
import org.symphonyoss.s2.common.dom.json.ImmutableJsonSet;
import org.symphonyoss.s2.common.dom.json.ImmutableJsonObject;
import org.symphonyoss.s2.common.dom.json.MutableJsonList;
import org.symphonyoss.s2.common.dom.json.MutableJsonSet;
import org.symphonyoss.s2.common.dom.json.MutableJsonObject;
import org.symphonyoss.s2.common.dom.json.JsonArray;
import org.symphonyoss.s2.common.dom.json.JsonList;
import org.symphonyoss.s2.common.dom.json.JsonSet;
import java.util.HashSet;
import java.util.List;
import java.util.LinkedList;
import java.util.Set;
import java.util.Iterator;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import org.symphonyoss.s2.common.immutable.ImmutableByteArray;
import org.symphonyoss.s2.common.hash.Hash;
import java.time.Instant;
import com.symphony.oss.models.core.canon.facade.InstantBuilder;
import com.symphony.oss.models.fundamental.canon.facade.*;
import com.symphony.oss.models.crypto.canon.facade.*;
import com.symphony.oss.models.crypto.canon.*;
import com.symphony.oss.models.core.canon.facade.*;
import com.symphony.oss.models.core.canon.*;
/**
* Object ObjectSchema(TraceTransaction)
* Generated from ObjectSchema(TraceTransaction) at #/components/schemas/TraceTransaction
*/
@Immutable
@SuppressWarnings("unused")
public abstract class TraceTransactionEntity extends Entity
implements ITraceTransaction, IFundamentalModelEntity
{
/** Type ID */
public static final String TYPE_ID = "com.symphony.s2.model.fundamental.TraceTransaction";
/** Type version */
public static final String TYPE_VERSION = "1.0";
/** Type major version */
public static final Integer TYPE_MAJOR_VERSION = 1;
/** Type minor version */
public static final Integer TYPE_MINOR_VERSION = 0;
/** Factory instance */
public static final Factory FACTORY = new Factory();
/**
* Builder factory instance
*
* @deprecated use new TraceTransaction.Builder()
or new TraceTransaction.Builder(ITraceTransactionEntity)
*/
@Deprecated
public static final IBuilderFactory BUILDER = new BuilderFactory();
private final ImmutableSet unknownKeys_;
private final HashType _hashType_;
private final Instant _timestamp_;
private final Hash _parentHash_;
private final Instant _parentTimestamp_;
private final Hash _rootHash_;
private final Instant _rootTimestamp_;
private final String _subjectType_;
private final String _subjectId_;
private final String _instanceId_;
private final String _threadId_;
private final String _tenantId_;
/**
* Constructor from builder.
*
* @param builder A mutable builder containing all values.
*/
public TraceTransactionEntity(TraceTransaction.AbstractTraceTransactionBuilder,?> builder)
{
super(builder);
_hashType_ = builder.getHashType();
if(_hashType_ == null)
throw new IllegalArgumentException("_hashType_ is required.");
_timestamp_ = builder.getTimestamp();
if(_timestamp_ == null)
throw new IllegalArgumentException("timestamp is required.");
_parentHash_ = builder.getParentHash();
_parentTimestamp_ = builder.getParentTimestamp();
_rootHash_ = builder.getRootHash();
_rootTimestamp_ = builder.getRootTimestamp();
_subjectType_ = builder.getSubjectType();
_subjectId_ = builder.getSubjectId();
_instanceId_ = builder.getInstanceId();
_threadId_ = builder.getThreadId();
_tenantId_ = builder.getTenantId();
unknownKeys_ = ImmutableSet.of();
}
/**
* Set the _type attribute of the given mutable JSON object to the type ID of this type if it is null and
* return an immutable copy.
*
* @param mutableJsonObject A mutable JSON Object.
*
* @return An immutable copy of the given object with the _type attribute set.
*/
public static ImmutableJsonObject setType(MutableJsonObject mutableJsonObject)
{
if(mutableJsonObject.get(CanonRuntime.JSON_TYPE) == null)
mutableJsonObject.addIfNotNull(CanonRuntime.JSON_TYPE, TYPE_ID);
return mutableJsonObject.immutify();
}
/**
* Constructor from mutable JSON object.
*
* @param mutableJsonObject A mutable JSON object containing the serialized form of the object.
* @param modelRegistry A model registry to use to deserialize any nested objects.
*/
public TraceTransactionEntity(MutableJsonObject mutableJsonObject, IModelRegistry modelRegistry)
{
this(setType(mutableJsonObject), modelRegistry);
}
/**
* Constructor from serialised form.
*
* @param jsonObject An immutable JSON object containing the serialized form of the object.
* @param modelRegistry A model registry to use to deserialize any nested objects.
*/
public TraceTransactionEntity(ImmutableJsonObject jsonObject, IModelRegistry modelRegistry)
{
super(jsonObject, modelRegistry);
if(jsonObject == null)
throw new IllegalArgumentException("jsonObject is required");
Set keySet = new HashSet<>(super.getCanonUnknownKeys());
if(keySet.remove("hashType"))
{
IJsonDomNode node = jsonObject.get("hashType");
if(node instanceof IIntegerProvider)
{
Integer value = ((IIntegerProvider)node).asInteger();
try
{
_hashType_ = HashType.newBuilder().build(value);
}
catch(RuntimeException e)
{
throw new IllegalArgumentException("Value \"" + value + "\" for hashType is not a valid value", e);
}
}
else
{
throw new IllegalArgumentException("hashType must be an instance of Integer not " + node.getClass().getName());
}
}
else
{
throw new IllegalArgumentException("hashType is required.");
}
if(keySet.remove("timestamp"))
{
IJsonDomNode node = jsonObject.get("timestamp");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
try
{
_timestamp_ = InstantBuilder.build(value);
}
catch(RuntimeException e)
{
throw new IllegalArgumentException("Value \"" + value + "\" for timestamp is not a valid value", e);
}
}
else
{
throw new IllegalArgumentException("timestamp must be an instance of String not " + node.getClass().getName());
}
}
else
{
throw new IllegalArgumentException("timestamp is required.");
}
if(keySet.remove("parentHash"))
{
IJsonDomNode node = jsonObject.get("parentHash");
if(node instanceof IImmutableByteArrayProvider)
{
ImmutableByteArray value = ((IImmutableByteArrayProvider)node).asImmutableByteArray();
try
{
_parentHash_ = Hash.build(value);
}
catch(RuntimeException e)
{
throw new IllegalArgumentException("Value \"" + value + "\" for parentHash is not a valid value", e);
}
}
else
{
throw new IllegalArgumentException("parentHash must be an instance of ImmutableByteArray not " + node.getClass().getName());
}
}
else
{
_parentHash_ = null;
}
if(keySet.remove("parentTimestamp"))
{
IJsonDomNode node = jsonObject.get("parentTimestamp");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
try
{
_parentTimestamp_ = InstantBuilder.build(value);
}
catch(RuntimeException e)
{
throw new IllegalArgumentException("Value \"" + value + "\" for parentTimestamp is not a valid value", e);
}
}
else
{
throw new IllegalArgumentException("parentTimestamp must be an instance of String not " + node.getClass().getName());
}
}
else
{
_parentTimestamp_ = null;
}
if(keySet.remove("rootHash"))
{
IJsonDomNode node = jsonObject.get("rootHash");
if(node instanceof IImmutableByteArrayProvider)
{
ImmutableByteArray value = ((IImmutableByteArrayProvider)node).asImmutableByteArray();
try
{
_rootHash_ = Hash.build(value);
}
catch(RuntimeException e)
{
throw new IllegalArgumentException("Value \"" + value + "\" for rootHash is not a valid value", e);
}
}
else
{
throw new IllegalArgumentException("rootHash must be an instance of ImmutableByteArray not " + node.getClass().getName());
}
}
else
{
_rootHash_ = null;
}
if(keySet.remove("rootTimestamp"))
{
IJsonDomNode node = jsonObject.get("rootTimestamp");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
try
{
_rootTimestamp_ = InstantBuilder.build(value);
}
catch(RuntimeException e)
{
throw new IllegalArgumentException("Value \"" + value + "\" for rootTimestamp is not a valid value", e);
}
}
else
{
throw new IllegalArgumentException("rootTimestamp must be an instance of String not " + node.getClass().getName());
}
}
else
{
_rootTimestamp_ = null;
}
if(keySet.remove("subjectType"))
{
IJsonDomNode node = jsonObject.get("subjectType");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_subjectType_ = value;
}
else
{
throw new IllegalArgumentException("subjectType must be an instance of String not " + node.getClass().getName());
}
}
else
{
_subjectType_ = null;
}
if(keySet.remove("subjectId"))
{
IJsonDomNode node = jsonObject.get("subjectId");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_subjectId_ = value;
}
else
{
throw new IllegalArgumentException("subjectId must be an instance of String not " + node.getClass().getName());
}
}
else
{
_subjectId_ = null;
}
if(keySet.remove("instanceId"))
{
IJsonDomNode node = jsonObject.get("instanceId");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_instanceId_ = value;
}
else
{
throw new IllegalArgumentException("instanceId must be an instance of String not " + node.getClass().getName());
}
}
else
{
_instanceId_ = null;
}
if(keySet.remove("threadId"))
{
IJsonDomNode node = jsonObject.get("threadId");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_threadId_ = value;
}
else
{
throw new IllegalArgumentException("threadId must be an instance of String not " + node.getClass().getName());
}
}
else
{
_threadId_ = null;
}
if(keySet.remove("tenantId"))
{
IJsonDomNode node = jsonObject.get("tenantId");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_tenantId_ = value;
}
else
{
throw new IllegalArgumentException("tenantId must be an instance of String not " + node.getClass().getName());
}
}
else
{
_tenantId_ = null;
}
unknownKeys_ = ImmutableSet.copyOf(keySet);
}
/**
* Copy constructor.
*
* @param other Another instance from which all attributes are to be copied.
*/
public TraceTransactionEntity(ITraceTransaction other)
{
super(other);
_hashType_ = other.getHashType();
_timestamp_ = other.getTimestamp();
_parentHash_ = other.getParentHash();
_parentTimestamp_ = other.getParentTimestamp();
_rootHash_ = other.getRootHash();
_rootTimestamp_ = other.getRootTimestamp();
_subjectType_ = other.getSubjectType();
_subjectId_ = other.getSubjectId();
_instanceId_ = other.getInstanceId();
_threadId_ = other.getThreadId();
_tenantId_ = other.getTenantId();
unknownKeys_ = other.getCanonUnknownKeys();
}
@Override
public ImmutableSet getCanonUnknownKeys()
{
return unknownKeys_;
}
@Override
public HashType getHashType()
{
return _hashType_;
}
@Override
public Instant getTimestamp()
{
return _timestamp_;
}
@Override
public Hash getParentHash()
{
return _parentHash_;
}
@Override
public Instant getParentTimestamp()
{
return _parentTimestamp_;
}
@Override
public Hash getRootHash()
{
return _rootHash_;
}
@Override
public Instant getRootTimestamp()
{
return _rootTimestamp_;
}
@Override
public String getSubjectType()
{
return _subjectType_;
}
@Override
public String getSubjectId()
{
return _subjectId_;
}
@Override
public String getInstanceId()
{
return _instanceId_;
}
@Override
public String getThreadId()
{
return _threadId_;
}
@Override
public String getTenantId()
{
return _tenantId_;
}
@Override
public boolean equals(Object obj)
{
if(obj instanceof TraceTransactionEntity)
return toString().equals(((TraceTransactionEntity)obj).toString());
return false;
}
/**
* Factory class for TraceTransaction.
*/
public static class Factory extends EntityFactory
{
protected Factory()
{
super(ITraceTransaction.class, ITraceTransactionEntity.class);
}
/**
* Return the type identifier (_type JSON attribute) for entities created by this factory.
*
* @return The type identifier for entities created by this factory.
*/
@Override
public String getCanonType()
{
return TYPE_ID;
}
/**
* Return the type version (_version JSON attribute) for entities created by this factory.
*
* @return The type version for entities created by this factory.
*/
public String getCanonVersion()
{
return TYPE_VERSION;
}
/**
* Return the major type version for entities created by this factory.
*
* @return The major type version for entities created by this factory.
*/
public @Nullable Integer getCanonMajorVersion()
{
return TYPE_MAJOR_VERSION;
}
/**
* Return the minjor type version for entities created by this factory.
*
* @return The minor type version for entities created by this factory.
*/
public @Nullable Integer getCanonMinorVersion()
{
return TYPE_MINOR_VERSION;
}
/**
* Return a new entity instance created from the given JSON serialization.
*
* @param jsonObject The JSON serialized form of the required entity.
* @param modelRegistry A model registry to use to deserialize any nested objects.
*
* @return An instance of the entity represented by the given serialized form.
*
* @throws IllegalArgumentException If the given JSON is not valid.
*/
@Override
public ITraceTransaction newInstance(ImmutableJsonObject jsonObject, IModelRegistry modelRegistry)
{
return new TraceTransaction(jsonObject, modelRegistry);
}
/**
* Return a new entity instance created from the given builder instance.
* This is used to construct an entity from its builder as the builder also
* implements the interface of the entity.
*
* @param builder a builder containing values of all fields for the required entity.
*
* @return An instance of the entity represented by the given values.
*
* @throws IllegalArgumentException If the given values are not valid.
*/
public ITraceTransaction newInstance(Builder builder)
{
return new TraceTransaction(builder);
}
}
/**
* Builder factory
*
* @deprecated use new TraceTransaction.Builder()
or new TraceTransaction.Builder(ITraceTransactionEntity)
*/
@Deprecated
private static class BuilderFactory implements IBuilderFactory
{
/**
* @deprecated use new TraceTransaction.Builder()
*/
@Deprecated
@Override
public Builder newInstance()
{
return new Builder();
}
/**
* @deprecated use new TraceTransaction.Builder(ITraceTransactionEntity)
*/
@Deprecated
@Override
public Builder newInstance(ITraceTransactionEntity initial)
{
return new Builder(initial);
}
}
/**
* Builder for TraceTransaction
*
* Created by calling BUILDER.newInstance();
*
*/
public static class Builder extends TraceTransaction.AbstractTraceTransactionBuilder
{
/**
* Constructor.
*/
public Builder()
{
super(Builder.class);
}
/**
* Constructor initialised from another object instance.
*
* @param initial An instance of the built type from which values are to be initialised.
*/
public Builder(ITraceTransactionEntity initial)
{
super(Builder.class, initial);
}
@Override
protected ITraceTransaction construct()
{
return new TraceTransaction(this);
}
}
/**
* Abstract builder for TraceTransaction. If there are sub-classes of this type then their builders sub-class this builder.
*
* @param The concrete type of the builder, used for fluent methods.
* @param The concrete type of the built object.
*/
public static abstract class AbstractTraceTransactionBuilder, T extends ITraceTransactionEntity>
extends EntityBuilder
{
protected HashType _hashType_;
protected Instant _timestamp_;
protected Hash _parentHash_;
protected Instant _parentTimestamp_;
protected Hash _rootHash_;
protected Instant _rootTimestamp_;
protected String _subjectType_;
protected String _subjectId_;
protected String _instanceId_;
protected String _threadId_;
protected String _tenantId_;
protected AbstractTraceTransactionBuilder(Class type)
{
super(type);
}
protected AbstractTraceTransactionBuilder(Class type, ITraceTransactionEntity initial)
{
super(type, initial);
_hashType_ = initial.getHashType();
_timestamp_ = initial.getTimestamp();
_parentHash_ = initial.getParentHash();
_parentTimestamp_ = initial.getParentTimestamp();
_rootHash_ = initial.getRootHash();
_rootTimestamp_ = initial.getRootTimestamp();
_subjectType_ = initial.getSubjectType();
_subjectId_ = initial.getSubjectId();
_instanceId_ = initial.getInstanceId();
_threadId_ = initial.getThreadId();
_tenantId_ = initial.getTenantId();
}
public B withValues(ImmutableJsonObject jsonObject, boolean ignoreValidation, IModelRegistry modelRegistry)
{
if(jsonObject.containsKey("hashType"))
{
IJsonDomNode node = jsonObject.get("hashType");
if(node instanceof IIntegerProvider)
{
Integer value = ((IIntegerProvider)node).asInteger();
try
{
_hashType_ = HashType.newBuilder().build(value);
}
catch(RuntimeException e)
{
if(!ignoreValidation) throw new IllegalArgumentException("Value \"" + value + "\" for hashType is not a valid value", e);
}
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("hashType must be an instance of Integer not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("timestamp"))
{
IJsonDomNode node = jsonObject.get("timestamp");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
try
{
_timestamp_ = InstantBuilder.build(value);
}
catch(RuntimeException e)
{
if(!ignoreValidation) throw new IllegalArgumentException("Value \"" + value + "\" for timestamp is not a valid value", e);
}
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("timestamp must be an instance of String not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("parentHash"))
{
IJsonDomNode node = jsonObject.get("parentHash");
if(node instanceof IImmutableByteArrayProvider)
{
ImmutableByteArray value = ((IImmutableByteArrayProvider)node).asImmutableByteArray();
try
{
_parentHash_ = Hash.build(value);
}
catch(RuntimeException e)
{
if(!ignoreValidation) throw new IllegalArgumentException("Value \"" + value + "\" for parentHash is not a valid value", e);
}
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("parentHash must be an instance of ImmutableByteArray not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("parentTimestamp"))
{
IJsonDomNode node = jsonObject.get("parentTimestamp");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
try
{
_parentTimestamp_ = InstantBuilder.build(value);
}
catch(RuntimeException e)
{
if(!ignoreValidation) throw new IllegalArgumentException("Value \"" + value + "\" for parentTimestamp is not a valid value", e);
}
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("parentTimestamp must be an instance of String not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("rootHash"))
{
IJsonDomNode node = jsonObject.get("rootHash");
if(node instanceof IImmutableByteArrayProvider)
{
ImmutableByteArray value = ((IImmutableByteArrayProvider)node).asImmutableByteArray();
try
{
_rootHash_ = Hash.build(value);
}
catch(RuntimeException e)
{
if(!ignoreValidation) throw new IllegalArgumentException("Value \"" + value + "\" for rootHash is not a valid value", e);
}
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("rootHash must be an instance of ImmutableByteArray not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("rootTimestamp"))
{
IJsonDomNode node = jsonObject.get("rootTimestamp");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
try
{
_rootTimestamp_ = InstantBuilder.build(value);
}
catch(RuntimeException e)
{
if(!ignoreValidation) throw new IllegalArgumentException("Value \"" + value + "\" for rootTimestamp is not a valid value", e);
}
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("rootTimestamp must be an instance of String not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("subjectType"))
{
IJsonDomNode node = jsonObject.get("subjectType");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_subjectType_ = value;
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("subjectType must be an instance of String not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("subjectId"))
{
IJsonDomNode node = jsonObject.get("subjectId");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_subjectId_ = value;
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("subjectId must be an instance of String not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("instanceId"))
{
IJsonDomNode node = jsonObject.get("instanceId");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_instanceId_ = value;
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("instanceId must be an instance of String not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("threadId"))
{
IJsonDomNode node = jsonObject.get("threadId");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_threadId_ = value;
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("threadId must be an instance of String not " + node.getClass().getName());
}
}
if(jsonObject.containsKey("tenantId"))
{
IJsonDomNode node = jsonObject.get("tenantId");
if(node instanceof IStringProvider)
{
String value = ((IStringProvider)node).asString();
_tenantId_ = value;
}
else if(!ignoreValidation)
{
throw new IllegalArgumentException("tenantId must be an instance of String not " + node.getClass().getName());
}
}
return self();
}
public void populateAllFields(List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy