internal override JSONNode ToJsonNode() { JSONObject jso = new JSONObject { [ApiConstants.Batch] = BatchSize }; if (MaxBytes > 0) { jso[ApiConstants.MaxBytes] = MaxBytes; } if (NoWait) { jso[ApiConstants.NoWait] = true; } if (ExpiresIn != null && ExpiresIn.IsPositive()) { jso[ApiConstants.Expires] = ExpiresIn.Nanos; } if (IdleHeartbeat != null && IdleHeartbeat.IsPositive()) { jso[ApiConstants.IdleHeartbeat] = IdleHeartbeat.Nanos; } return(jso); }