"""
    HCL AppScan on Cloud (v2)

    This API allows you to interact with the service. The API allows you to perform many of the operations available in the UI and more.</br>For authentication, use the relevant APIs in the Account section. A successful authentication response includes a bearer token for use in subsequent API calls. Pasting this token in the 'Access token' field above will automatically add the authorization header to any API call that requires a valid session.

    OpenAPI spec version: v2

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import re  # noqa: F401

# python 2 and python 3 compatibility library
from pyasoc.api_client import ApiClient


class FixGroupsApi:
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid(
        self, scope, scope_id, fix_group_id, **kwargs
    ):
        """Get fix group

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid(scope, scope_id, fix_group_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the fix group (required)
        :param str scope_id: id of the Scope (required)
        :param str fix_group_id: Fix Group ID (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :param str locale: If provided, it overrides the Accept-Language header. (If not provided and there is no Accept-Language header, the locale will be: en-US)
        :return: UserSiteCommonModelsFixGroup
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid_with_http_info(
                scope, scope_id, fix_group_id, **kwargs
            )
        else:
            (
                data
            ) = self.fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid_with_http_info(
                scope, scope_id, fix_group_id, **kwargs
            )
            return data

    def fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid_with_http_info(
        self, scope, scope_id, fix_group_id, **kwargs
    ):
        """Get fix group

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid_with_http_info(scope, scope_id, fix_group_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the fix group (required)
        :param str scope_id: id of the Scope (required)
        :param str fix_group_id: Fix Group ID (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :param str locale: If provided, it overrides the Accept-Language header. (If not provided and there is no Accept-Language header, the locale will be: en-US)
        :return: UserSiteCommonModelsFixGroup
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "scope",
            "scope_id",
            "fix_group_id",
            "apply_policies",
            "select_policy_ids",
            "locale",
        ]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and (
            "scope" not in params or params["scope"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope` when calling `fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid`"
            )
        # verify the required parameter 'scope_id' is set
        if self.api_client.client_side_validation and (
            "scope_id" not in params or params["scope_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope_id` when calling `fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid`"
            )
        # verify the required parameter 'fix_group_id' is set
        if self.api_client.client_side_validation and (
            "fix_group_id" not in params or params["fix_group_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `fix_group_id` when calling `fix_groups_get_fix_group_by_scope_and_scopeid_and_fixgroupid`"
            )

        collection_formats = {}

        path_params = {}
        if "scope" in params:
            path_params["scope"] = params["scope"]
        if "scope_id" in params:
            path_params["scopeId"] = params["scope_id"]
        if "fix_group_id" in params:
            path_params["fixGroupId"] = params["fix_group_id"]

        query_params = []
        if "apply_policies" in params:
            query_params.append(("applyPolicies", params["apply_policies"]))
        if "select_policy_ids" in params:
            query_params.append(("selectPolicyIds", params["select_policy_ids"]))
            collection_formats["selectPolicyIds"] = "multi"
        if "locale" in params:
            query_params.append(("locale", params["locale"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/FixGroups/{scope}/{scopeId}/{fixGroupId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsFixGroup",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def fix_groups_get_fix_groups_by_scope_and_scopeid(self, scope, scope_id, **kwargs):
        """Get fix groups in scope

        OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fix_groups_get_fix_groups_by_scope_and_scopeid(scope, scope_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the fix group (required)
        :param str scope_id: id of the Scope (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :param str locale: If provided, it overrides the Accept-Language header. (If not provided and there is no Accept-Language header, the locale will be: en-US)
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :param str inlinecount: Specifies that the response to the request MUST include the count of the number of entities in the collection of entities.
        :return: SystemWebHttpODataPageResultUserSiteCommonModelsFixGroup
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.fix_groups_get_fix_groups_by_scope_and_scopeid_with_http_info(
                scope, scope_id, **kwargs
            )
        else:
            (data) = self.fix_groups_get_fix_groups_by_scope_and_scopeid_with_http_info(
                scope, scope_id, **kwargs
            )
            return data

    def fix_groups_get_fix_groups_by_scope_and_scopeid_with_http_info(
        self, scope, scope_id, **kwargs
    ):
        """Get fix groups in scope

        OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fix_groups_get_fix_groups_by_scope_and_scopeid_with_http_info(scope, scope_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the fix group (required)
        :param str scope_id: id of the Scope (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :param str locale: If provided, it overrides the Accept-Language header. (If not provided and there is no Accept-Language header, the locale will be: en-US)
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :param str inlinecount: Specifies that the response to the request MUST include the count of the number of entities in the collection of entities.
        :return: SystemWebHttpODataPageResultUserSiteCommonModelsFixGroup
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "scope",
            "scope_id",
            "apply_policies",
            "select_policy_ids",
            "locale",
            "top",
            "skip",
            "filter",
            "select",
            "orderby",
            "expand",
            "inlinecount",
        ]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method fix_groups_get_fix_groups_by_scope_and_scopeid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and (
            "scope" not in params or params["scope"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope` when calling `fix_groups_get_fix_groups_by_scope_and_scopeid`"
            )
        # verify the required parameter 'scope_id' is set
        if self.api_client.client_side_validation and (
            "scope_id" not in params or params["scope_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope_id` when calling `fix_groups_get_fix_groups_by_scope_and_scopeid`"
            )

        collection_formats = {}

        path_params = {}
        if "scope" in params:
            path_params["scope"] = params["scope"]
        if "scope_id" in params:
            path_params["scopeId"] = params["scope_id"]

        query_params = []
        if "apply_policies" in params:
            query_params.append(("applyPolicies", params["apply_policies"]))
        if "select_policy_ids" in params:
            query_params.append(("selectPolicyIds", params["select_policy_ids"]))
            collection_formats["selectPolicyIds"] = "multi"
        if "locale" in params:
            query_params.append(("locale", params["locale"]))
        if "top" in params:
            query_params.append(("$top", params["top"]))
        if "skip" in params:
            query_params.append(("$skip", params["skip"]))
        if "filter" in params:
            query_params.append(("$filter", params["filter"]))
        if "select" in params:
            query_params.append(("$select", params["select"]))
        if "orderby" in params:
            query_params.append(("$orderby", params["orderby"]))
        if "expand" in params:
            query_params.append(("$expand", params["expand"]))
        if "inlinecount" in params:
            query_params.append(("$inlinecount", params["inlinecount"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/FixGroups/{scope}/{scopeId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="SystemWebHttpODataPageResultUserSiteCommonModelsFixGroup",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def fix_groups_get_issues_by_fix_group_id(self, scope, scope_id, fix_group_id, **kwargs):
        """Get filtered issues for a FixGroup

        OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fix_groups_get_issues_by_fix_group_id(scope, scope_id, fix_group_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the fix group (required)
        :param str scope_id: id of the Scope (required)
        :param str fix_group_id: FixGroup ID (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :param str locale: If provided, it overrides the Accept-Language header. (If not provided and there is no Accept-Language header, the locale will be: en-US)
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :param str inlinecount: Specifies that the response to the request MUST include the count of the number of entities in the collection of entities.
        :return: SystemWebHttpODataPageResultUtilitiesIssueModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.fix_groups_get_issues_by_fix_group_id_with_http_info(
                scope, scope_id, fix_group_id, **kwargs
            )
        else:
            (data) = self.fix_groups_get_issues_by_fix_group_id_with_http_info(
                scope, scope_id, fix_group_id, **kwargs
            )
            return data

    def fix_groups_get_issues_by_fix_group_id_with_http_info(
        self, scope, scope_id, fix_group_id, **kwargs
    ):
        """Get filtered issues for a FixGroup

        OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fix_groups_get_issues_by_fix_group_id_with_http_info(scope, scope_id, fix_group_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the fix group (required)
        :param str scope_id: id of the Scope (required)
        :param str fix_group_id: FixGroup ID (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :param str locale: If provided, it overrides the Accept-Language header. (If not provided and there is no Accept-Language header, the locale will be: en-US)
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :param str inlinecount: Specifies that the response to the request MUST include the count of the number of entities in the collection of entities.
        :return: SystemWebHttpODataPageResultUtilitiesIssueModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "scope",
            "scope_id",
            "fix_group_id",
            "apply_policies",
            "select_policy_ids",
            "locale",
            "top",
            "skip",
            "filter",
            "select",
            "orderby",
            "expand",
            "inlinecount",
        ]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method fix_groups_get_issues_by_fix_group_id" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and (
            "scope" not in params or params["scope"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope` when calling `fix_groups_get_issues_by_fix_group_id`"
            )
        # verify the required parameter 'scope_id' is set
        if self.api_client.client_side_validation and (
            "scope_id" not in params or params["scope_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope_id` when calling `fix_groups_get_issues_by_fix_group_id`"
            )
        # verify the required parameter 'fix_group_id' is set
        if self.api_client.client_side_validation and (
            "fix_group_id" not in params or params["fix_group_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `fix_group_id` when calling `fix_groups_get_issues_by_fix_group_id`"
            )

        collection_formats = {}

        path_params = {}
        if "scope" in params:
            path_params["scope"] = params["scope"]
        if "scope_id" in params:
            path_params["scopeId"] = params["scope_id"]
        if "fix_group_id" in params:
            path_params["fixGroupId"] = params["fix_group_id"]

        query_params = []
        if "apply_policies" in params:
            query_params.append(("applyPolicies", params["apply_policies"]))
        if "select_policy_ids" in params:
            query_params.append(("selectPolicyIds", params["select_policy_ids"]))
            collection_formats["selectPolicyIds"] = "multi"
        if "locale" in params:
            query_params.append(("locale", params["locale"]))
        if "top" in params:
            query_params.append(("$top", params["top"]))
        if "skip" in params:
            query_params.append(("$skip", params["skip"]))
        if "filter" in params:
            query_params.append(("$filter", params["filter"]))
        if "select" in params:
            query_params.append(("$select", params["select"]))
        if "orderby" in params:
            query_params.append(("$orderby", params["orderby"]))
        if "expand" in params:
            query_params.append(("$expand", params["expand"]))
        if "inlinecount" in params:
            query_params.append(("$inlinecount", params["inlinecount"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/FixGroups/{scope}/{scopeId}/{fixGroupId}/Issues",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="SystemWebHttpODataPageResultUtilitiesIssueModel",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid(
        self, scope, scope_id, fix_group_id, fix_group_model, **kwargs
    ):
        """Update a fix group according to a given scope

        The StickyStatus parameter determines how the new Status affects issues in the FixGroup.<br />  If StickyStatus is False, the Status you set affects only issues in the FixGroup that are filtered-in by the scope and policy.<br />  If StickyStatus is True, the Status is applied to all issues in the FixGroup (scope and policy are ignored), including new issues  that become associated with it later.<br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid(scope, scope_id, fix_group_id, fix_group_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the fix group (required)
        :param str scope_id: id of the Scope (required)
        :param str fix_group_id: Fix Group ID (required)
        :param UserSiteCommonModelsFixGroupUpdate fix_group_model:  (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :return: UserSiteCommonModelsTriageResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return (
                self.fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid_with_http_info(
                    scope, scope_id, fix_group_id, fix_group_model, **kwargs
                )
            )
        else:
            (
                data
            ) = self.fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid_with_http_info(
                scope, scope_id, fix_group_id, fix_group_model, **kwargs
            )
            return data

    def fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid_with_http_info(
        self, scope, scope_id, fix_group_id, fix_group_model, **kwargs
    ):
        """Update a fix group according to a given scope

        The StickyStatus parameter determines how the new Status affects issues in the FixGroup.<br />  If StickyStatus is False, the Status you set affects only issues in the FixGroup that are filtered-in by the scope and policy.<br />  If StickyStatus is True, the Status is applied to all issues in the FixGroup (scope and policy are ignored), including new issues  that become associated with it later.<br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid_with_http_info(scope, scope_id, fix_group_id, fix_group_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the fix group (required)
        :param str scope_id: id of the Scope (required)
        :param str fix_group_id: Fix Group ID (required)
        :param UserSiteCommonModelsFixGroupUpdate fix_group_model:  (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :return: UserSiteCommonModelsTriageResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "scope",
            "scope_id",
            "fix_group_id",
            "fix_group_model",
            "apply_policies",
            "select_policy_ids",
        ]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid"
                    % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and (
            "scope" not in params or params["scope"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope` when calling `fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid`"
            )
        # verify the required parameter 'scope_id' is set
        if self.api_client.client_side_validation and (
            "scope_id" not in params or params["scope_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope_id` when calling `fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid`"
            )
        # verify the required parameter 'fix_group_id' is set
        if self.api_client.client_side_validation and (
            "fix_group_id" not in params or params["fix_group_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `fix_group_id` when calling `fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid`"
            )
        # verify the required parameter 'fix_group_model' is set
        if self.api_client.client_side_validation and (
            "fix_group_model" not in params or params["fix_group_model"] is None
        ):
            raise ValueError(
                "Missing the required parameter `fix_group_model` when calling `fix_groups_update_fix_group_by_scope_and_scopeid_and_fixgroupid`"
            )

        collection_formats = {}

        path_params = {}
        if "scope" in params:
            path_params["scope"] = params["scope"]
        if "scope_id" in params:
            path_params["scopeId"] = params["scope_id"]
        if "fix_group_id" in params:
            path_params["fixGroupId"] = params["fix_group_id"]

        query_params = []
        if "apply_policies" in params:
            query_params.append(("applyPolicies", params["apply_policies"]))
        if "select_policy_ids" in params:
            query_params.append(("selectPolicyIds", params["select_policy_ids"]))
            collection_formats["selectPolicyIds"] = "multi"

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "fix_group_model" in params:
            body_params = params["fix_group_model"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/FixGroups/{scope}/{scopeId}/{fixGroupId}",
            "PUT",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsTriageResult",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
