From b74e62038e1112b4007d62c762409086400d987a Mon Sep 17 00:00:00 2001 From: "adam.gloyne" Date: Tue, 3 Sep 2024 12:29:04 +0100 Subject: [PATCH] Remove nullable --- src/LEGO.AsyncAPI.Bindings/Sns/Statement.cs | 4 ++-- src/LEGO.AsyncAPI.Bindings/Sqs/Statement.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LEGO.AsyncAPI.Bindings/Sns/Statement.cs b/src/LEGO.AsyncAPI.Bindings/Sns/Statement.cs index 95b5e3df..da93cfbf 100644 --- a/src/LEGO.AsyncAPI.Bindings/Sns/Statement.cs +++ b/src/LEGO.AsyncAPI.Bindings/Sns/Statement.cs @@ -33,7 +33,7 @@ public class Statement : IAsyncApiExtensible /// /// Specific circumstances under which the policy grants permission. /// - public Condition? Condition { get; set; } + public Condition Condition { get; set; } public IDictionary Extensions { get; set; } = new Dictionary(); @@ -49,7 +49,7 @@ public void Serialize(IAsyncApiWriter writer) writer.WriteRequiredObject("principal", this.Principal, (w, t) => t.Serialize(w)); writer.WriteRequiredObject("action", this.Action, (w, t) => t.Value.Write(w)); writer.WriteOptionalObject("resource", this.Resource, (w, t) => t?.Value.Write(w)); - writer.WriteOptionalObject("condition", this.Condition, (w, t) => t?.Serialize(w)); + writer.WriteOptionalObject("condition", this.Condition, (w, t) => t.Serialize(w)); writer.WriteExtensions(this.Extensions); writer.WriteEndObject(); } diff --git a/src/LEGO.AsyncAPI.Bindings/Sqs/Statement.cs b/src/LEGO.AsyncAPI.Bindings/Sqs/Statement.cs index 0ab25e89..4a9c5303 100644 --- a/src/LEGO.AsyncAPI.Bindings/Sqs/Statement.cs +++ b/src/LEGO.AsyncAPI.Bindings/Sqs/Statement.cs @@ -34,7 +34,7 @@ public class Statement : IAsyncApiExtensible /// /// Specific circumstances under which the policy grants permission. /// - public Condition? Condition { get; set; } + public Condition Condition { get; set; } public IDictionary Extensions { get; set; } = new Dictionary(); @@ -50,7 +50,7 @@ public void Serialize(IAsyncApiWriter writer) writer.WriteRequiredObject("principal", this.Principal, (w, t) => t.Serialize(w)); writer.WriteRequiredObject("action", this.Action, (w, t) => t.Value.Write(w)); writer.WriteOptionalObject("resource", this.Resource, (w, t) => t?.Value.Write(w)); - writer.WriteOptionalObject("condition", this.Condition, (w, t) => t?.Serialize(w)); + writer.WriteOptionalObject("condition", this.Condition, (w, t) => t.Serialize(w)); writer.WriteExtensions(this.Extensions); writer.WriteEndObject(); }