Source: models/CustomObject.js

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
/* Copyright (c) 2020 Mobify Research & Development Inc. All rights reserved. */
/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */

/**
 * Shop API
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 20.4
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 */


import ApiClient from '../ApiClient'





/**
* The CustomObject model module.
* @module models/CustomObject
* @version 20.4
*/
export default class CustomObject {
    /**
    * Constructs a new <code>CustomObject</code>.
    * Document representing a custom object that contains all defined custom attributes for its  object type.
    * @alias module:models/CustomObject
    * @class
    */

    constructor() {








    }

    /**
    * Constructs a <code>CustomObject</code> from a plain JavaScript object, optionally creating a new instance.
    * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
    * @param {Object} data The plain JavaScript object bearing properties of interest.
    * @param {module:models/CustomObject} obj Optional instance to populate.
    * @return {module:models/CustomObject} The populated <code>CustomObject</code> instance.
    */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new CustomObject()





            if (data.hasOwnProperty('key_property')) {
                obj.key_property = ApiClient.convertToType(data.key_property, 'String')
            }
            if (data.hasOwnProperty('key_value_integer')) {
                obj.key_value_integer = ApiClient.convertToType(data.key_value_integer, 'Number')
            }
            if (data.hasOwnProperty('key_value_string')) {
                obj.key_value_string = ApiClient.convertToType(data.key_value_string, 'String')
            }
            if (data.hasOwnProperty('object_type')) {
                obj.object_type = ApiClient.convertToType(data.object_type, 'String')
            }
        }
        return obj
    }

    /**
    * The name of the key property for the custom object.
    * @member {String} key_property
    */
    key_property = undefined;
    /**
    * The id of the custom object when the type of the key is Integer.
    * @member {Number} key_value_integer
    */
    key_value_integer = undefined;
    /**
    * The id of the custom object when the type of the key is String.
    * @member {String} key_value_string
    */
    key_value_string = undefined;
    /**
    * The id of the object type.
    * @member {String} object_type
    */
    object_type = undefined;








}