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.
  # --------------------------------------------------------------------------
  
  from msrest.pipeline import ClientRawResponse
  
  from .. import models
  
  
  class StringOperations(object):
      """StringOperations operations.
  
      You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
  
      :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
  
      def get_null(
              self, custom_headers=None, raw=False, **operation_config):
          """Get null string value value.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: enum or ClientRawResponse if raw=true
          :rtype: str or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.get_null.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Accept'] = 'application/json'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct and send request
          request = self._client.get(url, query_parameters, header_parameters)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          deserialized = None
          if response.status_code == 200:
              deserialized = self._deserialize('str', response)
  
          if raw:
              client_raw_response = ClientRawResponse(deserialized, response)
              return client_raw_response
  
          return deserialized
      get_null.metadata = {'url': '/string/null'}
  
      def put_null(
              self, string_body=None, custom_headers=None, raw=False, **operation_config):
          """Set string value null.
  
          :param string_body: Possible values include: ''
          :type string_body: str
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: None or ClientRawResponse if raw=true
          :rtype: None or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.put_null.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Content-Type'] = 'application/json; charset=utf-8'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct body
          if string_body is not None:
              body_content = self._serialize.body(string_body, 'str')
          else:
              body_content = None
  
          # Construct and send request
          request = self._client.put(url, query_parameters, header_parameters, body_content)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          if raw:
              client_raw_response = ClientRawResponse(None, response)
              return client_raw_response
      put_null.metadata = {'url': '/string/null'}
  
      def get_empty(
              self, custom_headers=None, raw=False, **operation_config):
          """Get empty string value value ''.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: enum or ClientRawResponse if raw=true
          :rtype: str or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.get_empty.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Accept'] = 'application/json'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct and send request
          request = self._client.get(url, query_parameters, header_parameters)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          deserialized = None
          if response.status_code == 200:
              deserialized = self._deserialize('str', response)
  
          if raw:
              client_raw_response = ClientRawResponse(deserialized, response)
              return client_raw_response
  
          return deserialized
      get_empty.metadata = {'url': '/string/empty'}
  
      def put_empty(
              self, custom_headers=None, raw=False, **operation_config):
          """Set string value empty ''.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: None or ClientRawResponse if raw=true
          :rtype: None or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          string_body = ""
  
          # Construct URL
          url = self.put_empty.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Content-Type'] = 'application/json; charset=utf-8'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct body
          body_content = self._serialize.body(string_body, 'str')
  
          # Construct and send request
          request = self._client.put(url, query_parameters, header_parameters, body_content)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          if raw:
              client_raw_response = ClientRawResponse(None, response)
              return client_raw_response
      put_empty.metadata = {'url': '/string/empty'}
  
      def get_mbcs(
              self, custom_headers=None, raw=False, **operation_config):
          """Get mbcs string value
          '啊齄丂狛狜隣郎隣兀﨩ˊ〞〡￤℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ！￣ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€'.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: enum or ClientRawResponse if raw=true
          :rtype: str or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.get_mbcs.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Accept'] = 'application/json'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct and send request
          request = self._client.get(url, query_parameters, header_parameters)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          deserialized = None
          if response.status_code == 200:
              deserialized = self._deserialize('str', response)
  
          if raw:
              client_raw_response = ClientRawResponse(deserialized, response)
              return client_raw_response
  
          return deserialized
      get_mbcs.metadata = {'url': '/string/mbcs'}
  
      def put_mbcs(
              self, custom_headers=None, raw=False, **operation_config):
          """Set string value mbcs
          '啊齄丂狛狜隣郎隣兀﨩ˊ〞〡￤℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ！￣ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€'.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: None or ClientRawResponse if raw=true
          :rtype: None or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          string_body = "啊齄丂狛狜隣郎隣兀﨩ˊ〞〡￤℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ！￣ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€"
  
          # Construct URL
          url = self.put_mbcs.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Content-Type'] = 'application/json; charset=utf-8'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct body
          body_content = self._serialize.body(string_body, 'str')
  
          # Construct and send request
          request = self._client.put(url, query_parameters, header_parameters, body_content)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          if raw:
              client_raw_response = ClientRawResponse(None, response)
              return client_raw_response
      put_mbcs.metadata = {'url': '/string/mbcs'}
  
      def get_whitespace(
              self, custom_headers=None, raw=False, **operation_config):
          """Get string value with leading and trailing whitespace
          '<tab><space><space>Now is the time for all good men to come to the aid
          of their country<tab><space><space>'.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: enum or ClientRawResponse if raw=true
          :rtype: str or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.get_whitespace.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Accept'] = 'application/json'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct and send request
          request = self._client.get(url, query_parameters, header_parameters)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          deserialized = None
          if response.status_code == 200:
              deserialized = self._deserialize('str', response)
  
          if raw:
              client_raw_response = ClientRawResponse(deserialized, response)
              return client_raw_response
  
          return deserialized
      get_whitespace.metadata = {'url': '/string/whitespace'}
  
      def put_whitespace(
              self, custom_headers=None, raw=False, **operation_config):
          """Set String value with leading and trailing whitespace
          '<tab><space><space>Now is the time for all good men to come to the aid
          of their country<tab><space><space>'.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: None or ClientRawResponse if raw=true
          :rtype: None or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          string_body = "    Now is the time for all good men to come to the aid of their country    "
  
          # Construct URL
          url = self.put_whitespace.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Content-Type'] = 'application/json; charset=utf-8'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct body
          body_content = self._serialize.body(string_body, 'str')
  
          # Construct and send request
          request = self._client.put(url, query_parameters, header_parameters, body_content)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          if raw:
              client_raw_response = ClientRawResponse(None, response)
              return client_raw_response
      put_whitespace.metadata = {'url': '/string/whitespace'}
  
      def get_not_provided(
              self, custom_headers=None, raw=False, **operation_config):
          """Get String value when no string value is sent in response payload.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: str or ClientRawResponse if raw=true
          :rtype: str or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.get_not_provided.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Accept'] = 'application/json'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct and send request
          request = self._client.get(url, query_parameters, header_parameters)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          deserialized = None
          if response.status_code == 200:
              deserialized = self._deserialize('str', response)
  
          if raw:
              client_raw_response = ClientRawResponse(deserialized, response)
              return client_raw_response
  
          return deserialized
      get_not_provided.metadata = {'url': '/string/notProvided'}
  
      def get_base64_encoded(
              self, custom_headers=None, raw=False, **operation_config):
          """Get value that is base64 encoded.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: bytes or ClientRawResponse if raw=true
          :rtype: bytes or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.get_base64_encoded.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Accept'] = 'application/json'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct and send request
          request = self._client.get(url, query_parameters, header_parameters)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          deserialized = None
          if response.status_code == 200:
              deserialized = self._deserialize('base64', response)
  
          if raw:
              client_raw_response = ClientRawResponse(deserialized, response)
              return client_raw_response
  
          return deserialized
      get_base64_encoded.metadata = {'url': '/string/base64Encoding'}
  
      def get_base64_url_encoded(
              self, custom_headers=None, raw=False, **operation_config):
          """Get value that is base64url encoded.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: bytes or ClientRawResponse if raw=true
          :rtype: bytes or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.get_base64_url_encoded.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Accept'] = 'application/json'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct and send request
          request = self._client.get(url, query_parameters, header_parameters)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          deserialized = None
          if response.status_code == 200:
              deserialized = self._deserialize('base64', response)
  
          if raw:
              client_raw_response = ClientRawResponse(deserialized, response)
              return client_raw_response
  
          return deserialized
      get_base64_url_encoded.metadata = {'url': '/string/base64UrlEncoding'}
  
      def put_base64_url_encoded(
              self, string_body, custom_headers=None, raw=False, **operation_config):
          """Put value that is base64url encoded.
  
          :param string_body:
          :type string_body: bytes
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: None or ClientRawResponse if raw=true
          :rtype: None or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.put_base64_url_encoded.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Content-Type'] = 'application/json; charset=utf-8'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct body
          body_content = self._serialize.body(string_body, 'base64')
  
          # Construct and send request
          request = self._client.put(url, query_parameters, header_parameters, body_content)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          if raw:
              client_raw_response = ClientRawResponse(None, response)
              return client_raw_response
      put_base64_url_encoded.metadata = {'url': '/string/base64UrlEncoding'}
  
      def get_null_base64_url_encoded(
              self, custom_headers=None, raw=False, **operation_config):
          """Get null value that is expected to be base64url encoded.
  
          :param dict custom_headers: headers that will be added to the request
          :param bool raw: returns the direct response alongside the
           deserialized response
          :param operation_config: :ref:`Operation configuration
           overrides<msrest:optionsforoperations>`.
          :return: bytes or ClientRawResponse if raw=true
          :rtype: bytes or ~msrest.pipeline.ClientRawResponse
          :raises: :class:`ErrorException<bodystring.models.ErrorException>`
          """
          # Construct URL
          url = self.get_null_base64_url_encoded.metadata['url']
  
          # Construct parameters
          query_parameters = {}
  
          # Construct headers
          header_parameters = {}
          header_parameters['Accept'] = 'application/json'
          if custom_headers:
              header_parameters.update(custom_headers)
  
          # Construct and send request
          request = self._client.get(url, query_parameters, header_parameters)
          response = self._client.send(request, stream=False, **operation_config)
  
          if response.status_code not in [200]:
              raise models.ErrorException(self._deserialize, response)
  
          deserialized = None
          if response.status_code == 200:
              deserialized = self._deserialize('base64', response)
  
          if raw:
              client_raw_response = ClientRawResponse(deserialized, response)
              return client_raw_response
  
          return deserialized
      get_null_base64_url_encoded.metadata = {'url': '/string/nullBase64UrlEncoding'}
  