// *** 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;

namespace Pulumi.Routeros.Iface
{
    /// <summary>
    /// ## # routeros.Iface.Gre (Resource)
    /// 
    /// ***
    /// 
    /// #### This is an alias for backwards compatibility between plugin versions.
    /// Please see documentation for routeros.Iface.InterfaceGre
    /// </summary>
    [RouterosResourceType("routeros:Iface/gre:Gre")]
    public partial class Gre : global::Pulumi.CustomResource
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Output("___id_")]
        public Output<int?> ___id_ { get; private set; } = null!;

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Output("___path_")]
        public Output<string?> ___path_ { get; private set; } = null!;

        [Output("actualMtu")]
        public Output<int> ActualMtu { get; private set; } = null!;

        /// <summary>
        /// Whether to allow FastPath processing. Must be disabled if IPsec tunneling is used.
        /// </summary>
        [Output("allowFastPath")]
        public Output<bool?> AllowFastPath { get; private set; } = null!;

        /// <summary>
        /// Controls whether to change MSS size for received TCP SYN packets. When enabled, a router will change the MSS size for
        /// received TCP SYN packets if the current MSS size exceeds the tunnel interface MTU (taking into account the TCP/IP
        /// overhead). The received encapsulated packet will still contain the original MSS, and only after decapsulation the MSS is
        /// changed.
        /// </summary>
        [Output("clampTcpMss")]
        public Output<bool?> ClampTcpMss { get; private set; } = null!;

        [Output("comment")]
        public Output<string?> Comment { get; private set; } = null!;

        [Output("disabled")]
        public Output<bool?> Disabled { get; private set; } = null!;

        [Output("dontFragment")]
        public Output<string?> DontFragment { get; private set; } = null!;

        /// <summary>
        /// Set dscp value in GRE header to a fixed value '0..63' or 'inherit' from dscp value taken from tunnelled traffic.
        /// </summary>
        [Output("dscp")]
        public Output<string?> Dscp { get; private set; } = null!;

        /// <summary>
        /// When secret is specified, router adds dynamic IPsec peer to remote-address with pre-shared key and policy (by default
        /// phase2 uses sha1/aes128cbc).
        /// </summary>
        [Output("ipsecSecret")]
        public Output<string?> IpsecSecret { get; private set; } = null!;

        /// <summary>
        /// Tunnel keepalive parameter sets the time interval in which the tunnel running flag will remain even if the remote end of
        /// tunnel goes down. If configured time,retries fail, interface running flag is removed. Parameters are written in
        /// following format: KeepaliveInterval,KeepaliveRetries where KeepaliveInterval is time interval and KeepaliveRetries -
        /// number of retry attempts. KeepaliveInterval is integer 0..4294967295
        /// </summary>
        [Output("keepalive")]
        public Output<string?> Keepalive { get; private set; } = null!;

        /// <summary>
        /// Layer2 Maximum transmission unit.
        /// </summary>
        [Output("l2mtu")]
        public Output<int> L2mtu { get; private set; } = null!;

        [Output("localAddress")]
        public Output<string?> LocalAddress { get; private set; } = null!;

        /// <summary>
        /// Layer3 Maximum transmission unit ('auto', 0 .. 65535)
        /// </summary>
        [Output("mtu")]
        public Output<string> Mtu { get; private set; } = null!;

        /// <summary>
        /// Changing the name of this resource will force it to be recreated. &gt; The links of other configuration properties to this
        /// resource may be lost! &gt; Changing the name of the resource outside of a Terraform will result in a loss of control
        /// integrity for that resource!
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        [Output("remoteAddress")]
        public Output<string> RemoteAddress { get; private set; } = null!;

        [Output("running")]
        public Output<bool> Running { get; private set; } = null!;


        /// <summary>
        /// Create a Gre 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 Gre(string name, GreArgs args, CustomResourceOptions? options = null)
            : base("routeros:Iface/gre:Gre", name, args ?? new GreArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Gre(string name, Input<string> id, GreState? state = null, CustomResourceOptions? options = null)
            : base("routeros:Iface/gre:Gre", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                AdditionalSecretOutputs =
                {
                    "ipsecSecret",
                },
            };
            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 Gre 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 Gre Get(string name, Input<string> id, GreState? state = null, CustomResourceOptions? options = null)
        {
            return new Gre(name, id, state, options);
        }
    }

    public sealed class GreArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___id_")]
        public Input<int>? ___id_ { get; set; }

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___path_")]
        public Input<string>? ___path_ { get; set; }

        /// <summary>
        /// Whether to allow FastPath processing. Must be disabled if IPsec tunneling is used.
        /// </summary>
        [Input("allowFastPath")]
        public Input<bool>? AllowFastPath { get; set; }

        /// <summary>
        /// Controls whether to change MSS size for received TCP SYN packets. When enabled, a router will change the MSS size for
        /// received TCP SYN packets if the current MSS size exceeds the tunnel interface MTU (taking into account the TCP/IP
        /// overhead). The received encapsulated packet will still contain the original MSS, and only after decapsulation the MSS is
        /// changed.
        /// </summary>
        [Input("clampTcpMss")]
        public Input<bool>? ClampTcpMss { get; set; }

        [Input("comment")]
        public Input<string>? Comment { get; set; }

        [Input("disabled")]
        public Input<bool>? Disabled { get; set; }

        [Input("dontFragment")]
        public Input<string>? DontFragment { get; set; }

        /// <summary>
        /// Set dscp value in GRE header to a fixed value '0..63' or 'inherit' from dscp value taken from tunnelled traffic.
        /// </summary>
        [Input("dscp")]
        public Input<string>? Dscp { get; set; }

        [Input("ipsecSecret")]
        private Input<string>? _ipsecSecret;

        /// <summary>
        /// When secret is specified, router adds dynamic IPsec peer to remote-address with pre-shared key and policy (by default
        /// phase2 uses sha1/aes128cbc).
        /// </summary>
        public Input<string>? IpsecSecret
        {
            get => _ipsecSecret;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _ipsecSecret = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Tunnel keepalive parameter sets the time interval in which the tunnel running flag will remain even if the remote end of
        /// tunnel goes down. If configured time,retries fail, interface running flag is removed. Parameters are written in
        /// following format: KeepaliveInterval,KeepaliveRetries where KeepaliveInterval is time interval and KeepaliveRetries -
        /// number of retry attempts. KeepaliveInterval is integer 0..4294967295
        /// </summary>
        [Input("keepalive")]
        public Input<string>? Keepalive { get; set; }

        [Input("localAddress")]
        public Input<string>? LocalAddress { get; set; }

        /// <summary>
        /// Layer3 Maximum transmission unit ('auto', 0 .. 65535)
        /// </summary>
        [Input("mtu")]
        public Input<string>? Mtu { get; set; }

        /// <summary>
        /// Changing the name of this resource will force it to be recreated. &gt; The links of other configuration properties to this
        /// resource may be lost! &gt; Changing the name of the resource outside of a Terraform will result in a loss of control
        /// integrity for that resource!
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("remoteAddress", required: true)]
        public Input<string> RemoteAddress { get; set; } = null!;

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

    public sealed class GreState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___id_")]
        public Input<int>? ___id_ { get; set; }

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___path_")]
        public Input<string>? ___path_ { get; set; }

        [Input("actualMtu")]
        public Input<int>? ActualMtu { get; set; }

        /// <summary>
        /// Whether to allow FastPath processing. Must be disabled if IPsec tunneling is used.
        /// </summary>
        [Input("allowFastPath")]
        public Input<bool>? AllowFastPath { get; set; }

        /// <summary>
        /// Controls whether to change MSS size for received TCP SYN packets. When enabled, a router will change the MSS size for
        /// received TCP SYN packets if the current MSS size exceeds the tunnel interface MTU (taking into account the TCP/IP
        /// overhead). The received encapsulated packet will still contain the original MSS, and only after decapsulation the MSS is
        /// changed.
        /// </summary>
        [Input("clampTcpMss")]
        public Input<bool>? ClampTcpMss { get; set; }

        [Input("comment")]
        public Input<string>? Comment { get; set; }

        [Input("disabled")]
        public Input<bool>? Disabled { get; set; }

        [Input("dontFragment")]
        public Input<string>? DontFragment { get; set; }

        /// <summary>
        /// Set dscp value in GRE header to a fixed value '0..63' or 'inherit' from dscp value taken from tunnelled traffic.
        /// </summary>
        [Input("dscp")]
        public Input<string>? Dscp { get; set; }

        [Input("ipsecSecret")]
        private Input<string>? _ipsecSecret;

        /// <summary>
        /// When secret is specified, router adds dynamic IPsec peer to remote-address with pre-shared key and policy (by default
        /// phase2 uses sha1/aes128cbc).
        /// </summary>
        public Input<string>? IpsecSecret
        {
            get => _ipsecSecret;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _ipsecSecret = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Tunnel keepalive parameter sets the time interval in which the tunnel running flag will remain even if the remote end of
        /// tunnel goes down. If configured time,retries fail, interface running flag is removed. Parameters are written in
        /// following format: KeepaliveInterval,KeepaliveRetries where KeepaliveInterval is time interval and KeepaliveRetries -
        /// number of retry attempts. KeepaliveInterval is integer 0..4294967295
        /// </summary>
        [Input("keepalive")]
        public Input<string>? Keepalive { get; set; }

        /// <summary>
        /// Layer2 Maximum transmission unit.
        /// </summary>
        [Input("l2mtu")]
        public Input<int>? L2mtu { get; set; }

        [Input("localAddress")]
        public Input<string>? LocalAddress { get; set; }

        /// <summary>
        /// Layer3 Maximum transmission unit ('auto', 0 .. 65535)
        /// </summary>
        [Input("mtu")]
        public Input<string>? Mtu { get; set; }

        /// <summary>
        /// Changing the name of this resource will force it to be recreated. &gt; The links of other configuration properties to this
        /// resource may be lost! &gt; Changing the name of the resource outside of a Terraform will result in a loss of control
        /// integrity for that resource!
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("remoteAddress")]
        public Input<string>? RemoteAddress { get; set; }

        [Input("running")]
        public Input<bool>? Running { get; set; }

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