Skip to content

Commit

Permalink
chore: make principal values public (#192)
Browse files Browse the repository at this point in the history
Co-authored-by: adam.gloyne <[email protected]>
  • Loading branch information
Gadam8 and adam.gloyne authored Aug 20, 2024
1 parent 38390d8 commit 57c0c33
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/LEGO.AsyncAPI.Bindings/Sns/PrincipalObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace LEGO.AsyncAPI.Bindings.Sns;

public class PrincipalObject : Principal
{
private KeyValuePair<string, StringOrStringList> PrincipalValue;
public KeyValuePair<string, StringOrStringList> Value { get; private set; }

public PrincipalObject(KeyValuePair<string, StringOrStringList> principalValue)
public PrincipalObject(KeyValuePair<string, StringOrStringList> value)
{
this.PrincipalValue = principalValue;
this.Value = value;
}

public override void Serialize(IAsyncApiWriter writer)
Expand All @@ -21,7 +21,7 @@ public override void Serialize(IAsyncApiWriter writer)
}

writer.WriteStartObject();
writer.WriteRequiredObject(this.PrincipalValue.Key, this.PrincipalValue.Value, (w, t) => t.Value.Write(w));
writer.WriteRequiredObject(this.Value.Key, this.Value.Value, (w, t) => t.Value.Write(w));
writer.WriteEndObject();
}
}
6 changes: 3 additions & 3 deletions src/LEGO.AsyncAPI.Bindings/Sns/PrincipalStar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ namespace LEGO.AsyncAPI.Bindings.Sns;

public class PrincipalStar : Principal
{
private string PrincipalValue;
public string Value { get; private set; }

public PrincipalStar()
{
this.PrincipalValue = "*";
this.Value = "*";
}

public override void Serialize(IAsyncApiWriter writer)
Expand All @@ -19,6 +19,6 @@ public override void Serialize(IAsyncApiWriter writer)
throw new ArgumentNullException(nameof(writer));
}

writer.WriteValue(this.PrincipalValue);
writer.WriteValue(this.Value);
}
}
8 changes: 4 additions & 4 deletions src/LEGO.AsyncAPI.Bindings/Sqs/PrincipalObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace LEGO.AsyncAPI.Bindings.Sqs;

public class PrincipalObject : Principal
{
private KeyValuePair<string, StringOrStringList> PrincipalValue;
public KeyValuePair<string, StringOrStringList> Value { get; private set; }

public PrincipalObject(KeyValuePair<string, StringOrStringList> principalValue)
public PrincipalObject(KeyValuePair<string, StringOrStringList> value)
{
this.PrincipalValue = principalValue;
this.Value = value;
}

public override void Serialize(IAsyncApiWriter writer)
Expand All @@ -21,7 +21,7 @@ public override void Serialize(IAsyncApiWriter writer)
}

writer.WriteStartObject();
writer.WriteRequiredObject(this.PrincipalValue.Key, this.PrincipalValue.Value, (w, t) => t.Value.Write(w));
writer.WriteRequiredObject(this.Value.Key, this.Value.Value, (w, t) => t.Value.Write(w));
writer.WriteEndObject();
}
}
6 changes: 3 additions & 3 deletions src/LEGO.AsyncAPI.Bindings/Sqs/PrincipalStar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ namespace LEGO.AsyncAPI.Bindings.Sqs;

public class PrincipalStar : Principal
{
private string PrincipalValue;
public string Value { get; private set; }

public PrincipalStar()
{
this.PrincipalValue = "*";
this.Value = "*";
}

public override void Serialize(IAsyncApiWriter writer)
Expand All @@ -19,6 +19,6 @@ public override void Serialize(IAsyncApiWriter writer)
throw new ArgumentNullException(nameof(writer));
}

writer.WriteValue(this.PrincipalValue);
writer.WriteValue(this.Value);
}
}

0 comments on commit 57c0c33

Please sign in to comment.