class_docstr: SamplingCreateRequest
class_docstr_tok: ["SamplingCreateRequest"]
docstr: Create an instance of SamplingCreateRequest from a dict
docstr_tok: ["Create","an","instance","of","SamplingCreateRequest","from","a","dict"]
code: def from_dict(cls, obj: dict) -> SamplingCreateRequest:
      """Create an instance of SamplingCreateRequest from a dict"""
      if obj is None:
          return None
  
      if not isinstance(obj, dict):
          return SamplingCreateRequest.parse_obj(obj)
  
      # raise errors for additional fields in the input
      for _key in obj.keys():
          if _key not in cls.__properties:
              raise ValueError(
                  "Error due to additional fields (not defined in SamplingCreateRequest) in the input: "
                  + str(obj)
              )
  
      _obj = SamplingCreateRequest.parse_obj(
          {
              "new_tag_name": obj.get("newTagName"),
              "method": obj.get("method"),
              "config": SamplingConfig.from_dict(obj.get("config"))
              if obj.get("config") is not None
              else None,
              "preselected_tag_id": obj.get("preselectedTagId"),
              "query_tag_id": obj.get("queryTagId"),
              "score_type": obj.get("scoreType"),
              "row_count": obj.get("rowCount"),
          }
      )
      return _obj
  
file_path: lightly/lightly/openapi_generated/swagger_client/models/sampling_create_request.py
imports: from __future__ import annotations
  import pprint
  import re
  import json
  from typing import Optional, Union
  from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, constr, validator
  from lightly.openapi_generated.swagger_client.models.sampling_config import SamplingConfig
  from lightly.openapi_generated.swagger_client.models.sampling_method import SamplingMethod
label_desc: Use image node_id 9 for calling the SamplingCreateRequest obj's underlying member method code with example usage: obj.from_dict(cls, obj) and returns: _obj, None, SamplingCreateRequest