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

from .base_api_module import BaseApiModule


class LibraryMediaApiModule(BaseApiModule):
    def list(self, params=None, **kwargs):
        """
        GET /api/library-media/

        :param dict params: assigned: string
        library: string
        library_name: string
        limit: integer
        name: string
        offset: integer
        ordering: 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/LibraryMedia'
            type: array
        required:
        - count
        - results
        type: object

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

    def create(self, json=None, **kwargs):
        """
        create library 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/requestBodies/LibraryMediaCreate'

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

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

    def summary(self, params=None, **kwargs):
        """
        View library media


        :param dict params: assigned: string
        library: string
        library_name: string
        limit: integer
        name: string
        offset: integer
        ordering: string

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

        https://docs.huvrdata.app/reference/api_library-media_summary
        """
        return self.client.request_json(
            method="get",
            path=f"/api/library-media/summary/",
            params=params,
            **kwargs,
        )

    def read(self, id, **kwargs):
        """
        Return the specific library media
        :params id media ID

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

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

    def update(self, id, json=None, **kwargs):
        """
        View library media


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

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

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

    def partial_update(self, id, json=None, **kwargs):
        """
        View library media


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

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

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

    def delete(self, id, **kwargs):
        """
        View library media

        https://docs.huvrdata.app/reference/api_library-media_delete
        """
        return self.client.request_json(
            method="delete",
            path=f"/api/library-media/{id}/",
            **kwargs,
        )
