# coding: utf-8

"""
    Identity Security Cloud Beta API

    Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. These APIs are in beta and are subject to change. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.

    The version of the OpenAPI document: 3.1.0-beta
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import unittest

from sailpoint.beta.models.completed_approval import CompletedApproval

class TestCompletedApproval(unittest.TestCase):
    """CompletedApproval unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional) -> CompletedApproval:
        """Test CompletedApproval
            include_optional is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # uncomment below to create an instance of `CompletedApproval`
        """
        model = CompletedApproval()
        if include_optional:
            return CompletedApproval(
                id = '2c938083633d259901633d25c68c00fa',
                name = 'Approval Name',
                created = '2017-07-11T18:45:37.098Z',
                modified = '2018-07-25T20:22:28.104Z',
                request_created = '2017-07-11T18:45:35.098Z',
                request_type = 'GRANT_ACCESS',
                requester = sailpoint.beta.models.access_item_requester_dto.Access Item Requester Dto(
                    type = 'IDENTITY', 
                    id = '2c7180a46faadee4016fb4e018c20648', 
                    name = 'William Wilson', ),
                requested_for = sailpoint.beta.models.requested_item_status_requested_for.RequestedItemStatus_requestedFor(
                    type = 'IDENTITY', 
                    id = '2c9180835d191a86015d28455b4b232a', 
                    name = 'William Wilson', ),
                reviewed_by = sailpoint.beta.models.completed_approval_reviewed_by.CompletedApproval_reviewedBy(
                    type = 'IDENTITY', 
                    id = '2c3780a46faadee4016fb4e018c20652', 
                    name = 'Allen Albertson', ),
                owner = sailpoint.beta.models.access_item_owner_dto.Access Item Owner Dto(
                    type = 'IDENTITY', 
                    id = '2c9180a46faadee4016fb4e018c20639', 
                    name = 'Support', ),
                requested_object = sailpoint.beta.models.requestable_object_reference.Requestable Object Reference(
                    id = '2c938083633d259901633d25c68c00fa', 
                    name = 'Object Name', 
                    description = 'Object Description', 
                    type = 'ROLE', ),
                requester_comment = sailpoint.beta.models.comment_dto.Comment Dto(
                    comment = 'This is a comment.', 
                    created = '2017-07-11T18:45:37.098Z', 
                    author = sailpoint.beta.models.comment_dto_1_author.CommentDto_1_author(
                        type = 'IDENTITY', 
                        id = '2c9180847e25f377017e2ae8cae4650b', 
                        name = 'john.doe', ), ),
                reviewer_comment = sailpoint.beta.models.comment_dto.Comment Dto(
                    comment = 'This is a comment.', 
                    author = sailpoint.beta.models.comment_dto_author.CommentDto_author(
                        type = 'IDENTITY', 
                        id = '2c91808568c529c60168cca6f90c1313', 
                        name = 'Adam Kennedy', ), 
                    created = '2017-07-11T18:45:37.098Z', ),
                previous_reviewers_comments = [
                    sailpoint.beta.models.comment_dto.Comment Dto(
                        comment = 'This is a comment.', 
                        created = '2017-07-11T18:45:37.098Z', 
                        author = sailpoint.beta.models.comment_dto_1_author.CommentDto_1_author(
                            type = 'IDENTITY', 
                            id = '2c9180847e25f377017e2ae8cae4650b', 
                            name = 'john.doe', ), )
                    ],
                forward_history = [
                    sailpoint.beta.models.approval_forward_history.Approval Forward History(
                        old_approver_name = 'Frank Mir', 
                        new_approver_name = 'Al Volta', 
                        comment = 'Forwarding from Frank to Al', 
                        modified = '2019-08-23T18:52:57.398Z', 
                        forwarder_name = 'William Wilson', 
                        reassignment_type = 'AUTOMATIC_REASSIGNMENT', )
                    ],
                comment_required_when_rejected = True,
                state = 'APPROVED',
                remove_date = '2020-07-11T00:00Z',
                remove_date_update_requested = True,
                current_remove_date = '2020-07-11T00:00Z',
                sod_violation_context = sailpoint.beta.models.sod_violation_context_check_completed.Sod Violation Context Check Completed(
                    state = 'SUCCESS', 
                    uuid = 'f73d16e9-a038-46c5-b217-1246e15fdbdd', 
                    violation_check_result = sailpoint.beta.models.sod_violation_check_result.Sod Violation Check Result(
                        message = sailpoint.beta.models.error_message_dto.Error Message Dto(
                            locale = 'en-US', 
                            locale_origin = 'DEFAULT', 
                            text = 'The request was syntactically correct but its content is semantically invalid.', ), 
                        client_metadata = {requestedAppName=test-app, requestedAppId=2c91808f7892918f0178b78da4a305a1}, 
                        violation_contexts = [
                            sailpoint.beta.models.sod_violation_context.Sod Violation Context(
                                policy = sailpoint.beta.models.sod_policy_dto.Sod Policy Dto(
                                    type = 'SOD_POLICY', 
                                    id = '0f11f2a4-7c94-4bf3-a2bd-742580fe3bde', 
                                    name = 'Business SOD Policy', ), 
                                conflicting_access_criteria = sailpoint.beta.models.sod_violation_context_2_conflicting_access_criteria.SodViolationContext_2_conflictingAccessCriteria(
                                    left_criteria = sailpoint.beta.models.sod_violation_context_2_conflicting_access_criteria_left_criteria.SodViolationContext_2_conflictingAccessCriteria_leftCriteria(
                                        criteria_list = [
                                            sailpoint.beta.models.sod_exempt_criteria.Sod Exempt Criteria(
                                                existing = True, 
                                                type = 'IDENTITY', 
                                                id = '2c918085771e9d3301773b3cb66f6398', 
                                                name = 'My HR Entitlement', )
                                            ], ), 
                                    right_criteria = sailpoint.beta.models.sod_violation_context_2_conflicting_access_criteria_left_criteria.SodViolationContext_2_conflictingAccessCriteria_leftCriteria(), ), )
                            ], 
                        violated_policies = [
                            sailpoint.beta.models.sod_policy_dto.Sod Policy Dto(
                                id = '0f11f2a4-7c94-4bf3-a2bd-742580fe3bde', 
                                name = 'Business SOD Policy', )
                            ], ), ),
                pre_approval_trigger_result = sailpoint.beta.models.completed_approval_pre_approval_trigger_result.CompletedApproval_preApprovalTriggerResult(
                    comment = 'This request was autoapproved by our automated ETS subscriber', 
                    decision = 'APPROVED', 
                    reviewer = 'Automated AR Approval', 
                    date = '2022-06-07T19:18:40.748Z', ),
                client_metadata = {requestedAppName=test-app, requestedAppId=2c91808f7892918f0178b78da4a305a1},
                requested_accounts = [
                    sailpoint.beta.models.requested_account_ref.Requested Account Ref(
                        name = 'Glen.067da3248e914', 
                        type = 'IDENTITY', 
                        account_uuid = '{fab7119e-004f-4822-9c33-b8d570d6c6a6}', 
                        account_id = 'CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local', 
                        source_name = 'Multi Account AD source name', )
                    ],
                privilege_level = 'High',
                max_permitted_access_duration = sailpoint.beta.models.pending_approval_max_permitted_access_duration.PendingApproval_maxPermittedAccessDuration(
                    value = 5, 
                    time_unit = 'DAYS', )
            )
        else:
            return CompletedApproval(
        )
        """

    def testCompletedApproval(self):
        """Test CompletedApproval"""
        # inst_req_only = self.make_instance(include_optional=False)
        # inst_req_and_optional = self.make_instance(include_optional=True)

if __name__ == '__main__':
    unittest.main()
