|
| 1 | +/** |
| 2 | + * BuiltByBit API |
| 3 | + * All operations not tagged 'free' require an active [Ultimate](https://builtbybit.com/account/ultimate) subscription or invite-only permissions. V2 documentation: https://builtbybit.com/wiki/api-v2/ \\ OAuth2 documentation: https://builtbybit.com/wiki/oauth2/ |
| 4 | + * |
| 5 | + * The version of the OpenAPI document: v2 |
| 6 | + * |
| 7 | + * |
| 8 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 9 | + * https://openapi-generator.tech |
| 10 | + * Do not edit the class manually. |
| 11 | + * |
| 12 | + */ |
| 13 | + |
| 14 | +import ApiClient from '../ApiClient'; |
| 15 | +import PostV2DeploymentsUpgrade200ResponseData from './PostV2DeploymentsUpgrade200ResponseData'; |
| 16 | + |
| 17 | +/** |
| 18 | + * The PostV2DeploymentsUpgrade200Response model module. |
| 19 | + * @module model/PostV2DeploymentsUpgrade200Response |
| 20 | + * @version v2 |
| 21 | + */ |
| 22 | +class PostV2DeploymentsUpgrade200Response { |
| 23 | + /** |
| 24 | + * Constructs a new <code>PostV2DeploymentsUpgrade200Response</code>. |
| 25 | + * @alias module:model/PostV2DeploymentsUpgrade200Response |
| 26 | + */ |
| 27 | + constructor() { |
| 28 | + |
| 29 | + PostV2DeploymentsUpgrade200Response.initialize(this); |
| 30 | + } |
| 31 | + |
| 32 | + /** |
| 33 | + * Initializes the fields of this object. |
| 34 | + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). |
| 35 | + * Only for internal use. |
| 36 | + */ |
| 37 | + static initialize(obj) { |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * Constructs a <code>PostV2DeploymentsUpgrade200Response</code> from a plain JavaScript object, optionally creating a new instance. |
| 42 | + * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. |
| 43 | + * @param {Object} data The plain JavaScript object bearing properties of interest. |
| 44 | + * @param {module:model/PostV2DeploymentsUpgrade200Response} obj Optional instance to populate. |
| 45 | + * @return {module:model/PostV2DeploymentsUpgrade200Response} The populated <code>PostV2DeploymentsUpgrade200Response</code> instance. |
| 46 | + */ |
| 47 | + static constructFromObject(data, obj) { |
| 48 | + if (data) { |
| 49 | + obj = obj || new PostV2DeploymentsUpgrade200Response(); |
| 50 | + |
| 51 | + if (data.hasOwnProperty('result')) { |
| 52 | + obj['result'] = ApiClient.convertToType(data['result'], 'String'); |
| 53 | + } |
| 54 | + if (data.hasOwnProperty('data')) { |
| 55 | + obj['data'] = PostV2DeploymentsUpgrade200ResponseData.constructFromObject(data['data']); |
| 56 | + } |
| 57 | + } |
| 58 | + return obj; |
| 59 | + } |
| 60 | + |
| 61 | + /** |
| 62 | + * Validates the JSON data with respect to <code>PostV2DeploymentsUpgrade200Response</code>. |
| 63 | + * @param {Object} data The plain JavaScript object bearing properties of interest. |
| 64 | + * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PostV2DeploymentsUpgrade200Response</code>. |
| 65 | + */ |
| 66 | + static validateJSON(data) { |
| 67 | + // ensure the json data is a string |
| 68 | + if (data['result'] && !(typeof data['result'] === 'string' || data['result'] instanceof String)) { |
| 69 | + throw new Error("Expected the field `result` to be a primitive type in the JSON string but got " + data['result']); |
| 70 | + } |
| 71 | + // validate the optional field `data` |
| 72 | + if (data['data']) { // data not null |
| 73 | + PostV2DeploymentsUpgrade200ResponseData.validateJSON(data['data']); |
| 74 | + } |
| 75 | + |
| 76 | + return true; |
| 77 | + } |
| 78 | + |
| 79 | + |
| 80 | +} |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +/** |
| 85 | + * @member {module:model/PostV2DeploymentsUpgrade200Response.ResultEnum} result |
| 86 | + */ |
| 87 | +PostV2DeploymentsUpgrade200Response.prototype['result'] = undefined; |
| 88 | + |
| 89 | +/** |
| 90 | + * @member {module:model/PostV2DeploymentsUpgrade200ResponseData} data |
| 91 | + */ |
| 92 | +PostV2DeploymentsUpgrade200Response.prototype['data'] = undefined; |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +/** |
| 99 | + * Allowed values for the <code>result</code> property. |
| 100 | + * @enum {String} |
| 101 | + * @readonly |
| 102 | + */ |
| 103 | +PostV2DeploymentsUpgrade200Response['ResultEnum'] = { |
| 104 | + |
| 105 | + /** |
| 106 | + * value: "success" |
| 107 | + * @const |
| 108 | + */ |
| 109 | + "success": "success" |
| 110 | +}; |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | +export default PostV2DeploymentsUpgrade200Response; |
| 115 | + |
0 commit comments