class_docstr: NOTE: This class is auto generated by OpenAPI Generator
  Ref: https://openapi-generator.tech
  
  Do not edit the class manually.
class_docstr_tok: ["NOTE",":","This","class","is","auto","generated","by","OpenAPI","Generator","Ref",":","https",":","\/\/openapi-generator.tech","Do","not","edit","the","class","manually","."]
docstr: get_resource_read_url_redirect  # noqa: E501
  
  This endpoint enables anyone given the correct credentials to access the actual image directly via a redirect. By creating a readURL for the resource and redirecting to that URL, the client can use this endpoint to always have a way to access the resource as there is no expiration   # 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_resource_read_url_redirect(dataset_id, path, async_req=True)
  >>> result = thread.get()
  
  :param dataset_id: ObjectId of the dataset (required)
  :type dataset_id: str
  :param path: the resource path (required)
  :type path: str
  :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: None
docstr_tok: ["get_resource_read_url_redirect","#","noqa",":","E501","This","endpoint","enables","anyone","given","the","correct","credentials","to","access","the","actual","image","directly","via","a","redirect",".","By","creating","a","readURL","for","the","resource","and","redirecting","to","that","URL",",","the","client","can","use","this","endpoint","to","always","have","a","way","to","access","the","resource","as","there","is","no","expiration","#","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_resource_read_url_redirect","(","dataset_id",",","path",",","async_req=True",")",">",">",">","result","=","thread.get","(",")",":","param","dataset_id",":","ObjectId","of","the","dataset","(","required",")",":","type","dataset_id",":","str",":","param","path",":","the","resource","path","(","required",")",":","type","path",":","str",":","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",":","None"]
code: def get_resource_read_url_redirect(
      self,
      dataset_id: Annotated[
          constr(strict=True),
          Field(..., description="ObjectId of the dataset"),
      ],
      path: Annotated[
          StrictStr, Field(..., description="the resource path")
      ],
      **kwargs,
  ) -> None:  # noqa: E501
      """get_resource_read_url_redirect  # noqa: E501
  
      This endpoint enables anyone given the correct credentials to access the actual image directly via a redirect. By creating a readURL for the resource and redirecting to that URL, the client can use this endpoint to always have a way to access the resource as there is no expiration   # 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_resource_read_url_redirect(dataset_id, path, async_req=True)
      >>> result = thread.get()
  
      :param dataset_id: ObjectId of the dataset (required)
      :type dataset_id: str
      :param path: the resource path (required)
      :type path: str
      :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: None
      """
      kwargs["_return_http_data_only"] = True
      if "_preload_content" in kwargs:
          raise ValueError(
              "Error! Please call the get_resource_read_url_redirect_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
          )
      return self.get_resource_read_url_redirect_with_http_info(
          dataset_id, path, **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.datasource_config import DatasourceConfig
  from lightly.openapi_generated.swagger_client.models.datasource_config_verify_data import DatasourceConfigVerifyData
  from lightly.openapi_generated.swagger_client.models.datasource_processed_until_timestamp_request import DatasourceProcessedUntilTimestampRequest
  from lightly.openapi_generated.swagger_client.models.datasource_processed_until_timestamp_response import DatasourceProcessedUntilTimestampResponse
  from lightly.openapi_generated.swagger_client.models.datasource_purpose import DatasourcePurpose
  from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_data import DatasourceRawSamplesData
  from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_metadata_data import DatasourceRawSamplesMetadataData
  from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_predictions_data import DatasourceRawSamplesPredictionsData
  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 24 for calling the DatasourcesApi obj's underlying member method code with example usage: obj.get_resource_read_url_redirect(dataset_id, path) and returns: self