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

from .base_api_module import BaseApiModule


class InspectionMediaApiModule(BaseApiModule):
    def list(self, params=None, **kwargs):
        """
        :param dict params: captured_on: string
        checklist: string
        component_display: string
        created_by_me: string
        created_on: string
        defect: string
        document_category: string
        file: string
        geo_point__bounding_box: string
        hidden: string
        limit: integer
        location_code_display: string
        location_zone_display: string
        name: string
        offset: integer
        ordering: string
        priority: string
        project: string
        recent: string
        related: string
        search: string
        size: string
        size_max: string
        size_min: string
        state: 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/InspectionMedia'
            type: array
        required:
        - count
        - results
        type: object

        https://docs.huvrdata.app/reference/api_inspection-media_list
        """
        return self.client.request_json(
            method="get",
            path=f"/api/inspection-media/",
            params=params,
            **kwargs,
        )

    def create(self, json=None, **kwargs):
        """
        create inspection media, the actual media object is hosted on GCS.
        For larger files, the preferred method is send the data directly storage.

        Generate a signed url that will allow the client to upload directly to GCS.

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

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

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

    def delete(self, json=None, **kwargs):
        """
        :param dict json: $ref: '#/components/requestBodies/InspectionMedia'

        https://docs.huvrdata.app/reference/api_inspection-media_delete
        """
        return self.client.request_json(
            method="post",
            path=f"/api/inspection-media/bulk-delete/",
            json=json,
            **kwargs,
        )

    def edit(self, json=None, **kwargs):
        """
        :param dict json: $ref: '#/components/requestBodies/InspectionMedia'

        https://docs.huvrdata.app/reference/api_inspection-media_edit
        """
        return self.client.request_json(
            method="post",
            path=f"/api/inspection-media/bulk-edit/",
            json=json,
            **kwargs,
        )

    def read(self, id, **kwargs):
        """
        :returns: $ref: '#/components/schemas/InspectionMedia'

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

    def update(self, id, json=None, **kwargs):
        """
        :param dict json: $ref: '#/components/requestBodies/InspectionMediaUpdate'

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

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

    def partial_update(self, id, json=None, **kwargs):
        """
        :param dict json: $ref: '#/components/requestBodies/InspectionMediaUpdate'

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

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

    def delete_alt(self, id, **kwargs):
        """
        https://docs.huvrdata.app/reference/api_inspection-media_delete_alt
        """
        return self.client.request_json(
            method="delete",
            path=f"/api/inspection-media/{id}/",
            **kwargs,
        )
