Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make principal values public #192

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}
Loading