|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + ark |
| 5 | +
|
| 6 | + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 |
| 7 | +
|
| 8 | + OpenAPI spec version: common-version |
| 9 | + |
| 10 | + Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 11 | +""" |
| 12 | + |
| 13 | + |
| 14 | +import pprint |
| 15 | +import re # noqa: F401 |
| 16 | + |
| 17 | +import six |
| 18 | + |
| 19 | +from volcenginesdkcore.configuration import Configuration |
| 20 | + |
| 21 | + |
| 22 | +class GetApiKeyRequest(object): |
| 23 | + """NOTE: This class is auto generated by the swagger code generator program. |
| 24 | +
|
| 25 | + Do not edit the class manually. |
| 26 | + """ |
| 27 | + |
| 28 | + """ |
| 29 | + Attributes: |
| 30 | + swagger_types (dict): The key is attribute name |
| 31 | + and the value is attribute type. |
| 32 | + attribute_map (dict): The key is attribute name |
| 33 | + and the value is json key in definition. |
| 34 | + """ |
| 35 | + swagger_types = { |
| 36 | + 'duration_seconds': 'int', |
| 37 | + 'resource_ids': 'list[str]', |
| 38 | + 'resource_type': 'str' |
| 39 | + } |
| 40 | + |
| 41 | + attribute_map = { |
| 42 | + 'duration_seconds': 'DurationSeconds', |
| 43 | + 'resource_ids': 'ResourceIds', |
| 44 | + 'resource_type': 'ResourceType' |
| 45 | + } |
| 46 | + |
| 47 | + def __init__(self, duration_seconds=None, resource_ids=None, resource_type=None, _configuration=None): # noqa: E501 |
| 48 | + """GetApiKeyRequest - a model defined in Swagger""" # noqa: E501 |
| 49 | + if _configuration is None: |
| 50 | + _configuration = Configuration() |
| 51 | + self._configuration = _configuration |
| 52 | + |
| 53 | + self._duration_seconds = None |
| 54 | + self._resource_ids = None |
| 55 | + self._resource_type = None |
| 56 | + self.discriminator = None |
| 57 | + |
| 58 | + self.duration_seconds = duration_seconds |
| 59 | + if resource_ids is not None: |
| 60 | + self.resource_ids = resource_ids |
| 61 | + self.resource_type = resource_type |
| 62 | + |
| 63 | + @property |
| 64 | + def duration_seconds(self): |
| 65 | + """Gets the duration_seconds of this GetApiKeyRequest. # noqa: E501 |
| 66 | +
|
| 67 | +
|
| 68 | + :return: The duration_seconds of this GetApiKeyRequest. # noqa: E501 |
| 69 | + :rtype: int |
| 70 | + """ |
| 71 | + return self._duration_seconds |
| 72 | + |
| 73 | + @duration_seconds.setter |
| 74 | + def duration_seconds(self, duration_seconds): |
| 75 | + """Sets the duration_seconds of this GetApiKeyRequest. |
| 76 | +
|
| 77 | +
|
| 78 | + :param duration_seconds: The duration_seconds of this GetApiKeyRequest. # noqa: E501 |
| 79 | + :type: int |
| 80 | + """ |
| 81 | + if self._configuration.client_side_validation and duration_seconds is None: |
| 82 | + raise ValueError("Invalid value for `duration_seconds`, must not be `None`") # noqa: E501 |
| 83 | + |
| 84 | + self._duration_seconds = duration_seconds |
| 85 | + |
| 86 | + @property |
| 87 | + def resource_ids(self): |
| 88 | + """Gets the resource_ids of this GetApiKeyRequest. # noqa: E501 |
| 89 | +
|
| 90 | +
|
| 91 | + :return: The resource_ids of this GetApiKeyRequest. # noqa: E501 |
| 92 | + :rtype: list[str] |
| 93 | + """ |
| 94 | + return self._resource_ids |
| 95 | + |
| 96 | + @resource_ids.setter |
| 97 | + def resource_ids(self, resource_ids): |
| 98 | + """Sets the resource_ids of this GetApiKeyRequest. |
| 99 | +
|
| 100 | +
|
| 101 | + :param resource_ids: The resource_ids of this GetApiKeyRequest. # noqa: E501 |
| 102 | + :type: list[str] |
| 103 | + """ |
| 104 | + |
| 105 | + self._resource_ids = resource_ids |
| 106 | + |
| 107 | + @property |
| 108 | + def resource_type(self): |
| 109 | + """Gets the resource_type of this GetApiKeyRequest. # noqa: E501 |
| 110 | +
|
| 111 | +
|
| 112 | + :return: The resource_type of this GetApiKeyRequest. # noqa: E501 |
| 113 | + :rtype: str |
| 114 | + """ |
| 115 | + return self._resource_type |
| 116 | + |
| 117 | + @resource_type.setter |
| 118 | + def resource_type(self, resource_type): |
| 119 | + """Sets the resource_type of this GetApiKeyRequest. |
| 120 | +
|
| 121 | +
|
| 122 | + :param resource_type: The resource_type of this GetApiKeyRequest. # noqa: E501 |
| 123 | + :type: str |
| 124 | + """ |
| 125 | + if self._configuration.client_side_validation and resource_type is None: |
| 126 | + raise ValueError("Invalid value for `resource_type`, must not be `None`") # noqa: E501 |
| 127 | + |
| 128 | + self._resource_type = resource_type |
| 129 | + |
| 130 | + def to_dict(self): |
| 131 | + """Returns the model properties as a dict""" |
| 132 | + result = {} |
| 133 | + |
| 134 | + for attr, _ in six.iteritems(self.swagger_types): |
| 135 | + value = getattr(self, attr) |
| 136 | + if isinstance(value, list): |
| 137 | + result[attr] = list(map( |
| 138 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 139 | + value |
| 140 | + )) |
| 141 | + elif hasattr(value, "to_dict"): |
| 142 | + result[attr] = value.to_dict() |
| 143 | + elif isinstance(value, dict): |
| 144 | + result[attr] = dict(map( |
| 145 | + lambda item: (item[0], item[1].to_dict()) |
| 146 | + if hasattr(item[1], "to_dict") else item, |
| 147 | + value.items() |
| 148 | + )) |
| 149 | + else: |
| 150 | + result[attr] = value |
| 151 | + if issubclass(GetApiKeyRequest, dict): |
| 152 | + for key, value in self.items(): |
| 153 | + result[key] = value |
| 154 | + |
| 155 | + return result |
| 156 | + |
| 157 | + def to_str(self): |
| 158 | + """Returns the string representation of the model""" |
| 159 | + return pprint.pformat(self.to_dict()) |
| 160 | + |
| 161 | + def __repr__(self): |
| 162 | + """For `print` and `pprint`""" |
| 163 | + return self.to_str() |
| 164 | + |
| 165 | + def __eq__(self, other): |
| 166 | + """Returns true if both objects are equal""" |
| 167 | + if not isinstance(other, GetApiKeyRequest): |
| 168 | + return False |
| 169 | + |
| 170 | + return self.to_dict() == other.to_dict() |
| 171 | + |
| 172 | + def __ne__(self, other): |
| 173 | + """Returns true if both objects are not equal""" |
| 174 | + if not isinstance(other, GetApiKeyRequest): |
| 175 | + return True |
| 176 | + |
| 177 | + return self.to_dict() != other.to_dict() |
0 commit comments