-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add notification settings to tasks [skip-bc] (generated)
algolia/api-clients-automation#4297 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
- Loading branch information
1 parent
f44f198
commit ae1f32e
Showing
8 changed files
with
373 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Ingestion; | ||
|
||
/// <summary> | ||
/// EmailNotifications | ||
/// </summary> | ||
public partial class EmailNotifications | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the EmailNotifications class. | ||
/// </summary> | ||
public EmailNotifications() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Whether to send email notifications, note that this doesn't prevent the task from being blocked. | ||
/// </summary> | ||
/// <value>Whether to send email notifications, note that this doesn't prevent the task from being blocked.</value> | ||
[JsonPropertyName("enabled")] | ||
public bool? Enabled { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class EmailNotifications {\n"); | ||
sb.Append(" Enabled: ").Append(Enabled).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not EmailNotifications input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Enabled == input.Enabled || Enabled.Equals(input.Enabled)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
hashCode = (hashCode * 59) + Enabled.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
// | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Ingestion; | ||
|
||
/// <summary> | ||
/// Notifications settings for a task. | ||
/// </summary> | ||
public partial class Notifications | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the Notifications class. | ||
/// </summary> | ||
[JsonConstructor] | ||
public Notifications() { } | ||
/// <summary> | ||
/// Initializes a new instance of the Notifications class. | ||
/// </summary> | ||
/// <param name="email">email (required).</param> | ||
public Notifications(EmailNotifications email) | ||
{ | ||
Email = email ?? throw new ArgumentNullException(nameof(email)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets Email | ||
/// </summary> | ||
[JsonPropertyName("email")] | ||
public EmailNotifications Email { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class Notifications {\n"); | ||
sb.Append(" Email: ").Append(Email).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not Notifications input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Email == input.Email || (Email != null && Email.Equals(input.Email))); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (Email != null) | ||
{ | ||
hashCode = (hashCode * 59) + Email.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Ingestion; | ||
|
||
/// <summary> | ||
/// Set of rules for a task. | ||
/// </summary> | ||
public partial class Policies | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the Policies class. | ||
/// </summary> | ||
public Policies() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// The number of critical failures in a row before blocking the task and sending a notification. | ||
/// </summary> | ||
/// <value>The number of critical failures in a row before blocking the task and sending a notification.</value> | ||
[JsonPropertyName("criticalThreshold")] | ||
public int? CriticalThreshold { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class Policies {\n"); | ||
sb.Append(" CriticalThreshold: ").Append(CriticalThreshold).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not Policies input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(CriticalThreshold == input.CriticalThreshold || CriticalThreshold.Equals(input.CriticalThreshold)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
hashCode = (hashCode * 59) + CriticalThreshold.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.