• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atlanticwave-sdx / sdx-lc-client / 3715106805

pending completion
3715106805

Pull #2

github

GitHub
Merge 381d6db30 into a442eb3ef
Pull Request #2: Add a GitHub Actions workflow

106 of 562 new or added lines in 18 files covered. (18.86%)

1173 of 2405 relevant lines covered (48.77%)

1.46 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.7
/swagger_client/models/node.py
1
# coding: utf-8
2

3
"""
3✔
4
    SDX LC
5

6
    You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).   # noqa: E501
7

8
    OpenAPI spec version: 1.0.0
9
    Contact: yxin@renci.org
10
    Generated by: https://github.com/swagger-api/swagger-codegen.git
11
"""
12

13
import pprint
3✔
14
import re  # noqa: F401
3✔
15

16
import six
3✔
17

18

19
class Node(object):
3✔
20
    """NOTE: This class is auto generated by the swagger code generator program.
21

22
    Do not edit the class manually.
23
    """
24

25
    """
1✔
26
    Attributes:
27
      swagger_types (dict): The key is attribute name
28
                            and the value is attribute type.
29
      attribute_map (dict): The key is attribute name
30
                            and the value is json key in definition.
31
    """
32
    swagger_types = {
3✔
33
        "id": "str",
34
        "name": "str",
35
        "short_name": "str",
36
        "location": "Location",
37
        "ports": "list[Port]",
38
        "private_attributes": "list[str]",
39
    }
40

41
    attribute_map = {
3✔
42
        "id": "id",
43
        "name": "name",
44
        "short_name": "short_name",
45
        "location": "location",
46
        "ports": "ports",
47
        "private_attributes": "private_attributes",
48
    }
49

50
    def __init__(
3✔
51
        self,
52
        id=None,
53
        name=None,
54
        short_name=None,
55
        location=None,
56
        ports=None,
57
        private_attributes=None,
58
    ):  # noqa: E501
59
        """Node - a model defined in Swagger"""  # noqa: E501
60
        self._id = None
3✔
61
        self._name = None
3✔
62
        self._short_name = None
3✔
63
        self._location = None
3✔
64
        self._ports = None
3✔
65
        self._private_attributes = None
3✔
66
        self.discriminator = None
3✔
67
        self.id = id
3✔
68
        self.name = name
3✔
69
        if short_name is not None:
3✔
70
            self.short_name = short_name
×
71
        self.location = location
3✔
72
        self.ports = ports
3✔
73
        if private_attributes is not None:
3✔
74
            self.private_attributes = private_attributes
×
75

76
    @property
3✔
77
    def id(self):
3✔
78
        """Gets the id of this Node.  # noqa: E501
79

80

81
        :return: The id of this Node.  # noqa: E501
82
        :rtype: str
83
        """
84
        return self._id
3✔
85

86
    @id.setter
3✔
87
    def id(self, id):
3✔
88
        """Sets the id of this Node.
89

90

91
        :param id: The id of this Node.  # noqa: E501
92
        :type: str
93
        """
94
        if id is None:
3✔
95
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501
×
96

97
        self._id = id
3✔
98

99
    @property
3✔
100
    def name(self):
3✔
101
        """Gets the name of this Node.  # noqa: E501
102

103

104
        :return: The name of this Node.  # noqa: E501
105
        :rtype: str
106
        """
107
        return self._name
3✔
108

109
    @name.setter
3✔
110
    def name(self, name):
3✔
111
        """Sets the name of this Node.
112

113

114
        :param name: The name of this Node.  # noqa: E501
115
        :type: str
116
        """
117
        if name is None:
3✔
NEW
118
            raise ValueError(
×
119
                "Invalid value for `name`, must not be `None`"
120
            )  # noqa: E501
121

122
        self._name = name
3✔
123

124
    @property
3✔
125
    def short_name(self):
3✔
126
        """Gets the short_name of this Node.  # noqa: E501
127

128

129
        :return: The short_name of this Node.  # noqa: E501
130
        :rtype: str
131
        """
132
        return self._short_name
3✔
133

134
    @short_name.setter
3✔
135
    def short_name(self, short_name):
3✔
136
        """Sets the short_name of this Node.
137

138

139
        :param short_name: The short_name of this Node.  # noqa: E501
140
        :type: str
141
        """
142

143
        self._short_name = short_name
×
144

145
    @property
3✔
146
    def location(self):
3✔
147
        """Gets the location of this Node.  # noqa: E501
148

149

150
        :return: The location of this Node.  # noqa: E501
151
        :rtype: Location
152
        """
153
        return self._location
3✔
154

155
    @location.setter
3✔
156
    def location(self, location):
3✔
157
        """Sets the location of this Node.
158

159

160
        :param location: The location of this Node.  # noqa: E501
161
        :type: Location
162
        """
163
        if location is None:
3✔
NEW
164
            raise ValueError(
×
165
                "Invalid value for `location`, must not be `None`"
166
            )  # noqa: E501
167

168
        self._location = location
3✔
169

170
    @property
3✔
171
    def ports(self):
3✔
172
        """Gets the ports of this Node.  # noqa: E501
173

174

175
        :return: The ports of this Node.  # noqa: E501
176
        :rtype: list[Port]
177
        """
178
        return self._ports
3✔
179

180
    @ports.setter
3✔
181
    def ports(self, ports):
3✔
182
        """Sets the ports of this Node.
183

184

185
        :param ports: The ports of this Node.  # noqa: E501
186
        :type: list[Port]
187
        """
188
        if ports is None:
3✔
NEW
189
            raise ValueError(
×
190
                "Invalid value for `ports`, must not be `None`"
191
            )  # noqa: E501
192

193
        self._ports = ports
3✔
194

195
    @property
3✔
196
    def private_attributes(self):
3✔
197
        """Gets the private_attributes of this Node.  # noqa: E501
198

199

200
        :return: The private_attributes of this Node.  # noqa: E501
201
        :rtype: list[str]
202
        """
203
        return self._private_attributes
3✔
204

205
    @private_attributes.setter
3✔
206
    def private_attributes(self, private_attributes):
3✔
207
        """Sets the private_attributes of this Node.
208

209

210
        :param private_attributes: The private_attributes of this Node.  # noqa: E501
211
        :type: list[str]
212
        """
213

214
        self._private_attributes = private_attributes
×
215

216
    def to_dict(self):
3✔
217
        """Returns the model properties as a dict"""
218
        result = {}
3✔
219

220
        for attr, _ in six.iteritems(self.swagger_types):
3✔
221
            value = getattr(self, attr)
3✔
222
            if isinstance(value, list):
3✔
223
                result[attr] = list(
3✔
224
                    map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)
225
                )
226
            elif hasattr(value, "to_dict"):
3✔
227
                result[attr] = value.to_dict()
3✔
228
            elif isinstance(value, dict):
3✔
NEW
229
                result[attr] = dict(
×
230
                    map(
231
                        lambda item: (item[0], item[1].to_dict())
232
                        if hasattr(item[1], "to_dict")
233
                        else item,
234
                        value.items(),
235
                    )
236
                )
237
            else:
238
                result[attr] = value
3✔
239
        if issubclass(Node, dict):
3✔
240
            for key, value in self.items():
×
241
                result[key] = value
×
242

243
        return result
3✔
244

245
    def to_str(self):
3✔
246
        """Returns the string representation of the model"""
247
        return pprint.pformat(self.to_dict())
3✔
248

249
    def __repr__(self):
3✔
250
        """For `print` and `pprint`"""
251
        return self.to_str()
3✔
252

253
    def __eq__(self, other):
3✔
254
        """Returns true if both objects are equal"""
255
        if not isinstance(other, Node):
×
256
            return False
×
257

258
        return self.__dict__ == other.__dict__
×
259

260
    def __ne__(self, other):
3✔
261
        """Returns true if both objects are not equal"""
262
        return not self == other
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc