Skip to content

Commit 28ac68d

Browse files
Sandeep SSandeep S
authored andcommitted
fix : update unit test file
1 parent c22fce9 commit 28ac68d

File tree

2 files changed

+34
-233
lines changed

2 files changed

+34
-233
lines changed

ibm_cloud_networking_services/dns_svcs_v1.py

Lines changed: 13 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,7 +2859,7 @@ def create_secondary_zone(self,
28592859
resolver_id: str,
28602860
*,
28612861
zone: str = None,
2862-
transfer_from: List['SecondaryZoneSourceInputItem'] = None,
2862+
transfer_from: List[str] = None,
28632863
description: str = None,
28642864
enabled: bool = None,
28652865
x_correlation_id: str = None,
@@ -2873,8 +2873,8 @@ def create_secondary_zone(self,
28732873
:param str instance_id: The unique identifier of a service instance.
28742874
:param str resolver_id: The unique identifier of a custom resolver.
28752875
:param str zone: (optional) zone name.
2876-
:param List[SecondaryZoneSourceInputItem] transfer_from: (optional) The
2877-
source configuration of secondary zone input.
2876+
:param List[str] transfer_from: (optional) The source configuration of
2877+
secondary zone input.
28782878
:param str description: (optional) Descriptive text of the secondary zone.
28792879
:param bool enabled: (optional) Enable/Disable the secondary zone.
28802880
:param str x_correlation_id: (optional) Uniquely identifying a request.
@@ -2887,8 +2887,6 @@ def create_secondary_zone(self,
28872887
raise ValueError('instance_id must be provided')
28882888
if resolver_id is None:
28892889
raise ValueError('resolver_id must be provided')
2890-
if transfer_from is not None:
2891-
transfer_from = [convert_model(x) for x in transfer_from]
28922890
headers = {
28932891
'X-Correlation-ID': x_correlation_id
28942892
}
@@ -3042,7 +3040,7 @@ def update_secondary_zone(self,
30423040
*,
30433041
description: str = None,
30443042
enabled: bool = None,
3045-
transfer_from: List['SecondaryZoneSourceInputItem'] = None,
3043+
transfer_from: List[str] = None,
30463044
x_correlation_id: str = None,
30473045
**kwargs
30483046
) -> DetailedResponse:
@@ -3056,8 +3054,8 @@ def update_secondary_zone(self,
30563054
:param str sz_id: The unique identifier of a secondary zone.
30573055
:param str description: (optional) Descriptive text of the secondary zone.
30583056
:param bool enabled: (optional) Enable/Disable the secondary zone.
3059-
:param List[SecondaryZoneSourceInputItem] transfer_from: (optional) The
3060-
source configuration of secondary zone input.
3057+
:param List[str] transfer_from: (optional) The source configuration of
3058+
secondary zone input.
30613059
:param str x_correlation_id: (optional) Uniquely identifying a request.
30623060
:param dict headers: A `dict` containing the request headers
30633061
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -3070,8 +3068,6 @@ def update_secondary_zone(self,
30703068
raise ValueError('resolver_id must be provided')
30713069
if sz_id is None:
30723070
raise ValueError('sz_id must be provided')
3073-
if transfer_from is not None:
3074-
transfer_from = [convert_model(x) for x in transfer_from]
30753071
headers = {
30763072
'X-Correlation-ID': x_correlation_id
30773073
}
@@ -4197,124 +4193,6 @@ def __init__(self) -> None:
41974193
", ".join(['ResourceRecordUpdateInputRdataRdataARecord', 'ResourceRecordUpdateInputRdataRdataAaaaRecord', 'ResourceRecordUpdateInputRdataRdataCnameRecord', 'ResourceRecordUpdateInputRdataRdataMxRecord', 'ResourceRecordUpdateInputRdataRdataSrvRecord', 'ResourceRecordUpdateInputRdataRdataTxtRecord', 'ResourceRecordUpdateInputRdataRdataPtrRecord']))
41984194
raise Exception(msg)
41994195

4200-
class SecondaryZoneSourceInputItem():
4201-
"""
4202-
The source address of secondary zone.
4203-
4204-
:attr str address: (optional) The address of secondary zone.
4205-
"""
4206-
4207-
def __init__(self,
4208-
*,
4209-
address: str = None) -> None:
4210-
"""
4211-
Initialize a SecondaryZoneSourceInputItem object.
4212-
4213-
:param str address: (optional) The address of secondary zone.
4214-
"""
4215-
self.address = address
4216-
4217-
@classmethod
4218-
def from_dict(cls, _dict: Dict) -> 'SecondaryZoneSourceInputItem':
4219-
"""Initialize a SecondaryZoneSourceInputItem object from a json dictionary."""
4220-
args = {}
4221-
if 'address' in _dict:
4222-
args['address'] = _dict.get('address')
4223-
return cls(**args)
4224-
4225-
@classmethod
4226-
def _from_dict(cls, _dict):
4227-
"""Initialize a SecondaryZoneSourceInputItem object from a json dictionary."""
4228-
return cls.from_dict(_dict)
4229-
4230-
def to_dict(self) -> Dict:
4231-
"""Return a json dictionary representing this model."""
4232-
_dict = {}
4233-
if hasattr(self, 'address') and self.address is not None:
4234-
_dict['address'] = self.address
4235-
return _dict
4236-
4237-
def _to_dict(self):
4238-
"""Return a json dictionary representing this model."""
4239-
return self.to_dict()
4240-
4241-
def __str__(self) -> str:
4242-
"""Return a `str` version of this SecondaryZoneSourceInputItem object."""
4243-
return json.dumps(self.to_dict(), indent=2)
4244-
4245-
def __eq__(self, other: 'SecondaryZoneSourceInputItem') -> bool:
4246-
"""Return `true` when self and other are equal, false otherwise."""
4247-
if not isinstance(other, self.__class__):
4248-
return False
4249-
return self.__dict__ == other.__dict__
4250-
4251-
def __ne__(self, other: 'SecondaryZoneSourceInputItem') -> bool:
4252-
"""Return `true` when self and other are not equal, false otherwise."""
4253-
return not self == other
4254-
4255-
class SecondaryZoneTransferFromItem():
4256-
"""
4257-
The source address of secondary zone.
4258-
4259-
:attr str address: (optional) The address of secondary zone.
4260-
:attr int port: (optional) The port number of secondary zone.
4261-
"""
4262-
4263-
def __init__(self,
4264-
*,
4265-
address: str = None,
4266-
port: int = None) -> None:
4267-
"""
4268-
Initialize a SecondaryZoneTransferFromItem object.
4269-
4270-
:param str address: (optional) The address of secondary zone.
4271-
:param int port: (optional) The port number of secondary zone.
4272-
"""
4273-
self.address = address
4274-
self.port = port
4275-
4276-
@classmethod
4277-
def from_dict(cls, _dict: Dict) -> 'SecondaryZoneTransferFromItem':
4278-
"""Initialize a SecondaryZoneTransferFromItem object from a json dictionary."""
4279-
args = {}
4280-
if 'address' in _dict:
4281-
args['address'] = _dict.get('address')
4282-
if 'port' in _dict:
4283-
args['port'] = _dict.get('port')
4284-
return cls(**args)
4285-
4286-
@classmethod
4287-
def _from_dict(cls, _dict):
4288-
"""Initialize a SecondaryZoneTransferFromItem object from a json dictionary."""
4289-
return cls.from_dict(_dict)
4290-
4291-
def to_dict(self) -> Dict:
4292-
"""Return a json dictionary representing this model."""
4293-
_dict = {}
4294-
if hasattr(self, 'address') and self.address is not None:
4295-
_dict['address'] = self.address
4296-
if hasattr(self, 'port') and self.port is not None:
4297-
_dict['port'] = self.port
4298-
return _dict
4299-
4300-
def _to_dict(self):
4301-
"""Return a json dictionary representing this model."""
4302-
return self.to_dict()
4303-
4304-
def __str__(self) -> str:
4305-
"""Return a `str` version of this SecondaryZoneTransferFromItem object."""
4306-
return json.dumps(self.to_dict(), indent=2)
4307-
4308-
def __eq__(self, other: 'SecondaryZoneTransferFromItem') -> bool:
4309-
"""Return `true` when self and other are equal, false otherwise."""
4310-
if not isinstance(other, self.__class__):
4311-
return False
4312-
return self.__dict__ == other.__dict__
4313-
4314-
def __ne__(self, other: 'SecondaryZoneTransferFromItem') -> bool:
4315-
"""Return `true` when self and other are not equal, false otherwise."""
4316-
return not self == other
4317-
43184196
class AccessRequest():
43194197
"""
43204198
Access request.
@@ -7768,8 +7646,8 @@ class SecondaryZone():
77687646
:attr str description: (optional) Descriptive text of the secondary zone.
77697647
:attr str zone: (optional) zone name.
77707648
:attr bool enabled: (optional) Enable/Disable the secondary zone.
7771-
:attr List[SecondaryZoneTransferFromItem] transfer_from: (optional) The source
7772-
configuration of secondary zone output.
7649+
:attr List[str] transfer_from: (optional) The source configuration of secondary
7650+
zone output.
77737651
:attr str created_on: (optional) The time when a secondary zone is created.
77747652
:attr str modified_on: (optional) The recent time when a secondary zone is
77757653
modified.
@@ -7781,7 +7659,7 @@ def __init__(self,
77817659
description: str = None,
77827660
zone: str = None,
77837661
enabled: bool = None,
7784-
transfer_from: List['SecondaryZoneTransferFromItem'] = None,
7662+
transfer_from: List[str] = None,
77857663
created_on: str = None,
77867664
modified_on: str = None) -> None:
77877665
"""
@@ -7791,8 +7669,8 @@ def __init__(self,
77917669
:param str description: (optional) Descriptive text of the secondary zone.
77927670
:param str zone: (optional) zone name.
77937671
:param bool enabled: (optional) Enable/Disable the secondary zone.
7794-
:param List[SecondaryZoneTransferFromItem] transfer_from: (optional) The
7795-
source configuration of secondary zone output.
7672+
:param List[str] transfer_from: (optional) The source configuration of
7673+
secondary zone output.
77967674
:param str created_on: (optional) The time when a secondary zone is
77977675
created.
77987676
:param str modified_on: (optional) The recent time when a secondary zone is
@@ -7819,7 +7697,7 @@ def from_dict(cls, _dict: Dict) -> 'SecondaryZone':
78197697
if 'enabled' in _dict:
78207698
args['enabled'] = _dict.get('enabled')
78217699
if 'transfer_from' in _dict:
7822-
args['transfer_from'] = [SecondaryZoneTransferFromItem.from_dict(x) for x in _dict.get('transfer_from')]
7700+
args['transfer_from'] = _dict.get('transfer_from')
78237701
if 'created_on' in _dict:
78247702
args['created_on'] = _dict.get('created_on')
78257703
if 'modified_on' in _dict:
@@ -7843,7 +7721,7 @@ def to_dict(self) -> Dict:
78437721
if hasattr(self, 'enabled') and self.enabled is not None:
78447722
_dict['enabled'] = self.enabled
78457723
if hasattr(self, 'transfer_from') and self.transfer_from is not None:
7846-
_dict['transfer_from'] = [x.to_dict() for x in self.transfer_from]
7724+
_dict['transfer_from'] = self.transfer_from
78477725
if hasattr(self, 'created_on') and self.created_on is not None:
78487726
_dict['created_on'] = self.created_on
78497727
if hasattr(self, 'modified_on') and self.modified_on is not None:

0 commit comments

Comments
 (0)