1# coding: utf-8 2# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. 3# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. 4 5 6from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 7from oci.decorators import init_model_state_from_kwargs 8 9 10@init_model_state_from_kwargs 11class DiffChunk(object): 12 """ 13 Details about a group of changes. 14 """ 15 16 def __init__(self, **kwargs): 17 """ 18 Initializes a new DiffChunk object with values from keyword arguments. 19 The following keyword arguments are supported (corresponding to the getters/setters of this class): 20 21 :param base_line: 22 The value to assign to the base_line property of this DiffChunk. 23 :type base_line: int 24 25 :param base_span: 26 The value to assign to the base_span property of this DiffChunk. 27 :type base_span: int 28 29 :param target_line: 30 The value to assign to the target_line property of this DiffChunk. 31 :type target_line: int 32 33 :param target_span: 34 The value to assign to the target_span property of this DiffChunk. 35 :type target_span: int 36 37 :param diff_sections: 38 The value to assign to the diff_sections property of this DiffChunk. 39 :type diff_sections: list[oci.devops.models.DiffSection] 40 41 """ 42 self.swagger_types = { 43 'base_line': 'int', 44 'base_span': 'int', 45 'target_line': 'int', 46 'target_span': 'int', 47 'diff_sections': 'list[DiffSection]' 48 } 49 50 self.attribute_map = { 51 'base_line': 'baseLine', 52 'base_span': 'baseSpan', 53 'target_line': 'targetLine', 54 'target_span': 'targetSpan', 55 'diff_sections': 'diffSections' 56 } 57 58 self._base_line = None 59 self._base_span = None 60 self._target_line = None 61 self._target_span = None 62 self._diff_sections = None 63 64 @property 65 def base_line(self): 66 """ 67 Gets the base_line of this DiffChunk. 68 Line number in base version where changes begin. 69 70 71 :return: The base_line of this DiffChunk. 72 :rtype: int 73 """ 74 return self._base_line 75 76 @base_line.setter 77 def base_line(self, base_line): 78 """ 79 Sets the base_line of this DiffChunk. 80 Line number in base version where changes begin. 81 82 83 :param base_line: The base_line of this DiffChunk. 84 :type: int 85 """ 86 self._base_line = base_line 87 88 @property 89 def base_span(self): 90 """ 91 Gets the base_span of this DiffChunk. 92 Number of lines chunk spans in base version. 93 94 95 :return: The base_span of this DiffChunk. 96 :rtype: int 97 """ 98 return self._base_span 99 100 @base_span.setter 101 def base_span(self, base_span): 102 """ 103 Sets the base_span of this DiffChunk. 104 Number of lines chunk spans in base version. 105 106 107 :param base_span: The base_span of this DiffChunk. 108 :type: int 109 """ 110 self._base_span = base_span 111 112 @property 113 def target_line(self): 114 """ 115 Gets the target_line of this DiffChunk. 116 Line number in target version where changes begin. 117 118 119 :return: The target_line of this DiffChunk. 120 :rtype: int 121 """ 122 return self._target_line 123 124 @target_line.setter 125 def target_line(self, target_line): 126 """ 127 Sets the target_line of this DiffChunk. 128 Line number in target version where changes begin. 129 130 131 :param target_line: The target_line of this DiffChunk. 132 :type: int 133 """ 134 self._target_line = target_line 135 136 @property 137 def target_span(self): 138 """ 139 Gets the target_span of this DiffChunk. 140 Number of lines chunk spans in target version. 141 142 143 :return: The target_span of this DiffChunk. 144 :rtype: int 145 """ 146 return self._target_span 147 148 @target_span.setter 149 def target_span(self, target_span): 150 """ 151 Sets the target_span of this DiffChunk. 152 Number of lines chunk spans in target version. 153 154 155 :param target_span: The target_span of this DiffChunk. 156 :type: int 157 """ 158 self._target_span = target_span 159 160 @property 161 def diff_sections(self): 162 """ 163 Gets the diff_sections of this DiffChunk. 164 List of difference section. 165 166 167 :return: The diff_sections of this DiffChunk. 168 :rtype: list[oci.devops.models.DiffSection] 169 """ 170 return self._diff_sections 171 172 @diff_sections.setter 173 def diff_sections(self, diff_sections): 174 """ 175 Sets the diff_sections of this DiffChunk. 176 List of difference section. 177 178 179 :param diff_sections: The diff_sections of this DiffChunk. 180 :type: list[oci.devops.models.DiffSection] 181 """ 182 self._diff_sections = diff_sections 183 184 def __repr__(self): 185 return formatted_flat_dict(self) 186 187 def __eq__(self, other): 188 if other is None: 189 return False 190 191 return self.__dict__ == other.__dict__ 192 193 def __ne__(self, other): 194 return not self == other 195