@@--  Spec to support SOAP enumeration types
@@--
--  wsdl2aws SOAP Generator v@_WSDL2AWS_VERSION_@
--
--  AWS @_AWS_VERSION_@ - SOAP @_SOAP_VERSION_@
--  This file was generated on @_NOW_@
--
--  $ wsdl2aws @_OPTIONS_@

with SOAP.Parameters;
with SOAP.Types;

@@TABLE@@
with @_USER_UNITS_@;
@@END_TABLE@@

package @_UNIT_NAME_@ is

   Q_Type_Name : constant String := "@_Q_TYPE_NAME_@";

@@IF@@ @_IS_EMPTY:TYPE_SPEC_@
   type @_TYPE_NAME_@ is
@@INLINE(     \()(, )(\);)@@
@@TABLE@@
      @_E_NAME_@
@@END_TABLE@@
@@END_INLINE@@

   function To_@_TYPE_NAME_@
     (D : @_TYPE_NAME_@) return @_TYPE_NAME_@ is (D);

   function From_@_TYPE_NAME_@
     (D : @_TYPE_NAME_@) return @_TYPE_NAME_@ is (D);
@@ELSE@@

   subtype @_TYPE_NAME_@ is
     @_TYPE_SPEC_@.@_TYPE_REF_@;

   function To_@_TYPE_NAME_@
     (D : @_TYPE_NAME_@)
      return @_TYPE_NAME_@ is (D);

   function From_@_TYPE_NAME_@
     (D : @_TYPE_NAME_@)
      return @_TYPE_NAME_@ is (D);
@@END_IF@@

   function Image (E : @_TYPE_NAME_@) return String;

   function To_String_Type
     (D : @_TYPE_NAME_@)
      return String is (Image (D));

   function From_String_Type
     (D : String)
      return @_TYPE_NAME_@ is (@_TYPE_NAME_@'Value (D));

   function Value (S : String)
     return @_TYPE_NAME_@
     renames From_String_Type;

   function To_@_TYPE_NAME_@
     (O : SOAP.Types.Object'Class)
      return @_TYPE_NAME_@ is
        (From_String_Type (SOAP.Types.V (SOAP.Types.SOAP_Enumeration (O))));

   function To_@_TYPE_NAME_@
     (L : SOAP.Parameters.List)
      return @_TYPE_NAME_@
      is (To_@_TYPE_NAME_@ (SOAP.Parameters.Argument (L, 1)));

   function To_SOAP_Object
     (D         : @_TYPE_NAME_@;
      Name      : String := "item";
      Type_Name : String := Q_Type_Name;
      NS        : SOAP.Name_Space.Object := Name_Space)
      return SOAP.Types.SOAP_Enumeration is
        (SOAP.Types.E (Image (D), Type_Name, Name, NS));

end @_UNIT_NAME_@;
