class_docstr: NOTE: This class is auto generated by OpenAPI Generator
  Ref: https://openapi-generator.tech
  
  Do not edit the class manually.
docstr: get_samples_by_dataset_id  # noqa: E501
  
  Get all samples of a dataset  # noqa: E501
  This method makes a synchronous HTTP request by default. To make an
  asynchronous HTTP request, please pass async_req=True
  
  >>> thread = api.get_samples_by_dataset_id(dataset_id, file_name, sort_by, page_size, page_offset, async_req=True)
  >>> result = thread.get()
  
  :param dataset_id: ObjectId of the dataset (required)
  :type dataset_id: str
  :param file_name: DEPRECATED, use without and filter yourself - Filter the samples by filename
  :type file_name: str
  :param sort_by: sort the samples
  :type sort_by: SampleSortBy
  :param page_size: pagination size/limit of the number of samples to return
  :type page_size: int
  :param page_offset: pagination offset
  :type page_offset: int
  :param async_req: Whether to execute the request asynchronously.
  :type async_req: bool, optional
  :param _request_timeout: timeout setting for this request. If one
                           number provided, it will be total request
                           timeout. It can also be a pair (tuple) of
                           (connection, read) timeouts.
  :return: Returns the result object.
           If the method is called asynchronously,
           returns the request thread.
  :rtype: List[SampleData]
docstr_tok: ["get_samples_by_dataset_id","#","noqa",":","E501","Get","all","samples","of","a","dataset","#","noqa",":","E501","This","method","makes","a","synchronous","HTTP","request","by","default",".","To","make","an","asynchronous","HTTP","request",",","please","pass","async_req=True",">",">",">","thread","=","api.get_samples_by_dataset_id","(","dataset_id",",","file_name",",","sort_by",",","page_size",",","page_offset",",","async_req=True",")",">",">",">","result","=","thread.get","(",")",":","param","dataset_id",":","ObjectId","of","the","dataset","(","required",")",":","type","dataset_id",":","str",":","param","file_name",":","DEPRECATED",",","use","without","and","filter","yourself","-","Filter","the","samples","by","filename",":","type","file_name",":","str",":","param","sort_by",":","sort","the","samples",":","type","sort_by",":","SampleSortBy",":","param","page_size",":","pagination","size\/limit","of","the","number","of","samples","to","return",":","type","page_size",":","int",":","param","page_offset",":","pagination","offset",":","type","page_offset",":","int",":","param","async_req",":","Whether","to","execute","the","request","asynchronously",".",":","type","async_req",":","bool",",","optional",":","param","_request_timeout",":","timeout","setting","for","this","request",".","If","one","number","provided",",","it","will","be","total","request","timeout",".","It","can","also","be","a","pair","(","tuple",")","of","(","connection",",","read",")","timeouts",".",":","return",":","Returns","the","result","object",".","If","the","method","is","called","asynchronously",",","returns","the","request","thread",".",":","rtype",":","List","[","SampleData","]"]
code: def get_samples_by_dataset_id(
      self,
      dataset_id: Annotated[
          constr(strict=True),
          Field(..., description="ObjectId of the dataset"),
      ],
      file_name: Annotated[
          Optional[StrictStr],
          Field(
              description="DEPRECATED, use without and filter yourself - Filter the samples by filename"
          ),
      ] = None,
      sort_by: Annotated[
          Optional[SampleSortBy], Field(description="sort the samples")
      ] = None,
      page_size: Annotated[
          Optional[conint(strict=True, ge=1)],
          Field(
              description="pagination size/limit of the number of samples to return"
          ),
      ] = None,
      page_offset: Annotated[
          Optional[conint(strict=True, ge=0)],
          Field(description="pagination offset"),
      ] = None,
      **kwargs,
  ) -> List[SampleData]:  # noqa: E501
      """get_samples_by_dataset_id  # noqa: E501
  
      Get all samples of a dataset  # noqa: E501
      This method makes a synchronous HTTP request by default. To make an
      asynchronous HTTP request, please pass async_req=True
  
      >>> thread = api.get_samples_by_dataset_id(dataset_id, file_name, sort_by, page_size, page_offset, async_req=True)
      >>> result = thread.get()
  
      :param dataset_id: ObjectId of the dataset (required)
      :type dataset_id: str
      :param file_name: DEPRECATED, use without and filter yourself - Filter the samples by filename
      :type file_name: str
      :param sort_by: sort the samples
      :type sort_by: SampleSortBy
      :param page_size: pagination size/limit of the number of samples to return
      :type page_size: int
      :param page_offset: pagination offset
      :type page_offset: int
      :param async_req: Whether to execute the request asynchronously.
      :type async_req: bool, optional
      :param _request_timeout: timeout setting for this request. If one
                               number provided, it will be total request
                               timeout. It can also be a pair (tuple) of
                               (connection, read) timeouts.
      :return: Returns the result object.
               If the method is called asynchronously,
               returns the request thread.
      :rtype: List[SampleData]
      """
      kwargs["_return_http_data_only"] = True
      if "_preload_content" in kwargs:
          raise ValueError(
              "Error! Please call the get_samples_by_dataset_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
          )
      return self.get_samples_by_dataset_id_with_http_info(
          dataset_id,
          file_name,
          sort_by,
          page_size,
          page_offset,
          **kwargs,
      )
  
imports: import re
  import io
  import warnings
  from pydantic import validate_arguments, ValidationError
  from typing_extensions import Annotated
  from pydantic import Field, StrictBool, StrictStr, conint, constr, validator
  from typing import List, Optional
  from lightly.openapi_generated.swagger_client.models.create_entity_response import CreateEntityResponse
  from lightly.openapi_generated.swagger_client.models.create_sample_with_write_urls_response import CreateSampleWithWriteUrlsResponse
  from lightly.openapi_generated.swagger_client.models.sample_create_request import SampleCreateRequest
  from lightly.openapi_generated.swagger_client.models.sample_data import SampleData
  from lightly.openapi_generated.swagger_client.models.sample_data_modes import SampleDataModes
  from lightly.openapi_generated.swagger_client.models.sample_partial_mode import SamplePartialMode
  from lightly.openapi_generated.swagger_client.models.sample_sort_by import SampleSortBy
  from lightly.openapi_generated.swagger_client.models.sample_update_request import SampleUpdateRequest
  from lightly.openapi_generated.swagger_client.models.sample_write_urls import SampleWriteUrls
  from lightly.openapi_generated.swagger_client.api_client import ApiClient
  from lightly.openapi_generated.swagger_client.api_response import ApiResponse
  from lightly.openapi_generated.swagger_client.exceptions import ApiTypeError, ApiValueError
label_desc: Use image node_id 16 for calling the SamplesApi obj's underlying member method code with example usage: obj.get_samples_by_dataset_id(dataset_id, file_name, sort_by, page_size, page_offset) and returns: self