internal HeaderActionParameters(HeaderActionParametersOdataType odataType, HeaderAction headerAction, string headerName, string value)
 {
     OdataType    = odataType;
     HeaderAction = headerAction;
     HeaderName   = headerName;
     Value        = value;
 }
        internal static HeaderActionParameters DeserializeHeaderActionParameters(JsonElement element)
        {
            HeaderActionParametersOdataType odataType = default;
            HeaderAction      headerAction            = default;
            string            headerName = default;
            Optional <string> value      = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("@odata.type"))
                {
                    odataType = new HeaderActionParametersOdataType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("headerAction"))
                {
                    headerAction = new HeaderAction(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("headerName"))
                {
                    headerName = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("value"))
                {
                    value = property.Value.GetString();
                    continue;
                }
            }
            return(new HeaderActionParameters(odataType, headerAction, headerName, value.Value));
        }
        public HeaderActionParameters(HeaderActionParametersOdataType odataType, HeaderAction headerAction, string headerName)
        {
            if (headerName == null)
            {
                throw new ArgumentNullException(nameof(headerName));
            }

            OdataType    = odataType;
            HeaderAction = headerAction;
            HeaderName   = headerName;
        }