text: # coding=utf-8
  # --------------------------------------------------------------------------
  # Copyright (c) Microsoft Corporation. All rights reserved.
  # Licensed under the MIT License. See License.txt in the project root for license information.
  # Code generated by Microsoft (R) AutoRest Code Generator.
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
  # --------------------------------------------------------------------------
  import datetime
  from typing import TYPE_CHECKING
  import warnings
  
  from azure.core.exceptions import (
      ClientAuthenticationError,
      HttpResponseError,
      ResourceExistsError,
      ResourceNotFoundError,
      map_error,
  )
  from azure.core.pipeline import PipelineResponse
  from azure.core.pipeline.transport import HttpRequest, HttpResponse
  from azure.core.tracing.decorator import distributed_trace
  
  from .. import models as _models
  
  if TYPE_CHECKING:
      # pylint: disable=unused-import,ungrouped-imports
      from typing import Any, Callable, Dict, Generic, Optional, TypeVar
  
      T = TypeVar("T")
      ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
  
  
  class PrimitiveOperations(object):
      """PrimitiveOperations operations.
  
      You should not instantiate this class directly. Instead, you should create a Client instance that
      instantiates it for you and attaches it as an attribute.
  
      :ivar models: Alias to model classes used in this operation group.
      :type models: ~bodycomplex.models
      :param client: Client for service requests.
      :param config: Configuration of service client.
      :param serializer: An object model serializer.
      :param deserializer: An object model deserializer.
      """
  
      models = _models
  
      def __init__(self, client, config, serializer, deserializer):
          self._client = client
          self._serialize = serializer
          self._deserialize = deserializer
          self._config = config
  
      @distributed_trace
      def get_int(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.IntWrapper"
          """Get complex types with integer properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: IntWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.IntWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.IntWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_int.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("IntWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_int.metadata = {"url": "/complex/primitive/integer"}  # type: ignore
  
      @distributed_trace
      def put_int(
          self,
          complex_body,  # type: "_models.IntWrapper"
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with integer properties.
  
          :param complex_body: Please put -1 and 2.
          :type complex_body: ~bodycomplex.models.IntWrapper
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_int.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(complex_body, "IntWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_int.metadata = {"url": "/complex/primitive/integer"}  # type: ignore
  
      @distributed_trace
      def get_long(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.LongWrapper"
          """Get complex types with long properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: LongWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.LongWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.LongWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_long.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("LongWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_long.metadata = {"url": "/complex/primitive/long"}  # type: ignore
  
      @distributed_trace
      def put_long(
          self,
          complex_body,  # type: "_models.LongWrapper"
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with long properties.
  
          :param complex_body: Please put 1099511627775 and -999511627788.
          :type complex_body: ~bodycomplex.models.LongWrapper
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_long.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(complex_body, "LongWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_long.metadata = {"url": "/complex/primitive/long"}  # type: ignore
  
      @distributed_trace
      def get_float(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.FloatWrapper"
          """Get complex types with float properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: FloatWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.FloatWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.FloatWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_float.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("FloatWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_float.metadata = {"url": "/complex/primitive/float"}  # type: ignore
  
      @distributed_trace
      def put_float(
          self,
          complex_body,  # type: "_models.FloatWrapper"
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with float properties.
  
          :param complex_body: Please put 1.05 and -0.003.
          :type complex_body: ~bodycomplex.models.FloatWrapper
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_float.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(complex_body, "FloatWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_float.metadata = {"url": "/complex/primitive/float"}  # type: ignore
  
      @distributed_trace
      def get_double(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.DoubleWrapper"
          """Get complex types with double properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: DoubleWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.DoubleWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.DoubleWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_double.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("DoubleWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_double.metadata = {"url": "/complex/primitive/double"}  # type: ignore
  
      @distributed_trace
      def put_double(
          self,
          complex_body,  # type: "_models.DoubleWrapper"
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with double properties.
  
          :param complex_body: Please put 3e-100 and
           -0.000000000000000000000000000000000000000000000000000000005.
          :type complex_body: ~bodycomplex.models.DoubleWrapper
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_double.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(complex_body, "DoubleWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_double.metadata = {"url": "/complex/primitive/double"}  # type: ignore
  
      @distributed_trace
      def get_bool(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.BooleanWrapper"
          """Get complex types with bool properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: BooleanWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.BooleanWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.BooleanWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_bool.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("BooleanWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_bool.metadata = {"url": "/complex/primitive/bool"}  # type: ignore
  
      @distributed_trace
      def put_bool(
          self,
          complex_body,  # type: "_models.BooleanWrapper"
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with bool properties.
  
          :param complex_body: Please put true and false.
          :type complex_body: ~bodycomplex.models.BooleanWrapper
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_bool.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(complex_body, "BooleanWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_bool.metadata = {"url": "/complex/primitive/bool"}  # type: ignore
  
      @distributed_trace
      def get_string(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.StringWrapper"
          """Get complex types with string properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: StringWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.StringWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.StringWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_string.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("StringWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_string.metadata = {"url": "/complex/primitive/string"}  # type: ignore
  
      @distributed_trace
      def put_string(
          self,
          complex_body,  # type: "_models.StringWrapper"
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with string properties.
  
          :param complex_body: Please put 'goodrequest', '', and null.
          :type complex_body: ~bodycomplex.models.StringWrapper
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_string.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(complex_body, "StringWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_string.metadata = {"url": "/complex/primitive/string"}  # type: ignore
  
      @distributed_trace
      def get_date(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.DateWrapper"
          """Get complex types with date properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: DateWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.DateWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.DateWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_date.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("DateWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_date.metadata = {"url": "/complex/primitive/date"}  # type: ignore
  
      @distributed_trace
      def put_date(
          self,
          complex_body,  # type: "_models.DateWrapper"
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with date properties.
  
          :param complex_body: Please put '0001-01-01' and '2016-02-29'.
          :type complex_body: ~bodycomplex.models.DateWrapper
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_date.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(complex_body, "DateWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_date.metadata = {"url": "/complex/primitive/date"}  # type: ignore
  
      @distributed_trace
      def get_date_time(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.DatetimeWrapper"
          """Get complex types with datetime properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: DatetimeWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.DatetimeWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.DatetimeWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_date_time.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("DatetimeWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_date_time.metadata = {"url": "/complex/primitive/datetime"}  # type: ignore
  
      @distributed_trace
      def put_date_time(
          self,
          complex_body,  # type: "_models.DatetimeWrapper"
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with datetime properties.
  
          :param complex_body: Please put '0001-01-01T12:00:00-04:00' and '2015-05-18T11:38:00-08:00'.
          :type complex_body: ~bodycomplex.models.DatetimeWrapper
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_date_time.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(complex_body, "DatetimeWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_date_time.metadata = {"url": "/complex/primitive/datetime"}  # type: ignore
  
      @distributed_trace
      def get_date_time_rfc1123(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.Datetimerfc1123Wrapper"
          """Get complex types with datetimeRfc1123 properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: Datetimerfc1123Wrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.Datetimerfc1123Wrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.Datetimerfc1123Wrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_date_time_rfc1123.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("Datetimerfc1123Wrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_date_time_rfc1123.metadata = {"url": "/complex/primitive/datetimerfc1123"}  # type: ignore
  
      @distributed_trace
      def put_date_time_rfc1123(
          self,
          complex_body,  # type: "_models.Datetimerfc1123Wrapper"
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with datetimeRfc1123 properties.
  
          :param complex_body: Please put 'Mon, 01 Jan 0001 12:00:00 GMT' and 'Mon, 18 May 2015 11:38:00
           GMT'.
          :type complex_body: ~bodycomplex.models.Datetimerfc1123Wrapper
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_date_time_rfc1123.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(complex_body, "Datetimerfc1123Wrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_date_time_rfc1123.metadata = {"url": "/complex/primitive/datetimerfc1123"}  # type: ignore
  
      @distributed_trace
      def get_duration(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.DurationWrapper"
          """Get complex types with duration properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: DurationWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.DurationWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.DurationWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_duration.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("DurationWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_duration.metadata = {"url": "/complex/primitive/duration"}  # type: ignore
  
      @distributed_trace
      def put_duration(
          self,
          field=None,  # type: Optional[datetime.timedelta]
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with duration properties.
  
          :param field:
          :type field: ~datetime.timedelta
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
  
          _complex_body = _models.DurationWrapper(field=field)
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_duration.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(_complex_body, "DurationWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_duration.metadata = {"url": "/complex/primitive/duration"}  # type: ignore
  
      @distributed_trace
      def get_byte(
          self, **kwargs  # type: Any
      ):
          # type: (...) -> "_models.ByteWrapper"
          """Get complex types with byte properties.
  
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: ByteWrapper, or the result of cls(response)
          :rtype: ~bodycomplex.models.ByteWrapper
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType["_models.ByteWrapper"]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
          accept = "application/json"
  
          # Construct URL
          url = self.get_byte.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          request = self._client.get(url, query_parameters, header_parameters)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          deserialized = self._deserialize("ByteWrapper", pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
  
      get_byte.metadata = {"url": "/complex/primitive/byte"}  # type: ignore
  
      @distributed_trace
      def put_byte(
          self,
          field=None,  # type: Optional[bytearray]
          **kwargs  # type: Any
      ):
          # type: (...) -> None
          """Put complex types with byte properties.
  
          :param field:
          :type field: bytearray
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: None, or the result of cls(response)
          :rtype: None
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop("cls", None)  # type: ClsType[None]
          error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
          error_map.update(kwargs.pop("error_map", {}))
  
          _complex_body = _models.ByteWrapper(field=field)
          content_type = kwargs.pop("content_type", "application/json")
          accept = "application/json"
  
          # Construct URL
          url = self.put_byte.metadata["url"]  # type: ignore
  
          # Construct parameters
          query_parameters = {}  # type: Dict[str, Any]
  
          # Construct headers
          header_parameters = {}  # type: Dict[str, Any]
          header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str")
          header_parameters["Accept"] = self._serialize.header("accept", accept, "str")
  
          body_content_kwargs = {}  # type: Dict[str, Any]
          body_content = self._serialize.body(_complex_body, "ByteWrapper")
          body_content_kwargs["content"] = body_content
          request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
          pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              error = self._deserialize.failsafe_deserialize(_models.Error, response)
              raise HttpResponseError(response=response, model=error)
  
          if cls:
              return cls(pipeline_response, None, {})
  
      put_byte.metadata = {"url": "/complex/primitive/byte"}  # type: ignore
  