"""
This file is automatically generated. Do not modify it manually.
"""

from .base_api_module import BaseApiModule


class ChecklistsApiModule(BaseApiModule):
    def list(self, params=None, **kwargs):
        """
        Returns an array of checklist instances.

        :param dict params: asset: string
        asset__asset_path_cache__path: string
        asset__id: string
        created_by: string
        created_by_me: string
        created_on: string
        descendants: string
        labels: string
        limit: integer
        offset: integer
        ordering: string
        project: string
        recent: string
        search: string
        tasks: string
        template: string
        template__categories: string
        template__id__in: string
        template__name: string
        template__type: string

        :returns: properties:
          count:
            type: integer
          next:
            format: uri
            nullable: true
            type: string
          previous:
            format: uri
            nullable: true
            type: string
          results:
            items:
              $ref: '#/components/schemas/ChecklistInstanceList'
            type: array
        required:
        - count
        - results
        type: object

        https://docs.huvrdata.app/reference/api_checklists_list
        """
        return self.client.request_json(
            method="get",
            path=f"/api/checklists/",
            params=params,
            **kwargs,
        )

    def create(self, json=None, **kwargs):
        """
        View Checklist Instances


        :param dict json: $ref: '#/components/schemas/ChecklistInstanceCreate'

        :returns: $ref: '#/components/schemas/ChecklistInstance'

        https://docs.huvrdata.app/reference/api_checklists_create
        """
        return self.client.request_json(
            method="post",
            path=f"/api/checklists/",
            json=json,
            **kwargs,
        )

    def read(self, id, **kwargs):
        """
        Return the specific Checklist Instances
        :params id Instance ID

        :returns: $ref: '#/components/schemas/ChecklistInstance'

        https://docs.huvrdata.app/reference/api_checklists_read
        """
        return self.client.request_json(
            method="get",
            path=f"/api/checklists/{id}/",
            **kwargs,
        )

    def edit(self, id, json=None, **kwargs):
        """
        edit a checklist instance

        :param dict json: $ref: '#/components/schemas/ChecklistEditInline'

        :returns: $ref: '#/components/schemas/ChecklistInstance'

        https://docs.huvrdata.app/reference/api_checklists_edit
        """
        return self.client.request_json(
            method="post",
            path=f"/api/checklists/{id}/edit/",
            json=json,
            **kwargs,
        )

    def revisions_read(self, id, **kwargs):
        """
        Set revisions object

        :returns: items:
          $ref: '#/components/schemas/ChecklistRevisionEdit'
        type: array

        https://docs.huvrdata.app/reference/api_checklists_revisions_read
        """
        return self.client.request_json(
            method="get",
            path=f"/api/checklists/{id}/revisions/",
            **kwargs,
        )

    def revisions_partial_update(self, id, json=None, **kwargs):
        """
        Set revisions object

        :param dict json: $ref: '#/components/schemas/ChecklistEdit'

        :returns: $ref: '#/components/schemas/ChecklistInstance'

        https://docs.huvrdata.app/reference/api_checklists_revisions_partial_update
        """
        return self.client.request_json(
            method="patch",
            path=f"/api/checklists/{id}/revisions/",
            json=json,
            **kwargs,
        )

    def overlays_create(self, id, json=None, **kwargs):
        """
        add or edit a overlay on a media object

        :param dict json: $ref: '#/components/requestBodies/InspectionMediaOverlayCreate'

        :returns: $ref: '#/components/schemas/InspectionMedia'

        https://docs.huvrdata.app/reference/api_inspection-media_overlays_create
        """
        return self.client.request_json(
            method="post",
            path=f"/api/inspection-media/{id}/overlays/",
            json=json,
            **kwargs,
        )

    def overlays_partial_update(self, id, json=None, **kwargs):
        """
        add or edit a overlay on a media object

        :param dict json: $ref: '#/components/requestBodies/InspectionMedia'

        :returns: $ref: '#/components/schemas/InspectionMedia'

        https://docs.huvrdata.app/reference/api_inspection-media_overlays_partial_update
        """
        return self.client.request_json(
            method="patch",
            path=f"/api/inspection-media/{id}/overlays/",
            json=json,
            **kwargs,
        )
