code: func defaultObjectPauser(obj runtime.Object) ([]byte, error) {
  	switch obj := obj.(type) {
  	case *extensionsv1beta1.Deployment:
  		if obj.Spec.Paused {
  			return nil, errors.New("is already paused")
  		}
  		obj.Spec.Paused = true
  		return runtime.Encode(scheme.Codecs.LegacyCodec(extensionsv1beta1.SchemeGroupVersion), obj)
  
  	case *appsv1.Deployment:
  		if obj.Spec.Paused {
  			return nil, errors.New("is already paused")
  		}
  		obj.Spec.Paused = true
  		return runtime.Encode(scheme.Codecs.LegacyCodec(appsv1.SchemeGroupVersion), obj)
  
  	case *appsv1beta2.Deployment:
  		if obj.Spec.Paused {
  			return nil, errors.New("is already paused")
  		}
  		obj.Spec.Paused = true
  		return runtime.Encode(scheme.Codecs.LegacyCodec(appsv1beta2.SchemeGroupVersion), obj)
  
  	case *appsv1beta1.Deployment:
  		if obj.Spec.Paused {
  			return nil, errors.New("is already paused")
  		}
  		obj.Spec.Paused = true
  		return runtime.Encode(scheme.Codecs.LegacyCodec(appsv1beta1.SchemeGroupVersion), obj)
  
  	default:
  		return nil, fmt.Errorf("pausing is not supported")
  	}
  }
docs: // Currently only supports Deployments.