text: from django.shortcuts import render
  from rest_framework.views import APIView
  from rest_framework.response import Response
  from rest_framework import status
  
  from profiles_api.serializers import HelloSerializer
  
  
  class HelloAPIView (APIView):
  
      serializer_class = HelloSerializer
  
      def get(self, request):
          return Response({'message': 'Hello!!!'})
  
      def post(self, request):
          serializer = self.serializer_class(data=request.data)
  
          if serializer.is_valid():
              name = serializer.validated_data.get('name')
              message = f'Hello {name}'
              return Response({'message': message})
          else:
              return Response(serializer.errors, 400)
  
      def put(self, request, pk=None):
          """Handle updating an object"""
  
          return Response({'method': 'PUT'})
  
      def patch(self, request, pk=None):
          """Handle partial update of object"""
  
          return Response({'method': 'PATCH'})
  
      def delete(self, request, pk=None):
          """Delete an object"""
  
          return Response({'method': 'DELETE'})
  