<gh_stars>0// *** 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.Ip
{
    /// <summary>
    /// ## # routeros.Ip.DhcpServer (Resource)
    /// 
    /// ***
    /// 
    /// #### This is an alias for backwards compatibility between plugin versions.
    /// Please see documentation for routeros.Ip.DhcpIpServer
    /// </summary>
    [RouterosResourceType("routeros:Ip/dhcpServer:DhcpServer")]
    public partial class DhcpServer : 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!;

        /// <summary>
        /// Whether to add dynamic ARP entry.
        /// </summary>
        [Output("addArp")]
        public Output<bool?> AddArp { get; private set; } = null!;

        /// <summary>
        /// IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a
        /// static lease (added in lease submenu) will be allowed.
        /// </summary>
        [Output("addressPool")]
        public Output<string?> AddressPool { get; private set; } = null!;

        /// <summary>
        /// Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
        /// Requires IPv6 DHCP Server to have this option enabled as well to work properly.
        /// </summary>
        [Output("allowDualStackQueue")]
        public Output<bool?> AllowDualStackQueue { get; private set; } = null!;

        /// <summary>
        /// Always send replies as broadcasts even if destination IP is known.
        /// </summary>
        [Output("alwaysBroadcast")]
        public Output<bool?> AlwaysBroadcast { get; private set; } = null!;

        /// <summary>
        /// Option changes the way how a server responds to DHCP requests.
        /// </summary>
        [Output("authoritative")]
        public Output<string?> Authoritative { get; private set; } = null!;

        /// <summary>
        /// Accepts two predefined options or time value: * forever - lease never expires * lease-time - use time from lease-time
        /// parameter
        /// </summary>
        [Output("bootpLeaseTime")]
        public Output<string?> BootpLeaseTime { get; private set; } = null!;

        /// <summary>
        /// Support for BOOTP clients.
        /// </summary>
        [Output("bootpSupport")]
        public Output<string?> BootpSupport { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to limit specific number of clients per single MAC address.
        /// </summary>
        [Output("clientMacLimit")]
        public Output<int?> ClientMacLimit { get; private set; } = null!;

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

        /// <summary>
        /// Allows to disable/enable conflict detection. If option is enabled, then whenever server tries to assign a lease it will
        /// send ICMP and ARP messages to detect whether such address in the network already exist. If any of above get reply
        /// address is considered already used. Conflict detection must be disabled when any kind of DHCP client limitation per port
        /// or per mac is used.
        /// </summary>
        [Output("conflictDetection")]
        public Output<bool?> ConflictDetection { get; private set; } = null!;

        /// <summary>
        /// If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored. If set to none - there is no
        /// threshold (all DHCP packets are processed).
        /// </summary>
        [Output("delayThreshold")]
        public Output<string?> DelayThreshold { get; private set; } = null!;

        /// <summary>
        /// Use custom set of DHCP options defined in option sets menu.
        /// </summary>
        [Output("dhcpOptionSet")]
        public Output<string?> DhcpOptionSet { get; private set; } = null!;

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

        /// <summary>
        /// Configuration item created by software, not by management interface. It is not exported, and cannot be directly
        /// modified.
        /// </summary>
        [Output("dynamic")]
        public Output<bool> Dynamic { get; private set; } = null!;

        /// <summary>
        /// Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
        /// </summary>
        [Output("insertQueueBefore")]
        public Output<string?> InsertQueueBefore { get; private set; } = null!;

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

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

        /// <summary>
        /// A script that will be executed after a lease is assigned or de-assigned.
        /// </summary>
        [Output("leaseScript")]
        public Output<string?> LeaseScript { get; private set; } = null!;

        /// <summary>
        /// The time that a client may use the assigned address. The client will try to renew this address after half of this time
        /// and will request a new address after the time limit expires.
        /// </summary>
        [Output("leaseTime")]
        public Output<string?> LeaseTime { 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("parentQueue")]
        public Output<string?> ParentQueue { get; private set; } = null!;

        /// <summary>
        /// The IP address of the relay this DHCP server.
        /// </summary>
        [Output("relay")]
        public Output<string?> Relay { get; private set; } = null!;

        /// <summary>
        /// The address which the DHCP client must send requests to in order to renew an IP address lease.
        /// </summary>
        [Output("srcAddress")]
        public Output<string?> SrcAddress { get; private set; } = null!;

        /// <summary>
        /// Forward RADIUS Framed-Route as a DHCP Classless-Static-Route to DHCP-client.
        /// </summary>
        [Output("useFramedAsClassless")]
        public Output<bool?> UseFramedAsClassless { get; private set; } = null!;

        /// <summary>
        /// Whether to use RADIUS server.
        /// </summary>
        [Output("useRadius")]
        public Output<string?> UseRadius { get; private set; } = null!;


        /// <summary>
        /// Create a DhcpServer 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 DhcpServer(string name, DhcpServerArgs args, CustomResourceOptions? options = null)
            : base("routeros:Ip/dhcpServer:DhcpServer", name, args ?? new DhcpServerArgs(), MakeResourceOptions(options, ""))
        {
        }

        private DhcpServer(string name, Input<string> id, DhcpServerState? state = null, CustomResourceOptions? options = null)
            : base("routeros:Ip/dhcpServer:DhcpServer", name, state, MakeResourceOptions(options, id))
        {
        }

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

    public sealed class DhcpServerArgs : 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 add dynamic ARP entry.
        /// </summary>
        [Input("addArp")]
        public Input<bool>? AddArp { get; set; }

        /// <summary>
        /// IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a
        /// static lease (added in lease submenu) will be allowed.
        /// </summary>
        [Input("addressPool")]
        public Input<string>? AddressPool { get; set; }

        /// <summary>
        /// Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
        /// Requires IPv6 DHCP Server to have this option enabled as well to work properly.
        /// </summary>
        [Input("allowDualStackQueue")]
        public Input<bool>? AllowDualStackQueue { get; set; }

        /// <summary>
        /// Always send replies as broadcasts even if destination IP is known.
        /// </summary>
        [Input("alwaysBroadcast")]
        public Input<bool>? AlwaysBroadcast { get; set; }

        /// <summary>
        /// Option changes the way how a server responds to DHCP requests.
        /// </summary>
        [Input("authoritative")]
        public Input<string>? Authoritative { get; set; }

        /// <summary>
        /// Accepts two predefined options or time value: * forever - lease never expires * lease-time - use time from lease-time
        /// parameter
        /// </summary>
        [Input("bootpLeaseTime")]
        public Input<string>? BootpLeaseTime { get; set; }

        /// <summary>
        /// Support for BOOTP clients.
        /// </summary>
        [Input("bootpSupport")]
        public Input<string>? BootpSupport { get; set; }

        /// <summary>
        /// Specifies whether to limit specific number of clients per single MAC address.
        /// </summary>
        [Input("clientMacLimit")]
        public Input<int>? ClientMacLimit { get; set; }

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

        /// <summary>
        /// Allows to disable/enable conflict detection. If option is enabled, then whenever server tries to assign a lease it will
        /// send ICMP and ARP messages to detect whether such address in the network already exist. If any of above get reply
        /// address is considered already used. Conflict detection must be disabled when any kind of DHCP client limitation per port
        /// or per mac is used.
        /// </summary>
        [Input("conflictDetection")]
        public Input<bool>? ConflictDetection { get; set; }

        /// <summary>
        /// If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored. If set to none - there is no
        /// threshold (all DHCP packets are processed).
        /// </summary>
        [Input("delayThreshold")]
        public Input<string>? DelayThreshold { get; set; }

        /// <summary>
        /// Use custom set of DHCP options defined in option sets menu.
        /// </summary>
        [Input("dhcpOptionSet")]
        public Input<string>? DhcpOptionSet { get; set; }

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

        /// <summary>
        /// Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
        /// </summary>
        [Input("insertQueueBefore")]
        public Input<string>? InsertQueueBefore { get; set; }

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

        /// <summary>
        /// A script that will be executed after a lease is assigned or de-assigned.
        /// </summary>
        [Input("leaseScript")]
        public Input<string>? LeaseScript { get; set; }

        /// <summary>
        /// The time that a client may use the assigned address. The client will try to renew this address after half of this time
        /// and will request a new address after the time limit expires.
        /// </summary>
        [Input("leaseTime")]
        public Input<string>? LeaseTime { 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("parentQueue")]
        public Input<string>? ParentQueue { get; set; }

        /// <summary>
        /// The IP address of the relay this DHCP server.
        /// </summary>
        [Input("relay")]
        public Input<string>? Relay { get; set; }

        /// <summary>
        /// The address which the DHCP client must send requests to in order to renew an IP address lease.
        /// </summary>
        [Input("srcAddress")]
        public Input<string>? SrcAddress { get; set; }

        /// <summary>
        /// Forward RADIUS Framed-Route as a DHCP Classless-Static-Route to DHCP-client.
        /// </summary>
        [Input("useFramedAsClassless")]
        public Input<bool>? UseFramedAsClassless { get; set; }

        /// <summary>
        /// Whether to use RADIUS server.
        /// </summary>
        [Input("useRadius")]
        public Input<string>? UseRadius { get; set; }

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

    public sealed class DhcpServerState : 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 add dynamic ARP entry.
        /// </summary>
        [Input("addArp")]
        public Input<bool>? AddArp { get; set; }

        /// <summary>
        /// IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a
        /// static lease (added in lease submenu) will be allowed.
        /// </summary>
        [Input("addressPool")]
        public Input<string>? AddressPool { get; set; }

        /// <summary>
        /// Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
        /// Requires IPv6 DHCP Server to have this option enabled as well to work properly.
        /// </summary>
        [Input("allowDualStackQueue")]
        public Input<bool>? AllowDualStackQueue { get; set; }

        /// <summary>
        /// Always send replies as broadcasts even if destination IP is known.
        /// </summary>
        [Input("alwaysBroadcast")]
        public Input<bool>? AlwaysBroadcast { get; set; }

        /// <summary>
        /// Option changes the way how a server responds to DHCP requests.
        /// </summary>
        [Input("authoritative")]
        public Input<string>? Authoritative { get; set; }

        /// <summary>
        /// Accepts two predefined options or time value: * forever - lease never expires * lease-time - use time from lease-time
        /// parameter
        /// </summary>
        [Input("bootpLeaseTime")]
        public Input<string>? BootpLeaseTime { get; set; }

        /// <summary>
        /// Support for BOOTP clients.
        /// </summary>
        [Input("bootpSupport")]
        public Input<string>? BootpSupport { get; set; }

        /// <summary>
        /// Specifies whether to limit specific number of clients per single MAC address.
        /// </summary>
        [Input("clientMacLimit")]
        public Input<int>? ClientMacLimit { get; set; }

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

        /// <summary>
        /// Allows to disable/enable conflict detection. If option is enabled, then whenever server tries to assign a lease it will
        /// send ICMP and ARP messages to detect whether such address in the network already exist. If any of above get reply
        /// address is considered already used. Conflict detection must be disabled when any kind of DHCP client limitation per port
        /// or per mac is used.
        /// </summary>
        [Input("conflictDetection")]
        public Input<bool>? ConflictDetection { get; set; }

        /// <summary>
        /// If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored. If set to none - there is no
        /// threshold (all DHCP packets are processed).
        /// </summary>
        [Input("delayThreshold")]
        public Input<string>? DelayThreshold { get; set; }

        /// <summary>
        /// Use custom set of DHCP options defined in option sets menu.
        /// </summary>
        [Input("dhcpOptionSet")]
        public Input<string>? DhcpOptionSet { get; set; }

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

        /// <summary>
        /// Configuration item created by software, not by management interface. It is not exported, and cannot be directly
        /// modified.
        /// </summary>
        [Input("dynamic")]
        public Input<bool>? Dynamic { get; set; }

        /// <summary>
        /// Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
        /// </summary>
        [Input("insertQueueBefore")]
        public Input<string>? InsertQueueBefore { get; set; }

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

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

        /// <summary>
        /// A script that will be executed after a lease is assigned or de-assigned.
        /// </summary>
        [Input("leaseScript")]
        public Input<string>? LeaseScript { get; set; }

        /// <summary>
        /// The time that a client may use the assigned address. The client will try to renew this address after half of this time
        /// and will request a new address after the time limit expires.
        /// </summary>
        [Input("leaseTime")]
        public Input<string>? LeaseTime { 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("parentQueue")]
        public Input<string>? ParentQueue { get; set; }

        /// <summary>
        /// The IP address of the relay this DHCP server.
        /// </summary>
        [Input("relay")]
        public Input<string>? Relay { get; set; }

        /// <summary>
        /// The address which the DHCP client must send requests to in order to renew an IP address lease.
        /// </summary>
        [Input("srcAddress")]
        public Input<string>? SrcAddress { get; set; }

        /// <summary>
        /// Forward RADIUS Framed-Route as a DHCP Classless-Static-Route to DHCP-client.
        /// </summary>
        [Input("useFramedAsClassless")]
        public Input<bool>? UseFramedAsClassless { get; set; }

        /// <summary>
        /// Whether to use RADIUS server.
        /// </summary>
        [Input("useRadius")]
        public Input<string>? UseRadius { get; set; }

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