/**
 * Events API
 * API for the Events Service. Use this API to manage rules and actions that create automation
in your tenancy. For more information, see [Overview of Events](/iaas/Content/Events/Concepts/eventsoverview.htm).

 * OpenAPI spec version: 20181201
 *
 *
 * 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" ) ; /**
 * Object used to create an action.
 *
 */ export interface ActionDetails { /**
      * Whether or not this action is currently enabled.
  * <p>
  Example: `true`
  *
      */ "isEnabled" : boolean ; /**
     * A string that describes the details of the action. It does not have to be unique, and you can change it. Avoid entering
     * confidential information.
     *
     */ "description" ? : string ; "actionType" : string ; } export namespace ActionDetails { export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "actionType" in obj && obj . actionType ) { switch ( obj . actionType ) { case "OSS" : return model . CreateStreamingServiceActionDetails . getJsonObj ( < model . CreateStreamingServiceActionDetails > ( < object > jsonObj ) , true ) ; case "FAAS" : return model . CreateFaaSActionDetails . getJsonObj ( < model . CreateFaaSActionDetails > ( < object > jsonObj ) , true ) ; case "ONS" : return model . CreateNotificationServiceActionDetails . getJsonObj ( < model . CreateNotificationServiceActionDetails > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . actionType ) ; } } return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "actionType" in obj && obj . actionType ) { switch ( obj . actionType ) { case "OSS" : return model . CreateStreamingServiceActionDetails . getDeserializedJsonObj ( < model . CreateStreamingServiceActionDetails > ( < object > jsonObj ) , true ) ; case "FAAS" : return model . CreateFaaSActionDetails . getDeserializedJsonObj ( < model . CreateFaaSActionDetails > ( < object > jsonObj ) , true ) ; case "ONS" : return model . CreateNotificationServiceActionDetails . getDeserializedJsonObj ( < model . CreateNotificationServiceActionDetails > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . actionType ) ; } } return jsonObj ; } }