/**
 * Resource Manager API
 * Use the Resource Manager API to automate deployment and operations for all Oracle Cloud Infrastructure resources.
Using the infrastructure-as-code (IaC) model, the service is based on Terraform, an open source industry standard that lets DevOps engineers develop and deploy their infrastructure anywhere.
For more information, see
[the Resource Manager documentation](/iaas/Content/ResourceManager/home.htm).

 * OpenAPI spec version: 20180917
 *
 *
 * 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" ) ; /**
 * Property details for the configuration source used for the stack.
 *
 */ export interface CreateConfigSourceDetails { /**
     * File path to the directory from which Terraform runs.
     * If not specified, the root directory is used.
     * This parameter is ignored for the `configSourceType` value of `COMPARTMENT_CONFIG_SOURCE`.
     *
     */ "workingDirectory" ? : string ; "configSourceType" : string ; } export namespace CreateConfigSourceDetails { export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "configSourceType" in obj && obj . configSourceType ) { switch ( obj . configSourceType ) { case "ZIP_UPLOAD" : return model . CreateZipUploadConfigSourceDetails . getJsonObj ( < model . CreateZipUploadConfigSourceDetails > ( < object > jsonObj ) , true ) ; case "GIT_CONFIG_SOURCE" : return model . CreateGitConfigSourceDetails . getJsonObj ( < model . CreateGitConfigSourceDetails > ( < object > jsonObj ) , true ) ; case "OBJECT_STORAGE_CONFIG_SOURCE" : return model . CreateObjectStorageConfigSourceDetails . getJsonObj ( < model . CreateObjectStorageConfigSourceDetails > ( < object > jsonObj ) , true ) ; case "COMPARTMENT_CONFIG_SOURCE" : return model . CreateCompartmentConfigSourceDetails . getJsonObj ( < model . CreateCompartmentConfigSourceDetails > ( < object > jsonObj ) , true ) ; case "TEMPLATE_CONFIG_SOURCE" : return model . CreateStackTemplateConfigSourceDetails . getJsonObj ( < model . CreateStackTemplateConfigSourceDetails > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . configSourceType ) ; } } return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "configSourceType" in obj && obj . configSourceType ) { switch ( obj . configSourceType ) { case "ZIP_UPLOAD" : return model . CreateZipUploadConfigSourceDetails . getDeserializedJsonObj ( < model . CreateZipUploadConfigSourceDetails > ( < object > jsonObj ) , true ) ; case "GIT_CONFIG_SOURCE" : return model . CreateGitConfigSourceDetails . getDeserializedJsonObj ( < model . CreateGitConfigSourceDetails > ( < object > jsonObj ) , true ) ; case "OBJECT_STORAGE_CONFIG_SOURCE" : return model . CreateObjectStorageConfigSourceDetails . getDeserializedJsonObj ( < model . CreateObjectStorageConfigSourceDetails > ( < object > jsonObj ) , true ) ; case "COMPARTMENT_CONFIG_SOURCE" : return model . CreateCompartmentConfigSourceDetails . getDeserializedJsonObj ( < model . CreateCompartmentConfigSourceDetails > ( < object > jsonObj ) , true ) ; case "TEMPLATE_CONFIG_SOURCE" : return model . CreateStackTemplateConfigSourceDetails . getDeserializedJsonObj ( < model . CreateStackTemplateConfigSourceDetails > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . configSourceType ) ; } } return jsonObj ; } }