public OriginGroupOverrideAction(OriginGroupOverrideActionParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            Parameters = parameters;
            Name       = DeliveryRuleAction.OriginGroupOverride;
        }
Exemple #2
0
        internal static OriginGroupOverrideAction DeserializeOriginGroupOverrideAction(JsonElement element)
        {
            OriginGroupOverrideActionParameters parameters = default;
            DeliveryRuleActionType name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = OriginGroupOverrideActionParameters.DeserializeOriginGroupOverrideActionParameters(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new DeliveryRuleActionType(property.Value.GetString());
                    continue;
                }
            }
            return(new OriginGroupOverrideAction(name, parameters));
        }
 internal OriginGroupOverrideAction(DeliveryRuleAction name, OriginGroupOverrideActionParameters parameters) : base(name)
 {
     Parameters = parameters;
     Name       = name;
 }