protected override void ProcessRecord() { Restriction newRestrict = this.ParametersToRestriction(this.MyInvocation.BoundParameters); if (base.ShouldProcess(string.Format(SHOULD_MSG, newRestrict.Ignored.ToJson(), newRestrict.Required.ToJson()), "New")) { string jsonRes = base.TryPostSonarrResult(GetRestriction.EP, newRestrict.ToJson()); if (!string.IsNullOrEmpty(jsonRes)) { Restriction restRes = SonarrHttp.ConvertToSonarrResult <Restriction>(jsonRes); base.WriteObject(restRes); } } }