|
| 1 | +/** |
| 2 | + * Patch API V1 |
| 3 | + * The core API used to integrate with Patch's service |
| 4 | + * |
| 5 | + * Contact: developers@usepatch.com |
| 6 | + */ |
| 7 | + |
| 8 | +import ApiClient from '../ApiClient'; |
| 9 | + |
| 10 | +class Sdg { |
| 11 | + constructor(title, _number, description, url) { |
| 12 | + Sdg.initialize(this, title, _number, description, url); |
| 13 | + } |
| 14 | + |
| 15 | + static initialize(obj, title, _number, description, url) { |
| 16 | + obj['title'] = title; |
| 17 | + obj['number'] = _number; |
| 18 | + obj['description'] = description; |
| 19 | + obj['url'] = url; |
| 20 | + } |
| 21 | + |
| 22 | + static constructFromObject(data, obj) { |
| 23 | + if (data) { |
| 24 | + obj = obj || new Sdg(); |
| 25 | + |
| 26 | + if (data.hasOwnProperty('title')) { |
| 27 | + obj['title'] = ApiClient.convertToType(data['title'], 'String'); |
| 28 | + } |
| 29 | + |
| 30 | + if (data.hasOwnProperty('number')) { |
| 31 | + obj['number'] = ApiClient.convertToType(data['number'], 'Number'); |
| 32 | + } |
| 33 | + |
| 34 | + if (data.hasOwnProperty('description')) { |
| 35 | + obj['description'] = ApiClient.convertToType( |
| 36 | + data['description'], |
| 37 | + 'String' |
| 38 | + ); |
| 39 | + } |
| 40 | + |
| 41 | + if (data.hasOwnProperty('url')) { |
| 42 | + obj['url'] = ApiClient.convertToType(data['url'], 'String'); |
| 43 | + } |
| 44 | + } |
| 45 | + return obj; |
| 46 | + } |
| 47 | +} |
| 48 | + |
| 49 | +Sdg.prototype['title'] = undefined; |
| 50 | + |
| 51 | +Sdg.prototype['number'] = undefined; |
| 52 | + |
| 53 | +Sdg.prototype['description'] = undefined; |
| 54 | + |
| 55 | +Sdg.prototype['url'] = undefined; |
| 56 | + |
| 57 | +export default Sdg; |
0 commit comments