|
| 1 | +/* |
| 2 | + * -------------------------------------------------------------------------------- |
| 3 | + * <copyright company="Aspose" file="comment_range_start.dart"> |
| 4 | + * Copyright (c) 2025 Aspose.Words for Cloud |
| 5 | + * </copyright> |
| 6 | + * <summary> |
| 7 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 8 | + * of this software and associated documentation files (the "Software"), to deal |
| 9 | + * in the Software without restriction, including without limitation the rights |
| 10 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 11 | + * copies of the Software, and to permit persons to whom the Software is |
| 12 | + * furnished to do so, subject to the following conditions: |
| 13 | + * |
| 14 | + * The above copyright notice and this permission notice shall be included in all |
| 15 | + * copies or substantial portions of the Software. |
| 16 | + * |
| 17 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 20 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 21 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 22 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 23 | + * SOFTWARE. |
| 24 | + * </summary> |
| 25 | + * -------------------------------------------------------------------------------- |
| 26 | + */ |
| 27 | + |
| 28 | +library aspose_words_cloud; |
| 29 | + |
| 30 | +import '../../aspose_words_cloud.dart'; |
| 31 | + |
| 32 | +/// Comment range start link. |
| 33 | +class CommentRangeStart extends NodeLink { |
| 34 | + /// Gets or sets the link to comment. |
| 35 | + CommentLink? _commentLink; |
| 36 | + |
| 37 | + CommentLink? get commentLink => _commentLink; |
| 38 | + set commentLink(CommentLink? val) => _commentLink = val; |
| 39 | + |
| 40 | + |
| 41 | + @override |
| 42 | + void deserialize(Map<String, dynamic>? json) { |
| 43 | + if (json == null) { |
| 44 | + throw ApiException(400, 'Failed to deserialize CommentRangeStart data model.'); |
| 45 | + } |
| 46 | + |
| 47 | + super.deserialize(json); |
| 48 | + if (json.containsKey('Link')) { |
| 49 | + link = ModelBase.createInstance< WordsApiLink >(json['Link'] as Map<String, dynamic>); |
| 50 | + } else { |
| 51 | + link = null; |
| 52 | + } |
| 53 | + |
| 54 | + if (json.containsKey('NodeId')) { |
| 55 | + nodeId = json['NodeId'] as String; |
| 56 | + } else { |
| 57 | + nodeId = null; |
| 58 | + } |
| 59 | + |
| 60 | + if (json.containsKey('CommentLink')) { |
| 61 | + commentLink = ModelBase.createInstance< CommentLink >(json['CommentLink'] as Map<String, dynamic>); |
| 62 | + } else { |
| 63 | + commentLink = null; |
| 64 | + } |
| 65 | + } |
| 66 | + |
| 67 | + @override |
| 68 | + Map<String, dynamic> serialize() { |
| 69 | + var _result = <String, dynamic>{}; |
| 70 | + _result.addAll(super.serialize()); |
| 71 | + if (commentLink != null) { |
| 72 | + _result['CommentLink'] = commentLink!.serialize(); |
| 73 | + } |
| 74 | + return _result; |
| 75 | + } |
| 76 | + |
| 77 | + @override |
| 78 | + void getFilesContent(List<FileReference> resultFilesContent) { |
| 79 | + } |
| 80 | + |
| 81 | + @override |
| 82 | + void validate() { |
| 83 | + super.validate(); |
| 84 | + |
| 85 | + commentLink?.validate(); |
| 86 | + |
| 87 | + } |
| 88 | +} |
| 89 | + |
| 90 | + |
0 commit comments