// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
using System.ClientModel.Primitives;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;

namespace SampleTypeSpec
{
    /// <summary> Another sample dynamic model. </summary>
    public partial class AnotherDynamicModel
    {
        [Experimental("SCME0001")]
        private JsonPatch _patch;

        /// <summary> Initializes a new instance of <see cref="AnotherDynamicModel"/>. </summary>
        /// <param name="bar"></param>
        /// <exception cref="ArgumentNullException"> <paramref name="bar"/> is null. </exception>
        public AnotherDynamicModel(string bar)
        {
            Argument.AssertNotNull(bar, nameof(bar));

            Bar = bar;
        }

        /// <summary> Initializes a new instance of <see cref="AnotherDynamicModel"/>. </summary>
        /// <param name="bar"></param>
        /// <param name="patch"></param>
#pragma warning disable SCME0001 // Type is for evaluation purposes only and is subject to change or removal in future updates.
        internal AnotherDynamicModel(string bar, in JsonPatch patch)
        {
            Bar = bar;
            _patch = patch;
        }
#pragma warning restore SCME0001 // Type is for evaluation purposes only and is subject to change or removal in future updates.

        /// <summary> Gets the Patch. </summary>
        [JsonIgnore]
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Experimental("SCME0001")]
        public ref JsonPatch Patch => ref _patch;

        /// <summary> Gets the Bar. </summary>
        public string Bar { get; }
    }
}
