/**
 * Secrets Management API
 * API for managing secrets.
 * OpenAPI spec version: 20180608
 *
 *
 * 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" ) ; /**
 * The details of the secret that you want to create.
 */ export interface CreateSecretDetails { /**
     * The OCID of the compartment where you want to create the secret.
     */ "compartmentId" : string ; /**
     * Defined tags for this resource. Each key is predefined and scoped to a namespace.
     * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
     * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
     *
     */ "definedTags" ? : { [ key ] : { [ key ] : any ; } ; } ; /**
     * A brief description of the secret. Avoid entering confidential information.
     */ "description" ? : string ; /**
     * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
     * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
     * Example: `{\"Department\": \"Finance\"}`
     *
     */ "freeformTags" ? : { [ key ] : string ; } ; /**
     * The OCID of the master encryption key that is used to encrypt the secret.
     */ "keyId" ? : string ; /**
     * Additional metadata that you can use to provide context about how to use the secret during rotation or
     * other administrative tasks. For example, for a secret that you use to connect to a database, the additional
     * metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs.
     *
     */ "metadata" ? : { [ key ] : any ; } ; "secretContent" : model . Base64SecretContentDetails ; /**
     * A user-friendly name for the secret. Secret names should be unique within a vault. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods.
     *
     */ "secretName" : string ; /**
     * A list of rules to control how the secret is used and managed.
     */ "secretRules" ? : Array < model . SecretRule > ; /**
     * The OCID of the vault where you want to create the secret.
     */ "vaultId" : string ; } export namespace CreateSecretDetails { export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { "secretContent" : obj . secretContent ? model . SecretContentDetails . getJsonObj ( obj . secretContent ) : undefined , "secretRules" : obj . secretRules ? obj . secretRules . map ( item => { return model . SecretRule . getJsonObj ( item ) ; } ) : undefined } } ; return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { "secretContent" : obj . secretContent ? model . SecretContentDetails . getDeserializedJsonObj ( obj . secretContent ) : undefined , "secretRules" : obj . secretRules ? obj . secretRules . map ( item => { return model . SecretRule . getDeserializedJsonObj ( item ) ; } ) : undefined } } ; return jsonObj ; } }