/**
 * Web Application Firewall (WAF) API
 * API for the Web Application Firewall service.
Use this API to manage regional Web App Firewalls and corresponding policies for protecting HTTP services.

 * OpenAPI spec version: 20210930
 *
 *
 * NOTE: This class is auto generated by OracleSDKGenerator.
 * Do not edit the class manually.
 *
 * Copyright (c) 2020, 2022, Oracle and/or its affiliates.  All rights reserved.
 * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
 */ import * as model from "../model" ; import common = require ( "oci-common" ) ; /**
 * A description of WorkRequest status
 */ export interface WorkRequest { /**
     * Type of the WorkRequest
     */ "operationType" : WorkRequest . OperationType ; /**
     * Status of current work request.
     */ "status" : WorkRequest . Status ; /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the WorkRequest.
     */ "id" : string ; /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the WorkRequest.
     * WorkRequests should be scoped to the same compartment as the resource the work request affects.
     *
     */ "compartmentId" : string ; /**
     * The resources affected by this WorkRequest.
     */ "resources" : Array < model . WorkRequestResource > ; /**
     * Percentage of the request completed. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
     */ "percentComplete" : number ; /**
     * The date and time the request was created, as described in
     * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29.
     *
     */ "timeAccepted" : Date ; /**
     * The date and time the request was started, as described in
     * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29.
     *
     */ "timeStarted" ? : Date ; /**
     * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339).
     *
     */ "timeFinished" ? : Date ; } export namespace WorkRequest { export enum OperationType { CreateWafPolicy = "CREATE_WAF_POLICY" , UpdateWafPolicy = "UPDATE_WAF_POLICY" , DeleteWafPolicy = "DELETE_WAF_POLICY" , MoveWafPolicy = "MOVE_WAF_POLICY" , CreateNetworkAddressList = "CREATE_NETWORK_ADDRESS_LIST" , UpdateNetworkAddressList = "UPDATE_NETWORK_ADDRESS_LIST" , DeleteNetworkAddressList = "DELETE_NETWORK_ADDRESS_LIST" , MoveNetworkAddressList = "MOVE_NETWORK_ADDRESS_LIST" , CreateWebAppFirewall = "CREATE_WEB_APP_FIREWALL" , UpdateWebAppFirewall = "UPDATE_WEB_APP_FIREWALL" , DeleteWebAppFirewall = "DELETE_WEB_APP_FIREWALL" , MoveWebAppFirewall = "MOVE_WEB_APP_FIREWALL" , /**
         * This value is used if a service returns a value for this enum that is not recognized by this
         * version of the SDK.
         */ UnknownValue = "UNKNOWN_VALUE" } export enum Status { Accepted = "ACCEPTED" , InProgress = "IN_PROGRESS" , Failed = "FAILED" , Succeeded = "SUCCEEDED" , Canceling = "CANCELING" , Canceled = "CANCELED" , /**
         * This value is used if a service returns a value for this enum that is not recognized by this
         * version of the SDK.
         */ UnknownValue = "UNKNOWN_VALUE" } export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { "resources" : obj . resources ? obj . resources . map ( item => { return model . WorkRequestResource . getJsonObj ( item ) ; } ) : undefined } } ; return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { "resources" : obj . resources ? obj . resources . map ( item => { return model . WorkRequestResource . getDeserializedJsonObj ( item ) ; } ) : undefined } } ; return jsonObj ; } }