diff --git a/ibm_platform_services/resource_controller_v2.py b/ibm_platform_services/resource_controller_v2.py index 8fd75775..08065513 100644 --- a/ibm_platform_services/resource_controller_v2.py +++ b/ibm_platform_services/resource_controller_v2.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-9ae61cfc-20210302-143858 +# IBM OpenAPI SDK Code Generator Version: 3.29.1-b338fb38-20210313-010605 """ Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are @@ -23,6 +23,7 @@ """ from datetime import datetime +from enum import Enum from typing import Dict, List import json @@ -88,6 +89,8 @@ def list_resource_instances(self, type: str = None, sub_type: str = None, limit: str = None, + state: str = None, + order_direction: str = None, updated_from: str = None, updated_to: str = None, **kwargs @@ -108,10 +111,14 @@ def list_resource_instances(self, :param str resource_plan_id: (optional) The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. - :param str type: (optional) The type of the instance. For example, + :param str type: (optional) The type of the instance, for example, `service_instance`. - :param str sub_type: (optional) The sub-type of instance, e.g. `cfaas`. + :param str sub_type: (optional) The sub-type of instance, for example, + `cfaas`. :param str limit: (optional) Limit on how many items should be returned. + :param str state: (optional) The state of the instance. If not specified, + instances in state `active` and `provisioning` are returned. + :param str order_direction: (optional) Order of results. :param str updated_from: (optional) Start date inclusive filter. :param str updated_to: (optional) End date inclusive filter. :param dict headers: A `dict` containing the request headers @@ -134,6 +141,8 @@ def list_resource_instances(self, 'type': type, 'sub_type': sub_type, 'limit': limit, + 'state': state, + 'order_direction': order_direction, 'updated_from': updated_from, 'updated_to': updated_to } @@ -829,8 +838,8 @@ def list_resource_bindings(self, :param str resource_id: (optional) The unique ID of the offering (service name). This value is provided by and stored in the global catalog. :param str region_binding_id: (optional) Short ID of the binding in the - specific targeted environment, e.g. service_binding_id in a given IBM Cloud - environment. + specific targeted environment, for example, service_binding_id in a given + IBM Cloud environment. :param str limit: (optional) Limit on how many items should be returned. :param str updated_from: (optional) Start date inclusive filter. :param str updated_to: (optional) End date inclusive filter. @@ -886,7 +895,7 @@ def create_resource_binding(self, :param str source: The short or long ID of resource alias. :param str target: The CRN of application to bind to in a specific - environment, e.g. Dallas YP, CFEE instance. + environment, for example, Dallas YP, CFEE instance. :param str name: (optional) The name of the binding. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. @@ -1153,7 +1162,7 @@ def create_resource_alias(self, cannot include any special characters other than `(space) - . _ :`. :param str source: The short or long ID of resource instance. :param str target: The CRN of target name(space) in a specific environment, - e.g. space in Dallas YP, CFEE instance etc. + for example, space in Dallas YP, CFEE instance etc. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. :rtype: DetailedResponse with `dict` result representing a `ResourceAlias` object @@ -1471,6 +1480,27 @@ def run_reclamation_action(self, return response +class ListResourceInstancesEnums: + """ + Enums for list_resource_instances parameters. + """ + + class State(str, Enum): + """ + The state of the instance. If not specified, instances in state `active` and + `provisioning` are returned. + """ + ACTIVE = 'active' + PROVISIONING = 'provisioning' + REMOVED = 'removed' + class OrderDirection(str, Enum): + """ + Order of results. + """ + ASC = 'asc' + DESC = 'desc' + + ############################################################################## # Models ############################################################################## @@ -1908,61 +1938,68 @@ class ResourceAlias(): :attr str guid: (optional) When you create a new alias, a globally unique identifier (GUID) is assigned. This GUID is a unique internal indentifier managed by the resource controller that corresponds to the alias. - :attr str crn: (optional) The full Cloud Resource Name (CRN) associated with the - alias. For more information about this format, see [Cloud Resource - Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). :attr str url: (optional) When you created a new alias, a relative URL path is created identifying the location of the alias. + :attr datetime created_at: (optional) The date when the alias was created. + :attr datetime updated_at: (optional) The date when the alias was last updated. + :attr datetime deleted_at: (optional) The date when the alias was deleted. + :attr str created_by: (optional) The subject who created the alias. + :attr str updated_by: (optional) The subject who updated the alias. + :attr str deleted_by: (optional) The subject who deleted the alias. :attr str name: (optional) The human-readable name of the alias. + :attr str resource_instance_id: (optional) The ID of the resource instance that + is being aliased. + :attr str target_crn: (optional) The CRN of the target namespace in the specific + environment. :attr str account_id: (optional) An alpha-numeric value identifying the account ID. - :attr str resource_group_id: (optional) The short ID of the resource group. - :attr str resource_group_crn: (optional) The long ID (full CRN) of the resource - group. - :attr str target_crn: (optional) The CRN of the target namespace in the specific + :attr str resource_id: (optional) The unique ID of the offering. This value is + provided by and stored in the global catalog. + :attr str resource_group_id: (optional) The ID of the resource group. + :attr str crn: (optional) The CRN of the alias. For more information about this + format, see [Cloud Resource + Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). + :attr str region_instance_id: (optional) The ID of the instance in the specific + target environment, for example, `service_instance_id` in a given IBM Cloud environment. + :attr str region_instance_crn: (optional) The CRN of the instance in the + specific target environment. :attr str state: (optional) The state of the alias. - :attr str resource_instance_id: (optional) The short ID of the resource instance - that is being aliased. - :attr str region_instance_id: (optional) The short ID of the instance in the - specific target environment, e.g. `service_instance_id` in a given IBM Cloud - environment. - :attr str resource_instance_url: (optional) The relative path to the instance. + :attr bool migrated: (optional) A boolean that dictates if the alias was + migrated from a previous CF instance. + :attr str resource_instance_url: (optional) The relative path to the resource + instance. :attr str resource_bindings_url: (optional) The relative path to the resource bindings for the alias. :attr str resource_keys_url: (optional) The relative path to the resource keys for the alias. - :attr datetime created_at: (optional) The date when the alias was created. - :attr datetime updated_at: (optional) The date when the alias was last updated. - :attr datetime deleted_at: (optional) The date when the alias was deleted. - :attr str created_by: (optional) The subject who created the alias. - :attr str updated_by: (optional) The subject who updated the alias. - :attr str deleted_by: (optional) The subject who deleted the alias. """ def __init__(self, *, id: str = None, guid: str = None, - crn: str = None, url: str = None, + created_at: datetime = None, + updated_at: datetime = None, + deleted_at: datetime = None, + created_by: str = None, + updated_by: str = None, + deleted_by: str = None, name: str = None, + resource_instance_id: str = None, + target_crn: str = None, account_id: str = None, + resource_id: str = None, resource_group_id: str = None, - resource_group_crn: str = None, - target_crn: str = None, - state: str = None, - resource_instance_id: str = None, + crn: str = None, region_instance_id: str = None, + region_instance_crn: str = None, + state: str = None, + migrated: bool = None, resource_instance_url: str = None, resource_bindings_url: str = None, - resource_keys_url: str = None, - created_at: datetime = None, - updated_at: datetime = None, - deleted_at: datetime = None, - created_by: str = None, - updated_by: str = None, - deleted_by: str = None) -> None: + resource_keys_url: str = None) -> None: """ Initialize a ResourceAlias object. @@ -1970,61 +2007,66 @@ def __init__(self, :param str guid: (optional) When you create a new alias, a globally unique identifier (GUID) is assigned. This GUID is a unique internal indentifier managed by the resource controller that corresponds to the alias. - :param str crn: (optional) The full Cloud Resource Name (CRN) associated - with the alias. For more information about this format, see [Cloud Resource - Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). :param str url: (optional) When you created a new alias, a relative URL path is created identifying the location of the alias. + :param datetime created_at: (optional) The date when the alias was created. + :param datetime updated_at: (optional) The date when the alias was last + updated. + :param datetime deleted_at: (optional) The date when the alias was deleted. + :param str created_by: (optional) The subject who created the alias. + :param str updated_by: (optional) The subject who updated the alias. + :param str deleted_by: (optional) The subject who deleted the alias. :param str name: (optional) The human-readable name of the alias. - :param str account_id: (optional) An alpha-numeric value identifying the - account ID. - :param str resource_group_id: (optional) The short ID of the resource - group. - :param str resource_group_crn: (optional) The long ID (full CRN) of the - resource group. + :param str resource_instance_id: (optional) The ID of the resource instance + that is being aliased. :param str target_crn: (optional) The CRN of the target namespace in the specific environment. + :param str account_id: (optional) An alpha-numeric value identifying the + account ID. + :param str resource_id: (optional) The unique ID of the offering. This + value is provided by and stored in the global catalog. + :param str resource_group_id: (optional) The ID of the resource group. + :param str crn: (optional) The CRN of the alias. For more information about + this format, see [Cloud Resource + Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). + :param str region_instance_id: (optional) The ID of the instance in the + specific target environment, for example, `service_instance_id` in a given + IBM Cloud environment. + :param str region_instance_crn: (optional) The CRN of the instance in the + specific target environment. :param str state: (optional) The state of the alias. - :param str resource_instance_id: (optional) The short ID of the resource - instance that is being aliased. - :param str region_instance_id: (optional) The short ID of the instance in - the specific target environment, e.g. `service_instance_id` in a given IBM - Cloud environment. + :param bool migrated: (optional) A boolean that dictates if the alias was + migrated from a previous CF instance. :param str resource_instance_url: (optional) The relative path to the - instance. + resource instance. :param str resource_bindings_url: (optional) The relative path to the resource bindings for the alias. :param str resource_keys_url: (optional) The relative path to the resource keys for the alias. - :param datetime created_at: (optional) The date when the alias was created. - :param datetime updated_at: (optional) The date when the alias was last - updated. - :param datetime deleted_at: (optional) The date when the alias was deleted. - :param str created_by: (optional) The subject who created the alias. - :param str updated_by: (optional) The subject who updated the alias. - :param str deleted_by: (optional) The subject who deleted the alias. """ self.id = id self.guid = guid - self.crn = crn self.url = url + self.created_at = created_at + self.updated_at = updated_at + self.deleted_at = deleted_at + self.created_by = created_by + self.updated_by = updated_by + self.deleted_by = deleted_by self.name = name + self.resource_instance_id = resource_instance_id + self.target_crn = target_crn self.account_id = account_id + self.resource_id = resource_id self.resource_group_id = resource_group_id - self.resource_group_crn = resource_group_crn - self.target_crn = target_crn - self.state = state - self.resource_instance_id = resource_instance_id + self.crn = crn self.region_instance_id = region_instance_id + self.region_instance_crn = region_instance_crn + self.state = state + self.migrated = migrated self.resource_instance_url = resource_instance_url self.resource_bindings_url = resource_bindings_url self.resource_keys_url = resource_keys_url - self.created_at = created_at - self.updated_at = updated_at - self.deleted_at = deleted_at - self.created_by = created_by - self.updated_by = updated_by - self.deleted_by = deleted_by @classmethod def from_dict(cls, _dict: Dict) -> 'ResourceAlias': @@ -2034,44 +2076,48 @@ def from_dict(cls, _dict: Dict) -> 'ResourceAlias': args['id'] = _dict.get('id') if 'guid' in _dict: args['guid'] = _dict.get('guid') - if 'crn' in _dict: - args['crn'] = _dict.get('crn') if 'url' in _dict: args['url'] = _dict.get('url') + if 'created_at' in _dict: + args['created_at'] = string_to_datetime(_dict.get('created_at')) + if 'updated_at' in _dict: + args['updated_at'] = string_to_datetime(_dict.get('updated_at')) + if 'deleted_at' in _dict: + args['deleted_at'] = string_to_datetime(_dict.get('deleted_at')) + if 'created_by' in _dict: + args['created_by'] = _dict.get('created_by') + if 'updated_by' in _dict: + args['updated_by'] = _dict.get('updated_by') + if 'deleted_by' in _dict: + args['deleted_by'] = _dict.get('deleted_by') if 'name' in _dict: args['name'] = _dict.get('name') + if 'resource_instance_id' in _dict: + args['resource_instance_id'] = _dict.get('resource_instance_id') + if 'target_crn' in _dict: + args['target_crn'] = _dict.get('target_crn') if 'account_id' in _dict: args['account_id'] = _dict.get('account_id') + if 'resource_id' in _dict: + args['resource_id'] = _dict.get('resource_id') if 'resource_group_id' in _dict: args['resource_group_id'] = _dict.get('resource_group_id') - if 'resource_group_crn' in _dict: - args['resource_group_crn'] = _dict.get('resource_group_crn') - if 'target_crn' in _dict: - args['target_crn'] = _dict.get('target_crn') - if 'state' in _dict: - args['state'] = _dict.get('state') - if 'resource_instance_id' in _dict: - args['resource_instance_id'] = _dict.get('resource_instance_id') + if 'crn' in _dict: + args['crn'] = _dict.get('crn') if 'region_instance_id' in _dict: args['region_instance_id'] = _dict.get('region_instance_id') + if 'region_instance_crn' in _dict: + args['region_instance_crn'] = _dict.get('region_instance_crn') + if 'state' in _dict: + args['state'] = _dict.get('state') + if 'migrated' in _dict: + args['migrated'] = _dict.get('migrated') if 'resource_instance_url' in _dict: args['resource_instance_url'] = _dict.get('resource_instance_url') if 'resource_bindings_url' in _dict: args['resource_bindings_url'] = _dict.get('resource_bindings_url') if 'resource_keys_url' in _dict: args['resource_keys_url'] = _dict.get('resource_keys_url') - if 'created_at' in _dict: - args['created_at'] = string_to_datetime(_dict.get('created_at')) - if 'updated_at' in _dict: - args['updated_at'] = string_to_datetime(_dict.get('updated_at')) - if 'deleted_at' in _dict: - args['deleted_at'] = string_to_datetime(_dict.get('deleted_at')) - if 'created_by' in _dict: - args['created_by'] = _dict.get('created_by') - if 'updated_by' in _dict: - args['updated_by'] = _dict.get('updated_by') - if 'deleted_by' in _dict: - args['deleted_by'] = _dict.get('deleted_by') return cls(**args) @classmethod @@ -2086,44 +2132,48 @@ def to_dict(self) -> Dict: _dict['id'] = self.id if hasattr(self, 'guid') and self.guid is not None: _dict['guid'] = self.guid - if hasattr(self, 'crn') and self.crn is not None: - _dict['crn'] = self.crn if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url + if hasattr(self, 'created_at') and self.created_at is not None: + _dict['created_at'] = datetime_to_string(self.created_at) + if hasattr(self, 'updated_at') and self.updated_at is not None: + _dict['updated_at'] = datetime_to_string(self.updated_at) + if hasattr(self, 'deleted_at') and self.deleted_at is not None: + _dict['deleted_at'] = datetime_to_string(self.deleted_at) + if hasattr(self, 'created_by') and self.created_by is not None: + _dict['created_by'] = self.created_by + if hasattr(self, 'updated_by') and self.updated_by is not None: + _dict['updated_by'] = self.updated_by + if hasattr(self, 'deleted_by') and self.deleted_by is not None: + _dict['deleted_by'] = self.deleted_by if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name + if hasattr(self, 'resource_instance_id') and self.resource_instance_id is not None: + _dict['resource_instance_id'] = self.resource_instance_id + if hasattr(self, 'target_crn') and self.target_crn is not None: + _dict['target_crn'] = self.target_crn if hasattr(self, 'account_id') and self.account_id is not None: _dict['account_id'] = self.account_id + if hasattr(self, 'resource_id') and self.resource_id is not None: + _dict['resource_id'] = self.resource_id if hasattr(self, 'resource_group_id') and self.resource_group_id is not None: _dict['resource_group_id'] = self.resource_group_id - if hasattr(self, 'resource_group_crn') and self.resource_group_crn is not None: - _dict['resource_group_crn'] = self.resource_group_crn - if hasattr(self, 'target_crn') and self.target_crn is not None: - _dict['target_crn'] = self.target_crn - if hasattr(self, 'state') and self.state is not None: - _dict['state'] = self.state - if hasattr(self, 'resource_instance_id') and self.resource_instance_id is not None: - _dict['resource_instance_id'] = self.resource_instance_id + if hasattr(self, 'crn') and self.crn is not None: + _dict['crn'] = self.crn if hasattr(self, 'region_instance_id') and self.region_instance_id is not None: _dict['region_instance_id'] = self.region_instance_id + if hasattr(self, 'region_instance_crn') and self.region_instance_crn is not None: + _dict['region_instance_crn'] = self.region_instance_crn + if hasattr(self, 'state') and self.state is not None: + _dict['state'] = self.state + if hasattr(self, 'migrated') and self.migrated is not None: + _dict['migrated'] = self.migrated if hasattr(self, 'resource_instance_url') and self.resource_instance_url is not None: _dict['resource_instance_url'] = self.resource_instance_url if hasattr(self, 'resource_bindings_url') and self.resource_bindings_url is not None: _dict['resource_bindings_url'] = self.resource_bindings_url if hasattr(self, 'resource_keys_url') and self.resource_keys_url is not None: _dict['resource_keys_url'] = self.resource_keys_url - if hasattr(self, 'created_at') and self.created_at is not None: - _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'updated_at') and self.updated_at is not None: - _dict['updated_at'] = datetime_to_string(self.updated_at) - if hasattr(self, 'deleted_at') and self.deleted_at is not None: - _dict['deleted_at'] = datetime_to_string(self.deleted_at) - if hasattr(self, 'created_by') and self.created_by is not None: - _dict['created_by'] = self.created_by - if hasattr(self, 'updated_by') and self.updated_by is not None: - _dict['updated_by'] = self.updated_by - if hasattr(self, 'deleted_by') and self.deleted_by is not None: - _dict['deleted_by'] = self.deleted_by return _dict def _to_dict(self): @@ -2148,30 +2198,34 @@ class ResourceAliasesList(): """ A list of resource aliases. + :attr int rows_count: The number of resource aliases in `resources`. :attr str next_url: The URL for requesting the next page of results. :attr List[ResourceAlias] resources: A list of resource aliases. - :attr int rows_count: The number of resource aliases in `resources`. """ def __init__(self, + rows_count: int, next_url: str, - resources: List['ResourceAlias'], - rows_count: int) -> None: + resources: List['ResourceAlias']) -> None: """ Initialize a ResourceAliasesList object. + :param int rows_count: The number of resource aliases in `resources`. :param str next_url: The URL for requesting the next page of results. :param List[ResourceAlias] resources: A list of resource aliases. - :param int rows_count: The number of resource aliases in `resources`. """ + self.rows_count = rows_count self.next_url = next_url self.resources = resources - self.rows_count = rows_count @classmethod def from_dict(cls, _dict: Dict) -> 'ResourceAliasesList': """Initialize a ResourceAliasesList object from a json dictionary.""" args = {} + if 'rows_count' in _dict: + args['rows_count'] = _dict.get('rows_count') + else: + raise ValueError('Required property \'rows_count\' not present in ResourceAliasesList JSON') if 'next_url' in _dict: args['next_url'] = _dict.get('next_url') else: @@ -2180,10 +2234,6 @@ def from_dict(cls, _dict: Dict) -> 'ResourceAliasesList': args['resources'] = [ResourceAlias.from_dict(x) for x in _dict.get('resources')] else: raise ValueError('Required property \'resources\' not present in ResourceAliasesList JSON') - if 'rows_count' in _dict: - args['rows_count'] = _dict.get('rows_count') - else: - raise ValueError('Required property \'rows_count\' not present in ResourceAliasesList JSON') return cls(**args) @classmethod @@ -2194,12 +2244,12 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'rows_count') and self.rows_count is not None: + _dict['rows_count'] = self.rows_count if hasattr(self, 'next_url') and self.next_url is not None: _dict['next_url'] = self.next_url if hasattr(self, 'resources') and self.resources is not None: _dict['resources'] = [x.to_dict() for x in self.resources] - if hasattr(self, 'rows_count') and self.rows_count is not None: - _dict['rows_count'] = self.rows_count return _dict def _to_dict(self): @@ -2228,63 +2278,70 @@ class ResourceBinding(): :attr str guid: (optional) When you create a new binding, a globally unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the binding. + :attr str url: (optional) When you provision a new binding, a relative URL path + is created identifying the location of the binding. + :attr datetime created_at: (optional) The date when the binding was created. + :attr datetime updated_at: (optional) The date when the binding was last + updated. + :attr datetime deleted_at: (optional) The date when the binding was deleted. + :attr str created_by: (optional) The subject who created the binding. + :attr str updated_by: (optional) The subject who updated the binding. + :attr str deleted_by: (optional) The subject who deleted the binding. + :attr str source_crn: (optional) The CRN of resource alias associated to the + binding. + :attr str target_crn: (optional) The CRN of target resource, for example, + application, in a specific environment. :attr str crn: (optional) The full Cloud Resource Name (CRN) associated with the binding. For more information about this format, see [Cloud Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). - :attr str url: (optional) When you provision a new binding, a relative URL path - is created identifying the location of the binding. + :attr str region_binding_id: (optional) The ID of the binding in the specific + target environment, for example, `service_binding_id` in a given IBM Cloud + environment. + :attr str region_binding_crn: (optional) The CRN of the binding in the specific + target environment. :attr str name: (optional) The human-readable name of the binding. :attr str account_id: (optional) An alpha-numeric value identifying the account ID. - :attr str resource_group_id: (optional) The short ID of the resource group. - :attr str source_crn: (optional) The CRN of resource alias associated to the - binding. - :attr str target_crn: (optional) The CRN of target resource, e.g. application, - in a specific environment. - :attr str role: (optional) The role CRN. - :attr str region_binding_id: (optional) The short ID of the binding in specific - targeted environment, e.g. `service_binding_id` in a given IBM Cloud - environment. + :attr str resource_group_id: (optional) The ID of the resource group. :attr str state: (optional) The state of the binding. :attr Credentials credentials: (optional) The credentials for the binding. Additional key-value pairs are passed through from the resource brokers. For additional details, see the service’s documentation. :attr bool iam_compatible: (optional) Specifies whether the binding’s credentials support IAM. + :attr str resource_id: (optional) The unique ID of the offering. This value is + provided by and stored in the global catalog. + :attr bool migrated: (optional) A boolean that dictates if the alias was + migrated from a previous CF instance. :attr str resource_alias_url: (optional) The relative path to the resource alias that this binding is associated with. - :attr datetime created_at: (optional) The date when the binding was created. - :attr datetime updated_at: (optional) The date when the binding was last - updated. - :attr datetime deleted_at: (optional) The date when the binding was deleted. - :attr str created_by: (optional) The subject who created the binding. - :attr str updated_by: (optional) The subject who updated the binding. - :attr str deleted_by: (optional) The subject who deleted the binding. """ def __init__(self, *, id: str = None, guid: str = None, - crn: str = None, url: str = None, - name: str = None, - account_id: str = None, - resource_group_id: str = None, + created_at: datetime = None, + updated_at: datetime = None, + deleted_at: datetime = None, + created_by: str = None, + updated_by: str = None, + deleted_by: str = None, source_crn: str = None, target_crn: str = None, - role: str = None, + crn: str = None, region_binding_id: str = None, + region_binding_crn: str = None, + name: str = None, + account_id: str = None, + resource_group_id: str = None, state: str = None, credentials: 'Credentials' = None, iam_compatible: bool = None, - resource_alias_url: str = None, - created_at: datetime = None, - updated_at: datetime = None, - deleted_at: datetime = None, - created_by: str = None, - updated_by: str = None, - deleted_by: str = None) -> None: + resource_id: str = None, + migrated: bool = None, + resource_alias_url: str = None) -> None: """ Initialize a ResourceBinding object. @@ -2293,63 +2350,69 @@ def __init__(self, unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the binding. + :param str url: (optional) When you provision a new binding, a relative URL + path is created identifying the location of the binding. + :param datetime created_at: (optional) The date when the binding was + created. + :param datetime updated_at: (optional) The date when the binding was last + updated. + :param datetime deleted_at: (optional) The date when the binding was + deleted. + :param str created_by: (optional) The subject who created the binding. + :param str updated_by: (optional) The subject who updated the binding. + :param str deleted_by: (optional) The subject who deleted the binding. + :param str source_crn: (optional) The CRN of resource alias associated to + the binding. + :param str target_crn: (optional) The CRN of target resource, for example, + application, in a specific environment. :param str crn: (optional) The full Cloud Resource Name (CRN) associated with the binding. For more information about this format, see [Cloud Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). - :param str url: (optional) When you provision a new binding, a relative URL - path is created identifying the location of the binding. + :param str region_binding_id: (optional) The ID of the binding in the + specific target environment, for example, `service_binding_id` in a given + IBM Cloud environment. + :param str region_binding_crn: (optional) The CRN of the binding in the + specific target environment. :param str name: (optional) The human-readable name of the binding. :param str account_id: (optional) An alpha-numeric value identifying the account ID. - :param str resource_group_id: (optional) The short ID of the resource - group. - :param str source_crn: (optional) The CRN of resource alias associated to - the binding. - :param str target_crn: (optional) The CRN of target resource, e.g. - application, in a specific environment. - :param str role: (optional) The role CRN. - :param str region_binding_id: (optional) The short ID of the binding in - specific targeted environment, e.g. `service_binding_id` in a given IBM - Cloud environment. + :param str resource_group_id: (optional) The ID of the resource group. :param str state: (optional) The state of the binding. :param Credentials credentials: (optional) The credentials for the binding. Additional key-value pairs are passed through from the resource brokers. For additional details, see the service’s documentation. :param bool iam_compatible: (optional) Specifies whether the binding’s credentials support IAM. + :param str resource_id: (optional) The unique ID of the offering. This + value is provided by and stored in the global catalog. + :param bool migrated: (optional) A boolean that dictates if the alias was + migrated from a previous CF instance. :param str resource_alias_url: (optional) The relative path to the resource alias that this binding is associated with. - :param datetime created_at: (optional) The date when the binding was - created. - :param datetime updated_at: (optional) The date when the binding was last - updated. - :param datetime deleted_at: (optional) The date when the binding was - deleted. - :param str created_by: (optional) The subject who created the binding. - :param str updated_by: (optional) The subject who updated the binding. - :param str deleted_by: (optional) The subject who deleted the binding. """ self.id = id self.guid = guid - self.crn = crn self.url = url - self.name = name - self.account_id = account_id - self.resource_group_id = resource_group_id + self.created_at = created_at + self.updated_at = updated_at + self.deleted_at = deleted_at + self.created_by = created_by + self.updated_by = updated_by + self.deleted_by = deleted_by self.source_crn = source_crn self.target_crn = target_crn - self.role = role + self.crn = crn self.region_binding_id = region_binding_id + self.region_binding_crn = region_binding_crn + self.name = name + self.account_id = account_id + self.resource_group_id = resource_group_id self.state = state self.credentials = credentials self.iam_compatible = iam_compatible + self.resource_id = resource_id + self.migrated = migrated self.resource_alias_url = resource_alias_url - self.created_at = created_at - self.updated_at = updated_at - self.deleted_at = deleted_at - self.created_by = created_by - self.updated_by = updated_by - self.deleted_by = deleted_by @classmethod def from_dict(cls, _dict: Dict) -> 'ResourceBinding': @@ -2359,44 +2422,48 @@ def from_dict(cls, _dict: Dict) -> 'ResourceBinding': args['id'] = _dict.get('id') if 'guid' in _dict: args['guid'] = _dict.get('guid') - if 'crn' in _dict: - args['crn'] = _dict.get('crn') if 'url' in _dict: args['url'] = _dict.get('url') - if 'name' in _dict: - args['name'] = _dict.get('name') - if 'account_id' in _dict: - args['account_id'] = _dict.get('account_id') - if 'resource_group_id' in _dict: - args['resource_group_id'] = _dict.get('resource_group_id') + if 'created_at' in _dict: + args['created_at'] = string_to_datetime(_dict.get('created_at')) + if 'updated_at' in _dict: + args['updated_at'] = string_to_datetime(_dict.get('updated_at')) + if 'deleted_at' in _dict: + args['deleted_at'] = string_to_datetime(_dict.get('deleted_at')) + if 'created_by' in _dict: + args['created_by'] = _dict.get('created_by') + if 'updated_by' in _dict: + args['updated_by'] = _dict.get('updated_by') + if 'deleted_by' in _dict: + args['deleted_by'] = _dict.get('deleted_by') if 'source_crn' in _dict: args['source_crn'] = _dict.get('source_crn') if 'target_crn' in _dict: args['target_crn'] = _dict.get('target_crn') - if 'role' in _dict: - args['role'] = _dict.get('role') + if 'crn' in _dict: + args['crn'] = _dict.get('crn') if 'region_binding_id' in _dict: args['region_binding_id'] = _dict.get('region_binding_id') + if 'region_binding_crn' in _dict: + args['region_binding_crn'] = _dict.get('region_binding_crn') + if 'name' in _dict: + args['name'] = _dict.get('name') + if 'account_id' in _dict: + args['account_id'] = _dict.get('account_id') + if 'resource_group_id' in _dict: + args['resource_group_id'] = _dict.get('resource_group_id') if 'state' in _dict: args['state'] = _dict.get('state') if 'credentials' in _dict: args['credentials'] = Credentials.from_dict(_dict.get('credentials')) if 'iam_compatible' in _dict: args['iam_compatible'] = _dict.get('iam_compatible') + if 'resource_id' in _dict: + args['resource_id'] = _dict.get('resource_id') + if 'migrated' in _dict: + args['migrated'] = _dict.get('migrated') if 'resource_alias_url' in _dict: args['resource_alias_url'] = _dict.get('resource_alias_url') - if 'created_at' in _dict: - args['created_at'] = string_to_datetime(_dict.get('created_at')) - if 'updated_at' in _dict: - args['updated_at'] = string_to_datetime(_dict.get('updated_at')) - if 'deleted_at' in _dict: - args['deleted_at'] = string_to_datetime(_dict.get('deleted_at')) - if 'created_by' in _dict: - args['created_by'] = _dict.get('created_by') - if 'updated_by' in _dict: - args['updated_by'] = _dict.get('updated_by') - if 'deleted_by' in _dict: - args['deleted_by'] = _dict.get('deleted_by') return cls(**args) @classmethod @@ -2411,44 +2478,48 @@ def to_dict(self) -> Dict: _dict['id'] = self.id if hasattr(self, 'guid') and self.guid is not None: _dict['guid'] = self.guid - if hasattr(self, 'crn') and self.crn is not None: - _dict['crn'] = self.crn if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url - if hasattr(self, 'name') and self.name is not None: - _dict['name'] = self.name - if hasattr(self, 'account_id') and self.account_id is not None: - _dict['account_id'] = self.account_id - if hasattr(self, 'resource_group_id') and self.resource_group_id is not None: - _dict['resource_group_id'] = self.resource_group_id + if hasattr(self, 'created_at') and self.created_at is not None: + _dict['created_at'] = datetime_to_string(self.created_at) + if hasattr(self, 'updated_at') and self.updated_at is not None: + _dict['updated_at'] = datetime_to_string(self.updated_at) + if hasattr(self, 'deleted_at') and self.deleted_at is not None: + _dict['deleted_at'] = datetime_to_string(self.deleted_at) + if hasattr(self, 'created_by') and self.created_by is not None: + _dict['created_by'] = self.created_by + if hasattr(self, 'updated_by') and self.updated_by is not None: + _dict['updated_by'] = self.updated_by + if hasattr(self, 'deleted_by') and self.deleted_by is not None: + _dict['deleted_by'] = self.deleted_by if hasattr(self, 'source_crn') and self.source_crn is not None: _dict['source_crn'] = self.source_crn if hasattr(self, 'target_crn') and self.target_crn is not None: _dict['target_crn'] = self.target_crn - if hasattr(self, 'role') and self.role is not None: - _dict['role'] = self.role + if hasattr(self, 'crn') and self.crn is not None: + _dict['crn'] = self.crn if hasattr(self, 'region_binding_id') and self.region_binding_id is not None: _dict['region_binding_id'] = self.region_binding_id + if hasattr(self, 'region_binding_crn') and self.region_binding_crn is not None: + _dict['region_binding_crn'] = self.region_binding_crn + if hasattr(self, 'name') and self.name is not None: + _dict['name'] = self.name + if hasattr(self, 'account_id') and self.account_id is not None: + _dict['account_id'] = self.account_id + if hasattr(self, 'resource_group_id') and self.resource_group_id is not None: + _dict['resource_group_id'] = self.resource_group_id if hasattr(self, 'state') and self.state is not None: _dict['state'] = self.state if hasattr(self, 'credentials') and self.credentials is not None: _dict['credentials'] = self.credentials.to_dict() if hasattr(self, 'iam_compatible') and self.iam_compatible is not None: _dict['iam_compatible'] = self.iam_compatible + if hasattr(self, 'resource_id') and self.resource_id is not None: + _dict['resource_id'] = self.resource_id + if hasattr(self, 'migrated') and self.migrated is not None: + _dict['migrated'] = self.migrated if hasattr(self, 'resource_alias_url') and self.resource_alias_url is not None: _dict['resource_alias_url'] = self.resource_alias_url - if hasattr(self, 'created_at') and self.created_at is not None: - _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'updated_at') and self.updated_at is not None: - _dict['updated_at'] = datetime_to_string(self.updated_at) - if hasattr(self, 'deleted_at') and self.deleted_at is not None: - _dict['deleted_at'] = datetime_to_string(self.deleted_at) - if hasattr(self, 'created_by') and self.created_by is not None: - _dict['created_by'] = self.created_by - if hasattr(self, 'updated_by') and self.updated_by is not None: - _dict['updated_by'] = self.updated_by - if hasattr(self, 'deleted_by') and self.deleted_by is not None: - _dict['deleted_by'] = self.deleted_by return _dict def _to_dict(self): @@ -2543,30 +2614,34 @@ class ResourceBindingsList(): """ A list of resource bindings. + :attr int rows_count: The number of resource bindings in `resources`. :attr str next_url: The URL for requesting the next page of results. :attr List[ResourceBinding] resources: A list of resource bindings. - :attr int rows_count: The number of resource bindings in `resources`. """ def __init__(self, + rows_count: int, next_url: str, - resources: List['ResourceBinding'], - rows_count: int) -> None: + resources: List['ResourceBinding']) -> None: """ Initialize a ResourceBindingsList object. + :param int rows_count: The number of resource bindings in `resources`. :param str next_url: The URL for requesting the next page of results. :param List[ResourceBinding] resources: A list of resource bindings. - :param int rows_count: The number of resource bindings in `resources`. """ + self.rows_count = rows_count self.next_url = next_url self.resources = resources - self.rows_count = rows_count @classmethod def from_dict(cls, _dict: Dict) -> 'ResourceBindingsList': """Initialize a ResourceBindingsList object from a json dictionary.""" args = {} + if 'rows_count' in _dict: + args['rows_count'] = _dict.get('rows_count') + else: + raise ValueError('Required property \'rows_count\' not present in ResourceBindingsList JSON') if 'next_url' in _dict: args['next_url'] = _dict.get('next_url') else: @@ -2575,10 +2650,6 @@ def from_dict(cls, _dict: Dict) -> 'ResourceBindingsList': args['resources'] = [ResourceBinding.from_dict(x) for x in _dict.get('resources')] else: raise ValueError('Required property \'resources\' not present in ResourceBindingsList JSON') - if 'rows_count' in _dict: - args['rows_count'] = _dict.get('rows_count') - else: - raise ValueError('Required property \'rows_count\' not present in ResourceBindingsList JSON') return cls(**args) @classmethod @@ -2589,12 +2660,12 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'rows_count') and self.rows_count is not None: + _dict['rows_count'] = self.rows_count if hasattr(self, 'next_url') and self.next_url is not None: _dict['next_url'] = self.next_url if hasattr(self, 'resources') and self.resources is not None: _dict['resources'] = [x.to_dict() for x in self.resources] - if hasattr(self, 'rows_count') and self.rows_count is not None: - _dict['rows_count'] = self.rows_count return _dict def _to_dict(self): @@ -2623,102 +2694,114 @@ class ResourceInstance(): :attr str guid: (optional) When you create a new resource, a globally unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the instance. - :attr str crn: (optional) The full Cloud Resource Name (CRN) associated with the - instance. For more information about this format, see [Cloud Resource - Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). :attr str url: (optional) When you provision a new resource, a relative URL path is created identifying the location of the instance. + :attr datetime created_at: (optional) The date when the instance was created. + :attr datetime updated_at: (optional) The date when the instance was last + updated. + :attr datetime deleted_at: (optional) The date when the instance was deleted. + :attr str created_by: (optional) The subject who created the instance. + :attr str updated_by: (optional) The subject who updated the instance. + :attr str deleted_by: (optional) The subject who deleted the instance. + :attr datetime scheduled_reclaim_at: (optional) The date when the instance was + scheduled for reclamation. + :attr datetime restored_at: (optional) The date when the instance under + reclamation was restored. + :attr str restored_by: (optional) The subject who restored the instance back + from reclamation. + :attr str scheduled_reclaim_by: (optional) The subject who initiated the + instance reclamation. :attr str name: (optional) The human-readable name of the instance. + :attr str region_id: (optional) The deployment location where the instance was + provisioned. :attr str account_id: (optional) An alpha-numeric value identifying the account ID. - :attr str resource_group_id: (optional) The short ID of the resource group. - :attr str resource_group_crn: (optional) The long ID (full CRN) of the resource - group. - :attr str resource_id: (optional) The unique ID of the offering. This value is - provided by and stored in the global catalog. + :attr str reseller_channel_id: (optional) The unique ID of the reseller channel + where the instance was provisioned from. :attr str resource_plan_id: (optional) The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. - :attr str target_crn: (optional) The full deployment CRN as defined in the - global catalog. The Cloud Resource Name (CRN) of the deployment location where - the instance is provisioned. + :attr str resource_group_id: (optional) The ID of the resource group. + :attr str resource_group_crn: (optional) The CRN of the resource group. + :attr str target_crn: (optional) The deployment CRN as defined in the global + catalog. The Cloud Resource Name (CRN) of the deployment location where the + instance is provisioned. :attr dict parameters: (optional) The current configuration parameters of the instance. - :attr str state: (optional) The current state of the instance. For example, if - the instance is deleted, it will return removed. - :attr str type: (optional) The type of the instance, e.g. `service_instance`. - :attr str sub_type: (optional) The sub-type of instance, e.g. `cfaas`. :attr bool allow_cleanup: (optional) A boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a region instance delete call. - :attr bool locked: (optional) A boolean that dictates if the resource instance - is locked or not. - :attr dict last_operation: (optional) The status of the last operation requested - on the instance. + :attr str crn: (optional) The full Cloud Resource Name (CRN) associated with the + instance. For more information about this format, see [Cloud Resource + Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). + :attr str state: (optional) The current state of the instance. For example, if + the instance is deleted, it will return removed. + :attr str type: (optional) The type of the instance, for example, + `service_instance`. + :attr str sub_type: (optional) The sub-type of instance, for example, `cfaas`. + :attr str resource_id: (optional) The unique ID of the offering. This value is + provided by and stored in the global catalog. :attr str dashboard_url: (optional) The resource-broker-provided URL to access administrative features of the instance. - :attr List[PlanHistoryItem] plan_history: (optional) The plan history of the - instance. - :attr dict extensions: (optional) Additional instance properties, contributed by - the service and/or platform, are represented as key-value pairs. + :attr dict last_operation: (optional) The status of the last operation requested + on the instance. :attr str resource_aliases_url: (optional) The relative path to the resource aliases for the instance. :attr str resource_bindings_url: (optional) The relative path to the resource bindings for the instance. :attr str resource_keys_url: (optional) The relative path to the resource keys for the instance. - :attr datetime created_at: (optional) The date when the instance was created. - :attr str created_by: (optional) The subject who created the instance. - :attr datetime updated_at: (optional) The date when the instance was last - updated. - :attr str updated_by: (optional) The subject who updated the instance. - :attr datetime deleted_at: (optional) The date when the instance was deleted. - :attr str deleted_by: (optional) The subject who deleted the instance. - :attr datetime scheduled_reclaim_at: (optional) The date when the instance was - scheduled for reclamation. - :attr str scheduled_reclaim_by: (optional) The subject who initiated the - instance reclamation. - :attr datetime restored_at: (optional) The date when the instance under - reclamation was restored. - :attr str restored_by: (optional) The subject who restored the instance back - from reclamation. + :attr List[PlanHistoryItem] plan_history: (optional) The plan history of the + instance. + :attr bool migrated: (optional) A boolean that dictates if the resource instance + was migrated from a previous CF instance. + :attr dict extensions: (optional) Additional instance properties, contributed by + the service and/or platform, are represented as key-value pairs. + :attr str controlled_by: (optional) The CRN of the resource that has control of + the instance. + :attr bool locked: (optional) A boolean that dictates if the resource instance + is locked or not. """ def __init__(self, *, id: str = None, guid: str = None, - crn: str = None, url: str = None, + created_at: datetime = None, + updated_at: datetime = None, + deleted_at: datetime = None, + created_by: str = None, + updated_by: str = None, + deleted_by: str = None, + scheduled_reclaim_at: datetime = None, + restored_at: datetime = None, + restored_by: str = None, + scheduled_reclaim_by: str = None, name: str = None, + region_id: str = None, account_id: str = None, + reseller_channel_id: str = None, + resource_plan_id: str = None, resource_group_id: str = None, resource_group_crn: str = None, - resource_id: str = None, - resource_plan_id: str = None, target_crn: str = None, parameters: dict = None, + allow_cleanup: bool = None, + crn: str = None, state: str = None, type: str = None, sub_type: str = None, - allow_cleanup: bool = None, - locked: bool = None, - last_operation: dict = None, + resource_id: str = None, dashboard_url: str = None, - plan_history: List['PlanHistoryItem'] = None, - extensions: dict = None, + last_operation: dict = None, resource_aliases_url: str = None, resource_bindings_url: str = None, resource_keys_url: str = None, - created_at: datetime = None, - created_by: str = None, - updated_at: datetime = None, - updated_by: str = None, - deleted_at: datetime = None, - deleted_by: str = None, - scheduled_reclaim_at: datetime = None, - scheduled_reclaim_by: str = None, - restored_at: datetime = None, - restored_by: str = None) -> None: + plan_history: List['PlanHistoryItem'] = None, + migrated: bool = None, + extensions: dict = None, + controlled_by: str = None, + locked: bool = None) -> None: """ Initialize a ResourceInstance object. @@ -2727,105 +2810,116 @@ def __init__(self, unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the instance. - :param str crn: (optional) The full Cloud Resource Name (CRN) associated - with the instance. For more information about this format, see [Cloud - Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). :param str url: (optional) When you provision a new resource, a relative URL path is created identifying the location of the instance. + :param datetime created_at: (optional) The date when the instance was + created. + :param datetime updated_at: (optional) The date when the instance was last + updated. + :param datetime deleted_at: (optional) The date when the instance was + deleted. + :param str created_by: (optional) The subject who created the instance. + :param str updated_by: (optional) The subject who updated the instance. + :param str deleted_by: (optional) The subject who deleted the instance. + :param datetime scheduled_reclaim_at: (optional) The date when the instance + was scheduled for reclamation. + :param datetime restored_at: (optional) The date when the instance under + reclamation was restored. + :param str restored_by: (optional) The subject who restored the instance + back from reclamation. + :param str scheduled_reclaim_by: (optional) The subject who initiated the + instance reclamation. :param str name: (optional) The human-readable name of the instance. + :param str region_id: (optional) The deployment location where the instance + was provisioned. :param str account_id: (optional) An alpha-numeric value identifying the account ID. - :param str resource_group_id: (optional) The short ID of the resource - group. - :param str resource_group_crn: (optional) The long ID (full CRN) of the - resource group. - :param str resource_id: (optional) The unique ID of the offering. This - value is provided by and stored in the global catalog. + :param str reseller_channel_id: (optional) The unique ID of the reseller + channel where the instance was provisioned from. :param str resource_plan_id: (optional) The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. - :param str target_crn: (optional) The full deployment CRN as defined in the + :param str resource_group_id: (optional) The ID of the resource group. + :param str resource_group_crn: (optional) The CRN of the resource group. + :param str target_crn: (optional) The deployment CRN as defined in the global catalog. The Cloud Resource Name (CRN) of the deployment location where the instance is provisioned. :param dict parameters: (optional) The current configuration parameters of the instance. - :param str state: (optional) The current state of the instance. For - example, if the instance is deleted, it will return removed. - :param str type: (optional) The type of the instance, e.g. - `service_instance`. - :param str sub_type: (optional) The sub-type of instance, e.g. `cfaas`. :param bool allow_cleanup: (optional) A boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a region instance delete call. - :param bool locked: (optional) A boolean that dictates if the resource - instance is locked or not. - :param dict last_operation: (optional) The status of the last operation - requested on the instance. + :param str crn: (optional) The full Cloud Resource Name (CRN) associated + with the instance. For more information about this format, see [Cloud + Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). + :param str state: (optional) The current state of the instance. For + example, if the instance is deleted, it will return removed. + :param str type: (optional) The type of the instance, for example, + `service_instance`. + :param str sub_type: (optional) The sub-type of instance, for example, + `cfaas`. + :param str resource_id: (optional) The unique ID of the offering. This + value is provided by and stored in the global catalog. :param str dashboard_url: (optional) The resource-broker-provided URL to access administrative features of the instance. - :param List[PlanHistoryItem] plan_history: (optional) The plan history of - the instance. - :param dict extensions: (optional) Additional instance properties, - contributed by the service and/or platform, are represented as key-value - pairs. + :param dict last_operation: (optional) The status of the last operation + requested on the instance. :param str resource_aliases_url: (optional) The relative path to the resource aliases for the instance. :param str resource_bindings_url: (optional) The relative path to the resource bindings for the instance. :param str resource_keys_url: (optional) The relative path to the resource keys for the instance. - :param datetime created_at: (optional) The date when the instance was - created. - :param str created_by: (optional) The subject who created the instance. - :param datetime updated_at: (optional) The date when the instance was last - updated. - :param str updated_by: (optional) The subject who updated the instance. - :param datetime deleted_at: (optional) The date when the instance was - deleted. - :param str deleted_by: (optional) The subject who deleted the instance. - :param datetime scheduled_reclaim_at: (optional) The date when the instance - was scheduled for reclamation. - :param str scheduled_reclaim_by: (optional) The subject who initiated the - instance reclamation. - :param datetime restored_at: (optional) The date when the instance under - reclamation was restored. - :param str restored_by: (optional) The subject who restored the instance - back from reclamation. + :param List[PlanHistoryItem] plan_history: (optional) The plan history of + the instance. + :param bool migrated: (optional) A boolean that dictates if the resource + instance was migrated from a previous CF instance. + :param dict extensions: (optional) Additional instance properties, + contributed by the service and/or platform, are represented as key-value + pairs. + :param str controlled_by: (optional) The CRN of the resource that has + control of the instance. + :param bool locked: (optional) A boolean that dictates if the resource + instance is locked or not. """ self.id = id self.guid = guid - self.crn = crn self.url = url + self.created_at = created_at + self.updated_at = updated_at + self.deleted_at = deleted_at + self.created_by = created_by + self.updated_by = updated_by + self.deleted_by = deleted_by + self.scheduled_reclaim_at = scheduled_reclaim_at + self.restored_at = restored_at + self.restored_by = restored_by + self.scheduled_reclaim_by = scheduled_reclaim_by self.name = name + self.region_id = region_id self.account_id = account_id + self.reseller_channel_id = reseller_channel_id + self.resource_plan_id = resource_plan_id self.resource_group_id = resource_group_id self.resource_group_crn = resource_group_crn - self.resource_id = resource_id - self.resource_plan_id = resource_plan_id self.target_crn = target_crn self.parameters = parameters + self.allow_cleanup = allow_cleanup + self.crn = crn self.state = state self.type = type self.sub_type = sub_type - self.allow_cleanup = allow_cleanup - self.locked = locked - self.last_operation = last_operation + self.resource_id = resource_id self.dashboard_url = dashboard_url - self.plan_history = plan_history - self.extensions = extensions + self.last_operation = last_operation self.resource_aliases_url = resource_aliases_url self.resource_bindings_url = resource_bindings_url self.resource_keys_url = resource_keys_url - self.created_at = created_at - self.created_by = created_by - self.updated_at = updated_at - self.updated_by = updated_by - self.deleted_at = deleted_at - self.deleted_by = deleted_by - self.scheduled_reclaim_at = scheduled_reclaim_at - self.scheduled_reclaim_by = scheduled_reclaim_by - self.restored_at = restored_at - self.restored_by = restored_by + self.plan_history = plan_history + self.migrated = migrated + self.extensions = extensions + self.controlled_by = controlled_by + self.locked = locked @classmethod def from_dict(cls, _dict: Dict) -> 'ResourceInstance': @@ -2835,70 +2929,78 @@ def from_dict(cls, _dict: Dict) -> 'ResourceInstance': args['id'] = _dict.get('id') if 'guid' in _dict: args['guid'] = _dict.get('guid') - if 'crn' in _dict: - args['crn'] = _dict.get('crn') if 'url' in _dict: args['url'] = _dict.get('url') + if 'created_at' in _dict: + args['created_at'] = string_to_datetime(_dict.get('created_at')) + if 'updated_at' in _dict: + args['updated_at'] = string_to_datetime(_dict.get('updated_at')) + if 'deleted_at' in _dict: + args['deleted_at'] = string_to_datetime(_dict.get('deleted_at')) + if 'created_by' in _dict: + args['created_by'] = _dict.get('created_by') + if 'updated_by' in _dict: + args['updated_by'] = _dict.get('updated_by') + if 'deleted_by' in _dict: + args['deleted_by'] = _dict.get('deleted_by') + if 'scheduled_reclaim_at' in _dict: + args['scheduled_reclaim_at'] = string_to_datetime(_dict.get('scheduled_reclaim_at')) + if 'restored_at' in _dict: + args['restored_at'] = string_to_datetime(_dict.get('restored_at')) + if 'restored_by' in _dict: + args['restored_by'] = _dict.get('restored_by') + if 'scheduled_reclaim_by' in _dict: + args['scheduled_reclaim_by'] = _dict.get('scheduled_reclaim_by') if 'name' in _dict: args['name'] = _dict.get('name') + if 'region_id' in _dict: + args['region_id'] = _dict.get('region_id') if 'account_id' in _dict: args['account_id'] = _dict.get('account_id') + if 'reseller_channel_id' in _dict: + args['reseller_channel_id'] = _dict.get('reseller_channel_id') + if 'resource_plan_id' in _dict: + args['resource_plan_id'] = _dict.get('resource_plan_id') if 'resource_group_id' in _dict: args['resource_group_id'] = _dict.get('resource_group_id') if 'resource_group_crn' in _dict: args['resource_group_crn'] = _dict.get('resource_group_crn') - if 'resource_id' in _dict: - args['resource_id'] = _dict.get('resource_id') - if 'resource_plan_id' in _dict: - args['resource_plan_id'] = _dict.get('resource_plan_id') if 'target_crn' in _dict: args['target_crn'] = _dict.get('target_crn') if 'parameters' in _dict: args['parameters'] = _dict.get('parameters') + if 'allow_cleanup' in _dict: + args['allow_cleanup'] = _dict.get('allow_cleanup') + if 'crn' in _dict: + args['crn'] = _dict.get('crn') if 'state' in _dict: args['state'] = _dict.get('state') if 'type' in _dict: args['type'] = _dict.get('type') if 'sub_type' in _dict: args['sub_type'] = _dict.get('sub_type') - if 'allow_cleanup' in _dict: - args['allow_cleanup'] = _dict.get('allow_cleanup') - if 'locked' in _dict: - args['locked'] = _dict.get('locked') - if 'last_operation' in _dict: - args['last_operation'] = _dict.get('last_operation') + if 'resource_id' in _dict: + args['resource_id'] = _dict.get('resource_id') if 'dashboard_url' in _dict: args['dashboard_url'] = _dict.get('dashboard_url') - if 'plan_history' in _dict: - args['plan_history'] = [PlanHistoryItem.from_dict(x) for x in _dict.get('plan_history')] - if 'extensions' in _dict: - args['extensions'] = _dict.get('extensions') + if 'last_operation' in _dict: + args['last_operation'] = _dict.get('last_operation') if 'resource_aliases_url' in _dict: args['resource_aliases_url'] = _dict.get('resource_aliases_url') if 'resource_bindings_url' in _dict: args['resource_bindings_url'] = _dict.get('resource_bindings_url') if 'resource_keys_url' in _dict: args['resource_keys_url'] = _dict.get('resource_keys_url') - if 'created_at' in _dict: - args['created_at'] = string_to_datetime(_dict.get('created_at')) - if 'created_by' in _dict: - args['created_by'] = _dict.get('created_by') - if 'updated_at' in _dict: - args['updated_at'] = string_to_datetime(_dict.get('updated_at')) - if 'updated_by' in _dict: - args['updated_by'] = _dict.get('updated_by') - if 'deleted_at' in _dict: - args['deleted_at'] = string_to_datetime(_dict.get('deleted_at')) - if 'deleted_by' in _dict: - args['deleted_by'] = _dict.get('deleted_by') - if 'scheduled_reclaim_at' in _dict: - args['scheduled_reclaim_at'] = string_to_datetime(_dict.get('scheduled_reclaim_at')) - if 'scheduled_reclaim_by' in _dict: - args['scheduled_reclaim_by'] = _dict.get('scheduled_reclaim_by') - if 'restored_at' in _dict: - args['restored_at'] = string_to_datetime(_dict.get('restored_at')) - if 'restored_by' in _dict: - args['restored_by'] = _dict.get('restored_by') + if 'plan_history' in _dict: + args['plan_history'] = [PlanHistoryItem.from_dict(x) for x in _dict.get('plan_history')] + if 'migrated' in _dict: + args['migrated'] = _dict.get('migrated') + if 'extensions' in _dict: + args['extensions'] = _dict.get('extensions') + if 'controlled_by' in _dict: + args['controlled_by'] = _dict.get('controlled_by') + if 'locked' in _dict: + args['locked'] = _dict.get('locked') return cls(**args) @classmethod @@ -2913,70 +3015,78 @@ def to_dict(self) -> Dict: _dict['id'] = self.id if hasattr(self, 'guid') and self.guid is not None: _dict['guid'] = self.guid - if hasattr(self, 'crn') and self.crn is not None: - _dict['crn'] = self.crn if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url + if hasattr(self, 'created_at') and self.created_at is not None: + _dict['created_at'] = datetime_to_string(self.created_at) + if hasattr(self, 'updated_at') and self.updated_at is not None: + _dict['updated_at'] = datetime_to_string(self.updated_at) + if hasattr(self, 'deleted_at') and self.deleted_at is not None: + _dict['deleted_at'] = datetime_to_string(self.deleted_at) + if hasattr(self, 'created_by') and self.created_by is not None: + _dict['created_by'] = self.created_by + if hasattr(self, 'updated_by') and self.updated_by is not None: + _dict['updated_by'] = self.updated_by + if hasattr(self, 'deleted_by') and self.deleted_by is not None: + _dict['deleted_by'] = self.deleted_by + if hasattr(self, 'scheduled_reclaim_at') and self.scheduled_reclaim_at is not None: + _dict['scheduled_reclaim_at'] = datetime_to_string(self.scheduled_reclaim_at) + if hasattr(self, 'restored_at') and self.restored_at is not None: + _dict['restored_at'] = datetime_to_string(self.restored_at) + if hasattr(self, 'restored_by') and self.restored_by is not None: + _dict['restored_by'] = self.restored_by + if hasattr(self, 'scheduled_reclaim_by') and self.scheduled_reclaim_by is not None: + _dict['scheduled_reclaim_by'] = self.scheduled_reclaim_by if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name + if hasattr(self, 'region_id') and self.region_id is not None: + _dict['region_id'] = self.region_id if hasattr(self, 'account_id') and self.account_id is not None: _dict['account_id'] = self.account_id + if hasattr(self, 'reseller_channel_id') and self.reseller_channel_id is not None: + _dict['reseller_channel_id'] = self.reseller_channel_id + if hasattr(self, 'resource_plan_id') and self.resource_plan_id is not None: + _dict['resource_plan_id'] = self.resource_plan_id if hasattr(self, 'resource_group_id') and self.resource_group_id is not None: _dict['resource_group_id'] = self.resource_group_id if hasattr(self, 'resource_group_crn') and self.resource_group_crn is not None: _dict['resource_group_crn'] = self.resource_group_crn - if hasattr(self, 'resource_id') and self.resource_id is not None: - _dict['resource_id'] = self.resource_id - if hasattr(self, 'resource_plan_id') and self.resource_plan_id is not None: - _dict['resource_plan_id'] = self.resource_plan_id if hasattr(self, 'target_crn') and self.target_crn is not None: _dict['target_crn'] = self.target_crn if hasattr(self, 'parameters') and self.parameters is not None: _dict['parameters'] = self.parameters + if hasattr(self, 'allow_cleanup') and self.allow_cleanup is not None: + _dict['allow_cleanup'] = self.allow_cleanup + if hasattr(self, 'crn') and self.crn is not None: + _dict['crn'] = self.crn if hasattr(self, 'state') and self.state is not None: _dict['state'] = self.state if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'sub_type') and self.sub_type is not None: _dict['sub_type'] = self.sub_type - if hasattr(self, 'allow_cleanup') and self.allow_cleanup is not None: - _dict['allow_cleanup'] = self.allow_cleanup - if hasattr(self, 'locked') and self.locked is not None: - _dict['locked'] = self.locked - if hasattr(self, 'last_operation') and self.last_operation is not None: - _dict['last_operation'] = self.last_operation + if hasattr(self, 'resource_id') and self.resource_id is not None: + _dict['resource_id'] = self.resource_id if hasattr(self, 'dashboard_url') and self.dashboard_url is not None: _dict['dashboard_url'] = self.dashboard_url - if hasattr(self, 'plan_history') and self.plan_history is not None: - _dict['plan_history'] = [x.to_dict() for x in self.plan_history] - if hasattr(self, 'extensions') and self.extensions is not None: - _dict['extensions'] = self.extensions + if hasattr(self, 'last_operation') and self.last_operation is not None: + _dict['last_operation'] = self.last_operation if hasattr(self, 'resource_aliases_url') and self.resource_aliases_url is not None: _dict['resource_aliases_url'] = self.resource_aliases_url if hasattr(self, 'resource_bindings_url') and self.resource_bindings_url is not None: _dict['resource_bindings_url'] = self.resource_bindings_url if hasattr(self, 'resource_keys_url') and self.resource_keys_url is not None: _dict['resource_keys_url'] = self.resource_keys_url - if hasattr(self, 'created_at') and self.created_at is not None: - _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'created_by') and self.created_by is not None: - _dict['created_by'] = self.created_by - if hasattr(self, 'updated_at') and self.updated_at is not None: - _dict['updated_at'] = datetime_to_string(self.updated_at) - if hasattr(self, 'updated_by') and self.updated_by is not None: - _dict['updated_by'] = self.updated_by - if hasattr(self, 'deleted_at') and self.deleted_at is not None: - _dict['deleted_at'] = datetime_to_string(self.deleted_at) - if hasattr(self, 'deleted_by') and self.deleted_by is not None: - _dict['deleted_by'] = self.deleted_by - if hasattr(self, 'scheduled_reclaim_at') and self.scheduled_reclaim_at is not None: - _dict['scheduled_reclaim_at'] = datetime_to_string(self.scheduled_reclaim_at) - if hasattr(self, 'scheduled_reclaim_by') and self.scheduled_reclaim_by is not None: - _dict['scheduled_reclaim_by'] = self.scheduled_reclaim_by - if hasattr(self, 'restored_at') and self.restored_at is not None: - _dict['restored_at'] = datetime_to_string(self.restored_at) - if hasattr(self, 'restored_by') and self.restored_by is not None: - _dict['restored_by'] = self.restored_by + if hasattr(self, 'plan_history') and self.plan_history is not None: + _dict['plan_history'] = [x.to_dict() for x in self.plan_history] + if hasattr(self, 'migrated') and self.migrated is not None: + _dict['migrated'] = self.migrated + if hasattr(self, 'extensions') and self.extensions is not None: + _dict['extensions'] = self.extensions + if hasattr(self, 'controlled_by') and self.controlled_by is not None: + _dict['controlled_by'] = self.controlled_by + if hasattr(self, 'locked') and self.locked is not None: + _dict['locked'] = self.locked return _dict def _to_dict(self): @@ -3001,30 +3111,34 @@ class ResourceInstancesList(): """ A list of resource instances. + :attr int rows_count: The number of resource instances in `resources`. :attr str next_url: The URL for requesting the next page of results. :attr List[ResourceInstance] resources: A list of resource instances. - :attr int rows_count: The number of resource instances in `resources`. """ def __init__(self, + rows_count: int, next_url: str, - resources: List['ResourceInstance'], - rows_count: int) -> None: + resources: List['ResourceInstance']) -> None: """ Initialize a ResourceInstancesList object. + :param int rows_count: The number of resource instances in `resources`. :param str next_url: The URL for requesting the next page of results. :param List[ResourceInstance] resources: A list of resource instances. - :param int rows_count: The number of resource instances in `resources`. """ + self.rows_count = rows_count self.next_url = next_url self.resources = resources - self.rows_count = rows_count @classmethod def from_dict(cls, _dict: Dict) -> 'ResourceInstancesList': """Initialize a ResourceInstancesList object from a json dictionary.""" args = {} + if 'rows_count' in _dict: + args['rows_count'] = _dict.get('rows_count') + else: + raise ValueError('Required property \'rows_count\' not present in ResourceInstancesList JSON') if 'next_url' in _dict: args['next_url'] = _dict.get('next_url') else: @@ -3033,10 +3147,6 @@ def from_dict(cls, _dict: Dict) -> 'ResourceInstancesList': args['resources'] = [ResourceInstance.from_dict(x) for x in _dict.get('resources')] else: raise ValueError('Required property \'resources\' not present in ResourceInstancesList JSON') - if 'rows_count' in _dict: - args['rows_count'] = _dict.get('rows_count') - else: - raise ValueError('Required property \'rows_count\' not present in ResourceInstancesList JSON') return cls(**args) @classmethod @@ -3047,12 +3157,12 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'rows_count') and self.rows_count is not None: + _dict['rows_count'] = self.rows_count if hasattr(self, 'next_url') and self.next_url is not None: _dict['next_url'] = self.next_url if hasattr(self, 'resources') and self.resources is not None: _dict['resources'] = [x.to_dict() for x in self.resources] - if hasattr(self, 'rows_count') and self.rows_count is not None: - _dict['rows_count'] = self.rows_count return _dict def _to_dict(self): @@ -3081,54 +3191,61 @@ class ResourceKey(): :attr str guid: (optional) When you create a new key, a globally unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the key. - :attr str crn: (optional) The full Cloud Resource Name (CRN) associated with the - key. For more information about this format, see [Cloud Resource - Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). :attr str url: (optional) When you created a new key, a relative URL path is created identifying the location of the key. - :attr str name: (optional) The human-readable name of the key. - :attr str account_id: (optional) An alpha-numeric value identifying the account - ID. - :attr str resource_group_id: (optional) The short ID of the resource group. + :attr datetime created_at: (optional) The date when the key was created. + :attr datetime updated_at: (optional) The date when the key was last updated. + :attr datetime deleted_at: (optional) The date when the key was deleted. + :attr str created_by: (optional) The subject who created the key. + :attr str updated_by: (optional) The subject who updated the key. + :attr str deleted_by: (optional) The subject who deleted the key. :attr str source_crn: (optional) The CRN of resource instance or alias associated to the key. - :attr str role: (optional) The role CRN. + :attr str name: (optional) The human-readable name of the key. + :attr str crn: (optional) The full Cloud Resource Name (CRN) associated with the + key. For more information about this format, see [Cloud Resource + Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). :attr str state: (optional) The state of the key. + :attr str account_id: (optional) An alpha-numeric value identifying the account + ID. + :attr str resource_group_id: (optional) The ID of the resource group. + :attr str resource_id: (optional) The unique ID of the offering. This value is + provided by and stored in the global catalog. :attr Credentials credentials: (optional) The credentials for the key. Additional key-value pairs are passed through from the resource brokers. Refer to service’s documentation for additional details. :attr bool iam_compatible: (optional) Specifies whether the key’s credentials support IAM. + :attr bool migrated: (optional) A boolean that dictates if the alias was + migrated from a previous CF instance. :attr str resource_instance_url: (optional) The relative path to the resource. - :attr datetime created_at: (optional) The date when the key was created. - :attr datetime updated_at: (optional) The date when the key was last updated. - :attr datetime deleted_at: (optional) The date when the key was deleted. - :attr str created_by: (optional) The subject who created the key. - :attr str updated_by: (optional) The subject who updated the key. - :attr str deleted_by: (optional) The subject who deleted the key. + :attr str resource_alias_url: (optional) The relative path to the resource alias + that this binding is associated with. """ def __init__(self, *, id: str = None, guid: str = None, - crn: str = None, url: str = None, + created_at: datetime = None, + updated_at: datetime = None, + deleted_at: datetime = None, + created_by: str = None, + updated_by: str = None, + deleted_by: str = None, + source_crn: str = None, name: str = None, + crn: str = None, + state: str = None, account_id: str = None, resource_group_id: str = None, - source_crn: str = None, - role: str = None, - state: str = None, + resource_id: str = None, credentials: 'Credentials' = None, iam_compatible: bool = None, + migrated: bool = None, resource_instance_url: str = None, - created_at: datetime = None, - updated_at: datetime = None, - deleted_at: datetime = None, - created_by: str = None, - updated_by: str = None, - deleted_by: str = None) -> None: + resource_alias_url: str = None) -> None: """ Initialize a ResourceKey object. @@ -3136,54 +3253,60 @@ def __init__(self, :param str guid: (optional) When you create a new key, a globally unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the key. - :param str crn: (optional) The full Cloud Resource Name (CRN) associated - with the key. For more information about this format, see [Cloud Resource - Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). :param str url: (optional) When you created a new key, a relative URL path is created identifying the location of the key. - :param str name: (optional) The human-readable name of the key. - :param str account_id: (optional) An alpha-numeric value identifying the - account ID. - :param str resource_group_id: (optional) The short ID of the resource - group. + :param datetime created_at: (optional) The date when the key was created. + :param datetime updated_at: (optional) The date when the key was last + updated. + :param datetime deleted_at: (optional) The date when the key was deleted. + :param str created_by: (optional) The subject who created the key. + :param str updated_by: (optional) The subject who updated the key. + :param str deleted_by: (optional) The subject who deleted the key. :param str source_crn: (optional) The CRN of resource instance or alias associated to the key. - :param str role: (optional) The role CRN. + :param str name: (optional) The human-readable name of the key. + :param str crn: (optional) The full Cloud Resource Name (CRN) associated + with the key. For more information about this format, see [Cloud Resource + Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). :param str state: (optional) The state of the key. + :param str account_id: (optional) An alpha-numeric value identifying the + account ID. + :param str resource_group_id: (optional) The ID of the resource group. + :param str resource_id: (optional) The unique ID of the offering. This + value is provided by and stored in the global catalog. :param Credentials credentials: (optional) The credentials for the key. Additional key-value pairs are passed through from the resource brokers. Refer to service’s documentation for additional details. :param bool iam_compatible: (optional) Specifies whether the key’s credentials support IAM. + :param bool migrated: (optional) A boolean that dictates if the alias was + migrated from a previous CF instance. :param str resource_instance_url: (optional) The relative path to the resource. - :param datetime created_at: (optional) The date when the key was created. - :param datetime updated_at: (optional) The date when the key was last - updated. - :param datetime deleted_at: (optional) The date when the key was deleted. - :param str created_by: (optional) The subject who created the key. - :param str updated_by: (optional) The subject who updated the key. - :param str deleted_by: (optional) The subject who deleted the key. + :param str resource_alias_url: (optional) The relative path to the resource + alias that this binding is associated with. """ self.id = id self.guid = guid - self.crn = crn self.url = url - self.name = name - self.account_id = account_id - self.resource_group_id = resource_group_id - self.source_crn = source_crn - self.role = role - self.state = state - self.credentials = credentials - self.iam_compatible = iam_compatible - self.resource_instance_url = resource_instance_url self.created_at = created_at self.updated_at = updated_at self.deleted_at = deleted_at self.created_by = created_by self.updated_by = updated_by self.deleted_by = deleted_by + self.source_crn = source_crn + self.name = name + self.crn = crn + self.state = state + self.account_id = account_id + self.resource_group_id = resource_group_id + self.resource_id = resource_id + self.credentials = credentials + self.iam_compatible = iam_compatible + self.migrated = migrated + self.resource_instance_url = resource_instance_url + self.resource_alias_url = resource_alias_url @classmethod def from_dict(cls, _dict: Dict) -> 'ResourceKey': @@ -3193,28 +3316,8 @@ def from_dict(cls, _dict: Dict) -> 'ResourceKey': args['id'] = _dict.get('id') if 'guid' in _dict: args['guid'] = _dict.get('guid') - if 'crn' in _dict: - args['crn'] = _dict.get('crn') if 'url' in _dict: args['url'] = _dict.get('url') - if 'name' in _dict: - args['name'] = _dict.get('name') - if 'account_id' in _dict: - args['account_id'] = _dict.get('account_id') - if 'resource_group_id' in _dict: - args['resource_group_id'] = _dict.get('resource_group_id') - if 'source_crn' in _dict: - args['source_crn'] = _dict.get('source_crn') - if 'role' in _dict: - args['role'] = _dict.get('role') - if 'state' in _dict: - args['state'] = _dict.get('state') - if 'credentials' in _dict: - args['credentials'] = Credentials.from_dict(_dict.get('credentials')) - if 'iam_compatible' in _dict: - args['iam_compatible'] = _dict.get('iam_compatible') - if 'resource_instance_url' in _dict: - args['resource_instance_url'] = _dict.get('resource_instance_url') if 'created_at' in _dict: args['created_at'] = string_to_datetime(_dict.get('created_at')) if 'updated_at' in _dict: @@ -3227,6 +3330,30 @@ def from_dict(cls, _dict: Dict) -> 'ResourceKey': args['updated_by'] = _dict.get('updated_by') if 'deleted_by' in _dict: args['deleted_by'] = _dict.get('deleted_by') + if 'source_crn' in _dict: + args['source_crn'] = _dict.get('source_crn') + if 'name' in _dict: + args['name'] = _dict.get('name') + if 'crn' in _dict: + args['crn'] = _dict.get('crn') + if 'state' in _dict: + args['state'] = _dict.get('state') + if 'account_id' in _dict: + args['account_id'] = _dict.get('account_id') + if 'resource_group_id' in _dict: + args['resource_group_id'] = _dict.get('resource_group_id') + if 'resource_id' in _dict: + args['resource_id'] = _dict.get('resource_id') + if 'credentials' in _dict: + args['credentials'] = Credentials.from_dict(_dict.get('credentials')) + if 'iam_compatible' in _dict: + args['iam_compatible'] = _dict.get('iam_compatible') + if 'migrated' in _dict: + args['migrated'] = _dict.get('migrated') + if 'resource_instance_url' in _dict: + args['resource_instance_url'] = _dict.get('resource_instance_url') + if 'resource_alias_url' in _dict: + args['resource_alias_url'] = _dict.get('resource_alias_url') return cls(**args) @classmethod @@ -3241,28 +3368,8 @@ def to_dict(self) -> Dict: _dict['id'] = self.id if hasattr(self, 'guid') and self.guid is not None: _dict['guid'] = self.guid - if hasattr(self, 'crn') and self.crn is not None: - _dict['crn'] = self.crn if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url - if hasattr(self, 'name') and self.name is not None: - _dict['name'] = self.name - if hasattr(self, 'account_id') and self.account_id is not None: - _dict['account_id'] = self.account_id - if hasattr(self, 'resource_group_id') and self.resource_group_id is not None: - _dict['resource_group_id'] = self.resource_group_id - if hasattr(self, 'source_crn') and self.source_crn is not None: - _dict['source_crn'] = self.source_crn - if hasattr(self, 'role') and self.role is not None: - _dict['role'] = self.role - if hasattr(self, 'state') and self.state is not None: - _dict['state'] = self.state - if hasattr(self, 'credentials') and self.credentials is not None: - _dict['credentials'] = self.credentials.to_dict() - if hasattr(self, 'iam_compatible') and self.iam_compatible is not None: - _dict['iam_compatible'] = self.iam_compatible - if hasattr(self, 'resource_instance_url') and self.resource_instance_url is not None: - _dict['resource_instance_url'] = self.resource_instance_url if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'updated_at') and self.updated_at is not None: @@ -3275,6 +3382,30 @@ def to_dict(self) -> Dict: _dict['updated_by'] = self.updated_by if hasattr(self, 'deleted_by') and self.deleted_by is not None: _dict['deleted_by'] = self.deleted_by + if hasattr(self, 'source_crn') and self.source_crn is not None: + _dict['source_crn'] = self.source_crn + if hasattr(self, 'name') and self.name is not None: + _dict['name'] = self.name + if hasattr(self, 'crn') and self.crn is not None: + _dict['crn'] = self.crn + if hasattr(self, 'state') and self.state is not None: + _dict['state'] = self.state + if hasattr(self, 'account_id') and self.account_id is not None: + _dict['account_id'] = self.account_id + if hasattr(self, 'resource_group_id') and self.resource_group_id is not None: + _dict['resource_group_id'] = self.resource_group_id + if hasattr(self, 'resource_id') and self.resource_id is not None: + _dict['resource_id'] = self.resource_id + if hasattr(self, 'credentials') and self.credentials is not None: + _dict['credentials'] = self.credentials.to_dict() + if hasattr(self, 'iam_compatible') and self.iam_compatible is not None: + _dict['iam_compatible'] = self.iam_compatible + if hasattr(self, 'migrated') and self.migrated is not None: + _dict['migrated'] = self.migrated + if hasattr(self, 'resource_instance_url') and self.resource_instance_url is not None: + _dict['resource_instance_url'] = self.resource_instance_url + if hasattr(self, 'resource_alias_url') and self.resource_alias_url is not None: + _dict['resource_alias_url'] = self.resource_alias_url return _dict def _to_dict(self): @@ -3369,30 +3500,34 @@ class ResourceKeysList(): """ A list of resource keys. + :attr int rows_count: The number of resource keys in `resources`. :attr str next_url: The URL for requesting the next page of results. :attr List[ResourceKey] resources: A list of resource keys. - :attr int rows_count: The number of resource keys in `resources`. """ def __init__(self, + rows_count: int, next_url: str, - resources: List['ResourceKey'], - rows_count: int) -> None: + resources: List['ResourceKey']) -> None: """ Initialize a ResourceKeysList object. + :param int rows_count: The number of resource keys in `resources`. :param str next_url: The URL for requesting the next page of results. :param List[ResourceKey] resources: A list of resource keys. - :param int rows_count: The number of resource keys in `resources`. """ + self.rows_count = rows_count self.next_url = next_url self.resources = resources - self.rows_count = rows_count @classmethod def from_dict(cls, _dict: Dict) -> 'ResourceKeysList': """Initialize a ResourceKeysList object from a json dictionary.""" args = {} + if 'rows_count' in _dict: + args['rows_count'] = _dict.get('rows_count') + else: + raise ValueError('Required property \'rows_count\' not present in ResourceKeysList JSON') if 'next_url' in _dict: args['next_url'] = _dict.get('next_url') else: @@ -3401,10 +3536,6 @@ def from_dict(cls, _dict: Dict) -> 'ResourceKeysList': args['resources'] = [ResourceKey.from_dict(x) for x in _dict.get('resources')] else: raise ValueError('Required property \'resources\' not present in ResourceKeysList JSON') - if 'rows_count' in _dict: - args['rows_count'] = _dict.get('rows_count') - else: - raise ValueError('Required property \'rows_count\' not present in ResourceKeysList JSON') return cls(**args) @classmethod @@ -3415,12 +3546,12 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'rows_count') and self.rows_count is not None: + _dict['rows_count'] = self.rows_count if hasattr(self, 'next_url') and self.next_url is not None: _dict['next_url'] = self.next_url if hasattr(self, 'resources') and self.resources is not None: _dict['resources'] = [x.to_dict() for x in self.resources] - if hasattr(self, 'rows_count') and self.rows_count is not None: - _dict['rows_count'] = self.rows_count return _dict def _to_dict(self): diff --git a/test/unit/test_resource_controller_v2.py b/test/unit/test_resource_controller_v2.py index 1f5bb518..99ec92ba 100644 --- a/test/unit/test_resource_controller_v2.py +++ b/test/unit/test_resource_controller_v2.py @@ -19,6 +19,7 @@ from datetime import datetime, timezone from ibm_cloud_sdk_core.authenticators.no_auth_authenticator import NoAuthAuthenticator +from ibm_cloud_sdk_core.utils import datetime_to_string, string_to_datetime import inspect import json import pytest @@ -62,7 +63,7 @@ def test_list_resource_instances_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}]}' responses.add(responses.GET, url, body=mock_response, @@ -78,6 +79,8 @@ def test_list_resource_instances_all_params(self): type = 'testString' sub_type = 'testString' limit = 'testString' + state = 'active' + order_direction = 'asc' updated_from = '2019-01-08T00:00:00.000Z' updated_to = '2019-01-08T00:00:00.000Z' @@ -91,6 +94,8 @@ def test_list_resource_instances_all_params(self): type=type, sub_type=sub_type, limit=limit, + state=state, + order_direction=order_direction, updated_from=updated_from, updated_to=updated_to, headers={} @@ -110,6 +115,8 @@ def test_list_resource_instances_all_params(self): assert 'type={}'.format(type) in query_string assert 'sub_type={}'.format(sub_type) in query_string assert 'limit={}'.format(limit) in query_string + assert 'state={}'.format(state) in query_string + assert 'order_direction={}'.format(order_direction) in query_string assert 'updated_from={}'.format(updated_from) in query_string assert 'updated_to={}'.format(updated_to) in query_string @@ -121,7 +128,7 @@ def test_list_resource_instances_required_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}]}' responses.add(responses.GET, url, body=mock_response, @@ -158,7 +165,7 @@ def test_create_resource_instance_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.POST, url, body=mock_response, @@ -209,7 +216,7 @@ def test_create_resource_instance_required_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.POST, url, body=mock_response, @@ -258,7 +265,7 @@ def test_create_resource_instance_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.POST, url, body=mock_response, @@ -309,7 +316,7 @@ def test_get_resource_instance_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.GET, url, body=mock_response, @@ -337,7 +344,7 @@ def test_get_resource_instance_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.GET, url, body=mock_response, @@ -474,7 +481,7 @@ def test_update_resource_instance_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.PATCH, url, body=mock_response, @@ -516,7 +523,7 @@ def test_update_resource_instance_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.PATCH, url, body=mock_response, @@ -562,7 +569,7 @@ def test_list_resource_aliases_for_instance_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString/resource_aliases') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -590,7 +597,7 @@ def test_list_resource_aliases_for_instance_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString/resource_aliases') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -632,7 +639,7 @@ def test_list_resource_keys_for_instance_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString/resource_keys') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -660,7 +667,7 @@ def test_list_resource_keys_for_instance_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString/resource_keys') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -702,7 +709,7 @@ def test_lock_resource_instance_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString/lock') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.POST, url, body=mock_response, @@ -730,7 +737,7 @@ def test_lock_resource_instance_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString/lock') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.POST, url, body=mock_response, @@ -772,7 +779,7 @@ def test_unlock_resource_instance_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString/lock') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.DELETE, url, body=mock_response, @@ -800,7 +807,7 @@ def test_unlock_resource_instance_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_instances/testString/lock') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "resource_id": "resource_id", "resource_plan_id": "resource_plan_id", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "state": "state", "type": "type", "sub_type": "sub_type", "allow_cleanup": false, "locked": true, "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "dashboard_url": "dashboard_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "extensions": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_at": "2019-01-01T12:00:00.000Z", "updated_by": "updated_by", "deleted_at": "2019-01-01T12:00:00.000Z", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "scheduled_reclaim_by": "scheduled_reclaim_by", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "scheduled_reclaim_at": "2019-01-01T12:00:00.000Z", "restored_at": "2019-01-01T12:00:00.000Z", "restored_by": "restored_by", "scheduled_reclaim_by": "scheduled_reclaim_by", "name": "name", "region_id": "region_id", "account_id": "account_id", "reseller_channel_id": "reseller_channel_id", "resource_plan_id": "resource_plan_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "parameters": {"mapKey": {"anyKey": "anyValue"}}, "allow_cleanup": false, "crn": "crn", "state": "state", "type": "type", "sub_type": "sub_type", "resource_id": "resource_id", "dashboard_url": "dashboard_url", "last_operation": {"mapKey": {"anyKey": "anyValue"}}, "resource_aliases_url": "resource_aliases_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "plan_history": [{"resource_plan_id": "resource_plan_id", "start_date": "2019-01-01T12:00:00.000Z", "requestor_id": "requestor_id"}], "migrated": true, "extensions": {"mapKey": {"anyKey": "anyValue"}}, "controlled_by": "controlled_by", "locked": true}' responses.add(responses.DELETE, url, body=mock_response, @@ -852,7 +859,7 @@ def test_list_resource_keys_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_keys') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -902,7 +909,7 @@ def test_list_resource_keys_required_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_keys') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -939,7 +946,7 @@ def test_create_resource_key_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_keys') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}' responses.add(responses.POST, url, body=mock_response, @@ -984,7 +991,7 @@ def test_create_resource_key_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_keys') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}' responses.add(responses.POST, url, body=mock_response, @@ -1035,7 +1042,7 @@ def test_get_resource_key_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_keys/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}' responses.add(responses.GET, url, body=mock_response, @@ -1063,7 +1070,7 @@ def test_get_resource_key_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_keys/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}' responses.add(responses.GET, url, body=mock_response, @@ -1169,7 +1176,7 @@ def test_update_resource_key_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_keys/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}' responses.add(responses.PATCH, url, body=mock_response, @@ -1202,7 +1209,7 @@ def test_update_resource_key_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_keys/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "role": "role", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_instance_url": "resource_instance_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "name": "name", "crn": "crn", "state": "state", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_id": "resource_id", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "migrated": true, "resource_instance_url": "resource_instance_url", "resource_alias_url": "resource_alias_url"}' responses.add(responses.PATCH, url, body=mock_response, @@ -1256,7 +1263,7 @@ def test_list_resource_bindings_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_bindings') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -1309,7 +1316,7 @@ def test_list_resource_bindings_required_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_bindings') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -1346,7 +1353,7 @@ def test_create_resource_binding_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_bindings') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}' responses.add(responses.POST, url, body=mock_response, @@ -1394,7 +1401,7 @@ def test_create_resource_binding_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_bindings') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}' responses.add(responses.POST, url, body=mock_response, @@ -1446,7 +1453,7 @@ def test_get_resource_binding_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_bindings/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}' responses.add(responses.GET, url, body=mock_response, @@ -1474,7 +1481,7 @@ def test_get_resource_binding_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_bindings/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}' responses.add(responses.GET, url, body=mock_response, @@ -1580,7 +1587,7 @@ def test_update_resource_binding_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_bindings/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}' responses.add(responses.PATCH, url, body=mock_response, @@ -1613,7 +1620,7 @@ def test_update_resource_binding_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_bindings/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}' responses.add(responses.PATCH, url, body=mock_response, @@ -1667,7 +1674,7 @@ def test_list_resource_aliases_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -1723,7 +1730,7 @@ def test_list_resource_aliases_required_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -1760,7 +1767,7 @@ def test_create_resource_alias_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}' responses.add(responses.POST, url, body=mock_response, @@ -1797,7 +1804,7 @@ def test_create_resource_alias_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}' responses.add(responses.POST, url, body=mock_response, @@ -1843,7 +1850,7 @@ def test_get_resource_alias_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}' responses.add(responses.GET, url, body=mock_response, @@ -1871,7 +1878,7 @@ def test_get_resource_alias_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}' responses.add(responses.GET, url, body=mock_response, @@ -1977,7 +1984,7 @@ def test_update_resource_alias_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}' responses.add(responses.PATCH, url, body=mock_response, @@ -2010,7 +2017,7 @@ def test_update_resource_alias_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases/testString') - mock_response = '{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "resource_group_crn": "resource_group_crn", "target_crn": "target_crn", "state": "state", "resource_instance_id": "resource_instance_id", "region_instance_id": "region_instance_id", "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}' + mock_response = '{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "name": "name", "resource_instance_id": "resource_instance_id", "target_crn": "target_crn", "account_id": "account_id", "resource_id": "resource_id", "resource_group_id": "resource_group_id", "crn": "crn", "region_instance_id": "region_instance_id", "region_instance_crn": "region_instance_crn", "state": "state", "migrated": true, "resource_instance_url": "resource_instance_url", "resource_bindings_url": "resource_bindings_url", "resource_keys_url": "resource_keys_url"}' responses.add(responses.PATCH, url, body=mock_response, @@ -2054,7 +2061,7 @@ def test_list_resource_bindings_for_alias_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases/testString/resource_bindings') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -2082,7 +2089,7 @@ def test_list_resource_bindings_for_alias_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v2/resource_aliases/testString/resource_bindings') - mock_response = '{"next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "crn": "crn", "url": "url", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "source_crn": "source_crn", "target_crn": "target_crn", "role": "role", "region_binding_id": "region_binding_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_alias_url": "resource_alias_url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by"}], "rows_count": 10}' + mock_response = '{"rows_count": 10, "next_url": "next_url", "resources": [{"id": "id", "guid": "guid", "url": "url", "created_at": "2019-01-01T12:00:00.000Z", "updated_at": "2019-01-01T12:00:00.000Z", "deleted_at": "2019-01-01T12:00:00.000Z", "created_by": "created_by", "updated_by": "updated_by", "deleted_by": "deleted_by", "source_crn": "source_crn", "target_crn": "target_crn", "crn": "crn", "region_binding_id": "region_binding_id", "region_binding_crn": "region_binding_crn", "name": "name", "account_id": "account_id", "resource_group_id": "resource_group_id", "state": "state", "credentials": {"apikey": "apikey", "iam_apikey_description": "iam_apikey_description", "iam_apikey_name": "iam_apikey_name", "iam_role_crn": "iam_role_crn", "iam_serviceid_crn": "iam_serviceid_crn"}, "iam_compatible": true, "resource_id": "resource_id", "migrated": true, "resource_alias_url": "resource_alias_url"}]}' responses.add(responses.GET, url, body=mock_response, @@ -2354,7 +2361,7 @@ def test_plan_history_item_serialization(self): # Construct a json representation of a PlanHistoryItem model plan_history_item_model_json = {} plan_history_item_model_json['resource_plan_id'] = 'testString' - plan_history_item_model_json['start_date'] = '2020-01-28T18:40:40.123456Z' + plan_history_item_model_json['start_date'] = '2015-03-14T09:26:53.123456Z' plan_history_item_model_json['requestor_id'] = 'testString' # Construct a model instance of PlanHistoryItem by calling from_dict on the json representation @@ -2395,9 +2402,9 @@ def test_reclamation_serialization(self): reclamation_model_json['state'] = 'testString' reclamation_model_json['target_time'] = 'testString' reclamation_model_json['custom_properties'] = {} - reclamation_model_json['created_at'] = '2020-01-28T18:40:40.123456Z' + reclamation_model_json['created_at'] = '2015-03-14T09:26:53.123456Z' reclamation_model_json['created_by'] = 'testString' - reclamation_model_json['updated_at'] = '2020-01-28T18:40:40.123456Z' + reclamation_model_json['updated_at'] = '2015-03-14T09:26:53.123456Z' reclamation_model_json['updated_by'] = 'testString' # Construct a model instance of Reclamation by calling from_dict on the json representation @@ -2439,9 +2446,9 @@ def test_reclamations_list_serialization(self): reclamation_model['state'] = 'testString' reclamation_model['target_time'] = 'testString' reclamation_model['custom_properties'] = {} - reclamation_model['created_at'] = '2020-01-28T18:40:40.123456Z' + reclamation_model['created_at'] = '2015-03-14T09:26:53.123456Z' reclamation_model['created_by'] = 'testString' - reclamation_model['updated_at'] = '2020-01-28T18:40:40.123456Z' + reclamation_model['updated_at'] = '2015-03-14T09:26:53.123456Z' reclamation_model['updated_by'] = 'testString' # Construct a json representation of a ReclamationsList model @@ -2477,25 +2484,27 @@ def test_resource_alias_serialization(self): resource_alias_model_json = {} resource_alias_model_json['id'] = 'testString' resource_alias_model_json['guid'] = 'testString' - resource_alias_model_json['crn'] = 'testString' resource_alias_model_json['url'] = 'testString' + resource_alias_model_json['created_at'] = '2015-03-14T09:26:53.123456Z' + resource_alias_model_json['updated_at'] = '2015-03-14T09:26:53.123456Z' + resource_alias_model_json['deleted_at'] = '2015-03-14T09:26:53.123456Z' + resource_alias_model_json['created_by'] = 'testString' + resource_alias_model_json['updated_by'] = 'testString' + resource_alias_model_json['deleted_by'] = 'testString' resource_alias_model_json['name'] = 'testString' + resource_alias_model_json['resource_instance_id'] = 'testString' + resource_alias_model_json['target_crn'] = 'testString' resource_alias_model_json['account_id'] = 'testString' + resource_alias_model_json['resource_id'] = 'testString' resource_alias_model_json['resource_group_id'] = 'testString' - resource_alias_model_json['resource_group_crn'] = 'testString' - resource_alias_model_json['target_crn'] = 'testString' - resource_alias_model_json['state'] = 'testString' - resource_alias_model_json['resource_instance_id'] = 'testString' + resource_alias_model_json['crn'] = 'testString' resource_alias_model_json['region_instance_id'] = 'testString' + resource_alias_model_json['region_instance_crn'] = 'testString' + resource_alias_model_json['state'] = 'testString' + resource_alias_model_json['migrated'] = True resource_alias_model_json['resource_instance_url'] = 'testString' resource_alias_model_json['resource_bindings_url'] = 'testString' resource_alias_model_json['resource_keys_url'] = 'testString' - resource_alias_model_json['created_at'] = '2020-01-28T18:40:40.123456Z' - resource_alias_model_json['updated_at'] = '2020-01-28T18:40:40.123456Z' - resource_alias_model_json['deleted_at'] = '2020-01-28T18:40:40.123456Z' - resource_alias_model_json['created_by'] = 'testString' - resource_alias_model_json['updated_by'] = 'testString' - resource_alias_model_json['deleted_by'] = 'testString' # Construct a model instance of ResourceAlias by calling from_dict on the json representation resource_alias_model = ResourceAlias.from_dict(resource_alias_model_json) @@ -2527,31 +2536,33 @@ def test_resource_aliases_list_serialization(self): resource_alias_model = {} # ResourceAlias resource_alias_model['id'] = 'testString' resource_alias_model['guid'] = 'testString' - resource_alias_model['crn'] = 'testString' resource_alias_model['url'] = 'testString' + resource_alias_model['created_at'] = '2015-03-14T09:26:53.123456Z' + resource_alias_model['updated_at'] = '2015-03-14T09:26:53.123456Z' + resource_alias_model['deleted_at'] = '2015-03-14T09:26:53.123456Z' + resource_alias_model['created_by'] = 'testString' + resource_alias_model['updated_by'] = 'testString' + resource_alias_model['deleted_by'] = 'testString' resource_alias_model['name'] = 'testString' + resource_alias_model['resource_instance_id'] = 'testString' + resource_alias_model['target_crn'] = 'testString' resource_alias_model['account_id'] = 'testString' + resource_alias_model['resource_id'] = 'testString' resource_alias_model['resource_group_id'] = 'testString' - resource_alias_model['resource_group_crn'] = 'testString' - resource_alias_model['target_crn'] = 'testString' - resource_alias_model['state'] = 'testString' - resource_alias_model['resource_instance_id'] = 'testString' + resource_alias_model['crn'] = 'testString' resource_alias_model['region_instance_id'] = 'testString' + resource_alias_model['region_instance_crn'] = 'testString' + resource_alias_model['state'] = 'testString' + resource_alias_model['migrated'] = True resource_alias_model['resource_instance_url'] = 'testString' resource_alias_model['resource_bindings_url'] = 'testString' resource_alias_model['resource_keys_url'] = 'testString' - resource_alias_model['created_at'] = '2020-01-28T18:40:40.123456Z' - resource_alias_model['updated_at'] = '2020-01-28T18:40:40.123456Z' - resource_alias_model['deleted_at'] = '2020-01-28T18:40:40.123456Z' - resource_alias_model['created_by'] = 'testString' - resource_alias_model['updated_by'] = 'testString' - resource_alias_model['deleted_by'] = 'testString' # Construct a json representation of a ResourceAliasesList model resource_aliases_list_model_json = {} + resource_aliases_list_model_json['rows_count'] = 38 resource_aliases_list_model_json['next_url'] = 'testString' resource_aliases_list_model_json['resources'] = [resource_alias_model] - resource_aliases_list_model_json['rows_count'] = 38 # Construct a model instance of ResourceAliasesList by calling from_dict on the json representation resource_aliases_list_model = ResourceAliasesList.from_dict(resource_aliases_list_model_json) @@ -2592,25 +2603,27 @@ def test_resource_binding_serialization(self): resource_binding_model_json = {} resource_binding_model_json['id'] = 'testString' resource_binding_model_json['guid'] = 'testString' - resource_binding_model_json['crn'] = 'testString' resource_binding_model_json['url'] = 'testString' - resource_binding_model_json['name'] = 'testString' - resource_binding_model_json['account_id'] = 'testString' - resource_binding_model_json['resource_group_id'] = 'testString' + resource_binding_model_json['created_at'] = '2015-03-14T09:26:53.123456Z' + resource_binding_model_json['updated_at'] = '2015-03-14T09:26:53.123456Z' + resource_binding_model_json['deleted_at'] = '2015-03-14T09:26:53.123456Z' + resource_binding_model_json['created_by'] = 'testString' + resource_binding_model_json['updated_by'] = 'testString' + resource_binding_model_json['deleted_by'] = 'testString' resource_binding_model_json['source_crn'] = 'testString' resource_binding_model_json['target_crn'] = 'testString' - resource_binding_model_json['role'] = 'testString' + resource_binding_model_json['crn'] = 'testString' resource_binding_model_json['region_binding_id'] = 'testString' + resource_binding_model_json['region_binding_crn'] = 'testString' + resource_binding_model_json['name'] = 'testString' + resource_binding_model_json['account_id'] = 'testString' + resource_binding_model_json['resource_group_id'] = 'testString' resource_binding_model_json['state'] = 'testString' resource_binding_model_json['credentials'] = credentials_model resource_binding_model_json['iam_compatible'] = True + resource_binding_model_json['resource_id'] = 'testString' + resource_binding_model_json['migrated'] = True resource_binding_model_json['resource_alias_url'] = 'testString' - resource_binding_model_json['created_at'] = '2020-01-28T18:40:40.123456Z' - resource_binding_model_json['updated_at'] = '2020-01-28T18:40:40.123456Z' - resource_binding_model_json['deleted_at'] = '2020-01-28T18:40:40.123456Z' - resource_binding_model_json['created_by'] = 'testString' - resource_binding_model_json['updated_by'] = 'testString' - resource_binding_model_json['deleted_by'] = 'testString' # Construct a model instance of ResourceBinding by calling from_dict on the json representation resource_binding_model = ResourceBinding.from_dict(resource_binding_model_json) @@ -2680,31 +2693,33 @@ def test_resource_bindings_list_serialization(self): resource_binding_model = {} # ResourceBinding resource_binding_model['id'] = 'testString' resource_binding_model['guid'] = 'testString' - resource_binding_model['crn'] = 'testString' resource_binding_model['url'] = 'testString' - resource_binding_model['name'] = 'testString' - resource_binding_model['account_id'] = 'testString' - resource_binding_model['resource_group_id'] = 'testString' + resource_binding_model['created_at'] = '2015-03-14T09:26:53.123456Z' + resource_binding_model['updated_at'] = '2015-03-14T09:26:53.123456Z' + resource_binding_model['deleted_at'] = '2015-03-14T09:26:53.123456Z' + resource_binding_model['created_by'] = 'testString' + resource_binding_model['updated_by'] = 'testString' + resource_binding_model['deleted_by'] = 'testString' resource_binding_model['source_crn'] = 'testString' resource_binding_model['target_crn'] = 'testString' - resource_binding_model['role'] = 'testString' + resource_binding_model['crn'] = 'testString' resource_binding_model['region_binding_id'] = 'testString' + resource_binding_model['region_binding_crn'] = 'testString' + resource_binding_model['name'] = 'testString' + resource_binding_model['account_id'] = 'testString' + resource_binding_model['resource_group_id'] = 'testString' resource_binding_model['state'] = 'testString' resource_binding_model['credentials'] = credentials_model resource_binding_model['iam_compatible'] = True + resource_binding_model['resource_id'] = 'testString' + resource_binding_model['migrated'] = True resource_binding_model['resource_alias_url'] = 'testString' - resource_binding_model['created_at'] = '2020-01-28T18:40:40.123456Z' - resource_binding_model['updated_at'] = '2020-01-28T18:40:40.123456Z' - resource_binding_model['deleted_at'] = '2020-01-28T18:40:40.123456Z' - resource_binding_model['created_by'] = 'testString' - resource_binding_model['updated_by'] = 'testString' - resource_binding_model['deleted_by'] = 'testString' # Construct a json representation of a ResourceBindingsList model resource_bindings_list_model_json = {} + resource_bindings_list_model_json['rows_count'] = 38 resource_bindings_list_model_json['next_url'] = 'testString' resource_bindings_list_model_json['resources'] = [resource_binding_model] - resource_bindings_list_model_json['rows_count'] = 38 # Construct a model instance of ResourceBindingsList by calling from_dict on the json representation resource_bindings_list_model = ResourceBindingsList.from_dict(resource_bindings_list_model_json) @@ -2735,45 +2750,49 @@ def test_resource_instance_serialization(self): plan_history_item_model = {} # PlanHistoryItem plan_history_item_model['resource_plan_id'] = 'testString' - plan_history_item_model['start_date'] = '2020-01-28T18:40:40.123456Z' + plan_history_item_model['start_date'] = '2015-03-14T09:26:53.123456Z' plan_history_item_model['requestor_id'] = 'testString' # Construct a json representation of a ResourceInstance model resource_instance_model_json = {} resource_instance_model_json['id'] = 'testString' resource_instance_model_json['guid'] = 'testString' - resource_instance_model_json['crn'] = 'testString' resource_instance_model_json['url'] = 'testString' + resource_instance_model_json['created_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model_json['updated_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model_json['deleted_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model_json['created_by'] = 'testString' + resource_instance_model_json['updated_by'] = 'testString' + resource_instance_model_json['deleted_by'] = 'testString' + resource_instance_model_json['scheduled_reclaim_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model_json['restored_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model_json['restored_by'] = 'testString' + resource_instance_model_json['scheduled_reclaim_by'] = 'testString' resource_instance_model_json['name'] = 'testString' + resource_instance_model_json['region_id'] = 'testString' resource_instance_model_json['account_id'] = 'testString' + resource_instance_model_json['reseller_channel_id'] = 'testString' + resource_instance_model_json['resource_plan_id'] = 'testString' resource_instance_model_json['resource_group_id'] = 'testString' resource_instance_model_json['resource_group_crn'] = 'testString' - resource_instance_model_json['resource_id'] = 'testString' - resource_instance_model_json['resource_plan_id'] = 'testString' resource_instance_model_json['target_crn'] = 'testString' resource_instance_model_json['parameters'] = {} + resource_instance_model_json['allow_cleanup'] = True + resource_instance_model_json['crn'] = 'testString' resource_instance_model_json['state'] = 'testString' resource_instance_model_json['type'] = 'testString' resource_instance_model_json['sub_type'] = 'testString' - resource_instance_model_json['allow_cleanup'] = True - resource_instance_model_json['locked'] = True - resource_instance_model_json['last_operation'] = {} + resource_instance_model_json['resource_id'] = 'testString' resource_instance_model_json['dashboard_url'] = 'testString' - resource_instance_model_json['plan_history'] = [plan_history_item_model] - resource_instance_model_json['extensions'] = {} + resource_instance_model_json['last_operation'] = {} resource_instance_model_json['resource_aliases_url'] = 'testString' resource_instance_model_json['resource_bindings_url'] = 'testString' resource_instance_model_json['resource_keys_url'] = 'testString' - resource_instance_model_json['created_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model_json['created_by'] = 'testString' - resource_instance_model_json['updated_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model_json['updated_by'] = 'testString' - resource_instance_model_json['deleted_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model_json['deleted_by'] = 'testString' - resource_instance_model_json['scheduled_reclaim_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model_json['scheduled_reclaim_by'] = 'testString' - resource_instance_model_json['restored_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model_json['restored_by'] = 'testString' + resource_instance_model_json['plan_history'] = [plan_history_item_model] + resource_instance_model_json['migrated'] = True + resource_instance_model_json['extensions'] = {} + resource_instance_model_json['controlled_by'] = 'testString' + resource_instance_model_json['locked'] = True # Construct a model instance of ResourceInstance by calling from_dict on the json representation resource_instance_model = ResourceInstance.from_dict(resource_instance_model_json) @@ -2804,50 +2823,54 @@ def test_resource_instances_list_serialization(self): plan_history_item_model = {} # PlanHistoryItem plan_history_item_model['resource_plan_id'] = 'testString' - plan_history_item_model['start_date'] = '2020-01-28T18:40:40.123456Z' + plan_history_item_model['start_date'] = '2015-03-14T09:26:53.123456Z' plan_history_item_model['requestor_id'] = 'testString' resource_instance_model = {} # ResourceInstance resource_instance_model['id'] = 'testString' resource_instance_model['guid'] = 'testString' - resource_instance_model['crn'] = 'testString' resource_instance_model['url'] = 'testString' + resource_instance_model['created_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model['updated_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model['deleted_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model['created_by'] = 'testString' + resource_instance_model['updated_by'] = 'testString' + resource_instance_model['deleted_by'] = 'testString' + resource_instance_model['scheduled_reclaim_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model['restored_at'] = '2015-03-14T09:26:53.123456Z' + resource_instance_model['restored_by'] = 'testString' + resource_instance_model['scheduled_reclaim_by'] = 'testString' resource_instance_model['name'] = 'testString' + resource_instance_model['region_id'] = 'testString' resource_instance_model['account_id'] = 'testString' + resource_instance_model['reseller_channel_id'] = 'testString' + resource_instance_model['resource_plan_id'] = 'testString' resource_instance_model['resource_group_id'] = 'testString' resource_instance_model['resource_group_crn'] = 'testString' - resource_instance_model['resource_id'] = 'testString' - resource_instance_model['resource_plan_id'] = 'testString' resource_instance_model['target_crn'] = 'testString' resource_instance_model['parameters'] = {} + resource_instance_model['allow_cleanup'] = True + resource_instance_model['crn'] = 'testString' resource_instance_model['state'] = 'testString' resource_instance_model['type'] = 'testString' resource_instance_model['sub_type'] = 'testString' - resource_instance_model['allow_cleanup'] = True - resource_instance_model['locked'] = True - resource_instance_model['last_operation'] = {} + resource_instance_model['resource_id'] = 'testString' resource_instance_model['dashboard_url'] = 'testString' - resource_instance_model['plan_history'] = [plan_history_item_model] - resource_instance_model['extensions'] = {} + resource_instance_model['last_operation'] = {} resource_instance_model['resource_aliases_url'] = 'testString' resource_instance_model['resource_bindings_url'] = 'testString' resource_instance_model['resource_keys_url'] = 'testString' - resource_instance_model['created_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model['created_by'] = 'testString' - resource_instance_model['updated_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model['updated_by'] = 'testString' - resource_instance_model['deleted_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model['deleted_by'] = 'testString' - resource_instance_model['scheduled_reclaim_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model['scheduled_reclaim_by'] = 'testString' - resource_instance_model['restored_at'] = '2020-01-28T18:40:40.123456Z' - resource_instance_model['restored_by'] = 'testString' + resource_instance_model['plan_history'] = [plan_history_item_model] + resource_instance_model['migrated'] = True + resource_instance_model['extensions'] = {} + resource_instance_model['controlled_by'] = 'testString' + resource_instance_model['locked'] = True # Construct a json representation of a ResourceInstancesList model resource_instances_list_model_json = {} + resource_instances_list_model_json['rows_count'] = 38 resource_instances_list_model_json['next_url'] = 'testString' resource_instances_list_model_json['resources'] = [resource_instance_model] - resource_instances_list_model_json['rows_count'] = 38 # Construct a model instance of ResourceInstancesList by calling from_dict on the json representation resource_instances_list_model = ResourceInstancesList.from_dict(resource_instances_list_model_json) @@ -2888,23 +2911,25 @@ def test_resource_key_serialization(self): resource_key_model_json = {} resource_key_model_json['id'] = 'testString' resource_key_model_json['guid'] = 'testString' - resource_key_model_json['crn'] = 'testString' resource_key_model_json['url'] = 'testString' + resource_key_model_json['created_at'] = '2015-03-14T09:26:53.123456Z' + resource_key_model_json['updated_at'] = '2015-03-14T09:26:53.123456Z' + resource_key_model_json['deleted_at'] = '2015-03-14T09:26:53.123456Z' + resource_key_model_json['created_by'] = 'testString' + resource_key_model_json['updated_by'] = 'testString' + resource_key_model_json['deleted_by'] = 'testString' + resource_key_model_json['source_crn'] = 'testString' resource_key_model_json['name'] = 'testString' + resource_key_model_json['crn'] = 'testString' + resource_key_model_json['state'] = 'testString' resource_key_model_json['account_id'] = 'testString' resource_key_model_json['resource_group_id'] = 'testString' - resource_key_model_json['source_crn'] = 'testString' - resource_key_model_json['role'] = 'testString' - resource_key_model_json['state'] = 'testString' + resource_key_model_json['resource_id'] = 'testString' resource_key_model_json['credentials'] = credentials_model resource_key_model_json['iam_compatible'] = True + resource_key_model_json['migrated'] = True resource_key_model_json['resource_instance_url'] = 'testString' - resource_key_model_json['created_at'] = '2020-01-28T18:40:40.123456Z' - resource_key_model_json['updated_at'] = '2020-01-28T18:40:40.123456Z' - resource_key_model_json['deleted_at'] = '2020-01-28T18:40:40.123456Z' - resource_key_model_json['created_by'] = 'testString' - resource_key_model_json['updated_by'] = 'testString' - resource_key_model_json['deleted_by'] = 'testString' + resource_key_model_json['resource_alias_url'] = 'testString' # Construct a model instance of ResourceKey by calling from_dict on the json representation resource_key_model = ResourceKey.from_dict(resource_key_model_json) @@ -2974,29 +2999,31 @@ def test_resource_keys_list_serialization(self): resource_key_model = {} # ResourceKey resource_key_model['id'] = 'testString' resource_key_model['guid'] = 'testString' - resource_key_model['crn'] = 'testString' resource_key_model['url'] = 'testString' + resource_key_model['created_at'] = '2015-03-14T09:26:53.123456Z' + resource_key_model['updated_at'] = '2015-03-14T09:26:53.123456Z' + resource_key_model['deleted_at'] = '2015-03-14T09:26:53.123456Z' + resource_key_model['created_by'] = 'testString' + resource_key_model['updated_by'] = 'testString' + resource_key_model['deleted_by'] = 'testString' + resource_key_model['source_crn'] = 'testString' resource_key_model['name'] = 'testString' + resource_key_model['crn'] = 'testString' + resource_key_model['state'] = 'testString' resource_key_model['account_id'] = 'testString' resource_key_model['resource_group_id'] = 'testString' - resource_key_model['source_crn'] = 'testString' - resource_key_model['role'] = 'testString' - resource_key_model['state'] = 'testString' + resource_key_model['resource_id'] = 'testString' resource_key_model['credentials'] = credentials_model resource_key_model['iam_compatible'] = True + resource_key_model['migrated'] = True resource_key_model['resource_instance_url'] = 'testString' - resource_key_model['created_at'] = '2020-01-28T18:40:40.123456Z' - resource_key_model['updated_at'] = '2020-01-28T18:40:40.123456Z' - resource_key_model['deleted_at'] = '2020-01-28T18:40:40.123456Z' - resource_key_model['created_by'] = 'testString' - resource_key_model['updated_by'] = 'testString' - resource_key_model['deleted_by'] = 'testString' + resource_key_model['resource_alias_url'] = 'testString' # Construct a json representation of a ResourceKeysList model resource_keys_list_model_json = {} + resource_keys_list_model_json['rows_count'] = 38 resource_keys_list_model_json['next_url'] = 'testString' resource_keys_list_model_json['resources'] = [resource_key_model] - resource_keys_list_model_json['rows_count'] = 38 # Construct a model instance of ResourceKeysList by calling from_dict on the json representation resource_keys_list_model = ResourceKeysList.from_dict(resource_keys_list_model_json)