Skip to content

Commit

Permalink
Merge pull request #3 from stefan-epic/VibeProgramm-fixed-bugs
Browse files Browse the repository at this point in the history
#2 
changed types of several props
  • Loading branch information
stefan-epic authored Mar 23, 2024
2 parents ee89611 + 96ee110 commit 39d73b0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
13 changes: 7 additions & 6 deletions Zabbix/Entities/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class Item : BaseEntity

[JsonProperty("valuemapid")] public string? Valuemapid { get; set; }

[JsonProperty("params")] public string? Params { get; set; }
[JsonProperty("params")] public Dictionary<string, string>? Params { get; set; }

[JsonProperty("ipmi_sensor")] public string? IpmiSensor { get; set; }

Expand Down Expand Up @@ -71,7 +71,7 @@ public class Item : BaseEntity

[JsonProperty("url")] public string? Url { get; set; }

[JsonProperty("query_fields")] public object? QueryFields { get; set; } //TODO: map this to something else
[JsonProperty("query_fields")] public List<object>? QueryFields { get; set; }

[JsonProperty("posts")] public string? Posts { get; set; }

Expand All @@ -83,7 +83,7 @@ public class Item : BaseEntity

[JsonProperty("http_proxy")] public string? HttpProxy { get; set; }

[JsonProperty("headers")] public HttpField? Headers { get; set; } //TODO make this something thats not object, bug: doesnt work with list of httpfields, above and below are two more with same problem
[JsonProperty("headers")] public Dictionary<string, string>? Headers { get; set; }

[JsonProperty("retrieve_mode")] public int? RetrieveMode { get; set; }

Expand All @@ -109,7 +109,8 @@ public class Item : BaseEntity

[JsonProperty("error")] public string? Error { get; set; }

[JsonProperty("parameters")] public object? Parameters { get; set; }
[JsonProperty("parameters")] public List<object>? Parameters { get; set; }


[JsonProperty("lastclock")] public string? Lastclock { get; set; }

Expand Down Expand Up @@ -167,7 +168,7 @@ public class ItemPreprocessing

[JsonProperty("type")] public int? Type { get; set; }

[JsonProperty("params")] public string? Params { get; set; }
[JsonProperty("params")] public Dictionary<string, string>? Params { get; set; }

[JsonProperty("error_handler")] public int? ErrorHandler { get; set; }

Expand All @@ -177,7 +178,7 @@ public class ItemPreprocessing

#region Constructors

public ItemPreprocessing(int type, string @params, int errorHandler, string errorHandlerParams)
public ItemPreprocessing(int type, Dictionary<string, string> @params, int errorHandler, string errorHandlerParams)
{
Type = type;
Params = @params;
Expand Down
8 changes: 4 additions & 4 deletions Zabbix/Entities/ItemPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ItemPrototype : BaseEntity
public int? FollowRedirects { get; set; }

[JsonProperty("headers")]
public HttpField? Headers { get; set; }
public Dictionary<string, string>? Headers { get; set; }

[JsonProperty("history")]
public string? History { get; set; }
Expand All @@ -73,7 +73,7 @@ public class ItemPrototype : BaseEntity
public int? OutputFormat { get; set; }

[JsonProperty("params")]
public string? Params { get; set; }
public Dictionary<string, string>? Params { get; set; }

[JsonProperty("parameters")]
public IList<object>? Parameters { get; set; }
Expand Down Expand Up @@ -218,7 +218,7 @@ public class ItemPrototypePreprocessing
public int? Type { get; set; }

[JsonProperty("params")]
public string? Params { get; set; }
public Dictionary<string, string>? Params { get; set; }

[JsonProperty("error_handler")]
public int? ErrorHandler { get; set; }
Expand All @@ -230,7 +230,7 @@ public class ItemPrototypePreprocessing

#region Constructors

public ItemPrototypePreprocessing(int type, string @params, int errorHandler, string errorHandlerParams)
public ItemPrototypePreprocessing(int type, Dictionary<string, string> @params, int errorHandler, string errorHandlerParams)
{
Type = type;
Params = @params;
Expand Down
8 changes: 4 additions & 4 deletions Zabbix/Entities/LLDRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class LldRule : BaseEntity
public int? OutputFormat { get; set; }

[JsonProperty("params")]
public string? Params { get; set; }
public Dictionary<string, string>? Params { get; set; }

[JsonProperty("password")]
public string? Password { get; set; }
Expand Down Expand Up @@ -135,7 +135,7 @@ public class LldRule : BaseEntity
#region Components

[JsonProperty("headers")]
public object? Headers { get; set; }
public Dictionary<string, string>? Headers { get; set; }

[JsonProperty("parameters")]
public IList<object>? Parameters { get; set; }
Expand Down Expand Up @@ -272,7 +272,7 @@ public class LLdRulePreprocessing
public int? Type { get; set; }

[JsonProperty("params")]
public string? Params { get; set; }
public Dictionary<string, string>? Params { get; set; }

[JsonProperty("error_handler")]
public int? ErrorHandler { get; set; }
Expand All @@ -284,7 +284,7 @@ public class LLdRulePreprocessing

#region Constructors

public LLdRulePreprocessing(int type, string @params, int errorHandler, string errorHandlerParams)
public LLdRulePreprocessing(int type, Dictionary<string, string> @params, int errorHandler, string errorHandlerParams)
{
Type = type;
Params = @params;
Expand Down
2 changes: 1 addition & 1 deletion Zabbix/Zabbix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Title>Zabbix 6.0 API Library</Title>
<Authors>Stefan Hasler</Authors>
<Company />
<Version>1.2.3</Version>
<Version>1.2.4</Version>
<PackageId>$(AssemblyName).Api.NET</PackageId>
<Product />
<Description>Library to communicate with the 6.0 Zabbix Api</Description>
Expand Down

0 comments on commit 39d73b0

Please sign in to comment.