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 HttpServerFailureOperations(object):
      """HttpServerFailureOperations operations.
  
      :param client: Client for service requests.
      :param config: Configuration of service client.
      :param serializer: An object model serializer.
      :param deserializer: An object model deserializer.
      """
  
      def __init__(self, client, config, serializer, deserializer):
  
          self._client = client
          self._serialize = serializer
          self._deserialize = deserializer
  
          self.config = config
  
      def head501(
              self, custom_headers=None, raw=False, **operation_config):
          """Return 501 status code - should be represented in the client as an
          error.
  
          :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>`.
          :rtype: :class:`Error <Fixtures.AcceptanceTestsHttp.models.Error>`
          :rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
           if raw=true
          :raises:
           :class:`ErrorException<Fixtures.AcceptanceTestsHttp.models.ErrorException>`
          """
          # Construct URL
          url = '/http/failure/server/501'
  
          # 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 and send request
          request = self._client.head(url, query_parameters)
          response = self._client.send(request, header_parameters, **operation_config)
  
          if response.status_code < 200 or response.status_code >= 300:
              raise models.ErrorException(self._deserialize, response)
  
          if raw:
              client_raw_response = ClientRawResponse(None, response)
              return client_raw_response
  
      def get501(
              self, custom_headers=None, raw=False, **operation_config):
          """Return 501 status code - should be represented in the client as an
          error.
  
          :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>`.
          :rtype: :class:`Error <Fixtures.AcceptanceTestsHttp.models.Error>`
          :rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
           if raw=true
          :raises:
           :class:`ErrorException<Fixtures.AcceptanceTestsHttp.models.ErrorException>`
          """
          # Construct URL
          url = '/http/failure/server/501'
  
          # 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 and send request
          request = self._client.get(url, query_parameters)
          response = self._client.send(request, header_parameters, **operation_config)
  
          if response.status_code < 200 or response.status_code >= 300:
              raise models.ErrorException(self._deserialize, response)
  
          if raw:
              client_raw_response = ClientRawResponse(None, response)
              return client_raw_response
  
      def post505(
              self, boolean_value=None, custom_headers=None, raw=False, **operation_config):
          """Return 505 status code - should be represented in the client as an
          error.
  
          :param boolean_value: Simple boolean value true
          :type boolean_value: bool
          :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>`.
          :rtype: :class:`Error <Fixtures.AcceptanceTestsHttp.models.Error>`
          :rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
           if raw=true
          :raises:
           :class:`ErrorException<Fixtures.AcceptanceTestsHttp.models.ErrorException>`
          """
          # Construct URL
          url = '/http/failure/server/505'
  
          # 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 boolean_value is not None:
              body_content = self._serialize.body(boolean_value, 'bool')
          else:
              body_content = None
  
          # Construct and send request
          request = self._client.post(url, query_parameters)
          response = self._client.send(
              request, header_parameters, body_content, **operation_config)
  
          if response.status_code < 200 or response.status_code >= 300:
              raise models.ErrorException(self._deserialize, response)
  
          if raw:
              client_raw_response = ClientRawResponse(None, response)
              return client_raw_response
  
      def delete505(
              self, boolean_value=None, custom_headers=None, raw=False, **operation_config):
          """Return 505 status code - should be represented in the client as an
          error.
  
          :param boolean_value: Simple boolean value true
          :type boolean_value: bool
          :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>`.
          :rtype: :class:`Error <Fixtures.AcceptanceTestsHttp.models.Error>`
          :rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
           if raw=true
          :raises:
           :class:`ErrorException<Fixtures.AcceptanceTestsHttp.models.ErrorException>`
          """
          # Construct URL
          url = '/http/failure/server/505'
  
          # 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 boolean_value is not None:
              body_content = self._serialize.body(boolean_value, 'bool')
          else:
              body_content = None
  
          # Construct and send request
          request = self._client.delete(url, query_parameters)
          response = self._client.send(
              request, header_parameters, body_content, **operation_config)
  
          if response.status_code < 200 or response.status_code >= 300:
              raise models.ErrorException(self._deserialize, response)
  
          if raw:
              client_raw_response = ClientRawResponse(None, response)
              return client_raw_response
  