// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumiverse.Fortios
{
    /// <summary>
    /// Configure IPsec manual keys.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var trname = new Fortios.VpnipsecManualkey("trname", new()
    ///     {
    ///         Authentication = "md5",
    ///         Authkey = "EE32CA121ECD772A-ECACAABA212345EC",
    ///         Enckey = "-",
    ///         Encryption = "null",
    ///         Interface = "port4",
    ///         LocalGw = "0.0.0.0",
    ///         Localspi = "0x100",
    ///         RemoteGw = "1.1.1.1",
    ///         Remotespi = "0x100",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// VpnIpsec Manualkey can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/vpnipsecManualkey:VpnipsecManualkey labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/vpnipsecManualkey:VpnipsecManualkey labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/vpnipsecManualkey:VpnipsecManualkey")]
    public partial class VpnipsecManualkey : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Authentication algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `md5`, `sha1`, `sha256`, `sha384`, `sha512`.
        /// </summary>
        [Output("authentication")]
        public Output<string> Authentication { get; private set; } = null!;

        /// <summary>
        /// Hexadecimal authentication key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        [Output("authkey")]
        public Output<string> Authkey { get; private set; } = null!;

        /// <summary>
        /// Hexadecimal encryption key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        [Output("enckey")]
        public Output<string> Enckey { get; private set; } = null!;

        /// <summary>
        /// Encryption algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `des`, `3des`, `aes128`, `aes192`, `aes256`, `aria128`, `aria192`, `aria256`, `seed`.
        /// </summary>
        [Output("encryption")]
        public Output<string> Encryption { get; private set; } = null!;

        /// <summary>
        /// Name of the physical, aggregate, or VLAN interface.
        /// </summary>
        [Output("interface")]
        public Output<string> Interface { get; private set; } = null!;

        /// <summary>
        /// Local gateway.
        /// </summary>
        [Output("localGw")]
        public Output<string> LocalGw { get; private set; } = null!;

        /// <summary>
        /// Local SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Output("localspi")]
        public Output<string> Localspi { get; private set; } = null!;

        /// <summary>
        /// IPsec tunnel name.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Enable/disable NPU offloading. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("npuOffload")]
        public Output<string> NpuOffload { get; private set; } = null!;

        /// <summary>
        /// Peer gateway.
        /// </summary>
        [Output("remoteGw")]
        public Output<string> RemoteGw { get; private set; } = null!;

        /// <summary>
        /// Remote SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Output("remotespi")]
        public Output<string> Remotespi { get; private set; } = null!;

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Output("vdomparam")]
        public Output<string?> Vdomparam { get; private set; } = null!;


        /// <summary>
        /// Create a VpnipsecManualkey resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public VpnipsecManualkey(string name, VpnipsecManualkeyArgs args, CustomResourceOptions? options = null)
            : base("fortios:index/vpnipsecManualkey:VpnipsecManualkey", name, args ?? new VpnipsecManualkeyArgs(), MakeResourceOptions(options, ""))
        {
        }

        private VpnipsecManualkey(string name, Input<string> id, VpnipsecManualkeyState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/vpnipsecManualkey:VpnipsecManualkey", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/pulumiverse/pulumi-fortios",
                AdditionalSecretOutputs =
                {
                    "authkey",
                    "enckey",
                },
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing VpnipsecManualkey resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static VpnipsecManualkey Get(string name, Input<string> id, VpnipsecManualkeyState? state = null, CustomResourceOptions? options = null)
        {
            return new VpnipsecManualkey(name, id, state, options);
        }
    }

    public sealed class VpnipsecManualkeyArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Authentication algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `md5`, `sha1`, `sha256`, `sha384`, `sha512`.
        /// </summary>
        [Input("authentication", required: true)]
        public Input<string> Authentication { get; set; } = null!;

        [Input("authkey")]
        private Input<string>? _authkey;

        /// <summary>
        /// Hexadecimal authentication key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        public Input<string>? Authkey
        {
            get => _authkey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _authkey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        [Input("enckey")]
        private Input<string>? _enckey;

        /// <summary>
        /// Hexadecimal encryption key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        public Input<string>? Enckey
        {
            get => _enckey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _enckey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Encryption algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `des`, `3des`, `aes128`, `aes192`, `aes256`, `aria128`, `aria192`, `aria256`, `seed`.
        /// </summary>
        [Input("encryption", required: true)]
        public Input<string> Encryption { get; set; } = null!;

        /// <summary>
        /// Name of the physical, aggregate, or VLAN interface.
        /// </summary>
        [Input("interface", required: true)]
        public Input<string> Interface { get; set; } = null!;

        /// <summary>
        /// Local gateway.
        /// </summary>
        [Input("localGw")]
        public Input<string>? LocalGw { get; set; }

        /// <summary>
        /// Local SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Input("localspi")]
        public Input<string>? Localspi { get; set; }

        /// <summary>
        /// IPsec tunnel name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Enable/disable NPU offloading. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("npuOffload")]
        public Input<string>? NpuOffload { get; set; }

        /// <summary>
        /// Peer gateway.
        /// </summary>
        [Input("remoteGw", required: true)]
        public Input<string> RemoteGw { get; set; } = null!;

        /// <summary>
        /// Remote SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Input("remotespi")]
        public Input<string>? Remotespi { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

        public VpnipsecManualkeyArgs()
        {
        }
        public static new VpnipsecManualkeyArgs Empty => new VpnipsecManualkeyArgs();
    }

    public sealed class VpnipsecManualkeyState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Authentication algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `md5`, `sha1`, `sha256`, `sha384`, `sha512`.
        /// </summary>
        [Input("authentication")]
        public Input<string>? Authentication { get; set; }

        [Input("authkey")]
        private Input<string>? _authkey;

        /// <summary>
        /// Hexadecimal authentication key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        public Input<string>? Authkey
        {
            get => _authkey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _authkey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        [Input("enckey")]
        private Input<string>? _enckey;

        /// <summary>
        /// Hexadecimal encryption key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        public Input<string>? Enckey
        {
            get => _enckey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _enckey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Encryption algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `des`, `3des`, `aes128`, `aes192`, `aes256`, `aria128`, `aria192`, `aria256`, `seed`.
        /// </summary>
        [Input("encryption")]
        public Input<string>? Encryption { get; set; }

        /// <summary>
        /// Name of the physical, aggregate, or VLAN interface.
        /// </summary>
        [Input("interface")]
        public Input<string>? Interface { get; set; }

        /// <summary>
        /// Local gateway.
        /// </summary>
        [Input("localGw")]
        public Input<string>? LocalGw { get; set; }

        /// <summary>
        /// Local SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Input("localspi")]
        public Input<string>? Localspi { get; set; }

        /// <summary>
        /// IPsec tunnel name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Enable/disable NPU offloading. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("npuOffload")]
        public Input<string>? NpuOffload { get; set; }

        /// <summary>
        /// Peer gateway.
        /// </summary>
        [Input("remoteGw")]
        public Input<string>? RemoteGw { get; set; }

        /// <summary>
        /// Remote SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Input("remotespi")]
        public Input<string>? Remotespi { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

        public VpnipsecManualkeyState()
        {
        }
        public static new VpnipsecManualkeyState Empty => new VpnipsecManualkeyState();
    }
}
