js/http_client/v1/src/model/V1ProjectVersion.js
/**
     * Constructs a <code>V1ProjectVersion</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/V1ProjectVersion} obj Optional instance to populate.
     * @return {module:model/V1ProjectVersion} The populated <code>V1ProjectVersion</code> instance.
     */
Constructs a V1ProjectVersion 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/V1ProjectVersion} obj Optional instance to populate.
Constructs a V1ProjectVersion 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 / V1ProjectVersion } obj Optional instance to populate .
static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new V1ProjectVersion();
            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('owner')) {
                obj['owner'] = ApiClient.convertToType(data['owner'], 'String');
            }
            if (data.hasOwnProperty('project')) {
                obj['project'] = ApiClient.convertToType(data['project'], 'String');
            }
            if (data.hasOwnProperty('connection')) {
                obj['connection'] = ApiClient.convertToType(data['connection'], 'String');
            }
            if (data.hasOwnProperty('run')) {
                obj['run'] = ApiClient.convertToType(data['run'], 'String');
            }
            if (data.hasOwnProperty('artifacts')) {
                obj['artifacts'] = ApiClient.convertToType(data['artifacts'], ['String']);
            }
            if (data.hasOwnProperty('meta_info')) {
                obj['meta_info'] = ApiClient.convertToType(data['meta_info'], Object);
            }
            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('stage')) {
                obj['stage'] = V1Stages.constructFromObject(data['stage']);
            }
            if (data.hasOwnProperty('kind')) {
                obj['kind'] = V1ProjectVersionKind.constructFromObject(data['kind']);
            }
            if (data.hasOwnProperty('stage_conditions')) {
                obj['stage_conditions'] = ApiClient.convertToType(data['stage_conditions'], [V1StageCondition]);
            }
            if (data.hasOwnProperty('content')) {
                obj['content'] = ApiClient.convertToType(data['content'], 'String');
            }
            if (data.hasOwnProperty('readme')) {
                obj['readme'] = ApiClient.convertToType(data['readme'], 'String');
            }
            if (data.hasOwnProperty('state')) {
                obj['state'] = ApiClient.convertToType(data['state'], 'String');
            }
            if (data.hasOwnProperty('role')) {
                obj['role'] = ApiClient.convertToType(data['role'], 'String');
            }
        }
        return obj;
    }
static constructFromObject ( data , obj ) { if ( data ) { obj = obj || new V1ProjectVersion ( ) ; 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 ( 'owner' ) ) { obj [ 'owner' ] = ApiClient . convertToType ( data [ 'owner' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'project' ) ) { obj [ 'project' ] = ApiClient . convertToType ( data [ 'project' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'connection' ) ) { obj [ 'connection' ] = ApiClient . convertToType ( data [ 'connection' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'run' ) ) { obj [ 'run' ] = ApiClient . convertToType ( data [ 'run' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'artifacts' ) ) { obj [ 'artifacts' ] = ApiClient . convertToType ( data [ 'artifacts' ] , [ 'String' ] ) ; } if ( data . hasOwnProperty ( 'meta_info' ) ) { obj [ 'meta_info' ] = ApiClient . convertToType ( data [ 'meta_info' ] , Object ) ; } 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 ( 'stage' ) ) { obj [ 'stage' ] = V1Stages . constructFromObject ( data [ 'stage' ] ) ; } if ( data . hasOwnProperty ( 'kind' ) ) { obj [ 'kind' ] = V1ProjectVersionKind . constructFromObject ( data [ 'kind' ] ) ; } if ( data . hasOwnProperty ( 'stage_conditions' ) ) { obj [ 'stage_conditions' ] = ApiClient . convertToType ( data [ 'stage_conditions' ] , [ V1StageCondition ] ) ; } if ( data . hasOwnProperty ( 'content' ) ) { obj [ 'content' ] = ApiClient . convertToType ( data [ 'content' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'readme' ) ) { obj [ 'readme' ] = ApiClient . convertToType ( data [ 'readme' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'state' ) ) { obj [ 'state' ] = ApiClient . convertToType ( data [ 'state' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'role' ) ) { obj [ 'role' ] = ApiClient . convertToType ( data [ 'role' ] , 'String' ) ; } } return obj ; }
Constructs a <code>V1ProjectVersion</code> from a plain JavaScript object, optionally creating a new instance.
Constructs a <code > V1ProjectVersion< / code > from a plain JavaScript object optionally creating a new instance .