// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;
using System.Linq;
using OpenAI;

namespace OpenAI.Responses
{
    internal partial class InternalLocalShellExecAction
    {
        private protected IDictionary<string, BinaryData> _additionalBinaryDataProperties;

        public InternalLocalShellExecAction(IEnumerable<string> command, IDictionary<string, string> env)
        {
            // Plugin customization: ensure initialization of collections
            Argument.AssertNotNull(command, nameof(command));
            Argument.AssertNotNull(env, nameof(env));

            Command = command.ToList();
            Env = env ?? new ChangeTrackingDictionary<string, string>();
        }

        internal InternalLocalShellExecAction(string kind, IList<string> command, int? timeoutMs, string workingDirectory, IDictionary<string, string> env, string user, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Kind = kind;
            Command = command ?? new ChangeTrackingList<string>();
            TimeoutMs = timeoutMs;
            WorkingDirectory = workingDirectory;
            Env = env ?? new ChangeTrackingDictionary<string, string>();
            User = user;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Kind { get; } = "exec";

        public IList<string> Command { get; }

        public int? TimeoutMs { get; set; }

        public string WorkingDirectory { get; set; }

        public IDictionary<string, string> Env { get; }

        public string User { get; set; }

        internal IDictionary<string, BinaryData> SerializedAdditionalRawData
        {
            get => _additionalBinaryDataProperties;
            set => _additionalBinaryDataProperties = value;
        }
    }
}
