/// <summary>
        /// Returns true if TealKeyValueStore instances are equal
        /// </summary>
        /// <param name="input">Instance of TealKeyValueStore to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(TealKeyValueStore input)
        {
            if (input == null)
            {
                return(false);
            }

            return(base.Equals(input));
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationLocalState" /> class.
 /// </summary>
 /// <param name="id">The application which this local state is for. (required).</param>
 /// <param name="schema">\\[hsch\\] schema. (required).</param>
 /// <param name="keyValue">\\[tkv\\] storage..</param>
 public ApplicationLocalState(long?id = default, ApplicationStateSchema schema = default(ApplicationStateSchema), TealKeyValueStore keyValue = default(TealKeyValueStore))
 {
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new InvalidDataException("id is a required property for ApplicationLocalState and cannot be null");
     }
     else
     {
         this.Id = id;
     }
     // to ensure "schema" is required (not null)
     if (schema == null)
     {
         throw new InvalidDataException("schema is a required property for ApplicationLocalState and cannot be null");
     }
     else
     {
         this.Schema = schema;
     }
     this.KeyValue = keyValue;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationParams" /> class.
 /// </summary>
 /// <param name="creator">The address that created this application. This is the address where the parameters and global state for this application can be found. (required).</param>
 /// <param name="approvalProgram">\\[approv\\] approval program. (required).</param>
 /// <param name="clearStateProgram">\\[clearp\\] approval program. (required).</param>
 /// <param name="localStateSchema">[\\lsch\\] local schema.</param>
 /// <param name="globalStateSchema">[\\lsch\\] global schema.</param>
 /// <param name="globalState">[\\gs\\] global schema.</param>
 public ApplicationParams(string creator = default(string), byte[] approvalProgram = default(byte[]), byte[] clearStateProgram = default(byte[]), ApplicationStateSchema localStateSchema = default(ApplicationStateSchema), ApplicationStateSchema globalStateSchema = default(ApplicationStateSchema), TealKeyValueStore globalState = default(TealKeyValueStore))
 {
     // to ensure "creator" is required (not null)
     if (creator == null)
     {
         throw new InvalidDataException("creator is a required property for ApplicationParams and cannot be null");
     }
     else
     {
         this.Creator = creator;
     }
     // to ensure "approvalProgram" is required (not null)
     if (approvalProgram == null)
     {
         throw new InvalidDataException("approvalProgram is a required property for ApplicationParams and cannot be null");
     }
     else
     {
         this.ApprovalProgram = approvalProgram;
     }
     // to ensure "clearStateProgram" is required (not null)
     if (clearStateProgram == null)
     {
         throw new InvalidDataException("clearStateProgram is a required property for ApplicationParams and cannot be null");
     }
     else
     {
         this.ClearStateProgram = clearStateProgram;
     }
     this.LocalStateSchema  = localStateSchema;
     this.GlobalStateSchema = globalStateSchema;
     this.GlobalState       = globalState;
 }