diff --git a/examples/test_iam_identity_v1_examples.py b/examples/test_iam_identity_v1_examples.py index b1f69dde..c1a64496 100644 --- a/examples/test_iam_identity_v1_examples.py +++ b/examples/test_iam_identity_v1_examples.py @@ -2082,6 +2082,58 @@ def test_delete_profile_example(self): except ApiException as e: pytest.fail(str(e)) + @needscredentials + def test_get_account_limits_example(self): + """ + get_account_limits request example + """ + try: + print('\nget_account_limits() result:') + + # begin-getAccountLimits + + response = iam_identity_service.get_account_limits( + account_id=account_id, + ) + identity_limits_usage_response = response.get_result() + + print(json.dumps(identity_limits_usage_response, indent=2)) + + # end-getAccountLimits + + except ApiException as e: + pytest.fail(str(e)) + + @needscredentials + def test_bulk_list_account_entity_consumption_example(self): + """ + bulk_list_account_entity_consumption request example + """ + try: + print('\nbulk_list_account_entity_consumption() result:') + + # begin-bulkListAccountEntityConsumption + + response = iam_identity_service.bulk_list_account_entity_consumption( + account_id=account_id, + serviceid_groups=True, + serviceids_per_group=['ServiceIdGroup-12345678-1234-1234-1234-123456789abc'], + profiles=True, + apikeys_per_identity=['iam-ServiceId-12345678-1234-1234-1234-123456789def'], + templates=True, + template_versions_per_template=['AccountSettingsTemplate-12345678-1234-1234-1234-123456789abc'], + idps=True, + claim_rules_per_group=['AccessGroupId-12345678-1234-1234-1234-123456789abc'], + ) + identity_limits_usage_response = response.get_result() + + print(json.dumps(identity_limits_usage_response, indent=2)) + + # end-bulkListAccountEntityConsumption + + except ApiException as e: + pytest.fail(str(e)) + # endregion ############################################################################## diff --git a/ibm_platform_services/iam_identity_v1.py b/ibm_platform_services/iam_identity_v1.py index 39c7815f..9ab581d7 100644 --- a/ibm_platform_services/iam_identity_v1.py +++ b/ibm_platform_services/iam_identity_v1.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: 3.107.1-41b0fbd0-20250825-080732 +# IBM OpenAPI SDK Code Generator Version: 3.113.0-3f9df07a-20260317-160650 """ The IAM Identity Service API allows for the management of Account Settings and Identities @@ -957,6 +957,9 @@ def create_api_key( API key is leaked, valid values are 'none', 'disable' and 'delete'. :param str expires_at: (optional) Date and time when the API key becomes invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'. + **WARNING** An API key will be permanently and irrevocably deleted when + both the expires_at and modified_at timestamps are more than ninety (90) + days in the past, regardless of the key’s locked status or any other state. :param str entity_lock: (optional) Indicates if the API key is locked for further write operations. False by default. :param str entity_disable: (optional) Indicates if the API key is disabled. @@ -1162,6 +1165,9 @@ def update_api_key( API key is leaked, valid values are 'none', 'disable' and 'delete'. :param str expires_at: (optional) Date and time when the API key becomes invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'. + **WARNING** An API key will be permanently and irrevocably deleted when + both the expires_at and modified_at timestamps are more than ninety (90) + days in the past, regardless of the key’s locked status or any other state. :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 `ApiKey` object @@ -2098,6 +2104,7 @@ def create_link( link: 'CreateProfileLinkRequestLink', *, name: Optional[str] = None, + is_cross_account: Optional[bool] = None, **kwargs, ) -> DetailedResponse: """ @@ -2112,6 +2119,9 @@ def create_link( IKS_SA, ROKS_SA. :param CreateProfileLinkRequestLink link: Link details. :param str name: (optional) Optional name of the Link. + :param bool is_cross_account: (optional) Flag to indicate that the link + provides cross account access. If not provided then the account scope of + the CRN must match the Profile's account. :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 `ProfileLink` object @@ -2136,6 +2146,7 @@ def create_link( 'cr_type': cr_type, 'link': link, 'name': name, + 'is_cross_account': is_cross_account, } data = {k: v for (k, v) in data.items() if v is not None} data = json.dumps(data) @@ -2905,7 +2916,7 @@ def update_account_settings( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param List[UserMfa] user_mfa: (optional) List of users that are exempted from the MFA requirement of the account. :param str session_expiration_in_seconds: (optional) Defines the session @@ -5391,6 +5402,213 @@ def update_account_settings_assignment( response = self.send(request, **kwargs) return response + ######################### + # Account Limits + ######################### + + def get_account_limits( + self, + account_id: str, + *, + serviceid_groups: Optional[bool] = None, + serviceids_per_group: Optional[str] = None, + profiles: Optional[str] = None, + apikeys_per_identity: Optional[str] = None, + templates: Optional[str] = None, + template_versions_per_template: Optional[str] = None, + idps: Optional[str] = None, + claim_rules_per_group: Optional[str] = None, + claim_rules_per_profile: Optional[str] = None, + cr_links: Optional[str] = None, + cr_links_per_profile: Optional[str] = None, + cr_rules: Optional[str] = None, + cr_rules_per_profile: Optional[str] = None, + **kwargs, + ) -> DetailedResponse: + """ + Get account entity limits. + + Returns the details of an account's entity limits with query parameters for + consumption details. + + :param str account_id: Unique ID of the account. + :param bool serviceid_groups: (optional) Boolean to include serviceid group + consumption. + :param str serviceids_per_group: (optional) Comma seperated list of + ServiceID groups to include for consumption. + :param str profiles: (optional) Boolean to include trusted profiles + consumption. + :param str apikeys_per_identity: (optional) Comma seperated list of IAM IDs + to include for API key consumption. + :param str templates: (optional) Boolean to include template consumption. + :param str template_versions_per_template: (optional) Comma seperated list + of template IDs to include for template version consumption. + :param str idps: (optional) Boolean to include identity provider + consumption. + :param str claim_rules_per_group: (optional) Comma seperated list of access + groups to include for claim rules consumption. + :param str claim_rules_per_profile: (optional) Comma seperated list of + profiles to include for claim rules consumption. + :param str cr_links: (optional) Boolean to include compute resource links + consumption. + :param str cr_links_per_profile: (optional) Comma seperated list of profile + IDs to include for cr links consumption. + :param str cr_rules: (optional) Boolean to include compute resource rules + consumption. + :param str cr_rules_per_profile: (optional) Comma seperated list of profile + IDs to include for cr rules consumption. + :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 `IdentityLimitsUsageResponse` object + """ + + if not account_id: + raise ValueError('account_id must be provided') + headers = {} + sdk_headers = get_sdk_headers( + service_name=self.DEFAULT_SERVICE_NAME, + service_version='V1', + operation_id='get_account_limits', + ) + headers.update(sdk_headers) + + params = { + 'serviceid_groups': serviceid_groups, + 'serviceids_per_group': serviceids_per_group, + 'profiles': profiles, + 'apikeys_per_identity': apikeys_per_identity, + 'templates': templates, + 'template_versions_per_template': template_versions_per_template, + 'idps': idps, + 'claim_rules_per_group': claim_rules_per_group, + 'claim_rules_per_profile': claim_rules_per_profile, + 'cr_links': cr_links, + 'cr_links_per_profile': cr_links_per_profile, + 'cr_rules': cr_rules, + 'cr_rules_per_profile': cr_rules_per_profile, + } + + if 'headers' in kwargs: + headers.update(kwargs.get('headers')) + del kwargs['headers'] + headers['Accept'] = 'application/json' + + path_param_keys = ['account_id'] + path_param_values = self.encode_path_vars(account_id) + path_param_dict = dict(zip(path_param_keys, path_param_values)) + url = '/v1/accounts/{account_id}/limits/identity'.format(**path_param_dict) + request = self.prepare_request( + method='GET', + url=url, + headers=headers, + params=params, + ) + + response = self.send(request, **kwargs) + return response + + def bulk_list_account_entity_consumption( + self, + account_id: str, + *, + serviceid_groups: Optional[bool] = None, + serviceids_per_group: Optional[List[str]] = None, + profiles: Optional[bool] = None, + apikeys_per_identity: Optional[List[str]] = None, + templates: Optional[bool] = None, + template_versions_per_template: Optional[List[str]] = None, + idps: Optional[bool] = None, + claim_rules_per_group: Optional[List[str]] = None, + claim_rules_per_profile: Optional[List[str]] = None, + cr_links: Optional[bool] = None, + cr_links_per_profile: Optional[List[str]] = None, + cr_rules: Optional[bool] = None, + cr_rules_per_profile: Optional[List[str]] = None, + **kwargs, + ) -> DetailedResponse: + """ + Get account entity limits via POST request. + + Returns the details of an account's entity limits using a body for larger list of + parameters for consumption details. + + :param str account_id: Unique ID of the account. + :param bool serviceid_groups: (optional) Flag to include service ID groups + usage. + :param List[str] serviceids_per_group: (optional) List of service ID group + IDs to get usage for. + :param bool profiles: (optional) Flag to include trusted profiles usage. + :param List[str] apikeys_per_identity: (optional) List of identity IDs to + get API key usage for. + :param bool templates: (optional) Flag to include templates usage. + :param List[str] template_versions_per_template: (optional) List of + template IDs to get version usage for. + :param bool idps: (optional) Flag to include identity providers usage. + :param List[str] claim_rules_per_group: (optional) List of access group IDs + to get claim rules usage for. + :param List[str] claim_rules_per_profile: (optional) List of profile IDs to + get claim rules usage for. + :param bool cr_links: (optional) Flag to include compute resource links + usage. + :param List[str] cr_links_per_profile: (optional) List of profile IDs to + get compute resource links usage for. + :param bool cr_rules: (optional) Flag to include compute resource rules + usage. + :param List[str] cr_rules_per_profile: (optional) List of profile IDs to + get compute resource rules usage for. + :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 `IdentityLimitsUsageResponse` object + """ + + if not account_id: + raise ValueError('account_id must be provided') + headers = {} + sdk_headers = get_sdk_headers( + service_name=self.DEFAULT_SERVICE_NAME, + service_version='V1', + operation_id='bulk_list_account_entity_consumption', + ) + headers.update(sdk_headers) + + data = { + 'serviceid_groups': serviceid_groups, + 'serviceids_per_group': serviceids_per_group, + 'profiles': profiles, + 'apikeys_per_identity': apikeys_per_identity, + 'templates': templates, + 'template_versions_per_template': template_versions_per_template, + 'idps': idps, + 'claim_rules_per_group': claim_rules_per_group, + 'claim_rules_per_profile': claim_rules_per_profile, + 'cr_links': cr_links, + 'cr_links_per_profile': cr_links_per_profile, + 'cr_rules': cr_rules, + 'cr_rules_per_profile': cr_rules_per_profile, + } + data = {k: v for (k, v) in data.items() if v is not None} + data = json.dumps(data) + headers['content-type'] = 'application/json' + + if 'headers' in kwargs: + headers.update(kwargs.get('headers')) + del kwargs['headers'] + headers['Accept'] = 'application/json' + + path_param_keys = ['account_id'] + path_param_values = self.encode_path_vars(account_id) + path_param_dict = dict(zip(path_param_keys, path_param_values)) + url = '/v1/accounts/{account_id}/limits/identity'.format(**path_param_dict) + request = self.prepare_request( + method='POST', + url=url, + headers=headers, + data=data, + ) + + response = self.send(request, **kwargs) + return response + class ListServiceIdsEnums: """ @@ -5660,6 +5878,72 @@ class Order(str, Enum): ############################################################################## +class AccessGroupCount: + """ + Claim rule count for a specific access group. + + :param str group_id: (optional) Access group identifier. + :param int count: (optional) Number of claim rules for the access group. + """ + + def __init__( + self, + *, + group_id: Optional[str] = None, + count: Optional[int] = None, + ) -> None: + """ + Initialize a AccessGroupCount object. + + :param str group_id: (optional) Access group identifier. + :param int count: (optional) Number of claim rules for the access group. + """ + self.group_id = group_id + self.count = count + + @classmethod + def from_dict(cls, _dict: Dict) -> 'AccessGroupCount': + """Initialize a AccessGroupCount object from a json dictionary.""" + args = {} + if (group_id := _dict.get('group_id')) is not None: + args['group_id'] = group_id + if (count := _dict.get('count')) is not None: + args['count'] = count + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a AccessGroupCount object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'group_id') and self.group_id is not None: + _dict['group_id'] = self.group_id + if hasattr(self, 'count') and self.count is not None: + _dict['count'] = self.count + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this AccessGroupCount object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'AccessGroupCount') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'AccessGroupCount') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class AccountBasedMfaEnrollment: """ AccountBasedMfaEnrollment. @@ -5786,7 +6070,7 @@ class AccountSettingsAssignedTemplatesSection: * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str session_expiration_in_seconds: (optional) Defines the session expiration in seconds for the account. Valid values: * Any whole number between between '900' and '86400' @@ -5868,7 +6152,7 @@ def __init__( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str session_expiration_in_seconds: (optional) Defines the session expiration in seconds for the account. Valid values: * Any whole number between between '900' and '86400' @@ -6081,7 +6365,7 @@ class MfaEnum(str, Enum): * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ NONE = 'NONE' @@ -6140,7 +6424,7 @@ class AccountSettingsEffectiveSection: * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param List[AccountSettingsUserMFAResponse] user_mfa: (optional) List of users that are exempted from the MFA requirement of the account. :param str session_expiration_in_seconds: (optional) Defines the session @@ -6212,7 +6496,7 @@ def __init__( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param List[AccountSettingsUserMFAResponse] user_mfa: (optional) List of users that are exempted from the MFA requirement of the account. :param str session_expiration_in_seconds: (optional) Defines the session @@ -6391,7 +6675,7 @@ class MfaEnum(str, Enum): * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ NONE = 'NONE' @@ -6434,7 +6718,7 @@ class AccountSettingsResponse: * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str session_expiration_in_seconds: Defines the session expiration in seconds for the account. Valid values: * Any whole number between between '900' and '86400' @@ -6515,7 +6799,7 @@ def __init__( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str session_expiration_in_seconds: Defines the session expiration in seconds for the account. Valid values: * Any whole number between between '900' and '86400' @@ -6782,7 +7066,7 @@ class MfaEnum(str, Enum): * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ NONE = 'NONE' @@ -7241,7 +7525,7 @@ class AccountSettingsUserMFAResponse: * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str name: (optional) name of the user account. :param str user_name: (optional) userName of the user. :param str email: (optional) email of the user. @@ -7269,7 +7553,7 @@ def __init__( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str name: (optional) name of the user account. :param str user_name: (optional) userName of the user. :param str email: (optional) email of the user. @@ -7353,7 +7637,7 @@ class MfaEnum(str, Enum): * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ NONE = 'NONE' @@ -7759,7 +8043,10 @@ class ApiKey: :param str action_when_leaked: (optional) Defines the action to take when API key is leaked, valid values are 'none', 'disable' and 'delete'. :param str expires_at: (optional) Date and time when the API key becomes - invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'. + invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'. **WARNING** An + API key will be permanently and irrevocably deleted when both the expires_at and + modified_at timestamps are more than ninety (90) days in the past, regardless of + the key’s locked status or any other state. :param str description: (optional) The optional description of the API key. The 'description' property is only available if a description was provided during a create of an API key. @@ -7839,6 +8126,9 @@ def __init__( API key is leaked, valid values are 'none', 'disable' and 'delete'. :param str expires_at: (optional) Date and time when the API key becomes invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'. + **WARNING** An API key will be permanently and irrevocably deleted when + both the expires_at and modified_at timestamps are more than ninety (90) + days in the past, regardless of the key’s locked status or any other state. :param str description: (optional) The optional description of the API key. The 'description' property is only available if a description was provided during a create of an API key. @@ -8028,7 +8318,10 @@ class ApiKeyInsideCreateServiceIdRequest: :param str action_when_leaked: (optional) Defines the action to take when API key is leaked, valid values are 'none', 'disable' and 'delete'. :param str expires_at: (optional) Date and time when the API key becomes - invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'. + invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'. **WARNING** An + API key will be permanently and irrevocably deleted when both the expires_at and + modified_at timestamps are more than ninety (90) days in the past, regardless of + the key’s locked status or any other state. """ def __init__( @@ -8065,6 +8358,9 @@ def __init__( API key is leaked, valid values are 'none', 'disable' and 'delete'. :param str expires_at: (optional) Date and time when the API key becomes invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'. + **WARNING** An API key will be permanently and irrevocably deleted when + both the expires_at and modified_at timestamps are more than ninety (90) + days in the past, regardless of the key’s locked status or any other state. """ self.name = name self.description = description @@ -9213,7 +9509,7 @@ class IdBasedMfaEnrollment: * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str trait_user_specific: (optional) MFA trait definitions as follows: * NONE - No MFA trait set * NONE_NO_ROPC- No MFA, disable CLI logins with only a password @@ -9221,7 +9517,7 @@ class IdBasedMfaEnrollment: * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str trait_effective: MFA trait definitions as follows: * NONE - No MFA trait set * NONE_NO_ROPC- No MFA, disable CLI logins with only a password @@ -9229,7 +9525,7 @@ class IdBasedMfaEnrollment: * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param bool complies: The enrollment complies to the effective requirement. :param str comply_state: (optional) Defines comply state for the account. Valid values: @@ -9259,7 +9555,7 @@ def __init__( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str trait_effective: MFA trait definitions as follows: * NONE - No MFA trait set * NONE_NO_ROPC- No MFA, disable CLI logins with only a password @@ -9267,7 +9563,7 @@ def __init__( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param bool complies: The enrollment complies to the effective requirement. :param str trait_user_specific: (optional) MFA trait definitions as follows: @@ -9277,7 +9573,7 @@ def __init__( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param str comply_state: (optional) Defines comply state for the account. Valid values: * NO - User does not comply in the given account. @@ -9361,7 +9657,7 @@ class TraitAccountDefaultEnum(str, Enum): * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ NONE = 'NONE' @@ -9381,7 +9677,7 @@ class TraitUserSpecificEnum(str, Enum): * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ NONE = 'NONE' @@ -9401,7 +9697,7 @@ class TraitEffectiveEnum(str, Enum): * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ NONE = 'NONE' @@ -9427,94 +9723,51 @@ class ComplyStateEnum(str, Enum): CROSS_ACCOUNT = 'CROSS_ACCOUNT' -class IdentityPreferenceResponse: +class IdentityCount: """ - IdentityPreferenceResponse. + API key count for a specific identity. - :param str service: (optional) Service of the preference. - :param str id: (optional) Unique ID of the preference. - :param str account_id: (optional) Account ID of the preference, only present for - scope 'account'. - :param str scope: (optional) Scope of the preference, 'global' or 'account'. - :param str value_string: (optional) String value of the preference, only one - value property is set, either 'value_string' or 'value_list_of_strings' is - present. - :param List[str] value_list_of_strings: (optional) List of value of the - preference, only one value property is set, either 'value_string' or - 'value_list_of_strings' is present. + :param str iam_id: (optional) IAM identifier of the identity. + :param int count: (optional) Number of API keys for the identity. """ def __init__( self, *, - service: Optional[str] = None, - id: Optional[str] = None, - account_id: Optional[str] = None, - scope: Optional[str] = None, - value_string: Optional[str] = None, - value_list_of_strings: Optional[List[str]] = None, + iam_id: Optional[str] = None, + count: Optional[int] = None, ) -> None: """ - Initialize a IdentityPreferenceResponse object. + Initialize a IdentityCount object. - :param str service: (optional) Service of the preference. - :param str id: (optional) Unique ID of the preference. - :param str account_id: (optional) Account ID of the preference, only - present for scope 'account'. - :param str scope: (optional) Scope of the preference, 'global' or - 'account'. - :param str value_string: (optional) String value of the preference, only - one value property is set, either 'value_string' or 'value_list_of_strings' - is present. - :param List[str] value_list_of_strings: (optional) List of value of the - preference, only one value property is set, either 'value_string' or - 'value_list_of_strings' is present. + :param str iam_id: (optional) IAM identifier of the identity. + :param int count: (optional) Number of API keys for the identity. """ - self.service = service - self.id = id - self.account_id = account_id - self.scope = scope - self.value_string = value_string - self.value_list_of_strings = value_list_of_strings + self.iam_id = iam_id + self.count = count @classmethod - def from_dict(cls, _dict: Dict) -> 'IdentityPreferenceResponse': - """Initialize a IdentityPreferenceResponse object from a json dictionary.""" + def from_dict(cls, _dict: Dict) -> 'IdentityCount': + """Initialize a IdentityCount object from a json dictionary.""" args = {} - if (service := _dict.get('service')) is not None: - args['service'] = service - if (id := _dict.get('id')) is not None: - args['id'] = id - if (account_id := _dict.get('account_id')) is not None: - args['account_id'] = account_id - if (scope := _dict.get('scope')) is not None: - args['scope'] = scope - if (value_string := _dict.get('value_string')) is not None: - args['value_string'] = value_string - if (value_list_of_strings := _dict.get('value_list_of_strings')) is not None: - args['value_list_of_strings'] = value_list_of_strings + if (iam_id := _dict.get('iam_id')) is not None: + args['iam_id'] = iam_id + if (count := _dict.get('count')) is not None: + args['count'] = count return cls(**args) @classmethod def _from_dict(cls, _dict): - """Initialize a IdentityPreferenceResponse object from a json dictionary.""" + """Initialize a IdentityCount object from a json dictionary.""" return cls.from_dict(_dict) def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'service') and self.service is not None: - _dict['service'] = self.service - if hasattr(self, 'id') and self.id is not None: - _dict['id'] = self.id - if hasattr(self, 'account_id') and self.account_id is not None: - _dict['account_id'] = self.account_id - if hasattr(self, 'scope') and self.scope is not None: - _dict['scope'] = self.scope - if hasattr(self, 'value_string') and self.value_string is not None: - _dict['value_string'] = self.value_string - if hasattr(self, 'value_list_of_strings') and self.value_list_of_strings is not None: - _dict['value_list_of_strings'] = self.value_list_of_strings + if hasattr(self, 'iam_id') and self.iam_id is not None: + _dict['iam_id'] = self.iam_id + if hasattr(self, 'count') and self.count is not None: + _dict['count'] = self.count return _dict def _to_dict(self): @@ -9522,67 +9775,962 @@ def _to_dict(self): return self.to_dict() def __str__(self) -> str: - """Return a `str` version of this IdentityPreferenceResponse object.""" + """Return a `str` version of this IdentityCount object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'IdentityPreferenceResponse') -> bool: + def __eq__(self, other: 'IdentityCount') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'IdentityPreferenceResponse') -> bool: + def __ne__(self, other: 'IdentityCount') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class IdentityPreferencesResponse: - """ - IdentityPreferencesResponse. - - :param List[IdentityPreferenceResponse] preferences: List of Identity - Preferences. +class IdentityLimitsUsageResponse: + """ + Response body format for identity limits usage. + + :param LimitCount serviceid_groups: (optional) Limit and current usage count for + a resource. + :param IdentityLimitsUsageResponseServiceidsPerGroup serviceids_per_group: + (optional) Usage count for service IDs per group. + :param LimitCount profiles: (optional) Limit and current usage count for a + resource. + :param IdentityLimitsUsageResponseApikeysPerIdentity apikeys_per_identity: + (optional) Usage count for API keys per identity. + :param LimitCount profile_templates: (optional) Limit and current usage count + for a resource. + :param LimitCount account_settings_templates: (optional) Limit and current usage + count for a resource. + :param IdentityLimitsUsageResponseTemplateVersionsPerTemplate + template_versions_per_template: (optional) Usage count for template versions per + template. + :param LimitCount idps: (optional) Limit and current usage count for a resource. + :param IdentityLimitsUsageResponseClaimRulesPerGroup claim_rules_per_group: + (optional) Usage count for claim rules per access group. + :param IdentityLimitsUsageResponseClaimRulesPerProfile claim_rules_per_profile: + (optional) Usage count for claim rules per profile. + :param LimitCount cr_links: (optional) Limit and current usage count for a + resource. + :param IdentityLimitsUsageResponseCrLinksPerProfile cr_links_per_profile: + (optional) Usage count for compute resource links per profile. + :param LimitCount cr_rules: (optional) Limit and current usage count for a + resource. + :param IdentityLimitsUsageResponseCrRulesPerProfile cr_rules_per_profile: + (optional) Usage count for compute resource rules per profile. """ def __init__( self, - preferences: List['IdentityPreferenceResponse'], + *, + serviceid_groups: Optional['LimitCount'] = None, + serviceids_per_group: Optional['IdentityLimitsUsageResponseServiceidsPerGroup'] = None, + profiles: Optional['LimitCount'] = None, + apikeys_per_identity: Optional['IdentityLimitsUsageResponseApikeysPerIdentity'] = None, + profile_templates: Optional['LimitCount'] = None, + account_settings_templates: Optional['LimitCount'] = None, + template_versions_per_template: Optional['IdentityLimitsUsageResponseTemplateVersionsPerTemplate'] = None, + idps: Optional['LimitCount'] = None, + claim_rules_per_group: Optional['IdentityLimitsUsageResponseClaimRulesPerGroup'] = None, + claim_rules_per_profile: Optional['IdentityLimitsUsageResponseClaimRulesPerProfile'] = None, + cr_links: Optional['LimitCount'] = None, + cr_links_per_profile: Optional['IdentityLimitsUsageResponseCrLinksPerProfile'] = None, + cr_rules: Optional['LimitCount'] = None, + cr_rules_per_profile: Optional['IdentityLimitsUsageResponseCrRulesPerProfile'] = None, ) -> None: """ - Initialize a IdentityPreferencesResponse object. - - :param List[IdentityPreferenceResponse] preferences: List of Identity - Preferences. + Initialize a IdentityLimitsUsageResponse object. + + :param LimitCount serviceid_groups: (optional) Limit and current usage + count for a resource. + :param IdentityLimitsUsageResponseServiceidsPerGroup serviceids_per_group: + (optional) Usage count for service IDs per group. + :param LimitCount profiles: (optional) Limit and current usage count for a + resource. + :param IdentityLimitsUsageResponseApikeysPerIdentity apikeys_per_identity: + (optional) Usage count for API keys per identity. + :param LimitCount profile_templates: (optional) Limit and current usage + count for a resource. + :param LimitCount account_settings_templates: (optional) Limit and current + usage count for a resource. + :param IdentityLimitsUsageResponseTemplateVersionsPerTemplate + template_versions_per_template: (optional) Usage count for template + versions per template. + :param LimitCount idps: (optional) Limit and current usage count for a + resource. + :param IdentityLimitsUsageResponseClaimRulesPerGroup claim_rules_per_group: + (optional) Usage count for claim rules per access group. + :param IdentityLimitsUsageResponseClaimRulesPerProfile + claim_rules_per_profile: (optional) Usage count for claim rules per + profile. + :param LimitCount cr_links: (optional) Limit and current usage count for a + resource. + :param IdentityLimitsUsageResponseCrLinksPerProfile cr_links_per_profile: + (optional) Usage count for compute resource links per profile. + :param LimitCount cr_rules: (optional) Limit and current usage count for a + resource. + :param IdentityLimitsUsageResponseCrRulesPerProfile cr_rules_per_profile: + (optional) Usage count for compute resource rules per profile. """ - self.preferences = preferences - - @classmethod - def from_dict(cls, _dict: Dict) -> 'IdentityPreferencesResponse': - """Initialize a IdentityPreferencesResponse object from a json dictionary.""" + self.serviceid_groups = serviceid_groups + self.serviceids_per_group = serviceids_per_group + self.profiles = profiles + self.apikeys_per_identity = apikeys_per_identity + self.profile_templates = profile_templates + self.account_settings_templates = account_settings_templates + self.template_versions_per_template = template_versions_per_template + self.idps = idps + self.claim_rules_per_group = claim_rules_per_group + self.claim_rules_per_profile = claim_rules_per_profile + self.cr_links = cr_links + self.cr_links_per_profile = cr_links_per_profile + self.cr_rules = cr_rules + self.cr_rules_per_profile = cr_rules_per_profile + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityLimitsUsageResponse': + """Initialize a IdentityLimitsUsageResponse object from a json dictionary.""" args = {} - if (preferences := _dict.get('preferences')) is not None: - args['preferences'] = [IdentityPreferenceResponse.from_dict(v) for v in preferences] - else: - raise ValueError('Required property \'preferences\' not present in IdentityPreferencesResponse JSON') + if (serviceid_groups := _dict.get('serviceid_groups')) is not None: + args['serviceid_groups'] = LimitCount.from_dict(serviceid_groups) + if (serviceids_per_group := _dict.get('serviceids_per_group')) is not None: + args['serviceids_per_group'] = IdentityLimitsUsageResponseServiceidsPerGroup.from_dict(serviceids_per_group) + if (profiles := _dict.get('profiles')) is not None: + args['profiles'] = LimitCount.from_dict(profiles) + if (apikeys_per_identity := _dict.get('apikeys_per_identity')) is not None: + args['apikeys_per_identity'] = IdentityLimitsUsageResponseApikeysPerIdentity.from_dict(apikeys_per_identity) + if (profile_templates := _dict.get('profile_templates')) is not None: + args['profile_templates'] = LimitCount.from_dict(profile_templates) + if (account_settings_templates := _dict.get('account_settings_templates')) is not None: + args['account_settings_templates'] = LimitCount.from_dict(account_settings_templates) + if (template_versions_per_template := _dict.get('template_versions_per_template')) is not None: + args['template_versions_per_template'] = IdentityLimitsUsageResponseTemplateVersionsPerTemplate.from_dict( + template_versions_per_template + ) + if (idps := _dict.get('idps')) is not None: + args['idps'] = LimitCount.from_dict(idps) + if (claim_rules_per_group := _dict.get('claim_rules_per_group')) is not None: + args['claim_rules_per_group'] = IdentityLimitsUsageResponseClaimRulesPerGroup.from_dict( + claim_rules_per_group + ) + if (claim_rules_per_profile := _dict.get('claim_rules_per_profile')) is not None: + args['claim_rules_per_profile'] = IdentityLimitsUsageResponseClaimRulesPerProfile.from_dict( + claim_rules_per_profile + ) + if (cr_links := _dict.get('cr_links')) is not None: + args['cr_links'] = LimitCount.from_dict(cr_links) + if (cr_links_per_profile := _dict.get('cr_links_per_profile')) is not None: + args['cr_links_per_profile'] = IdentityLimitsUsageResponseCrLinksPerProfile.from_dict(cr_links_per_profile) + if (cr_rules := _dict.get('cr_rules')) is not None: + args['cr_rules'] = LimitCount.from_dict(cr_rules) + if (cr_rules_per_profile := _dict.get('cr_rules_per_profile')) is not None: + args['cr_rules_per_profile'] = IdentityLimitsUsageResponseCrRulesPerProfile.from_dict(cr_rules_per_profile) return cls(**args) @classmethod def _from_dict(cls, _dict): - """Initialize a IdentityPreferencesResponse object from a json dictionary.""" + """Initialize a IdentityLimitsUsageResponse object from a json dictionary.""" return cls.from_dict(_dict) def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'preferences') and self.preferences is not None: - preferences_list = [] - for v in self.preferences: - if isinstance(v, dict): - preferences_list.append(v) - else: - preferences_list.append(v.to_dict()) - _dict['preferences'] = preferences_list - return _dict + if hasattr(self, 'serviceid_groups') and self.serviceid_groups is not None: + if isinstance(self.serviceid_groups, dict): + _dict['serviceid_groups'] = self.serviceid_groups + else: + _dict['serviceid_groups'] = self.serviceid_groups.to_dict() + if hasattr(self, 'serviceids_per_group') and self.serviceids_per_group is not None: + if isinstance(self.serviceids_per_group, dict): + _dict['serviceids_per_group'] = self.serviceids_per_group + else: + _dict['serviceids_per_group'] = self.serviceids_per_group.to_dict() + if hasattr(self, 'profiles') and self.profiles is not None: + if isinstance(self.profiles, dict): + _dict['profiles'] = self.profiles + else: + _dict['profiles'] = self.profiles.to_dict() + if hasattr(self, 'apikeys_per_identity') and self.apikeys_per_identity is not None: + if isinstance(self.apikeys_per_identity, dict): + _dict['apikeys_per_identity'] = self.apikeys_per_identity + else: + _dict['apikeys_per_identity'] = self.apikeys_per_identity.to_dict() + if hasattr(self, 'profile_templates') and self.profile_templates is not None: + if isinstance(self.profile_templates, dict): + _dict['profile_templates'] = self.profile_templates + else: + _dict['profile_templates'] = self.profile_templates.to_dict() + if hasattr(self, 'account_settings_templates') and self.account_settings_templates is not None: + if isinstance(self.account_settings_templates, dict): + _dict['account_settings_templates'] = self.account_settings_templates + else: + _dict['account_settings_templates'] = self.account_settings_templates.to_dict() + if hasattr(self, 'template_versions_per_template') and self.template_versions_per_template is not None: + if isinstance(self.template_versions_per_template, dict): + _dict['template_versions_per_template'] = self.template_versions_per_template + else: + _dict['template_versions_per_template'] = self.template_versions_per_template.to_dict() + if hasattr(self, 'idps') and self.idps is not None: + if isinstance(self.idps, dict): + _dict['idps'] = self.idps + else: + _dict['idps'] = self.idps.to_dict() + if hasattr(self, 'claim_rules_per_group') and self.claim_rules_per_group is not None: + if isinstance(self.claim_rules_per_group, dict): + _dict['claim_rules_per_group'] = self.claim_rules_per_group + else: + _dict['claim_rules_per_group'] = self.claim_rules_per_group.to_dict() + if hasattr(self, 'claim_rules_per_profile') and self.claim_rules_per_profile is not None: + if isinstance(self.claim_rules_per_profile, dict): + _dict['claim_rules_per_profile'] = self.claim_rules_per_profile + else: + _dict['claim_rules_per_profile'] = self.claim_rules_per_profile.to_dict() + if hasattr(self, 'cr_links') and self.cr_links is not None: + if isinstance(self.cr_links, dict): + _dict['cr_links'] = self.cr_links + else: + _dict['cr_links'] = self.cr_links.to_dict() + if hasattr(self, 'cr_links_per_profile') and self.cr_links_per_profile is not None: + if isinstance(self.cr_links_per_profile, dict): + _dict['cr_links_per_profile'] = self.cr_links_per_profile + else: + _dict['cr_links_per_profile'] = self.cr_links_per_profile.to_dict() + if hasattr(self, 'cr_rules') and self.cr_rules is not None: + if isinstance(self.cr_rules, dict): + _dict['cr_rules'] = self.cr_rules + else: + _dict['cr_rules'] = self.cr_rules.to_dict() + if hasattr(self, 'cr_rules_per_profile') and self.cr_rules_per_profile is not None: + if isinstance(self.cr_rules_per_profile, dict): + _dict['cr_rules_per_profile'] = self.cr_rules_per_profile + else: + _dict['cr_rules_per_profile'] = self.cr_rules_per_profile.to_dict() + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IdentityLimitsUsageResponse object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IdentityLimitsUsageResponse') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IdentityLimitsUsageResponse') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IdentityLimitsUsageResponseApikeysPerIdentity: + """ + Usage count for API keys per identity. + + :param int limit: Maximum allowed API keys per identity. + :param List[IdentityCount] identities: (optional) List of identities with their + API key usage counts. + """ + + def __init__( + self, + limit: int, + *, + identities: Optional[List['IdentityCount']] = None, + ) -> None: + """ + Initialize a IdentityLimitsUsageResponseApikeysPerIdentity object. + + :param int limit: Maximum allowed API keys per identity. + :param List[IdentityCount] identities: (optional) List of identities with + their API key usage counts. + """ + self.limit = limit + self.identities = identities + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityLimitsUsageResponseApikeysPerIdentity': + """Initialize a IdentityLimitsUsageResponseApikeysPerIdentity object from a json dictionary.""" + args = {} + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in IdentityLimitsUsageResponseApikeysPerIdentity JSON' + ) + if (identities := _dict.get('identities')) is not None: + args['identities'] = [IdentityCount.from_dict(v) for v in identities] + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IdentityLimitsUsageResponseApikeysPerIdentity object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'identities') and self.identities is not None: + identities_list = [] + for v in self.identities: + if isinstance(v, dict): + identities_list.append(v) + else: + identities_list.append(v.to_dict()) + _dict['identities'] = identities_list + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IdentityLimitsUsageResponseApikeysPerIdentity object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IdentityLimitsUsageResponseApikeysPerIdentity') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IdentityLimitsUsageResponseApikeysPerIdentity') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IdentityLimitsUsageResponseClaimRulesPerGroup: + """ + Usage count for claim rules per access group. + + :param int limit: Maximum allowed claim rules per access group. + :param List[AccessGroupCount] access_groups: (optional) List of access groups + with their claim rules usage counts. + """ + + def __init__( + self, + limit: int, + *, + access_groups: Optional[List['AccessGroupCount']] = None, + ) -> None: + """ + Initialize a IdentityLimitsUsageResponseClaimRulesPerGroup object. + + :param int limit: Maximum allowed claim rules per access group. + :param List[AccessGroupCount] access_groups: (optional) List of access + groups with their claim rules usage counts. + """ + self.limit = limit + self.access_groups = access_groups + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityLimitsUsageResponseClaimRulesPerGroup': + """Initialize a IdentityLimitsUsageResponseClaimRulesPerGroup object from a json dictionary.""" + args = {} + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in IdentityLimitsUsageResponseClaimRulesPerGroup JSON' + ) + if (access_groups := _dict.get('access_groups')) is not None: + args['access_groups'] = [AccessGroupCount.from_dict(v) for v in access_groups] + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IdentityLimitsUsageResponseClaimRulesPerGroup object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'access_groups') and self.access_groups is not None: + access_groups_list = [] + for v in self.access_groups: + if isinstance(v, dict): + access_groups_list.append(v) + else: + access_groups_list.append(v.to_dict()) + _dict['access_groups'] = access_groups_list + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IdentityLimitsUsageResponseClaimRulesPerGroup object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IdentityLimitsUsageResponseClaimRulesPerGroup') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IdentityLimitsUsageResponseClaimRulesPerGroup') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IdentityLimitsUsageResponseClaimRulesPerProfile: + """ + Usage count for claim rules per profile. + + :param int limit: Maximum allowed claim rules per profile. + :param List[ProfileCount] profiles: (optional) List of profiles with their claim + rules usage counts. + """ + + def __init__( + self, + limit: int, + *, + profiles: Optional[List['ProfileCount']] = None, + ) -> None: + """ + Initialize a IdentityLimitsUsageResponseClaimRulesPerProfile object. + + :param int limit: Maximum allowed claim rules per profile. + :param List[ProfileCount] profiles: (optional) List of profiles with their + claim rules usage counts. + """ + self.limit = limit + self.profiles = profiles + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityLimitsUsageResponseClaimRulesPerProfile': + """Initialize a IdentityLimitsUsageResponseClaimRulesPerProfile object from a json dictionary.""" + args = {} + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in IdentityLimitsUsageResponseClaimRulesPerProfile JSON' + ) + if (profiles := _dict.get('profiles')) is not None: + args['profiles'] = [ProfileCount.from_dict(v) for v in profiles] + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IdentityLimitsUsageResponseClaimRulesPerProfile object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'profiles') and self.profiles is not None: + profiles_list = [] + for v in self.profiles: + if isinstance(v, dict): + profiles_list.append(v) + else: + profiles_list.append(v.to_dict()) + _dict['profiles'] = profiles_list + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IdentityLimitsUsageResponseClaimRulesPerProfile object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IdentityLimitsUsageResponseClaimRulesPerProfile') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IdentityLimitsUsageResponseClaimRulesPerProfile') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IdentityLimitsUsageResponseCrLinksPerProfile: + """ + Usage count for compute resource links per profile. + + :param int limit: Maximum allowed compute resource links per profile. + :param List[ProfileCount] profiles: (optional) List of profiles with their + compute resource links usage counts. + """ + + def __init__( + self, + limit: int, + *, + profiles: Optional[List['ProfileCount']] = None, + ) -> None: + """ + Initialize a IdentityLimitsUsageResponseCrLinksPerProfile object. + + :param int limit: Maximum allowed compute resource links per profile. + :param List[ProfileCount] profiles: (optional) List of profiles with their + compute resource links usage counts. + """ + self.limit = limit + self.profiles = profiles + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityLimitsUsageResponseCrLinksPerProfile': + """Initialize a IdentityLimitsUsageResponseCrLinksPerProfile object from a json dictionary.""" + args = {} + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in IdentityLimitsUsageResponseCrLinksPerProfile JSON' + ) + if (profiles := _dict.get('profiles')) is not None: + args['profiles'] = [ProfileCount.from_dict(v) for v in profiles] + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IdentityLimitsUsageResponseCrLinksPerProfile object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'profiles') and self.profiles is not None: + profiles_list = [] + for v in self.profiles: + if isinstance(v, dict): + profiles_list.append(v) + else: + profiles_list.append(v.to_dict()) + _dict['profiles'] = profiles_list + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IdentityLimitsUsageResponseCrLinksPerProfile object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IdentityLimitsUsageResponseCrLinksPerProfile') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IdentityLimitsUsageResponseCrLinksPerProfile') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IdentityLimitsUsageResponseCrRulesPerProfile: + """ + Usage count for compute resource rules per profile. + + :param int limit: Maximum allowed compute resource rules per profile. + :param List[ProfileCount] profiles: (optional) List of profiles with their + compute resource rules usage counts. + """ + + def __init__( + self, + limit: int, + *, + profiles: Optional[List['ProfileCount']] = None, + ) -> None: + """ + Initialize a IdentityLimitsUsageResponseCrRulesPerProfile object. + + :param int limit: Maximum allowed compute resource rules per profile. + :param List[ProfileCount] profiles: (optional) List of profiles with their + compute resource rules usage counts. + """ + self.limit = limit + self.profiles = profiles + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityLimitsUsageResponseCrRulesPerProfile': + """Initialize a IdentityLimitsUsageResponseCrRulesPerProfile object from a json dictionary.""" + args = {} + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in IdentityLimitsUsageResponseCrRulesPerProfile JSON' + ) + if (profiles := _dict.get('profiles')) is not None: + args['profiles'] = [ProfileCount.from_dict(v) for v in profiles] + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IdentityLimitsUsageResponseCrRulesPerProfile object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'profiles') and self.profiles is not None: + profiles_list = [] + for v in self.profiles: + if isinstance(v, dict): + profiles_list.append(v) + else: + profiles_list.append(v.to_dict()) + _dict['profiles'] = profiles_list + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IdentityLimitsUsageResponseCrRulesPerProfile object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IdentityLimitsUsageResponseCrRulesPerProfile') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IdentityLimitsUsageResponseCrRulesPerProfile') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IdentityLimitsUsageResponseServiceidsPerGroup: + """ + Usage count for service IDs per group. + + :param int limit: Maximum allowed service IDs per group. + :param List[ServiceIdGroupCount] serviceid_groups: (optional) List of service ID + groups with their usage counts. + """ + + def __init__( + self, + limit: int, + *, + serviceid_groups: Optional[List['ServiceIdGroupCount']] = None, + ) -> None: + """ + Initialize a IdentityLimitsUsageResponseServiceidsPerGroup object. + + :param int limit: Maximum allowed service IDs per group. + :param List[ServiceIdGroupCount] serviceid_groups: (optional) List of + service ID groups with their usage counts. + """ + self.limit = limit + self.serviceid_groups = serviceid_groups + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityLimitsUsageResponseServiceidsPerGroup': + """Initialize a IdentityLimitsUsageResponseServiceidsPerGroup object from a json dictionary.""" + args = {} + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in IdentityLimitsUsageResponseServiceidsPerGroup JSON' + ) + if (serviceid_groups := _dict.get('serviceid_groups')) is not None: + args['serviceid_groups'] = [ServiceIdGroupCount.from_dict(v) for v in serviceid_groups] + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IdentityLimitsUsageResponseServiceidsPerGroup object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'serviceid_groups') and self.serviceid_groups is not None: + serviceid_groups_list = [] + for v in self.serviceid_groups: + if isinstance(v, dict): + serviceid_groups_list.append(v) + else: + serviceid_groups_list.append(v.to_dict()) + _dict['serviceid_groups'] = serviceid_groups_list + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IdentityLimitsUsageResponseServiceidsPerGroup object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IdentityLimitsUsageResponseServiceidsPerGroup') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IdentityLimitsUsageResponseServiceidsPerGroup') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IdentityLimitsUsageResponseTemplateVersionsPerTemplate: + """ + Usage count for template versions per template. + + :param int limit: Maximum allowed versions per template. + :param List[TemplateCount] templates: (optional) List of templates with their + version usage counts. + """ + + def __init__( + self, + limit: int, + *, + templates: Optional[List['TemplateCount']] = None, + ) -> None: + """ + Initialize a IdentityLimitsUsageResponseTemplateVersionsPerTemplate object. + + :param int limit: Maximum allowed versions per template. + :param List[TemplateCount] templates: (optional) List of templates with + their version usage counts. + """ + self.limit = limit + self.templates = templates + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityLimitsUsageResponseTemplateVersionsPerTemplate': + """Initialize a IdentityLimitsUsageResponseTemplateVersionsPerTemplate object from a json dictionary.""" + args = {} + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in IdentityLimitsUsageResponseTemplateVersionsPerTemplate JSON' + ) + if (templates := _dict.get('templates')) is not None: + args['templates'] = [TemplateCount.from_dict(v) for v in templates] + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IdentityLimitsUsageResponseTemplateVersionsPerTemplate object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'templates') and self.templates is not None: + templates_list = [] + for v in self.templates: + if isinstance(v, dict): + templates_list.append(v) + else: + templates_list.append(v.to_dict()) + _dict['templates'] = templates_list + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IdentityLimitsUsageResponseTemplateVersionsPerTemplate object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IdentityLimitsUsageResponseTemplateVersionsPerTemplate') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IdentityLimitsUsageResponseTemplateVersionsPerTemplate') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IdentityPreferenceResponse: + """ + IdentityPreferenceResponse. + + :param str service: (optional) Service of the preference. + :param str id: (optional) Unique ID of the preference. + :param str account_id: (optional) Account ID of the preference, only present for + scope 'account'. + :param str scope: (optional) Scope of the preference, 'global' or 'account'. + :param str value_string: (optional) String value of the preference, only one + value property is set, either 'value_string' or 'value_list_of_strings' is + present. + :param List[str] value_list_of_strings: (optional) List of value of the + preference, only one value property is set, either 'value_string' or + 'value_list_of_strings' is present. + """ + + def __init__( + self, + *, + service: Optional[str] = None, + id: Optional[str] = None, + account_id: Optional[str] = None, + scope: Optional[str] = None, + value_string: Optional[str] = None, + value_list_of_strings: Optional[List[str]] = None, + ) -> None: + """ + Initialize a IdentityPreferenceResponse object. + + :param str service: (optional) Service of the preference. + :param str id: (optional) Unique ID of the preference. + :param str account_id: (optional) Account ID of the preference, only + present for scope 'account'. + :param str scope: (optional) Scope of the preference, 'global' or + 'account'. + :param str value_string: (optional) String value of the preference, only + one value property is set, either 'value_string' or 'value_list_of_strings' + is present. + :param List[str] value_list_of_strings: (optional) List of value of the + preference, only one value property is set, either 'value_string' or + 'value_list_of_strings' is present. + """ + self.service = service + self.id = id + self.account_id = account_id + self.scope = scope + self.value_string = value_string + self.value_list_of_strings = value_list_of_strings + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityPreferenceResponse': + """Initialize a IdentityPreferenceResponse object from a json dictionary.""" + args = {} + if (service := _dict.get('service')) is not None: + args['service'] = service + if (id := _dict.get('id')) is not None: + args['id'] = id + if (account_id := _dict.get('account_id')) is not None: + args['account_id'] = account_id + if (scope := _dict.get('scope')) is not None: + args['scope'] = scope + if (value_string := _dict.get('value_string')) is not None: + args['value_string'] = value_string + if (value_list_of_strings := _dict.get('value_list_of_strings')) is not None: + args['value_list_of_strings'] = value_list_of_strings + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IdentityPreferenceResponse object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'service') and self.service is not None: + _dict['service'] = self.service + if hasattr(self, 'id') and self.id is not None: + _dict['id'] = self.id + if hasattr(self, 'account_id') and self.account_id is not None: + _dict['account_id'] = self.account_id + if hasattr(self, 'scope') and self.scope is not None: + _dict['scope'] = self.scope + if hasattr(self, 'value_string') and self.value_string is not None: + _dict['value_string'] = self.value_string + if hasattr(self, 'value_list_of_strings') and self.value_list_of_strings is not None: + _dict['value_list_of_strings'] = self.value_list_of_strings + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IdentityPreferenceResponse object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IdentityPreferenceResponse') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IdentityPreferenceResponse') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IdentityPreferencesResponse: + """ + IdentityPreferencesResponse. + + :param List[IdentityPreferenceResponse] preferences: List of Identity + Preferences. + """ + + def __init__( + self, + preferences: List['IdentityPreferenceResponse'], + ) -> None: + """ + Initialize a IdentityPreferencesResponse object. + + :param List[IdentityPreferenceResponse] preferences: List of Identity + Preferences. + """ + self.preferences = preferences + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IdentityPreferencesResponse': + """Initialize a IdentityPreferencesResponse object from a json dictionary.""" + args = {} + if (preferences := _dict.get('preferences')) is not None: + args['preferences'] = [IdentityPreferenceResponse.from_dict(v) for v in preferences] + else: + raise ValueError('Required property \'preferences\' not present in IdentityPreferencesResponse JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IdentityPreferencesResponse object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'preferences') and self.preferences is not None: + preferences_list = [] + for v in self.preferences: + if isinstance(v, dict): + preferences_list.append(v) + else: + preferences_list.append(v.to_dict()) + _dict['preferences'] = preferences_list + return _dict def _to_dict(self): """Return a json dictionary representing this model.""" @@ -9603,6 +10751,74 @@ def __ne__(self, other: 'IdentityPreferencesResponse') -> bool: return not self == other +class LimitCount: + """ + Limit and current usage count for a resource. + + :param int limit: Maximum allowed value for the resource. + :param int count: (optional) Current usage count for the resource. + """ + + def __init__( + self, + limit: int, + *, + count: Optional[int] = None, + ) -> None: + """ + Initialize a LimitCount object. + + :param int limit: Maximum allowed value for the resource. + :param int count: (optional) Current usage count for the resource. + """ + self.limit = limit + self.count = count + + @classmethod + def from_dict(cls, _dict: Dict) -> 'LimitCount': + """Initialize a LimitCount object from a json dictionary.""" + args = {} + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError('Required property \'limit\' not present in LimitCount JSON') + if (count := _dict.get('count')) is not None: + args['count'] = count + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a LimitCount object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'count') and self.count is not None: + _dict['count'] = self.count + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this LimitCount object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'LimitCount') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'LimitCount') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class MfaEnrollmentTypeStatus: """ MfaEnrollmentTypeStatus. @@ -10065,6 +11281,73 @@ def __ne__(self, other: 'ProfileClaimRuleList') -> bool: return not self == other +class ProfileCount: + """ + Resource count for a specific profile. + + :param str profile_id: (optional) Profile identifier. + :param int count: (optional) Number of resources associated with the profile. + """ + + def __init__( + self, + *, + profile_id: Optional[str] = None, + count: Optional[int] = None, + ) -> None: + """ + Initialize a ProfileCount object. + + :param str profile_id: (optional) Profile identifier. + :param int count: (optional) Number of resources associated with the + profile. + """ + self.profile_id = profile_id + self.count = count + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ProfileCount': + """Initialize a ProfileCount object from a json dictionary.""" + args = {} + if (profile_id := _dict.get('profile_id')) is not None: + args['profile_id'] = profile_id + if (count := _dict.get('count')) is not None: + args['count'] = count + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ProfileCount object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'profile_id') and self.profile_id is not None: + _dict['profile_id'] = self.profile_id + if hasattr(self, 'count') and self.count is not None: + _dict['count'] = self.count + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ProfileCount object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ProfileCount') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ProfileCount') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ProfileIdentitiesResponse: """ ProfileIdentitiesResponse. @@ -10388,6 +11671,9 @@ class ProfileLink: :param str name: (optional) Optional name of the Link. :param str cr_type: The compute resource type. Valid values are VSI, BMS, IKS_SA, ROKS_SA, CE. + :param bool is_cross_account: (optional) Flag to indicate that the link provides + cross account access. If not provided then the account scope of the CRN must + match the Profile's account. :param ProfileLinkLink link: """ @@ -10401,6 +11687,7 @@ def __init__( link: 'ProfileLinkLink', *, name: Optional[str] = None, + is_cross_account: Optional[bool] = None, ) -> None: """ Initialize a ProfileLink object. @@ -10415,6 +11702,9 @@ def __init__( IKS_SA, ROKS_SA, CE. :param ProfileLinkLink link: :param str name: (optional) Optional name of the Link. + :param bool is_cross_account: (optional) Flag to indicate that the link + provides cross account access. If not provided then the account scope of + the CRN must match the Profile's account. """ self.id = id self.entity_tag = entity_tag @@ -10422,6 +11712,7 @@ def __init__( self.modified_at = modified_at self.name = name self.cr_type = cr_type + self.is_cross_account = is_cross_account self.link = link @classmethod @@ -10450,6 +11741,8 @@ def from_dict(cls, _dict: Dict) -> 'ProfileLink': args['cr_type'] = cr_type else: raise ValueError('Required property \'cr_type\' not present in ProfileLink JSON') + if (is_cross_account := _dict.get('is_cross_account')) is not None: + args['is_cross_account'] = is_cross_account if (link := _dict.get('link')) is not None: args['link'] = ProfileLinkLink.from_dict(link) else: @@ -10476,6 +11769,8 @@ def to_dict(self) -> Dict: _dict['name'] = self.name if hasattr(self, 'cr_type') and self.cr_type is not None: _dict['cr_type'] = self.cr_type + if hasattr(self, 'is_cross_account') and self.is_cross_account is not None: + _dict['is_cross_account'] = self.is_cross_account if hasattr(self, 'link') and self.link is not None: if isinstance(self.link, dict): _dict['link'] = self.link @@ -11523,6 +12818,72 @@ def __ne__(self, other: 'ServiceIdGroup') -> bool: return not self == other +class ServiceIdGroupCount: + """ + Service ID count for a specific group. + + :param str group_id: (optional) Service ID group identifier. + :param int count: (optional) Number of service IDs in the group. + """ + + def __init__( + self, + *, + group_id: Optional[str] = None, + count: Optional[int] = None, + ) -> None: + """ + Initialize a ServiceIdGroupCount object. + + :param str group_id: (optional) Service ID group identifier. + :param int count: (optional) Number of service IDs in the group. + """ + self.group_id = group_id + self.count = count + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ServiceIdGroupCount': + """Initialize a ServiceIdGroupCount object from a json dictionary.""" + args = {} + if (group_id := _dict.get('group_id')) is not None: + args['group_id'] = group_id + if (count := _dict.get('count')) is not None: + args['count'] = count + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ServiceIdGroupCount object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'group_id') and self.group_id is not None: + _dict['group_id'] = self.group_id + if hasattr(self, 'count') and self.count is not None: + _dict['count'] = self.count + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ServiceIdGroupCount object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ServiceIdGroupCount') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ServiceIdGroupCount') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ServiceIdGroupList: """ ServiceIdGroupList. @@ -11746,7 +13107,7 @@ class TemplateAccountSettings: * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param List[UserMfa] user_mfa: (optional) List of users that are exempted from the MFA requirement of the account. :param str session_expiration_in_seconds: (optional) Defines the session @@ -11822,7 +13183,7 @@ def __init__( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. :param List[UserMfa] user_mfa: (optional) List of users that are exempted from the MFA requirement of the account. :param str session_expiration_in_seconds: (optional) Defines the session @@ -12006,7 +13367,7 @@ class MfaEnum(str, Enum): * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ NONE = 'NONE' @@ -12826,6 +14187,72 @@ def __ne__(self, other: 'TemplateAssignmentResponseResourceDetail') -> bool: return not self == other +class TemplateCount: + """ + Version count for a specific template. + + :param str template_id: (optional) Template identifier. + :param int count: (optional) Number of versions for the template. + """ + + def __init__( + self, + *, + template_id: Optional[str] = None, + count: Optional[int] = None, + ) -> None: + """ + Initialize a TemplateCount object. + + :param str template_id: (optional) Template identifier. + :param int count: (optional) Number of versions for the template. + """ + self.template_id = template_id + self.count = count + + @classmethod + def from_dict(cls, _dict: Dict) -> 'TemplateCount': + """Initialize a TemplateCount object from a json dictionary.""" + args = {} + if (template_id := _dict.get('template_id')) is not None: + args['template_id'] = template_id + if (count := _dict.get('count')) is not None: + args['count'] = count + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a TemplateCount object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'template_id') and self.template_id is not None: + _dict['template_id'] = self.template_id + if hasattr(self, 'count') and self.count is not None: + _dict['count'] = self.count + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this TemplateCount object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'TemplateCount') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'TemplateCount') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class TemplateProfileComponentRequest: """ Input body parameters for the TemplateProfileComponent. @@ -14033,7 +15460,7 @@ class UserMfa: * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ def __init__( @@ -14053,7 +15480,7 @@ def __init__( * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ self.iam_id = iam_id self.mfa = mfa @@ -14109,7 +15536,7 @@ class MfaEnum(str, Enum): * TOTP4ALL - For all users * LEVEL1 - Email-based MFA for all users * LEVEL2 - TOTP-based MFA for all users - * LEVEL3 - U2F MFA for all users. + * LEVEL3 - Security Key MFA for all users. """ NONE = 'NONE' diff --git a/test/integration/test_iam_identity_v1.py b/test/integration/test_iam_identity_v1.py index 1605de52..821fadd7 100644 --- a/test/integration/test_iam_identity_v1.py +++ b/test/integration/test_iam_identity_v1.py @@ -2178,3 +2178,31 @@ def test_delete_profile2(self): profile = self.get_profile(self.iam_identity_service, profile_id2) assert profile is None + + @needscredentials + def test_get_account_limits(self): + response = self.iam_identity_service.get_account_limits( + account_id=self.account_id, + ) + + assert response.get_status_code() == 200 + identity_limits_usage_response = response.get_result() + assert identity_limits_usage_response is not None + + @needscredentials + def test_bulk_list_account_entity_consumption(self): + response = self.iam_identity_service.bulk_list_account_entity_consumption( + account_id=self.account_id, + serviceid_groups=True, + serviceids_per_group=['ServiceIdGroup-12345678-1234-1234-1234-123456789abc'], + profiles=True, + apikeys_per_identity=['iam-ServiceId-12345678-1234-1234-1234-123456789def'], + templates=True, + template_versions_per_template=['AccountSettingsTemplate-12345678-1234-1234-1234-123456789abc'], + idps=True, + claim_rules_per_group=['AccessGroupId-12345678-1234-1234-1234-123456789abc'], + ) + + assert response.get_status_code() == 200 + identity_limits_usage_response = response.get_result() + assert identity_limits_usage_response is not None diff --git a/test/unit/test_iam_identity_v1.py b/test/unit/test_iam_identity_v1.py index f689f097..0be7513f 100644 --- a/test/unit/test_iam_identity_v1.py +++ b/test/unit/test_iam_identity_v1.py @@ -3549,7 +3549,7 @@ def test_create_link_all_params(self): """ # Set up mock url = preprocess_url('/v1/profiles/testString/links') - mock_response = '{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}' + mock_response = '{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "is_cross_account": true, "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}' responses.add( responses.POST, url, @@ -3571,6 +3571,7 @@ def test_create_link_all_params(self): cr_type = 'testString' link = create_profile_link_request_link_model name = 'testString' + is_cross_account = True # Invoke method response = _service.create_link( @@ -3578,6 +3579,7 @@ def test_create_link_all_params(self): cr_type, link, name=name, + is_cross_account=is_cross_account, headers={}, ) @@ -3589,6 +3591,7 @@ def test_create_link_all_params(self): assert req_body['cr_type'] == 'testString' assert req_body['link'] == create_profile_link_request_link_model assert req_body['name'] == 'testString' + assert req_body['is_cross_account'] == True def test_create_link_all_params_with_retries(self): # Enable retries and run test_create_link_all_params. @@ -3606,7 +3609,7 @@ def test_create_link_value_error(self): """ # Set up mock url = preprocess_url('/v1/profiles/testString/links') - mock_response = '{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}' + mock_response = '{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "is_cross_account": true, "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}' responses.add( responses.POST, url, @@ -3628,6 +3631,7 @@ def test_create_link_value_error(self): cr_type = 'testString' link = create_profile_link_request_link_model name = 'testString' + is_cross_account = True # Pass in all but one required param and check for a ValueError req_param_dict = { @@ -3662,7 +3666,7 @@ def test_list_links_all_params(self): """ # Set up mock url = preprocess_url('/v1/profiles/testString/links') - mock_response = '{"links": [{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}]}' + mock_response = '{"links": [{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "is_cross_account": true, "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}]}' responses.add( responses.GET, url, @@ -3700,7 +3704,7 @@ def test_list_links_value_error(self): """ # Set up mock url = preprocess_url('/v1/profiles/testString/links') - mock_response = '{"links": [{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}]}' + mock_response = '{"links": [{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "is_cross_account": true, "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}]}' responses.add( responses.GET, url, @@ -3882,7 +3886,7 @@ def test_get_link_all_params(self): """ # Set up mock url = preprocess_url('/v1/profiles/testString/links/testString') - mock_response = '{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}' + mock_response = '{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "is_cross_account": true, "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}' responses.add( responses.GET, url, @@ -3922,7 +3926,7 @@ def test_get_link_value_error(self): """ # Set up mock url = preprocess_url('/v1/profiles/testString/links/testString') - mock_response = '{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}' + mock_response = '{"id": "id", "entity_tag": "entity_tag", "created_at": "2019-01-01T12:00:00.000Z", "modified_at": "2019-01-01T12:00:00.000Z", "name": "name", "cr_type": "cr_type", "is_cross_account": true, "link": {"crn": "crn", "namespace": "namespace", "name": "name", "component_type": "component_type", "component_name": "component_name"}}' responses.add( responses.GET, url, @@ -9544,6 +9548,396 @@ def test_update_account_settings_assignment_value_error_with_retries(self): # End of Service: AccountSettingsTemplateAssignments ############################################################################## +############################################################################## +# Start of Service: AccountLimits +############################################################################## +# region + + +class TestNewInstance: + """ + Test Class for new_instance + """ + + def test_new_instance(self): + """ + new_instance() + """ + os.environ['TEST_SERVICE_AUTH_TYPE'] = 'noAuth' + + service = IamIdentityV1.new_instance( + service_name='TEST_SERVICE', + ) + + assert service is not None + assert isinstance(service, IamIdentityV1) + + def test_new_instance_without_authenticator(self): + """ + new_instance_without_authenticator() + """ + with pytest.raises(ValueError, match='authenticator must be provided'): + service = IamIdentityV1.new_instance( + service_name='TEST_SERVICE_NOT_FOUND', + ) + + +class TestGetAccountLimits: + """ + Test Class for get_account_limits + """ + + @responses.activate + def test_get_account_limits_all_params(self): + """ + get_account_limits() + """ + # Set up mock + url = preprocess_url('/v1/accounts/testString/limits/identity') + mock_response = '{"serviceid_groups": {"limit": 5, "count": 5}, "serviceids_per_group": {"limit": 5, "serviceid_groups": [{"group_id": "group_id", "count": 5}]}, "profiles": {"limit": 5, "count": 5}, "apikeys_per_identity": {"limit": 5, "identities": [{"iam_id": "iam_id", "count": 5}]}, "profile_templates": {"limit": 5, "count": 5}, "account_settings_templates": {"limit": 5, "count": 5}, "template_versions_per_template": {"limit": 5, "templates": [{"template_id": "template_id", "count": 5}]}, "idps": {"limit": 5, "count": 5}, "claim_rules_per_group": {"limit": 5, "access_groups": [{"group_id": "group_id", "count": 5}]}, "claim_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_links": {"limit": 5, "count": 5}, "cr_links_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_rules": {"limit": 5, "count": 5}, "cr_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + account_id = 'testString' + serviceid_groups = True + serviceids_per_group = 'testString' + profiles = 'testString' + apikeys_per_identity = 'testString' + templates = 'testString' + template_versions_per_template = 'testString' + idps = 'testString' + claim_rules_per_group = 'testString' + claim_rules_per_profile = 'testString' + cr_links = 'testString' + cr_links_per_profile = 'testString' + cr_rules = 'testString' + cr_rules_per_profile = 'testString' + + # Invoke method + response = _service.get_account_limits( + account_id, + serviceid_groups=serviceid_groups, + serviceids_per_group=serviceids_per_group, + profiles=profiles, + apikeys_per_identity=apikeys_per_identity, + templates=templates, + template_versions_per_template=template_versions_per_template, + idps=idps, + claim_rules_per_group=claim_rules_per_group, + claim_rules_per_profile=claim_rules_per_profile, + cr_links=cr_links, + cr_links_per_profile=cr_links_per_profile, + cr_rules=cr_rules, + cr_rules_per_profile=cr_rules_per_profile, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + # Validate query params + query_string = responses.calls[0].request.url.split('?', 1)[1] + query_string = urllib.parse.unquote_plus(query_string) + assert 'serviceid_groups={}'.format('true' if serviceid_groups else 'false') in query_string + assert 'serviceids_per_group={}'.format(serviceids_per_group) in query_string + assert 'profiles={}'.format(profiles) in query_string + assert 'apikeys_per_identity={}'.format(apikeys_per_identity) in query_string + assert 'templates={}'.format(templates) in query_string + assert 'template_versions_per_template={}'.format(template_versions_per_template) in query_string + assert 'idps={}'.format(idps) in query_string + assert 'claim_rules_per_group={}'.format(claim_rules_per_group) in query_string + assert 'claim_rules_per_profile={}'.format(claim_rules_per_profile) in query_string + assert 'cr_links={}'.format(cr_links) in query_string + assert 'cr_links_per_profile={}'.format(cr_links_per_profile) in query_string + assert 'cr_rules={}'.format(cr_rules) in query_string + assert 'cr_rules_per_profile={}'.format(cr_rules_per_profile) in query_string + + def test_get_account_limits_all_params_with_retries(self): + # Enable retries and run test_get_account_limits_all_params. + _service.enable_retries() + self.test_get_account_limits_all_params() + + # Disable retries and run test_get_account_limits_all_params. + _service.disable_retries() + self.test_get_account_limits_all_params() + + @responses.activate + def test_get_account_limits_required_params(self): + """ + test_get_account_limits_required_params() + """ + # Set up mock + url = preprocess_url('/v1/accounts/testString/limits/identity') + mock_response = '{"serviceid_groups": {"limit": 5, "count": 5}, "serviceids_per_group": {"limit": 5, "serviceid_groups": [{"group_id": "group_id", "count": 5}]}, "profiles": {"limit": 5, "count": 5}, "apikeys_per_identity": {"limit": 5, "identities": [{"iam_id": "iam_id", "count": 5}]}, "profile_templates": {"limit": 5, "count": 5}, "account_settings_templates": {"limit": 5, "count": 5}, "template_versions_per_template": {"limit": 5, "templates": [{"template_id": "template_id", "count": 5}]}, "idps": {"limit": 5, "count": 5}, "claim_rules_per_group": {"limit": 5, "access_groups": [{"group_id": "group_id", "count": 5}]}, "claim_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_links": {"limit": 5, "count": 5}, "cr_links_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_rules": {"limit": 5, "count": 5}, "cr_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + account_id = 'testString' + + # Invoke method + response = _service.get_account_limits( + account_id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + + def test_get_account_limits_required_params_with_retries(self): + # Enable retries and run test_get_account_limits_required_params. + _service.enable_retries() + self.test_get_account_limits_required_params() + + # Disable retries and run test_get_account_limits_required_params. + _service.disable_retries() + self.test_get_account_limits_required_params() + + @responses.activate + def test_get_account_limits_value_error(self): + """ + test_get_account_limits_value_error() + """ + # Set up mock + url = preprocess_url('/v1/accounts/testString/limits/identity') + mock_response = '{"serviceid_groups": {"limit": 5, "count": 5}, "serviceids_per_group": {"limit": 5, "serviceid_groups": [{"group_id": "group_id", "count": 5}]}, "profiles": {"limit": 5, "count": 5}, "apikeys_per_identity": {"limit": 5, "identities": [{"iam_id": "iam_id", "count": 5}]}, "profile_templates": {"limit": 5, "count": 5}, "account_settings_templates": {"limit": 5, "count": 5}, "template_versions_per_template": {"limit": 5, "templates": [{"template_id": "template_id", "count": 5}]}, "idps": {"limit": 5, "count": 5}, "claim_rules_per_group": {"limit": 5, "access_groups": [{"group_id": "group_id", "count": 5}]}, "claim_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_links": {"limit": 5, "count": 5}, "cr_links_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_rules": {"limit": 5, "count": 5}, "cr_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + account_id = 'testString' + + # Pass in all but one required param and check for a ValueError + req_param_dict = { + "account_id": account_id, + } + for param in req_param_dict.keys(): + req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + with pytest.raises(ValueError): + _service.get_account_limits(**req_copy) + + def test_get_account_limits_value_error_with_retries(self): + # Enable retries and run test_get_account_limits_value_error. + _service.enable_retries() + self.test_get_account_limits_value_error() + + # Disable retries and run test_get_account_limits_value_error. + _service.disable_retries() + self.test_get_account_limits_value_error() + + +class TestBulkListAccountEntityConsumption: + """ + Test Class for bulk_list_account_entity_consumption + """ + + @responses.activate + def test_bulk_list_account_entity_consumption_all_params(self): + """ + bulk_list_account_entity_consumption() + """ + # Set up mock + url = preprocess_url('/v1/accounts/testString/limits/identity') + mock_response = '{"serviceid_groups": {"limit": 5, "count": 5}, "serviceids_per_group": {"limit": 5, "serviceid_groups": [{"group_id": "group_id", "count": 5}]}, "profiles": {"limit": 5, "count": 5}, "apikeys_per_identity": {"limit": 5, "identities": [{"iam_id": "iam_id", "count": 5}]}, "profile_templates": {"limit": 5, "count": 5}, "account_settings_templates": {"limit": 5, "count": 5}, "template_versions_per_template": {"limit": 5, "templates": [{"template_id": "template_id", "count": 5}]}, "idps": {"limit": 5, "count": 5}, "claim_rules_per_group": {"limit": 5, "access_groups": [{"group_id": "group_id", "count": 5}]}, "claim_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_links": {"limit": 5, "count": 5}, "cr_links_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_rules": {"limit": 5, "count": 5}, "cr_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}}' + responses.add( + responses.POST, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + account_id = 'testString' + serviceid_groups = True + serviceids_per_group = [ + 'ServiceIdGroup-12345678-1234-1234-1234-123456789abc', + 'ServiceIdGroup-12345678-1234-1234-1234-123456789def', + ] + profiles = True + apikeys_per_identity = ['iam-ServiceId-12345678-1234-1234-1234-123456789def', 'IBMid-1234567ABC'] + templates = True + template_versions_per_template = [ + 'AccountSettingsTemplate-12345678-1234-1234-1234-123456789abc', + 'ProfileTemplate-12345678-1234-1234-1234-123456789def', + ] + idps = True + claim_rules_per_group = [ + 'AccessGroupId-12345678-1234-1234-1234-123456789abc', + 'AccessGroupId-12345678-1234-1234-1234-123456789def', + ] + claim_rules_per_profile = ['Profile-12345678-1234-1234-123456789abc', 'Profile-12345678-1234-1234-123456789def'] + cr_links = True + cr_links_per_profile = ['Profile-12345678-1234-1234-123456789abc', 'Profile-12345678-1234-1234-123456789def'] + cr_rules = True + cr_rules_per_profile = ['Profile-12345678-1234-1234-123456789abc', 'Profile-12345678-1234-1234-123456789def'] + + # Invoke method + response = _service.bulk_list_account_entity_consumption( + account_id, + serviceid_groups=serviceid_groups, + serviceids_per_group=serviceids_per_group, + profiles=profiles, + apikeys_per_identity=apikeys_per_identity, + templates=templates, + template_versions_per_template=template_versions_per_template, + idps=idps, + claim_rules_per_group=claim_rules_per_group, + claim_rules_per_profile=claim_rules_per_profile, + cr_links=cr_links, + cr_links_per_profile=cr_links_per_profile, + cr_rules=cr_rules, + cr_rules_per_profile=cr_rules_per_profile, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + # Validate body params + req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) + assert req_body['serviceid_groups'] == True + assert req_body['serviceids_per_group'] == [ + 'ServiceIdGroup-12345678-1234-1234-1234-123456789abc', + 'ServiceIdGroup-12345678-1234-1234-1234-123456789def', + ] + assert req_body['profiles'] == True + assert req_body['apikeys_per_identity'] == [ + 'iam-ServiceId-12345678-1234-1234-1234-123456789def', + 'IBMid-1234567ABC', + ] + assert req_body['templates'] == True + assert req_body['template_versions_per_template'] == [ + 'AccountSettingsTemplate-12345678-1234-1234-1234-123456789abc', + 'ProfileTemplate-12345678-1234-1234-1234-123456789def', + ] + assert req_body['idps'] == True + assert req_body['claim_rules_per_group'] == [ + 'AccessGroupId-12345678-1234-1234-1234-123456789abc', + 'AccessGroupId-12345678-1234-1234-1234-123456789def', + ] + assert req_body['claim_rules_per_profile'] == [ + 'Profile-12345678-1234-1234-123456789abc', + 'Profile-12345678-1234-1234-123456789def', + ] + assert req_body['cr_links'] == True + assert req_body['cr_links_per_profile'] == [ + 'Profile-12345678-1234-1234-123456789abc', + 'Profile-12345678-1234-1234-123456789def', + ] + assert req_body['cr_rules'] == True + assert req_body['cr_rules_per_profile'] == [ + 'Profile-12345678-1234-1234-123456789abc', + 'Profile-12345678-1234-1234-123456789def', + ] + + def test_bulk_list_account_entity_consumption_all_params_with_retries(self): + # Enable retries and run test_bulk_list_account_entity_consumption_all_params. + _service.enable_retries() + self.test_bulk_list_account_entity_consumption_all_params() + + # Disable retries and run test_bulk_list_account_entity_consumption_all_params. + _service.disable_retries() + self.test_bulk_list_account_entity_consumption_all_params() + + @responses.activate + def test_bulk_list_account_entity_consumption_required_params(self): + """ + test_bulk_list_account_entity_consumption_required_params() + """ + # Set up mock + url = preprocess_url('/v1/accounts/testString/limits/identity') + mock_response = '{"serviceid_groups": {"limit": 5, "count": 5}, "serviceids_per_group": {"limit": 5, "serviceid_groups": [{"group_id": "group_id", "count": 5}]}, "profiles": {"limit": 5, "count": 5}, "apikeys_per_identity": {"limit": 5, "identities": [{"iam_id": "iam_id", "count": 5}]}, "profile_templates": {"limit": 5, "count": 5}, "account_settings_templates": {"limit": 5, "count": 5}, "template_versions_per_template": {"limit": 5, "templates": [{"template_id": "template_id", "count": 5}]}, "idps": {"limit": 5, "count": 5}, "claim_rules_per_group": {"limit": 5, "access_groups": [{"group_id": "group_id", "count": 5}]}, "claim_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_links": {"limit": 5, "count": 5}, "cr_links_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_rules": {"limit": 5, "count": 5}, "cr_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}}' + responses.add( + responses.POST, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + account_id = 'testString' + + # Invoke method + response = _service.bulk_list_account_entity_consumption( + account_id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + + def test_bulk_list_account_entity_consumption_required_params_with_retries(self): + # Enable retries and run test_bulk_list_account_entity_consumption_required_params. + _service.enable_retries() + self.test_bulk_list_account_entity_consumption_required_params() + + # Disable retries and run test_bulk_list_account_entity_consumption_required_params. + _service.disable_retries() + self.test_bulk_list_account_entity_consumption_required_params() + + @responses.activate + def test_bulk_list_account_entity_consumption_value_error(self): + """ + test_bulk_list_account_entity_consumption_value_error() + """ + # Set up mock + url = preprocess_url('/v1/accounts/testString/limits/identity') + mock_response = '{"serviceid_groups": {"limit": 5, "count": 5}, "serviceids_per_group": {"limit": 5, "serviceid_groups": [{"group_id": "group_id", "count": 5}]}, "profiles": {"limit": 5, "count": 5}, "apikeys_per_identity": {"limit": 5, "identities": [{"iam_id": "iam_id", "count": 5}]}, "profile_templates": {"limit": 5, "count": 5}, "account_settings_templates": {"limit": 5, "count": 5}, "template_versions_per_template": {"limit": 5, "templates": [{"template_id": "template_id", "count": 5}]}, "idps": {"limit": 5, "count": 5}, "claim_rules_per_group": {"limit": 5, "access_groups": [{"group_id": "group_id", "count": 5}]}, "claim_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_links": {"limit": 5, "count": 5}, "cr_links_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}, "cr_rules": {"limit": 5, "count": 5}, "cr_rules_per_profile": {"limit": 5, "profiles": [{"profile_id": "profile_id", "count": 5}]}}' + responses.add( + responses.POST, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + account_id = 'testString' + + # Pass in all but one required param and check for a ValueError + req_param_dict = { + "account_id": account_id, + } + for param in req_param_dict.keys(): + req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + with pytest.raises(ValueError): + _service.bulk_list_account_entity_consumption(**req_copy) + + def test_bulk_list_account_entity_consumption_value_error_with_retries(self): + # Enable retries and run test_bulk_list_account_entity_consumption_value_error. + _service.enable_retries() + self.test_bulk_list_account_entity_consumption_value_error() + + # Disable retries and run test_bulk_list_account_entity_consumption_value_error. + _service.disable_retries() + self.test_bulk_list_account_entity_consumption_value_error() + + +# endregion +############################################################################## +# End of Service: AccountLimits +############################################################################## + ############################################################################## # Start of Model Tests @@ -9551,6 +9945,37 @@ def test_update_account_settings_assignment_value_error_with_retries(self): # region +class TestModel_AccessGroupCount: + """ + Test Class for AccessGroupCount + """ + + def test_access_group_count_serialization(self): + """ + Test serialization/deserialization for AccessGroupCount + """ + + # Construct a json representation of a AccessGroupCount model + access_group_count_model_json = {} + access_group_count_model_json['group_id'] = 'testString' + access_group_count_model_json['count'] = 38 + + # Construct a model instance of AccessGroupCount by calling from_dict on the json representation + access_group_count_model = AccessGroupCount.from_dict(access_group_count_model_json) + assert access_group_count_model != False + + # Construct a model instance of AccessGroupCount by calling from_dict on the json representation + access_group_count_model_dict = AccessGroupCount.from_dict(access_group_count_model_json).__dict__ + access_group_count_model2 = AccessGroupCount(**access_group_count_model_dict) + + # Verify the model instances are equivalent + assert access_group_count_model == access_group_count_model2 + + # Convert model instance back to dict and verify no loss of data + access_group_count_model_json2 = access_group_count_model.to_dict() + assert access_group_count_model_json2 == access_group_count_model_json + + class TestModel_AccountBasedMfaEnrollment: """ Test Class for AccountBasedMfaEnrollment @@ -10795,214 +11220,753 @@ def test_effective_account_settings_response_serialization(self): account_settings_assigned_templates_section_model ] - # Construct a model instance of EffectiveAccountSettingsResponse by calling from_dict on the json representation - effective_account_settings_response_model = EffectiveAccountSettingsResponse.from_dict( - effective_account_settings_response_model_json + # Construct a model instance of EffectiveAccountSettingsResponse by calling from_dict on the json representation + effective_account_settings_response_model = EffectiveAccountSettingsResponse.from_dict( + effective_account_settings_response_model_json + ) + assert effective_account_settings_response_model != False + + # Construct a model instance of EffectiveAccountSettingsResponse by calling from_dict on the json representation + effective_account_settings_response_model_dict = EffectiveAccountSettingsResponse.from_dict( + effective_account_settings_response_model_json + ).__dict__ + effective_account_settings_response_model2 = EffectiveAccountSettingsResponse( + **effective_account_settings_response_model_dict + ) + + # Verify the model instances are equivalent + assert effective_account_settings_response_model == effective_account_settings_response_model2 + + # Convert model instance back to dict and verify no loss of data + effective_account_settings_response_model_json2 = effective_account_settings_response_model.to_dict() + assert effective_account_settings_response_model_json2 == effective_account_settings_response_model_json + + +class TestModel_EnityHistoryRecord: + """ + Test Class for EnityHistoryRecord + """ + + def test_enity_history_record_serialization(self): + """ + Test serialization/deserialization for EnityHistoryRecord + """ + + # Construct a json representation of a EnityHistoryRecord model + enity_history_record_model_json = {} + enity_history_record_model_json['timestamp'] = 'testString' + enity_history_record_model_json['iam_id'] = 'testString' + enity_history_record_model_json['iam_id_account'] = 'testString' + enity_history_record_model_json['action'] = 'testString' + enity_history_record_model_json['params'] = ['testString'] + enity_history_record_model_json['message'] = 'testString' + + # Construct a model instance of EnityHistoryRecord by calling from_dict on the json representation + enity_history_record_model = EnityHistoryRecord.from_dict(enity_history_record_model_json) + assert enity_history_record_model != False + + # Construct a model instance of EnityHistoryRecord by calling from_dict on the json representation + enity_history_record_model_dict = EnityHistoryRecord.from_dict(enity_history_record_model_json).__dict__ + enity_history_record_model2 = EnityHistoryRecord(**enity_history_record_model_dict) + + # Verify the model instances are equivalent + assert enity_history_record_model == enity_history_record_model2 + + # Convert model instance back to dict and verify no loss of data + enity_history_record_model_json2 = enity_history_record_model.to_dict() + assert enity_history_record_model_json2 == enity_history_record_model_json + + +class TestModel_EntityActivity: + """ + Test Class for EntityActivity + """ + + def test_entity_activity_serialization(self): + """ + Test serialization/deserialization for EntityActivity + """ + + # Construct a json representation of a EntityActivity model + entity_activity_model_json = {} + entity_activity_model_json['id'] = 'testString' + entity_activity_model_json['name'] = 'testString' + entity_activity_model_json['last_authn'] = 'testString' + + # Construct a model instance of EntityActivity by calling from_dict on the json representation + entity_activity_model = EntityActivity.from_dict(entity_activity_model_json) + assert entity_activity_model != False + + # Construct a model instance of EntityActivity by calling from_dict on the json representation + entity_activity_model_dict = EntityActivity.from_dict(entity_activity_model_json).__dict__ + entity_activity_model2 = EntityActivity(**entity_activity_model_dict) + + # Verify the model instances are equivalent + assert entity_activity_model == entity_activity_model2 + + # Convert model instance back to dict and verify no loss of data + entity_activity_model_json2 = entity_activity_model.to_dict() + assert entity_activity_model_json2 == entity_activity_model_json + + +class TestModel_Error: + """ + Test Class for Error + """ + + def test_error_serialization(self): + """ + Test serialization/deserialization for Error + """ + + # Construct a json representation of a Error model + error_model_json = {} + error_model_json['code'] = 'testString' + error_model_json['message_code'] = 'testString' + error_model_json['message'] = 'testString' + error_model_json['details'] = 'testString' + + # Construct a model instance of Error by calling from_dict on the json representation + error_model = Error.from_dict(error_model_json) + assert error_model != False + + # Construct a model instance of Error by calling from_dict on the json representation + error_model_dict = Error.from_dict(error_model_json).__dict__ + error_model2 = Error(**error_model_dict) + + # Verify the model instances are equivalent + assert error_model == error_model2 + + # Convert model instance back to dict and verify no loss of data + error_model_json2 = error_model.to_dict() + assert error_model_json2 == error_model_json + + +class TestModel_ExceptionResponse: + """ + Test Class for ExceptionResponse + """ + + def test_exception_response_serialization(self): + """ + Test serialization/deserialization for ExceptionResponse + """ + + # Construct dict forms of any model objects needed in order to build this model. + + response_context_model = {} # ResponseContext + response_context_model['transaction_id'] = 'testString' + response_context_model['operation'] = 'testString' + response_context_model['user_agent'] = 'testString' + response_context_model['url'] = 'testString' + response_context_model['instance_id'] = 'testString' + response_context_model['thread_id'] = 'testString' + response_context_model['host'] = 'testString' + response_context_model['start_time'] = 'testString' + response_context_model['end_time'] = 'testString' + response_context_model['elapsed_time'] = 'testString' + response_context_model['cluster_name'] = 'testString' + + error_model = {} # Error + error_model['code'] = 'testString' + error_model['message_code'] = 'testString' + error_model['message'] = 'testString' + error_model['details'] = 'testString' + + # Construct a json representation of a ExceptionResponse model + exception_response_model_json = {} + exception_response_model_json['context'] = response_context_model + exception_response_model_json['status_code'] = 'testString' + exception_response_model_json['errors'] = [error_model] + exception_response_model_json['trace'] = 'testString' + + # Construct a model instance of ExceptionResponse by calling from_dict on the json representation + exception_response_model = ExceptionResponse.from_dict(exception_response_model_json) + assert exception_response_model != False + + # Construct a model instance of ExceptionResponse by calling from_dict on the json representation + exception_response_model_dict = ExceptionResponse.from_dict(exception_response_model_json).__dict__ + exception_response_model2 = ExceptionResponse(**exception_response_model_dict) + + # Verify the model instances are equivalent + assert exception_response_model == exception_response_model2 + + # Convert model instance back to dict and verify no loss of data + exception_response_model_json2 = exception_response_model.to_dict() + assert exception_response_model_json2 == exception_response_model_json + + +class TestModel_IdBasedMfaEnrollment: + """ + Test Class for IdBasedMfaEnrollment + """ + + def test_id_based_mfa_enrollment_serialization(self): + """ + Test serialization/deserialization for IdBasedMfaEnrollment + """ + + # Construct a json representation of a IdBasedMfaEnrollment model + id_based_mfa_enrollment_model_json = {} + id_based_mfa_enrollment_model_json['trait_account_default'] = 'NONE' + id_based_mfa_enrollment_model_json['trait_user_specific'] = 'NONE' + id_based_mfa_enrollment_model_json['trait_effective'] = 'NONE' + id_based_mfa_enrollment_model_json['complies'] = True + id_based_mfa_enrollment_model_json['comply_state'] = 'NO' + + # Construct a model instance of IdBasedMfaEnrollment by calling from_dict on the json representation + id_based_mfa_enrollment_model = IdBasedMfaEnrollment.from_dict(id_based_mfa_enrollment_model_json) + assert id_based_mfa_enrollment_model != False + + # Construct a model instance of IdBasedMfaEnrollment by calling from_dict on the json representation + id_based_mfa_enrollment_model_dict = IdBasedMfaEnrollment.from_dict(id_based_mfa_enrollment_model_json).__dict__ + id_based_mfa_enrollment_model2 = IdBasedMfaEnrollment(**id_based_mfa_enrollment_model_dict) + + # Verify the model instances are equivalent + assert id_based_mfa_enrollment_model == id_based_mfa_enrollment_model2 + + # Convert model instance back to dict and verify no loss of data + id_based_mfa_enrollment_model_json2 = id_based_mfa_enrollment_model.to_dict() + assert id_based_mfa_enrollment_model_json2 == id_based_mfa_enrollment_model_json + + +class TestModel_IdentityCount: + """ + Test Class for IdentityCount + """ + + def test_identity_count_serialization(self): + """ + Test serialization/deserialization for IdentityCount + """ + + # Construct a json representation of a IdentityCount model + identity_count_model_json = {} + identity_count_model_json['iam_id'] = 'testString' + identity_count_model_json['count'] = 38 + + # Construct a model instance of IdentityCount by calling from_dict on the json representation + identity_count_model = IdentityCount.from_dict(identity_count_model_json) + assert identity_count_model != False + + # Construct a model instance of IdentityCount by calling from_dict on the json representation + identity_count_model_dict = IdentityCount.from_dict(identity_count_model_json).__dict__ + identity_count_model2 = IdentityCount(**identity_count_model_dict) + + # Verify the model instances are equivalent + assert identity_count_model == identity_count_model2 + + # Convert model instance back to dict and verify no loss of data + identity_count_model_json2 = identity_count_model.to_dict() + assert identity_count_model_json2 == identity_count_model_json + + +class TestModel_IdentityLimitsUsageResponse: + """ + Test Class for IdentityLimitsUsageResponse + """ + + def test_identity_limits_usage_response_serialization(self): + """ + Test serialization/deserialization for IdentityLimitsUsageResponse + """ + + # Construct dict forms of any model objects needed in order to build this model. + + limit_count_model = {} # LimitCount + limit_count_model['limit'] = 38 + limit_count_model['count'] = 38 + + service_id_group_count_model = {} # ServiceIdGroupCount + service_id_group_count_model['group_id'] = 'testString' + service_id_group_count_model['count'] = 38 + + identity_limits_usage_response_serviceids_per_group_model = {} # IdentityLimitsUsageResponseServiceidsPerGroup + identity_limits_usage_response_serviceids_per_group_model['limit'] = 38 + identity_limits_usage_response_serviceids_per_group_model['serviceid_groups'] = [service_id_group_count_model] + + identity_count_model = {} # IdentityCount + identity_count_model['iam_id'] = 'testString' + identity_count_model['count'] = 38 + + identity_limits_usage_response_apikeys_per_identity_model = {} # IdentityLimitsUsageResponseApikeysPerIdentity + identity_limits_usage_response_apikeys_per_identity_model['limit'] = 38 + identity_limits_usage_response_apikeys_per_identity_model['identities'] = [identity_count_model] + + template_count_model = {} # TemplateCount + template_count_model['template_id'] = 'testString' + template_count_model['count'] = 38 + + identity_limits_usage_response_template_versions_per_template_model = ( + {} + ) # IdentityLimitsUsageResponseTemplateVersionsPerTemplate + identity_limits_usage_response_template_versions_per_template_model['limit'] = 38 + identity_limits_usage_response_template_versions_per_template_model['templates'] = [template_count_model] + + access_group_count_model = {} # AccessGroupCount + access_group_count_model['group_id'] = 'testString' + access_group_count_model['count'] = 38 + + identity_limits_usage_response_claim_rules_per_group_model = {} # IdentityLimitsUsageResponseClaimRulesPerGroup + identity_limits_usage_response_claim_rules_per_group_model['limit'] = 38 + identity_limits_usage_response_claim_rules_per_group_model['access_groups'] = [access_group_count_model] + + profile_count_model = {} # ProfileCount + profile_count_model['profile_id'] = 'testString' + profile_count_model['count'] = 38 + + identity_limits_usage_response_claim_rules_per_profile_model = ( + {} + ) # IdentityLimitsUsageResponseClaimRulesPerProfile + identity_limits_usage_response_claim_rules_per_profile_model['limit'] = 38 + identity_limits_usage_response_claim_rules_per_profile_model['profiles'] = [profile_count_model] + + identity_limits_usage_response_cr_links_per_profile_model = {} # IdentityLimitsUsageResponseCrLinksPerProfile + identity_limits_usage_response_cr_links_per_profile_model['limit'] = 38 + identity_limits_usage_response_cr_links_per_profile_model['profiles'] = [profile_count_model] + + identity_limits_usage_response_cr_rules_per_profile_model = {} # IdentityLimitsUsageResponseCrRulesPerProfile + identity_limits_usage_response_cr_rules_per_profile_model['limit'] = 38 + identity_limits_usage_response_cr_rules_per_profile_model['profiles'] = [profile_count_model] + + # Construct a json representation of a IdentityLimitsUsageResponse model + identity_limits_usage_response_model_json = {} + identity_limits_usage_response_model_json['serviceid_groups'] = limit_count_model + identity_limits_usage_response_model_json['serviceids_per_group'] = ( + identity_limits_usage_response_serviceids_per_group_model + ) + identity_limits_usage_response_model_json['profiles'] = limit_count_model + identity_limits_usage_response_model_json['apikeys_per_identity'] = ( + identity_limits_usage_response_apikeys_per_identity_model + ) + identity_limits_usage_response_model_json['profile_templates'] = limit_count_model + identity_limits_usage_response_model_json['account_settings_templates'] = limit_count_model + identity_limits_usage_response_model_json['template_versions_per_template'] = ( + identity_limits_usage_response_template_versions_per_template_model + ) + identity_limits_usage_response_model_json['idps'] = limit_count_model + identity_limits_usage_response_model_json['claim_rules_per_group'] = ( + identity_limits_usage_response_claim_rules_per_group_model + ) + identity_limits_usage_response_model_json['claim_rules_per_profile'] = ( + identity_limits_usage_response_claim_rules_per_profile_model + ) + identity_limits_usage_response_model_json['cr_links'] = limit_count_model + identity_limits_usage_response_model_json['cr_links_per_profile'] = ( + identity_limits_usage_response_cr_links_per_profile_model + ) + identity_limits_usage_response_model_json['cr_rules'] = limit_count_model + identity_limits_usage_response_model_json['cr_rules_per_profile'] = ( + identity_limits_usage_response_cr_rules_per_profile_model + ) + + # Construct a model instance of IdentityLimitsUsageResponse by calling from_dict on the json representation + identity_limits_usage_response_model = IdentityLimitsUsageResponse.from_dict( + identity_limits_usage_response_model_json + ) + assert identity_limits_usage_response_model != False + + # Construct a model instance of IdentityLimitsUsageResponse by calling from_dict on the json representation + identity_limits_usage_response_model_dict = IdentityLimitsUsageResponse.from_dict( + identity_limits_usage_response_model_json + ).__dict__ + identity_limits_usage_response_model2 = IdentityLimitsUsageResponse(**identity_limits_usage_response_model_dict) + + # Verify the model instances are equivalent + assert identity_limits_usage_response_model == identity_limits_usage_response_model2 + + # Convert model instance back to dict and verify no loss of data + identity_limits_usage_response_model_json2 = identity_limits_usage_response_model.to_dict() + assert identity_limits_usage_response_model_json2 == identity_limits_usage_response_model_json + + +class TestModel_IdentityLimitsUsageResponseApikeysPerIdentity: + """ + Test Class for IdentityLimitsUsageResponseApikeysPerIdentity + """ + + def test_identity_limits_usage_response_apikeys_per_identity_serialization(self): + """ + Test serialization/deserialization for IdentityLimitsUsageResponseApikeysPerIdentity + """ + + # Construct dict forms of any model objects needed in order to build this model. + + identity_count_model = {} # IdentityCount + identity_count_model['iam_id'] = 'testString' + identity_count_model['count'] = 38 + + # Construct a json representation of a IdentityLimitsUsageResponseApikeysPerIdentity model + identity_limits_usage_response_apikeys_per_identity_model_json = {} + identity_limits_usage_response_apikeys_per_identity_model_json['limit'] = 38 + identity_limits_usage_response_apikeys_per_identity_model_json['identities'] = [identity_count_model] + + # Construct a model instance of IdentityLimitsUsageResponseApikeysPerIdentity by calling from_dict on the json representation + identity_limits_usage_response_apikeys_per_identity_model = ( + IdentityLimitsUsageResponseApikeysPerIdentity.from_dict( + identity_limits_usage_response_apikeys_per_identity_model_json + ) + ) + assert identity_limits_usage_response_apikeys_per_identity_model != False + + # Construct a model instance of IdentityLimitsUsageResponseApikeysPerIdentity by calling from_dict on the json representation + identity_limits_usage_response_apikeys_per_identity_model_dict = ( + IdentityLimitsUsageResponseApikeysPerIdentity.from_dict( + identity_limits_usage_response_apikeys_per_identity_model_json + ).__dict__ + ) + identity_limits_usage_response_apikeys_per_identity_model2 = IdentityLimitsUsageResponseApikeysPerIdentity( + **identity_limits_usage_response_apikeys_per_identity_model_dict + ) + + # Verify the model instances are equivalent + assert ( + identity_limits_usage_response_apikeys_per_identity_model + == identity_limits_usage_response_apikeys_per_identity_model2 + ) + + # Convert model instance back to dict and verify no loss of data + identity_limits_usage_response_apikeys_per_identity_model_json2 = ( + identity_limits_usage_response_apikeys_per_identity_model.to_dict() + ) + assert ( + identity_limits_usage_response_apikeys_per_identity_model_json2 + == identity_limits_usage_response_apikeys_per_identity_model_json + ) + + +class TestModel_IdentityLimitsUsageResponseClaimRulesPerGroup: + """ + Test Class for IdentityLimitsUsageResponseClaimRulesPerGroup + """ + + def test_identity_limits_usage_response_claim_rules_per_group_serialization(self): + """ + Test serialization/deserialization for IdentityLimitsUsageResponseClaimRulesPerGroup + """ + + # Construct dict forms of any model objects needed in order to build this model. + + access_group_count_model = {} # AccessGroupCount + access_group_count_model['group_id'] = 'testString' + access_group_count_model['count'] = 38 + + # Construct a json representation of a IdentityLimitsUsageResponseClaimRulesPerGroup model + identity_limits_usage_response_claim_rules_per_group_model_json = {} + identity_limits_usage_response_claim_rules_per_group_model_json['limit'] = 38 + identity_limits_usage_response_claim_rules_per_group_model_json['access_groups'] = [access_group_count_model] + + # Construct a model instance of IdentityLimitsUsageResponseClaimRulesPerGroup by calling from_dict on the json representation + identity_limits_usage_response_claim_rules_per_group_model = ( + IdentityLimitsUsageResponseClaimRulesPerGroup.from_dict( + identity_limits_usage_response_claim_rules_per_group_model_json + ) ) - assert effective_account_settings_response_model != False + assert identity_limits_usage_response_claim_rules_per_group_model != False - # Construct a model instance of EffectiveAccountSettingsResponse by calling from_dict on the json representation - effective_account_settings_response_model_dict = EffectiveAccountSettingsResponse.from_dict( - effective_account_settings_response_model_json - ).__dict__ - effective_account_settings_response_model2 = EffectiveAccountSettingsResponse( - **effective_account_settings_response_model_dict + # Construct a model instance of IdentityLimitsUsageResponseClaimRulesPerGroup by calling from_dict on the json representation + identity_limits_usage_response_claim_rules_per_group_model_dict = ( + IdentityLimitsUsageResponseClaimRulesPerGroup.from_dict( + identity_limits_usage_response_claim_rules_per_group_model_json + ).__dict__ + ) + identity_limits_usage_response_claim_rules_per_group_model2 = IdentityLimitsUsageResponseClaimRulesPerGroup( + **identity_limits_usage_response_claim_rules_per_group_model_dict ) # Verify the model instances are equivalent - assert effective_account_settings_response_model == effective_account_settings_response_model2 + assert ( + identity_limits_usage_response_claim_rules_per_group_model + == identity_limits_usage_response_claim_rules_per_group_model2 + ) # Convert model instance back to dict and verify no loss of data - effective_account_settings_response_model_json2 = effective_account_settings_response_model.to_dict() - assert effective_account_settings_response_model_json2 == effective_account_settings_response_model_json + identity_limits_usage_response_claim_rules_per_group_model_json2 = ( + identity_limits_usage_response_claim_rules_per_group_model.to_dict() + ) + assert ( + identity_limits_usage_response_claim_rules_per_group_model_json2 + == identity_limits_usage_response_claim_rules_per_group_model_json + ) -class TestModel_EnityHistoryRecord: +class TestModel_IdentityLimitsUsageResponseClaimRulesPerProfile: """ - Test Class for EnityHistoryRecord + Test Class for IdentityLimitsUsageResponseClaimRulesPerProfile """ - def test_enity_history_record_serialization(self): + def test_identity_limits_usage_response_claim_rules_per_profile_serialization(self): """ - Test serialization/deserialization for EnityHistoryRecord + Test serialization/deserialization for IdentityLimitsUsageResponseClaimRulesPerProfile """ - # Construct a json representation of a EnityHistoryRecord model - enity_history_record_model_json = {} - enity_history_record_model_json['timestamp'] = 'testString' - enity_history_record_model_json['iam_id'] = 'testString' - enity_history_record_model_json['iam_id_account'] = 'testString' - enity_history_record_model_json['action'] = 'testString' - enity_history_record_model_json['params'] = ['testString'] - enity_history_record_model_json['message'] = 'testString' + # Construct dict forms of any model objects needed in order to build this model. - # Construct a model instance of EnityHistoryRecord by calling from_dict on the json representation - enity_history_record_model = EnityHistoryRecord.from_dict(enity_history_record_model_json) - assert enity_history_record_model != False + profile_count_model = {} # ProfileCount + profile_count_model['profile_id'] = 'testString' + profile_count_model['count'] = 38 - # Construct a model instance of EnityHistoryRecord by calling from_dict on the json representation - enity_history_record_model_dict = EnityHistoryRecord.from_dict(enity_history_record_model_json).__dict__ - enity_history_record_model2 = EnityHistoryRecord(**enity_history_record_model_dict) + # Construct a json representation of a IdentityLimitsUsageResponseClaimRulesPerProfile model + identity_limits_usage_response_claim_rules_per_profile_model_json = {} + identity_limits_usage_response_claim_rules_per_profile_model_json['limit'] = 38 + identity_limits_usage_response_claim_rules_per_profile_model_json['profiles'] = [profile_count_model] + + # Construct a model instance of IdentityLimitsUsageResponseClaimRulesPerProfile by calling from_dict on the json representation + identity_limits_usage_response_claim_rules_per_profile_model = ( + IdentityLimitsUsageResponseClaimRulesPerProfile.from_dict( + identity_limits_usage_response_claim_rules_per_profile_model_json + ) + ) + assert identity_limits_usage_response_claim_rules_per_profile_model != False + + # Construct a model instance of IdentityLimitsUsageResponseClaimRulesPerProfile by calling from_dict on the json representation + identity_limits_usage_response_claim_rules_per_profile_model_dict = ( + IdentityLimitsUsageResponseClaimRulesPerProfile.from_dict( + identity_limits_usage_response_claim_rules_per_profile_model_json + ).__dict__ + ) + identity_limits_usage_response_claim_rules_per_profile_model2 = IdentityLimitsUsageResponseClaimRulesPerProfile( + **identity_limits_usage_response_claim_rules_per_profile_model_dict + ) # Verify the model instances are equivalent - assert enity_history_record_model == enity_history_record_model2 + assert ( + identity_limits_usage_response_claim_rules_per_profile_model + == identity_limits_usage_response_claim_rules_per_profile_model2 + ) # Convert model instance back to dict and verify no loss of data - enity_history_record_model_json2 = enity_history_record_model.to_dict() - assert enity_history_record_model_json2 == enity_history_record_model_json + identity_limits_usage_response_claim_rules_per_profile_model_json2 = ( + identity_limits_usage_response_claim_rules_per_profile_model.to_dict() + ) + assert ( + identity_limits_usage_response_claim_rules_per_profile_model_json2 + == identity_limits_usage_response_claim_rules_per_profile_model_json + ) -class TestModel_EntityActivity: +class TestModel_IdentityLimitsUsageResponseCrLinksPerProfile: """ - Test Class for EntityActivity + Test Class for IdentityLimitsUsageResponseCrLinksPerProfile """ - def test_entity_activity_serialization(self): + def test_identity_limits_usage_response_cr_links_per_profile_serialization(self): """ - Test serialization/deserialization for EntityActivity + Test serialization/deserialization for IdentityLimitsUsageResponseCrLinksPerProfile """ - # Construct a json representation of a EntityActivity model - entity_activity_model_json = {} - entity_activity_model_json['id'] = 'testString' - entity_activity_model_json['name'] = 'testString' - entity_activity_model_json['last_authn'] = 'testString' + # Construct dict forms of any model objects needed in order to build this model. - # Construct a model instance of EntityActivity by calling from_dict on the json representation - entity_activity_model = EntityActivity.from_dict(entity_activity_model_json) - assert entity_activity_model != False + profile_count_model = {} # ProfileCount + profile_count_model['profile_id'] = 'testString' + profile_count_model['count'] = 38 - # Construct a model instance of EntityActivity by calling from_dict on the json representation - entity_activity_model_dict = EntityActivity.from_dict(entity_activity_model_json).__dict__ - entity_activity_model2 = EntityActivity(**entity_activity_model_dict) + # Construct a json representation of a IdentityLimitsUsageResponseCrLinksPerProfile model + identity_limits_usage_response_cr_links_per_profile_model_json = {} + identity_limits_usage_response_cr_links_per_profile_model_json['limit'] = 38 + identity_limits_usage_response_cr_links_per_profile_model_json['profiles'] = [profile_count_model] + + # Construct a model instance of IdentityLimitsUsageResponseCrLinksPerProfile by calling from_dict on the json representation + identity_limits_usage_response_cr_links_per_profile_model = ( + IdentityLimitsUsageResponseCrLinksPerProfile.from_dict( + identity_limits_usage_response_cr_links_per_profile_model_json + ) + ) + assert identity_limits_usage_response_cr_links_per_profile_model != False + + # Construct a model instance of IdentityLimitsUsageResponseCrLinksPerProfile by calling from_dict on the json representation + identity_limits_usage_response_cr_links_per_profile_model_dict = ( + IdentityLimitsUsageResponseCrLinksPerProfile.from_dict( + identity_limits_usage_response_cr_links_per_profile_model_json + ).__dict__ + ) + identity_limits_usage_response_cr_links_per_profile_model2 = IdentityLimitsUsageResponseCrLinksPerProfile( + **identity_limits_usage_response_cr_links_per_profile_model_dict + ) # Verify the model instances are equivalent - assert entity_activity_model == entity_activity_model2 + assert ( + identity_limits_usage_response_cr_links_per_profile_model + == identity_limits_usage_response_cr_links_per_profile_model2 + ) # Convert model instance back to dict and verify no loss of data - entity_activity_model_json2 = entity_activity_model.to_dict() - assert entity_activity_model_json2 == entity_activity_model_json + identity_limits_usage_response_cr_links_per_profile_model_json2 = ( + identity_limits_usage_response_cr_links_per_profile_model.to_dict() + ) + assert ( + identity_limits_usage_response_cr_links_per_profile_model_json2 + == identity_limits_usage_response_cr_links_per_profile_model_json + ) -class TestModel_Error: +class TestModel_IdentityLimitsUsageResponseCrRulesPerProfile: """ - Test Class for Error + Test Class for IdentityLimitsUsageResponseCrRulesPerProfile """ - def test_error_serialization(self): + def test_identity_limits_usage_response_cr_rules_per_profile_serialization(self): """ - Test serialization/deserialization for Error + Test serialization/deserialization for IdentityLimitsUsageResponseCrRulesPerProfile """ - # Construct a json representation of a Error model - error_model_json = {} - error_model_json['code'] = 'testString' - error_model_json['message_code'] = 'testString' - error_model_json['message'] = 'testString' - error_model_json['details'] = 'testString' + # Construct dict forms of any model objects needed in order to build this model. - # Construct a model instance of Error by calling from_dict on the json representation - error_model = Error.from_dict(error_model_json) - assert error_model != False + profile_count_model = {} # ProfileCount + profile_count_model['profile_id'] = 'testString' + profile_count_model['count'] = 38 - # Construct a model instance of Error by calling from_dict on the json representation - error_model_dict = Error.from_dict(error_model_json).__dict__ - error_model2 = Error(**error_model_dict) + # Construct a json representation of a IdentityLimitsUsageResponseCrRulesPerProfile model + identity_limits_usage_response_cr_rules_per_profile_model_json = {} + identity_limits_usage_response_cr_rules_per_profile_model_json['limit'] = 38 + identity_limits_usage_response_cr_rules_per_profile_model_json['profiles'] = [profile_count_model] + + # Construct a model instance of IdentityLimitsUsageResponseCrRulesPerProfile by calling from_dict on the json representation + identity_limits_usage_response_cr_rules_per_profile_model = ( + IdentityLimitsUsageResponseCrRulesPerProfile.from_dict( + identity_limits_usage_response_cr_rules_per_profile_model_json + ) + ) + assert identity_limits_usage_response_cr_rules_per_profile_model != False + + # Construct a model instance of IdentityLimitsUsageResponseCrRulesPerProfile by calling from_dict on the json representation + identity_limits_usage_response_cr_rules_per_profile_model_dict = ( + IdentityLimitsUsageResponseCrRulesPerProfile.from_dict( + identity_limits_usage_response_cr_rules_per_profile_model_json + ).__dict__ + ) + identity_limits_usage_response_cr_rules_per_profile_model2 = IdentityLimitsUsageResponseCrRulesPerProfile( + **identity_limits_usage_response_cr_rules_per_profile_model_dict + ) # Verify the model instances are equivalent - assert error_model == error_model2 + assert ( + identity_limits_usage_response_cr_rules_per_profile_model + == identity_limits_usage_response_cr_rules_per_profile_model2 + ) # Convert model instance back to dict and verify no loss of data - error_model_json2 = error_model.to_dict() - assert error_model_json2 == error_model_json + identity_limits_usage_response_cr_rules_per_profile_model_json2 = ( + identity_limits_usage_response_cr_rules_per_profile_model.to_dict() + ) + assert ( + identity_limits_usage_response_cr_rules_per_profile_model_json2 + == identity_limits_usage_response_cr_rules_per_profile_model_json + ) -class TestModel_ExceptionResponse: +class TestModel_IdentityLimitsUsageResponseServiceidsPerGroup: """ - Test Class for ExceptionResponse + Test Class for IdentityLimitsUsageResponseServiceidsPerGroup """ - def test_exception_response_serialization(self): + def test_identity_limits_usage_response_serviceids_per_group_serialization(self): """ - Test serialization/deserialization for ExceptionResponse + Test serialization/deserialization for IdentityLimitsUsageResponseServiceidsPerGroup """ # Construct dict forms of any model objects needed in order to build this model. - response_context_model = {} # ResponseContext - response_context_model['transaction_id'] = 'testString' - response_context_model['operation'] = 'testString' - response_context_model['user_agent'] = 'testString' - response_context_model['url'] = 'testString' - response_context_model['instance_id'] = 'testString' - response_context_model['thread_id'] = 'testString' - response_context_model['host'] = 'testString' - response_context_model['start_time'] = 'testString' - response_context_model['end_time'] = 'testString' - response_context_model['elapsed_time'] = 'testString' - response_context_model['cluster_name'] = 'testString' - - error_model = {} # Error - error_model['code'] = 'testString' - error_model['message_code'] = 'testString' - error_model['message'] = 'testString' - error_model['details'] = 'testString' + service_id_group_count_model = {} # ServiceIdGroupCount + service_id_group_count_model['group_id'] = 'testString' + service_id_group_count_model['count'] = 38 - # Construct a json representation of a ExceptionResponse model - exception_response_model_json = {} - exception_response_model_json['context'] = response_context_model - exception_response_model_json['status_code'] = 'testString' - exception_response_model_json['errors'] = [error_model] - exception_response_model_json['trace'] = 'testString' + # Construct a json representation of a IdentityLimitsUsageResponseServiceidsPerGroup model + identity_limits_usage_response_serviceids_per_group_model_json = {} + identity_limits_usage_response_serviceids_per_group_model_json['limit'] = 38 + identity_limits_usage_response_serviceids_per_group_model_json['serviceid_groups'] = [ + service_id_group_count_model + ] - # Construct a model instance of ExceptionResponse by calling from_dict on the json representation - exception_response_model = ExceptionResponse.from_dict(exception_response_model_json) - assert exception_response_model != False + # Construct a model instance of IdentityLimitsUsageResponseServiceidsPerGroup by calling from_dict on the json representation + identity_limits_usage_response_serviceids_per_group_model = ( + IdentityLimitsUsageResponseServiceidsPerGroup.from_dict( + identity_limits_usage_response_serviceids_per_group_model_json + ) + ) + assert identity_limits_usage_response_serviceids_per_group_model != False - # Construct a model instance of ExceptionResponse by calling from_dict on the json representation - exception_response_model_dict = ExceptionResponse.from_dict(exception_response_model_json).__dict__ - exception_response_model2 = ExceptionResponse(**exception_response_model_dict) + # Construct a model instance of IdentityLimitsUsageResponseServiceidsPerGroup by calling from_dict on the json representation + identity_limits_usage_response_serviceids_per_group_model_dict = ( + IdentityLimitsUsageResponseServiceidsPerGroup.from_dict( + identity_limits_usage_response_serviceids_per_group_model_json + ).__dict__ + ) + identity_limits_usage_response_serviceids_per_group_model2 = IdentityLimitsUsageResponseServiceidsPerGroup( + **identity_limits_usage_response_serviceids_per_group_model_dict + ) # Verify the model instances are equivalent - assert exception_response_model == exception_response_model2 + assert ( + identity_limits_usage_response_serviceids_per_group_model + == identity_limits_usage_response_serviceids_per_group_model2 + ) # Convert model instance back to dict and verify no loss of data - exception_response_model_json2 = exception_response_model.to_dict() - assert exception_response_model_json2 == exception_response_model_json + identity_limits_usage_response_serviceids_per_group_model_json2 = ( + identity_limits_usage_response_serviceids_per_group_model.to_dict() + ) + assert ( + identity_limits_usage_response_serviceids_per_group_model_json2 + == identity_limits_usage_response_serviceids_per_group_model_json + ) -class TestModel_IdBasedMfaEnrollment: +class TestModel_IdentityLimitsUsageResponseTemplateVersionsPerTemplate: """ - Test Class for IdBasedMfaEnrollment + Test Class for IdentityLimitsUsageResponseTemplateVersionsPerTemplate """ - def test_id_based_mfa_enrollment_serialization(self): + def test_identity_limits_usage_response_template_versions_per_template_serialization(self): """ - Test serialization/deserialization for IdBasedMfaEnrollment + Test serialization/deserialization for IdentityLimitsUsageResponseTemplateVersionsPerTemplate """ - # Construct a json representation of a IdBasedMfaEnrollment model - id_based_mfa_enrollment_model_json = {} - id_based_mfa_enrollment_model_json['trait_account_default'] = 'NONE' - id_based_mfa_enrollment_model_json['trait_user_specific'] = 'NONE' - id_based_mfa_enrollment_model_json['trait_effective'] = 'NONE' - id_based_mfa_enrollment_model_json['complies'] = True - id_based_mfa_enrollment_model_json['comply_state'] = 'NO' + # Construct dict forms of any model objects needed in order to build this model. - # Construct a model instance of IdBasedMfaEnrollment by calling from_dict on the json representation - id_based_mfa_enrollment_model = IdBasedMfaEnrollment.from_dict(id_based_mfa_enrollment_model_json) - assert id_based_mfa_enrollment_model != False + template_count_model = {} # TemplateCount + template_count_model['template_id'] = 'testString' + template_count_model['count'] = 38 - # Construct a model instance of IdBasedMfaEnrollment by calling from_dict on the json representation - id_based_mfa_enrollment_model_dict = IdBasedMfaEnrollment.from_dict(id_based_mfa_enrollment_model_json).__dict__ - id_based_mfa_enrollment_model2 = IdBasedMfaEnrollment(**id_based_mfa_enrollment_model_dict) + # Construct a json representation of a IdentityLimitsUsageResponseTemplateVersionsPerTemplate model + identity_limits_usage_response_template_versions_per_template_model_json = {} + identity_limits_usage_response_template_versions_per_template_model_json['limit'] = 38 + identity_limits_usage_response_template_versions_per_template_model_json['templates'] = [template_count_model] + + # Construct a model instance of IdentityLimitsUsageResponseTemplateVersionsPerTemplate by calling from_dict on the json representation + identity_limits_usage_response_template_versions_per_template_model = ( + IdentityLimitsUsageResponseTemplateVersionsPerTemplate.from_dict( + identity_limits_usage_response_template_versions_per_template_model_json + ) + ) + assert identity_limits_usage_response_template_versions_per_template_model != False + + # Construct a model instance of IdentityLimitsUsageResponseTemplateVersionsPerTemplate by calling from_dict on the json representation + identity_limits_usage_response_template_versions_per_template_model_dict = ( + IdentityLimitsUsageResponseTemplateVersionsPerTemplate.from_dict( + identity_limits_usage_response_template_versions_per_template_model_json + ).__dict__ + ) + identity_limits_usage_response_template_versions_per_template_model2 = ( + IdentityLimitsUsageResponseTemplateVersionsPerTemplate( + **identity_limits_usage_response_template_versions_per_template_model_dict + ) + ) # Verify the model instances are equivalent - assert id_based_mfa_enrollment_model == id_based_mfa_enrollment_model2 + assert ( + identity_limits_usage_response_template_versions_per_template_model + == identity_limits_usage_response_template_versions_per_template_model2 + ) # Convert model instance back to dict and verify no loss of data - id_based_mfa_enrollment_model_json2 = id_based_mfa_enrollment_model.to_dict() - assert id_based_mfa_enrollment_model_json2 == id_based_mfa_enrollment_model_json + identity_limits_usage_response_template_versions_per_template_model_json2 = ( + identity_limits_usage_response_template_versions_per_template_model.to_dict() + ) + assert ( + identity_limits_usage_response_template_versions_per_template_model_json2 + == identity_limits_usage_response_template_versions_per_template_model_json + ) class TestModel_IdentityPreferenceResponse: @@ -11088,6 +12052,37 @@ def test_identity_preferences_response_serialization(self): assert identity_preferences_response_model_json2 == identity_preferences_response_model_json +class TestModel_LimitCount: + """ + Test Class for LimitCount + """ + + def test_limit_count_serialization(self): + """ + Test serialization/deserialization for LimitCount + """ + + # Construct a json representation of a LimitCount model + limit_count_model_json = {} + limit_count_model_json['limit'] = 38 + limit_count_model_json['count'] = 38 + + # Construct a model instance of LimitCount by calling from_dict on the json representation + limit_count_model = LimitCount.from_dict(limit_count_model_json) + assert limit_count_model != False + + # Construct a model instance of LimitCount by calling from_dict on the json representation + limit_count_model_dict = LimitCount.from_dict(limit_count_model_json).__dict__ + limit_count_model2 = LimitCount(**limit_count_model_dict) + + # Verify the model instances are equivalent + assert limit_count_model == limit_count_model2 + + # Convert model instance back to dict and verify no loss of data + limit_count_model_json2 = limit_count_model.to_dict() + assert limit_count_model_json2 == limit_count_model_json + + class TestModel_MfaEnrollmentTypeStatus: """ Test Class for MfaEnrollmentTypeStatus @@ -11299,6 +12294,37 @@ def test_profile_claim_rule_list_serialization(self): assert profile_claim_rule_list_model_json2 == profile_claim_rule_list_model_json +class TestModel_ProfileCount: + """ + Test Class for ProfileCount + """ + + def test_profile_count_serialization(self): + """ + Test serialization/deserialization for ProfileCount + """ + + # Construct a json representation of a ProfileCount model + profile_count_model_json = {} + profile_count_model_json['profile_id'] = 'testString' + profile_count_model_json['count'] = 38 + + # Construct a model instance of ProfileCount by calling from_dict on the json representation + profile_count_model = ProfileCount.from_dict(profile_count_model_json) + assert profile_count_model != False + + # Construct a model instance of ProfileCount by calling from_dict on the json representation + profile_count_model_dict = ProfileCount.from_dict(profile_count_model_json).__dict__ + profile_count_model2 = ProfileCount(**profile_count_model_dict) + + # Verify the model instances are equivalent + assert profile_count_model == profile_count_model2 + + # Convert model instance back to dict and verify no loss of data + profile_count_model_json2 = profile_count_model.to_dict() + assert profile_count_model_json2 == profile_count_model_json + + class TestModel_ProfileIdentitiesResponse: """ Test Class for ProfileIdentitiesResponse @@ -11439,6 +12465,7 @@ def test_profile_link_serialization(self): profile_link_model_json['modified_at'] = '2019-01-01T12:00:00Z' profile_link_model_json['name'] = 'testString' profile_link_model_json['cr_type'] = 'testString' + profile_link_model_json['is_cross_account'] = True profile_link_model_json['link'] = profile_link_link_model # Construct a model instance of ProfileLink by calling from_dict on the json representation @@ -11517,6 +12544,7 @@ def test_profile_link_list_serialization(self): profile_link_model['modified_at'] = '2019-01-01T12:00:00Z' profile_link_model['name'] = 'testString' profile_link_model['cr_type'] = 'testString' + profile_link_model['is_cross_account'] = True profile_link_model['link'] = profile_link_link_model # Construct a json representation of a ProfileLinkList model @@ -11877,6 +12905,37 @@ def test_service_id_group_serialization(self): assert service_id_group_model_json2 == service_id_group_model_json +class TestModel_ServiceIdGroupCount: + """ + Test Class for ServiceIdGroupCount + """ + + def test_service_id_group_count_serialization(self): + """ + Test serialization/deserialization for ServiceIdGroupCount + """ + + # Construct a json representation of a ServiceIdGroupCount model + service_id_group_count_model_json = {} + service_id_group_count_model_json['group_id'] = 'testString' + service_id_group_count_model_json['count'] = 38 + + # Construct a model instance of ServiceIdGroupCount by calling from_dict on the json representation + service_id_group_count_model = ServiceIdGroupCount.from_dict(service_id_group_count_model_json) + assert service_id_group_count_model != False + + # Construct a model instance of ServiceIdGroupCount by calling from_dict on the json representation + service_id_group_count_model_dict = ServiceIdGroupCount.from_dict(service_id_group_count_model_json).__dict__ + service_id_group_count_model2 = ServiceIdGroupCount(**service_id_group_count_model_dict) + + # Verify the model instances are equivalent + assert service_id_group_count_model == service_id_group_count_model2 + + # Convert model instance back to dict and verify no loss of data + service_id_group_count_model_json2 = service_id_group_count_model.to_dict() + assert service_id_group_count_model_json2 == service_id_group_count_model_json + + class TestModel_ServiceIdGroupList: """ Test Class for ServiceIdGroupList @@ -12539,6 +13598,37 @@ def test_template_assignment_response_resource_detail_serialization(self): ) +class TestModel_TemplateCount: + """ + Test Class for TemplateCount + """ + + def test_template_count_serialization(self): + """ + Test serialization/deserialization for TemplateCount + """ + + # Construct a json representation of a TemplateCount model + template_count_model_json = {} + template_count_model_json['template_id'] = 'testString' + template_count_model_json['count'] = 38 + + # Construct a model instance of TemplateCount by calling from_dict on the json representation + template_count_model = TemplateCount.from_dict(template_count_model_json) + assert template_count_model != False + + # Construct a model instance of TemplateCount by calling from_dict on the json representation + template_count_model_dict = TemplateCount.from_dict(template_count_model_json).__dict__ + template_count_model2 = TemplateCount(**template_count_model_dict) + + # Verify the model instances are equivalent + assert template_count_model == template_count_model2 + + # Convert model instance back to dict and verify no loss of data + template_count_model_json2 = template_count_model.to_dict() + assert template_count_model_json2 == template_count_model_json + + class TestModel_TemplateProfileComponentRequest: """ Test Class for TemplateProfileComponentRequest