js/http_client/v1/src/model/V1Agent.js
/**
     * Constructs a <code>V1Agent</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:model/V1Agent} obj Optional instance to populate.
     * @return {module:model/V1Agent} The populated <code>V1Agent</code> instance.
     */
Constructs a V1Agent from a plain JavaScript object, optionally creating a new instance.
Copies all relevant properties from data to obj if supplied or a new instance if not.
@param {Object} data The plain JavaScript object bearing properties of interest.
@param {module:model/V1Agent} obj Optional instance to populate.
Constructs a V1Agent from a plain JavaScript object optionally creating a new instance . Copies all relevant properties from data to obj if supplied or a new instance if not . @param { Object } data The plain JavaScript object bearing properties of interest . @param { module : model / V1Agent } obj Optional instance to populate .
static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new V1Agent();
            if (data.hasOwnProperty('uuid')) {
                obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String');
            }
            if (data.hasOwnProperty('name')) {
                obj['name'] = ApiClient.convertToType(data['name'], 'String');
            }
            if (data.hasOwnProperty('description')) {
                obj['description'] = ApiClient.convertToType(data['description'], 'String');
            }
            if (data.hasOwnProperty('tags')) {
                obj['tags'] = ApiClient.convertToType(data['tags'], ['String']);
            }
            if (data.hasOwnProperty('live_state')) {
                obj['live_state'] = ApiClient.convertToType(data['live_state'], 'Number');
            }
            if (data.hasOwnProperty('namespace')) {
                obj['namespace'] = ApiClient.convertToType(data['namespace'], 'String');
            }
            if (data.hasOwnProperty('version_api')) {
                obj['version_api'] = ApiClient.convertToType(data['version_api'], Object);
            }
            if (data.hasOwnProperty('version')) {
                obj['version'] = ApiClient.convertToType(data['version'], 'String');
            }
            if (data.hasOwnProperty('content')) {
                obj['content'] = ApiClient.convertToType(data['content'], 'String');
            }
            if (data.hasOwnProperty('created_at')) {
                obj['created_at'] = ApiClient.convertToType(data['created_at'], 'Date');
            }
            if (data.hasOwnProperty('updated_at')) {
                obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'Date');
            }
            if (data.hasOwnProperty('status')) {
                obj['status'] = V1Statuses.constructFromObject(data['status']);
            }
            if (data.hasOwnProperty('is_replica')) {
                obj['is_replica'] = ApiClient.convertToType(data['is_replica'], 'Boolean');
            }
            if (data.hasOwnProperty('is_ui_managed')) {
                obj['is_ui_managed'] = ApiClient.convertToType(data['is_ui_managed'], 'Boolean');
            }
            if (data.hasOwnProperty('settings')) {
                obj['settings'] = ApiClient.convertToType(data['settings'], Object);
            }
        }
        return obj;
    }
static constructFromObject ( data , obj ) { if ( data ) { obj = obj || new V1Agent ( ) ; if ( data . hasOwnProperty ( 'uuid' ) ) { obj [ 'uuid' ] = ApiClient . convertToType ( data [ 'uuid' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'name' ) ) { obj [ 'name' ] = ApiClient . convertToType ( data [ 'name' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'description' ) ) { obj [ 'description' ] = ApiClient . convertToType ( data [ 'description' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'tags' ) ) { obj [ 'tags' ] = ApiClient . convertToType ( data [ 'tags' ] , [ 'String' ] ) ; } if ( data . hasOwnProperty ( 'live_state' ) ) { obj [ 'live_state' ] = ApiClient . convertToType ( data [ 'live_state' ] , 'Number' ) ; } if ( data . hasOwnProperty ( 'namespace' ) ) { obj [ 'namespace' ] = ApiClient . convertToType ( data [ 'namespace' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'version_api' ) ) { obj [ 'version_api' ] = ApiClient . convertToType ( data [ 'version_api' ] , Object ) ; } if ( data . hasOwnProperty ( 'version' ) ) { obj [ 'version' ] = ApiClient . convertToType ( data [ 'version' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'content' ) ) { obj [ 'content' ] = ApiClient . convertToType ( data [ 'content' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'created_at' ) ) { obj [ 'created_at' ] = ApiClient . convertToType ( data [ 'created_at' ] , 'Date' ) ; } if ( data . hasOwnProperty ( 'updated_at' ) ) { obj [ 'updated_at' ] = ApiClient . convertToType ( data [ 'updated_at' ] , 'Date' ) ; } if ( data . hasOwnProperty ( 'status' ) ) { obj [ 'status' ] = V1Statuses . constructFromObject ( data [ 'status' ] ) ; } if ( data . hasOwnProperty ( 'is_replica' ) ) { obj [ 'is_replica' ] = ApiClient . convertToType ( data [ 'is_replica' ] , 'Boolean' ) ; } if ( data . hasOwnProperty ( 'is_ui_managed' ) ) { obj [ 'is_ui_managed' ] = ApiClient . convertToType ( data [ 'is_ui_managed' ] , 'Boolean' ) ; } if ( data . hasOwnProperty ( 'settings' ) ) { obj [ 'settings' ] = ApiClient . convertToType ( data [ 'settings' ] , Object ) ; } } return obj ; }
Constructs a <code>V1Agent</code> from a plain JavaScript object, optionally creating a new instance.
Constructs a <code > V1Agent< / code > from a plain JavaScript object optionally creating a new instance .