# StatusCodeEnum.java

    /*
    ** Module   : StatusCodeEnum.java
    ** Abstract : Implementation of the builtin class.
    **
    ** Copyright (c) 2019-2022, Golden Code Development Corporation.
    **
    ** -#- -I- --Date-- -------------------------------Description--------------------------------
    ** 001 CA  20190526 First version, stubs taken by converting the skeleton using FWD.
    ** 002 CA  20190710 Runtime implementation.
    ** 003 CA  20191024 Added method support levels and updated the class support level.
    ** 004 ME  20200518 Shifted to new legacy enum approach.
    ** 005 CA  20210221 Fixed 'qualified', 'extent' and 'returns' annotations at the legacy
    **                  signature.
    **     VVT 20221221 Serialization support added (see #4658).
    */

    /*
    ** This program is free software: you can redistribute it and/or modify
    ** it under the terms of the GNU Affero General Public License as
    ** published by the Free Software Foundation, either version 3 of the
    ** License, or (at your option) any later version.
    **
    ** This program is distributed in the hope that it will be useful,
    ** but WITHOUT ANY WARRANTY; without even the implied warranty of
    ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ** GNU Affero General Public License for more details.
    **
    ** You may find a copy of the GNU Affero GPL version 3 at the following
    ** location: https://www.gnu.org/licenses/agpl-3.0.en.html
    **
    ** Additional terms under GNU Affero GPL version 3 section 7:
    **
    **   Under Section 7 of the GNU Affero GPL version 3, the following additional
    **   terms apply to the works covered under the License.  These additional terms
    **   are non-permissive additional terms allowed under Section 7 of the GNU
    **   Affero GPL version 3 and may not be removed by you.
    **
    **   0. Attribution Requirement.
    **
    **     You must preserve all legal notices or author attributions in the covered
    **     work or Appropriate Legal Notices displayed by works containing the covered
    **     work.  You may not remove from the covered work any author or developer
    **     credit already included within the covered work.
    **
    **   1. No License To Use Trademarks.
    **
    **     This license does not grant any license or rights to use the trademarks
    **     Golden Code, FWD, any Golden Code or FWD logo, or any other trademarks
    **     of Golden Code Development Corporation. You are not authorized to use the
    **     name Golden Code, FWD, or the names of any author or contributor, for
    **     publicity purposes without written authorization.
    **
    **   2. No Misrepresentation of Affiliation.
    **
    **     You may not represent yourself as Golden Code Development Corporation or FWD.
    **
    **     You may not represent yourself for publicity purposes as associated with
    **     Golden Code Development Corporation, FWD, or any author or contributor to
    **     the covered work, without written authorization.
    **
    **   3. No Misrepresentation of Source or Origin.
    **
    **     You may not represent the covered work as solely your work.  All modified
    **     versions of the covered work must be marked in a reasonable way to make it
    **     clear that the modified work is not originating from Golden Code Development
    **     Corporation or FWD.  All modified versions must contain the notices of
    **     attribution required in this license.
    */

    package com.goldencode.p2j.oo.net.http;

    import com.goldencode.p2j.util.*;
    import com.goldencode.p2j.oo.lang.*;

    import static com.goldencode.p2j.report.ReportConstants.*;
    import static com.goldencode.p2j.util.InternalEntry.Type;

    /**
     * Business logic (converted to Java from the 4GL source code
     * in OpenEdge/Net/HTTP/StatusCodeEnum.cls).
     */
    @LegacyResource(resource = "OpenEdge.Net.HTTP.StatusCodeEnum")
    @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_FULL)
    public final class StatusCodeEnum
    extends LegacyEnum
    {
       @LegacySignature(type = Type.VARIABLE, name = "None")
       public static final object<? extends StatusCodeEnum> none;

       @LegacySignature(type = Type.VARIABLE, name = "Unknown")
       public static final object<? extends StatusCodeEnum> unknown;

       @LegacySignature(type = Type.VARIABLE, name = "Continue")
       public static final object<? extends StatusCodeEnum> continue_;

       @LegacySignature(type = Type.VARIABLE, name = "SwitchingProtocols")
       public static final object<? extends StatusCodeEnum> switchingProtocols;

       @LegacySignature(type = Type.VARIABLE, name = "Processing")
       public static final object<? extends StatusCodeEnum> processing;

       @LegacySignature(type = Type.VARIABLE, name = "OK")
       public static final object<? extends StatusCodeEnum> ok;

       @LegacySignature(type = Type.VARIABLE, name = "Created")
       public static final object<? extends StatusCodeEnum> created;

       @LegacySignature(type = Type.VARIABLE, name = "Accepted")
       public static final object<? extends StatusCodeEnum> accepted;

       @LegacySignature(type = Type.VARIABLE, name = "NonAuthoritativeInformation")
       public static final object<? extends StatusCodeEnum> nonAuthoritativeInformation;

       @LegacySignature(type = Type.VARIABLE, name = "NoContent")
       public static final object<? extends StatusCodeEnum> noContent;

       @LegacySignature(type = Type.VARIABLE, name = "ResetContent")
       public static final object<? extends StatusCodeEnum> resetContent;

       @LegacySignature(type = Type.VARIABLE, name = "PartialContent")
       public static final object<? extends StatusCodeEnum> partialContent;

       @LegacySignature(type = Type.VARIABLE, name = "Multi-Status")
       public static final object<? extends StatusCodeEnum> multiStatus;

       @LegacySignature(type = Type.VARIABLE, name = "AlreadyReported")
       public static final object<? extends StatusCodeEnum> alreadyReported;

       @LegacySignature(type = Type.VARIABLE, name = "IMUsed")
       public static final object<? extends StatusCodeEnum> imused;

       @LegacySignature(type = Type.VARIABLE, name = "MultipleChoices")
       public static final object<? extends StatusCodeEnum> multipleChoices;

       @LegacySignature(type = Type.VARIABLE, name = "MovedPermanently")
       public static final object<? extends StatusCodeEnum> movedPermanently;

       @LegacySignature(type = Type.VARIABLE, name = "Found")
       public static final object<? extends StatusCodeEnum> found;

       @LegacySignature(type = Type.VARIABLE, name = "SeeOther")
       public static final object<? extends StatusCodeEnum> seeOther;

       @LegacySignature(type = Type.VARIABLE, name = "NotModified")
       public static final object<? extends StatusCodeEnum> notModified;

       @LegacySignature(type = Type.VARIABLE, name = "UseProxy")
       public static final object<? extends StatusCodeEnum> useProxy;

       @LegacySignature(type = Type.VARIABLE, name = "TemporaryRedirect")
       public static final object<? extends StatusCodeEnum> temporaryRedirect;

       @LegacySignature(type = Type.VARIABLE, name = "PermanentRedirect")
       public static final object<? extends StatusCodeEnum> permanentRedirect;

       @LegacySignature(type = Type.VARIABLE, name = "BadRequest")
       public static final object<? extends StatusCodeEnum> badRequest;

       @LegacySignature(type = Type.VARIABLE, name = "Unauthorized")
       public static final object<? extends StatusCodeEnum> unauthorized;

       @LegacySignature(type = Type.VARIABLE, name = "PaymentRequired")
       public static final object<? extends StatusCodeEnum> paymentRequired;

       @LegacySignature(type = Type.VARIABLE, name = "Forbidden")
       public static final object<? extends StatusCodeEnum> forbidden;

       @LegacySignature(type = Type.VARIABLE, name = "NotFound")
       public static final object<? extends StatusCodeEnum> notFound;

       @LegacySignature(type = Type.VARIABLE, name = "MethodNotAllowed")
       public static final object<? extends StatusCodeEnum> methodNotAllowed;

       @LegacySignature(type = Type.VARIABLE, name = "NotAcceptable")
       public static final object<? extends StatusCodeEnum> notAcceptable;

       @LegacySignature(type = Type.VARIABLE, name = "ProxyAuthenticationRequired")
       public static final object<? extends StatusCodeEnum> proxyAuthenticationRequired;

       @LegacySignature(type = Type.VARIABLE, name = "RequestTimeOut")
       public static final object<? extends StatusCodeEnum> requestTimeOut;

       @LegacySignature(type = Type.VARIABLE, name = "Conflict")
       public static final object<? extends StatusCodeEnum> conflict;

       @LegacySignature(type = Type.VARIABLE, name = "Gone")
       public static final object<? extends StatusCodeEnum> gone;

       @LegacySignature(type = Type.VARIABLE, name = "LengthRequired")
       public static final object<? extends StatusCodeEnum> lengthRequired;

       @LegacySignature(type = Type.VARIABLE, name = "PreconditionFailed")
       public static final object<? extends StatusCodeEnum> preconditionFailed;

       @LegacySignature(type = Type.VARIABLE, name = "RequestEntityTooLarge")
       public static final object<? extends StatusCodeEnum> requestEntityTooLarge;

       @LegacySignature(type = Type.VARIABLE, name = "RequestURITooLarge")
       public static final object<? extends StatusCodeEnum> requestUritooLarge;

       @LegacySignature(type = Type.VARIABLE, name = "UnsupportedMediaType")
       public static final object<? extends StatusCodeEnum> unsupportedMediaType;

       @LegacySignature(type = Type.VARIABLE, name = "RequestedRangeNotSatisfiable")
       public static final object<? extends StatusCodeEnum> requestedRangeNotSatisfiable;

       @LegacySignature(type = Type.VARIABLE, name = "ExpectationFailed")
       public static final object<? extends StatusCodeEnum> expectationFailed;

       @LegacySignature(type = Type.VARIABLE, name = "MisdirectedRequest")
       public static final object<? extends StatusCodeEnum> misdirectedRequest;

       @LegacySignature(type = Type.VARIABLE, name = "UnprocessableEntity")
       public static final object<? extends StatusCodeEnum> unprocessableEntity;

       @LegacySignature(type = Type.VARIABLE, name = "Locked")
       public static final object<? extends StatusCodeEnum> locked;

       @LegacySignature(type = Type.VARIABLE, name = "FailedDependency")
       public static final object<? extends StatusCodeEnum> failedDependency;

       @LegacySignature(type = Type.VARIABLE, name = "UpgradeRequired")
       public static final object<? extends StatusCodeEnum> upgradeRequired;

       @LegacySignature(type = Type.VARIABLE, name = "PreconditionRequired")
       public static final object<? extends StatusCodeEnum> preconditionRequired;

       @LegacySignature(type = Type.VARIABLE, name = "TooManyRequests")
       public static final object<? extends StatusCodeEnum> tooManyRequests;

       @LegacySignature(type = Type.VARIABLE, name = "RequestHeaderFieldsTooLarge")
       public static final object<? extends StatusCodeEnum> requestHeaderFieldsTooLarge;

       @LegacySignature(type = Type.VARIABLE, name = "InternalServerError")
       public static final object<? extends StatusCodeEnum> internalServerError;

       @LegacySignature(type = Type.VARIABLE, name = "NotImplemented")
       public static final object<? extends StatusCodeEnum> notImplemented;

       @LegacySignature(type = Type.VARIABLE, name = "BadGateway")
       public static final object<? extends StatusCodeEnum> badGateway;

       @LegacySignature(type = Type.VARIABLE, name = "ServiceUnavailable")
       public static final object<? extends StatusCodeEnum> serviceUnavailable;

       @LegacySignature(type = Type.VARIABLE, name = "GatewayTimeout")
       public static final object<? extends StatusCodeEnum> gatewayTimeout;

       @LegacySignature(type = Type.VARIABLE, name = "HTTPVersionNotSupported")
       public static final object<? extends StatusCodeEnum> httpversionNotSupported;

       @LegacySignature(type = Type.VARIABLE, name = "VariantAlsoNegotiates")
       public static final object<? extends StatusCodeEnum> variantAlsoNegotiates;

       @LegacySignature(type = Type.VARIABLE, name = "InsufficientStorage")
       public static final object<? extends StatusCodeEnum> insufficientStorage;

       @LegacySignature(type = Type.VARIABLE, name = "LoopDetected")
       public static final object<? extends StatusCodeEnum> loopDetected;

       @LegacySignature(type = Type.VARIABLE, name = "NotExtended")
       public static final object<? extends StatusCodeEnum> notExtended;

       @LegacySignature(type = Type.VARIABLE, name = "NetworkAuthenticationRequired")
       public static final object<? extends StatusCodeEnum> networkAuthenticationRequired;

       static
       {
          registerEnum(StatusCodeEnum.class, StatusCodeEnum::new, "OpenEdge.Net.HTTP.StatusCodeEnum");
          none = createEnum(StatusCodeEnum.class, "None", 0l);
          unknown = createEnum(StatusCodeEnum.class, "Unknown", -1l);
          continue_ = createEnum(StatusCodeEnum.class, "Continue", 100l);
          switchingProtocols = createEnum(StatusCodeEnum.class, "SwitchingProtocols", 101l);
          processing = createEnum(StatusCodeEnum.class, "Processing", 102l);
          ok = createEnum(StatusCodeEnum.class, "OK", 200l);
          created = createEnum(StatusCodeEnum.class, "Created", 201l);
          accepted = createEnum(StatusCodeEnum.class, "Accepted", 202l);
          nonAuthoritativeInformation = createEnum(StatusCodeEnum.class,
                   "NonAuthoritativeInformation", 203l);
          noContent = createEnum(StatusCodeEnum.class, "NoContent", 204l);
          resetContent = createEnum(StatusCodeEnum.class, "ResetContent", 205l);
          partialContent = createEnum(StatusCodeEnum.class, "PartialContent", 206l);
          multiStatus = createEnum(StatusCodeEnum.class, "Multi-Status", 207l);
          alreadyReported = createEnum(StatusCodeEnum.class, "AlreadyReported", 208l);
          imused = createEnum(StatusCodeEnum.class, "IMUsed", 226l);
          multipleChoices = createEnum(StatusCodeEnum.class, "MultipleChoices", 300l);
          movedPermanently = createEnum(StatusCodeEnum.class, "MovedPermanently", 301l);
          found = createEnum(StatusCodeEnum.class, "Found", 302l);
          seeOther = createEnum(StatusCodeEnum.class, "SeeOther", 303l);
          notModified = createEnum(StatusCodeEnum.class, "NotModified", 304l);
          useProxy = createEnum(StatusCodeEnum.class, "UseProxy", 305l);
          temporaryRedirect = createEnum(StatusCodeEnum.class, "TemporaryRedirect", 307l);
          permanentRedirect = createEnum(StatusCodeEnum.class, "PermanentRedirect", 308l);
          badRequest = createEnum(StatusCodeEnum.class, "BadRequest", 400l);
          unauthorized = createEnum(StatusCodeEnum.class, "Unauthorized", 401l);
          paymentRequired = createEnum(StatusCodeEnum.class, "PaymentRequired", 402l);
          forbidden = createEnum(StatusCodeEnum.class, "Forbidden", 403l);
          notFound = createEnum(StatusCodeEnum.class, "NotFound", 404l);
          methodNotAllowed = createEnum(StatusCodeEnum.class, "MethodNotAllowed", 405l);
          notAcceptable = createEnum(StatusCodeEnum.class, "NotAcceptable", 406l);
          proxyAuthenticationRequired = createEnum(StatusCodeEnum.class,
                   "ProxyAuthenticationRequired", 407l);
          requestTimeOut = createEnum(StatusCodeEnum.class, "RequestTimeOut", 408l);
          conflict = createEnum(StatusCodeEnum.class, "Conflict", 409l);
          gone = createEnum(StatusCodeEnum.class, "Gone", 410l);
          lengthRequired = createEnum(StatusCodeEnum.class, "LengthRequired", 411l);
          preconditionFailed = createEnum(StatusCodeEnum.class, "PreconditionFailed", 412l);
          requestEntityTooLarge = createEnum(StatusCodeEnum.class, "RequestEntityTooLarge", 413l);
          requestUritooLarge = createEnum(StatusCodeEnum.class, "RequestURITooLarge", 414l);
          unsupportedMediaType = createEnum(StatusCodeEnum.class, "UnsupportedMediaType", 415l);
          requestedRangeNotSatisfiable = createEnum(StatusCodeEnum.class,
                   "RequestedRangeNotSatisfiable", 416l);
          expectationFailed = createEnum(StatusCodeEnum.class, "ExpectationFailed", 417l);
          misdirectedRequest = createEnum(StatusCodeEnum.class, "MisdirectedRequest", 421l);
          unprocessableEntity = createEnum(StatusCodeEnum.class, "UnprocessableEntity", 422l);
          locked = createEnum(StatusCodeEnum.class, "Locked", 423l);
          failedDependency = createEnum(StatusCodeEnum.class, "FailedDependency", 424l);
          upgradeRequired = createEnum(StatusCodeEnum.class, "UpgradeRequired", 426l);
          preconditionRequired = createEnum(StatusCodeEnum.class, "PreconditionRequired", 428l);
          tooManyRequests = createEnum(StatusCodeEnum.class, "TooManyRequests", 429l);
          requestHeaderFieldsTooLarge = createEnum(StatusCodeEnum.class,
                   "RequestHeaderFieldsTooLarge", 431l);
          internalServerError = createEnum(StatusCodeEnum.class, "InternalServerError", 500l);
          notImplemented = createEnum(StatusCodeEnum.class, "NotImplemented", 501l);
          badGateway = createEnum(StatusCodeEnum.class, "BadGateway", 502l);
          serviceUnavailable = createEnum(StatusCodeEnum.class, "ServiceUnavailable", 503l);
          gatewayTimeout = createEnum(StatusCodeEnum.class, "GatewayTimeout", 504l);
          httpversionNotSupported = createEnum(StatusCodeEnum.class, "HTTPVersionNotSupported", 505l);
          variantAlsoNegotiates = createEnum(StatusCodeEnum.class, "VariantAlsoNegotiates", 506l);
          insufficientStorage = createEnum(StatusCodeEnum.class, "InsufficientStorage", 507l);
          loopDetected = createEnum(StatusCodeEnum.class, "LoopDetected", 508l);
          notExtended = createEnum(StatusCodeEnum.class, "NotExtended", 510l);
          networkAuthenticationRequired = createEnum(StatusCodeEnum.class,
                   "NetworkAuthenticationRequired", 511l);
       }

       /**
        * Default constructor. required for de-serialization.
        */
       public StatusCodeEnum()
       {
       }

       private StatusCodeEnum(final String name, final Long value)
       {
          super(name, value);
       }

       @LegacySignature(returns = "OBJECT", type = Type.METHOD, name = "GetEnum", qualified = "OpenEdge.Net.HTTP.StatusCodeEnum", parameters = {
                @LegacyParameter(name = "val", type = "INT64", mode = "INPUT") })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_FULL)
       public static object<StatusCodeEnum> getEnum(int64 val)
       {
          return getEnum(StatusCodeEnum.class, val);
       }

       @LegacySignature(returns = "OBJECT", type = Type.METHOD, name = "GetEnum", qualified = "OpenEdge.Net.HTTP.StatusCodeEnum", parameters = {
                @LegacyParameter(name = "val", type = "CHARACTER", mode = "INPUT") })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_FULL)
       public static object<StatusCodeEnum> getEnum(character val)
       {
          return getEnum(StatusCodeEnum.class, val);
       }
    }