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

com.sforce.soap.metadata.RuleDefinition Maven / Gradle / Ivy

There is a newer version: 62.0.0
Show newest version
package com.sforce.soap.metadata;

/**
 * This is a generated class for the SObject Enterprise API.
 * Do not edit this file, as your changes will be lost.
 */
public class RuleDefinition implements com.sforce.ws.bind.XMLizable {

    /**
     * Constructor
     */
    public RuleDefinition() {}

    /* Cache the typeInfo instead of declaring static fields throughout*/
    private transient java.util.Map typeInfoCache = new java.util.HashMap();
    private com.sforce.ws.bind.TypeInfo _lookupTypeInfo(String fieldName, String namespace, String name, String typeNS, String type, int minOcc, int maxOcc, boolean elementForm) {
      com.sforce.ws.bind.TypeInfo typeInfo = typeInfoCache.get(fieldName);
      if (typeInfo == null) {
        typeInfo = new com.sforce.ws.bind.TypeInfo(namespace, name, typeNS, type, minOcc, maxOcc, elementForm);
        typeInfoCache.put(fieldName, typeInfo);
      }
      return typeInfo;
    }

    /**
     * element : actions of type {http://soap.sforce.com/2006/04/metadata}RuleAction
     * java type: com.sforce.soap.metadata.RuleAction[]
     */
    private boolean actions__is_set = false;

    private com.sforce.soap.metadata.RuleAction[] actions = new com.sforce.soap.metadata.RuleAction[0];

    public com.sforce.soap.metadata.RuleAction[] getActions() {
      return actions;
    }

    public void setActions(com.sforce.soap.metadata.RuleAction[] actions) {
      this.actions = actions;
      actions__is_set = true;
    }

    protected void setActions(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.isElement(__in, _lookupTypeInfo("actions", "http://soap.sforce.com/2006/04/metadata","actions","http://soap.sforce.com/2006/04/metadata","RuleAction",0,-1,true))) {
        setActions((com.sforce.soap.metadata.RuleAction[])__typeMapper.readObject(__in, _lookupTypeInfo("actions", "http://soap.sforce.com/2006/04/metadata","actions","http://soap.sforce.com/2006/04/metadata","RuleAction",0,-1,true), com.sforce.soap.metadata.RuleAction[].class));
      }
    }

    private void writeFieldActions(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("actions", "http://soap.sforce.com/2006/04/metadata","actions","http://soap.sforce.com/2006/04/metadata","RuleAction",0,-1,true), actions, actions__is_set);
    }

    /**
     * element : apiName of type {http://www.w3.org/2001/XMLSchema}string
     * java type: java.lang.String
     */
    private boolean apiName__is_set = false;

    private java.lang.String apiName;

    public java.lang.String getApiName() {
      return apiName;
    }

    public void setApiName(java.lang.String apiName) {
      this.apiName = apiName;
      apiName__is_set = true;
    }

    protected void setApiName(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.verifyElement(__in, _lookupTypeInfo("apiName", "http://soap.sforce.com/2006/04/metadata","apiName","http://www.w3.org/2001/XMLSchema","string",1,1,true))) {
        setApiName(__typeMapper.readString(__in, _lookupTypeInfo("apiName", "http://soap.sforce.com/2006/04/metadata","apiName","http://www.w3.org/2001/XMLSchema","string",1,1,true), java.lang.String.class));
      }
    }

    private void writeFieldApiName(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("apiName", "http://soap.sforce.com/2006/04/metadata","apiName","http://www.w3.org/2001/XMLSchema","string",1,1,true), apiName, apiName__is_set);
    }

    /**
     * element : criteria of type {http://soap.sforce.com/2006/04/metadata}RuleFilterCriteria
     * java type: com.sforce.soap.metadata.RuleFilterCriteria[]
     */
    private boolean criteria__is_set = false;

    private com.sforce.soap.metadata.RuleFilterCriteria[] criteria = new com.sforce.soap.metadata.RuleFilterCriteria[0];

    public com.sforce.soap.metadata.RuleFilterCriteria[] getCriteria() {
      return criteria;
    }

    public void setCriteria(com.sforce.soap.metadata.RuleFilterCriteria[] criteria) {
      this.criteria = criteria;
      criteria__is_set = true;
    }

    protected void setCriteria(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.isElement(__in, _lookupTypeInfo("criteria", "http://soap.sforce.com/2006/04/metadata","criteria","http://soap.sforce.com/2006/04/metadata","RuleFilterCriteria",0,-1,true))) {
        setCriteria((com.sforce.soap.metadata.RuleFilterCriteria[])__typeMapper.readObject(__in, _lookupTypeInfo("criteria", "http://soap.sforce.com/2006/04/metadata","criteria","http://soap.sforce.com/2006/04/metadata","RuleFilterCriteria",0,-1,true), com.sforce.soap.metadata.RuleFilterCriteria[].class));
      }
    }

    private void writeFieldCriteria(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("criteria", "http://soap.sforce.com/2006/04/metadata","criteria","http://soap.sforce.com/2006/04/metadata","RuleFilterCriteria",0,-1,true), criteria, criteria__is_set);
    }

    /**
     * element : description of type {http://www.w3.org/2001/XMLSchema}string
     * java type: java.lang.String
     */
    private boolean description__is_set = false;

    private java.lang.String description;

    public java.lang.String getDescription() {
      return description;
    }

    public void setDescription(java.lang.String description) {
      this.description = description;
      description__is_set = true;
    }

    protected void setDescription(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.isElement(__in, _lookupTypeInfo("description", "http://soap.sforce.com/2006/04/metadata","description","http://www.w3.org/2001/XMLSchema","string",0,1,true))) {
        setDescription(__typeMapper.readString(__in, _lookupTypeInfo("description", "http://soap.sforce.com/2006/04/metadata","description","http://www.w3.org/2001/XMLSchema","string",0,1,true), java.lang.String.class));
      }
    }

    private void writeFieldDescription(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("description", "http://soap.sforce.com/2006/04/metadata","description","http://www.w3.org/2001/XMLSchema","string",0,1,true), description, description__is_set);
    }

    /**
     * element : endDate of type {http://www.w3.org/2001/XMLSchema}dateTime
     * java type: java.util.Calendar
     */
    private boolean endDate__is_set = false;

    private java.util.Calendar endDate;

    public java.util.Calendar getEndDate() {
      return endDate;
    }

    public void setEndDate(java.util.Calendar endDate) {
      this.endDate = endDate;
      endDate__is_set = true;
    }

    protected void setEndDate(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.isElement(__in, _lookupTypeInfo("endDate", "http://soap.sforce.com/2006/04/metadata","endDate","http://www.w3.org/2001/XMLSchema","dateTime",0,1,true))) {
        setEndDate((java.util.Calendar)__typeMapper.readObject(__in, _lookupTypeInfo("endDate", "http://soap.sforce.com/2006/04/metadata","endDate","http://www.w3.org/2001/XMLSchema","dateTime",0,1,true), java.util.Calendar.class));
      }
    }

    private void writeFieldEndDate(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("endDate", "http://soap.sforce.com/2006/04/metadata","endDate","http://www.w3.org/2001/XMLSchema","dateTime",0,1,true), endDate, endDate__is_set);
    }

    /**
     * element : label of type {http://www.w3.org/2001/XMLSchema}string
     * java type: java.lang.String
     */
    private boolean label__is_set = false;

    private java.lang.String label;

    public java.lang.String getLabel() {
      return label;
    }

    public void setLabel(java.lang.String label) {
      this.label = label;
      label__is_set = true;
    }

    protected void setLabel(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.verifyElement(__in, _lookupTypeInfo("label", "http://soap.sforce.com/2006/04/metadata","label","http://www.w3.org/2001/XMLSchema","string",1,1,true))) {
        setLabel(__typeMapper.readString(__in, _lookupTypeInfo("label", "http://soap.sforce.com/2006/04/metadata","label","http://www.w3.org/2001/XMLSchema","string",1,1,true), java.lang.String.class));
      }
    }

    private void writeFieldLabel(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("label", "http://soap.sforce.com/2006/04/metadata","label","http://www.w3.org/2001/XMLSchema","string",1,1,true), label, label__is_set);
    }

    /**
     * element : ruleStatus of type {http://soap.sforce.com/2006/04/metadata}ContextRuleStatus
     * java type: com.sforce.soap.metadata.ContextRuleStatus
     */
    private boolean ruleStatus__is_set = false;

    private com.sforce.soap.metadata.ContextRuleStatus ruleStatus;

    public com.sforce.soap.metadata.ContextRuleStatus getRuleStatus() {
      return ruleStatus;
    }

    public void setRuleStatus(com.sforce.soap.metadata.ContextRuleStatus ruleStatus) {
      this.ruleStatus = ruleStatus;
      ruleStatus__is_set = true;
    }

    protected void setRuleStatus(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.verifyElement(__in, _lookupTypeInfo("ruleStatus", "http://soap.sforce.com/2006/04/metadata","ruleStatus","http://soap.sforce.com/2006/04/metadata","ContextRuleStatus",1,1,true))) {
        setRuleStatus((com.sforce.soap.metadata.ContextRuleStatus)__typeMapper.readObject(__in, _lookupTypeInfo("ruleStatus", "http://soap.sforce.com/2006/04/metadata","ruleStatus","http://soap.sforce.com/2006/04/metadata","ContextRuleStatus",1,1,true), com.sforce.soap.metadata.ContextRuleStatus.class));
      }
    }

    private void writeFieldRuleStatus(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("ruleStatus", "http://soap.sforce.com/2006/04/metadata","ruleStatus","http://soap.sforce.com/2006/04/metadata","ContextRuleStatus",1,1,true), ruleStatus, ruleStatus__is_set);
    }

    /**
     * element : sequenceNumber of type {http://www.w3.org/2001/XMLSchema}int
     * java type: int
     */
    private boolean sequenceNumber__is_set = false;

    private int sequenceNumber;

    public int getSequenceNumber() {
      return sequenceNumber;
    }

    public void setSequenceNumber(int sequenceNumber) {
      this.sequenceNumber = sequenceNumber;
      sequenceNumber__is_set = true;
    }

    protected void setSequenceNumber(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.isElement(__in, _lookupTypeInfo("sequenceNumber", "http://soap.sforce.com/2006/04/metadata","sequenceNumber","http://www.w3.org/2001/XMLSchema","int",0,1,true))) {
        setSequenceNumber((int)__typeMapper.readInt(__in, _lookupTypeInfo("sequenceNumber", "http://soap.sforce.com/2006/04/metadata","sequenceNumber","http://www.w3.org/2001/XMLSchema","int",0,1,true), int.class));
      }
    }

    private void writeFieldSequenceNumber(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("sequenceNumber", "http://soap.sforce.com/2006/04/metadata","sequenceNumber","http://www.w3.org/2001/XMLSchema","int",0,1,true), sequenceNumber, sequenceNumber__is_set);
    }

    /**
     * element : startDate of type {http://www.w3.org/2001/XMLSchema}dateTime
     * java type: java.util.Calendar
     */
    private boolean startDate__is_set = false;

    private java.util.Calendar startDate;

    public java.util.Calendar getStartDate() {
      return startDate;
    }

    public void setStartDate(java.util.Calendar startDate) {
      this.startDate = startDate;
      startDate__is_set = true;
    }

    protected void setStartDate(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.verifyElement(__in, _lookupTypeInfo("startDate", "http://soap.sforce.com/2006/04/metadata","startDate","http://www.w3.org/2001/XMLSchema","dateTime",1,1,true))) {
        setStartDate((java.util.Calendar)__typeMapper.readObject(__in, _lookupTypeInfo("startDate", "http://soap.sforce.com/2006/04/metadata","startDate","http://www.w3.org/2001/XMLSchema","dateTime",1,1,true), java.util.Calendar.class));
      }
    }

    private void writeFieldStartDate(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("startDate", "http://soap.sforce.com/2006/04/metadata","startDate","http://www.w3.org/2001/XMLSchema","dateTime",1,1,true), startDate, startDate__is_set);
    }

    /**
     * element : usageSubType of type {http://www.w3.org/2001/XMLSchema}string
     * java type: java.lang.String
     */
    private boolean usageSubType__is_set = false;

    private java.lang.String usageSubType;

    public java.lang.String getUsageSubType() {
      return usageSubType;
    }

    public void setUsageSubType(java.lang.String usageSubType) {
      this.usageSubType = usageSubType;
      usageSubType__is_set = true;
    }

    protected void setUsageSubType(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.isElement(__in, _lookupTypeInfo("usageSubType", "http://soap.sforce.com/2006/04/metadata","usageSubType","http://www.w3.org/2001/XMLSchema","string",0,1,true))) {
        setUsageSubType(__typeMapper.readString(__in, _lookupTypeInfo("usageSubType", "http://soap.sforce.com/2006/04/metadata","usageSubType","http://www.w3.org/2001/XMLSchema","string",0,1,true), java.lang.String.class));
      }
    }

    private void writeFieldUsageSubType(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("usageSubType", "http://soap.sforce.com/2006/04/metadata","usageSubType","http://www.w3.org/2001/XMLSchema","string",0,1,true), usageSubType, usageSubType__is_set);
    }

    /**
     * element : usageType of type {http://www.w3.org/2001/XMLSchema}string
     * java type: java.lang.String
     */
    private boolean usageType__is_set = false;

    private java.lang.String usageType;

    public java.lang.String getUsageType() {
      return usageType;
    }

    public void setUsageType(java.lang.String usageType) {
      this.usageType = usageType;
      usageType__is_set = true;
    }

    protected void setUsageType(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.verifyElement(__in, _lookupTypeInfo("usageType", "http://soap.sforce.com/2006/04/metadata","usageType","http://www.w3.org/2001/XMLSchema","string",1,1,true))) {
        setUsageType(__typeMapper.readString(__in, _lookupTypeInfo("usageType", "http://soap.sforce.com/2006/04/metadata","usageType","http://www.w3.org/2001/XMLSchema","string",1,1,true), java.lang.String.class));
      }
    }

    private void writeFieldUsageType(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("usageType", "http://soap.sforce.com/2006/04/metadata","usageType","http://www.w3.org/2001/XMLSchema","string",1,1,true), usageType, usageType__is_set);
    }

    /**
     * element : variables of type {http://soap.sforce.com/2006/04/metadata}RuleReferenceVariable
     * java type: com.sforce.soap.metadata.RuleReferenceVariable[]
     */
    private boolean variables__is_set = false;

    private com.sforce.soap.metadata.RuleReferenceVariable[] variables = new com.sforce.soap.metadata.RuleReferenceVariable[0];

    public com.sforce.soap.metadata.RuleReferenceVariable[] getVariables() {
      return variables;
    }

    public void setVariables(com.sforce.soap.metadata.RuleReferenceVariable[] variables) {
      this.variables = variables;
      variables__is_set = true;
    }

    protected void setVariables(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.isElement(__in, _lookupTypeInfo("variables", "http://soap.sforce.com/2006/04/metadata","variables","http://soap.sforce.com/2006/04/metadata","RuleReferenceVariable",0,-1,true))) {
        setVariables((com.sforce.soap.metadata.RuleReferenceVariable[])__typeMapper.readObject(__in, _lookupTypeInfo("variables", "http://soap.sforce.com/2006/04/metadata","variables","http://soap.sforce.com/2006/04/metadata","RuleReferenceVariable",0,-1,true), com.sforce.soap.metadata.RuleReferenceVariable[].class));
      }
    }

    private void writeFieldVariables(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      __typeMapper.writeObject(__out, _lookupTypeInfo("variables", "http://soap.sforce.com/2006/04/metadata","variables","http://soap.sforce.com/2006/04/metadata","RuleReferenceVariable",0,-1,true), variables, variables__is_set);
    }

    /**
     */
    @Override
    public void write(javax.xml.namespace.QName __element,
        com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
        throws java.io.IOException {
      __out.writeStartTag(__element.getNamespaceURI(), __element.getLocalPart());
      writeFields(__out, __typeMapper);
      __out.writeEndTag(__element.getNamespaceURI(), __element.getLocalPart());
    }

    protected void writeFields(com.sforce.ws.parser.XmlOutputStream __out,
         com.sforce.ws.bind.TypeMapper __typeMapper)
         throws java.io.IOException {
       writeFields1(__out, __typeMapper);
    }

    @Override
    public void load(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __typeMapper.consumeStartTag(__in);
      loadFields(__in, __typeMapper);
      __typeMapper.consumeEndTag(__in);
    }

    protected void loadFields(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
        loadFields1(__in, __typeMapper);
    }

    @Override
    public String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder();
      sb.append("[RuleDefinition ");
      toString1(sb);

      sb.append("]\n");
      return sb.toString();
    }

    private void toStringHelper(StringBuilder sb, String name, Object value) {
      sb.append(' ').append(name).append("='").append(com.sforce.ws.util.Verbose.toString(value)).append("'\n");
    }

    private void writeFields1(com.sforce.ws.parser.XmlOutputStream __out,
         com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
      writeFieldActions(__out, __typeMapper);
      writeFieldApiName(__out, __typeMapper);
      writeFieldCriteria(__out, __typeMapper);
      writeFieldDescription(__out, __typeMapper);
      writeFieldEndDate(__out, __typeMapper);
      writeFieldLabel(__out, __typeMapper);
      writeFieldRuleStatus(__out, __typeMapper);
      writeFieldSequenceNumber(__out, __typeMapper);
      writeFieldStartDate(__out, __typeMapper);
      writeFieldUsageSubType(__out, __typeMapper);
      writeFieldUsageType(__out, __typeMapper);
      writeFieldVariables(__out, __typeMapper);
    }

    private void loadFields1(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      setActions(__in, __typeMapper);
      setApiName(__in, __typeMapper);
      setCriteria(__in, __typeMapper);
      setDescription(__in, __typeMapper);
      setEndDate(__in, __typeMapper);
      setLabel(__in, __typeMapper);
      setRuleStatus(__in, __typeMapper);
      setSequenceNumber(__in, __typeMapper);
      setStartDate(__in, __typeMapper);
      setUsageSubType(__in, __typeMapper);
      setUsageType(__in, __typeMapper);
      setVariables(__in, __typeMapper);
    }

    private void toString1(StringBuilder sb) {
      toStringHelper(sb, "actions", actions);
      toStringHelper(sb, "apiName", apiName);
      toStringHelper(sb, "criteria", criteria);
      toStringHelper(sb, "description", description);
      toStringHelper(sb, "endDate", endDate);
      toStringHelper(sb, "label", label);
      toStringHelper(sb, "ruleStatus", ruleStatus);
      toStringHelper(sb, "sequenceNumber", sequenceNumber);
      toStringHelper(sb, "startDate", startDate);
      toStringHelper(sb, "usageSubType", usageSubType);
      toStringHelper(sb, "usageType", usageType);
      toStringHelper(sb, "variables", variables);
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy