Skip to content

Commit

Permalink
fix(specs): ingestion expected and received events type [skip-bc] (#4356
Browse files Browse the repository at this point in the history
) (generated) [skip ci]

Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Jan 13, 2025
1 parent 3b129e0 commit f2e89e6
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,30 @@ public partial class RunProgress
/// <summary>
/// Initializes a new instance of the RunProgress class.
/// </summary>
public RunProgress()
[JsonConstructor]
public RunProgress() { }
/// <summary>
/// Initializes a new instance of the RunProgress class.
/// </summary>
/// <param name="expectedNbOfEvents">expectedNbOfEvents (required).</param>
/// <param name="receivedNbOfEvents">receivedNbOfEvents (required).</param>
public RunProgress(int expectedNbOfEvents, int receivedNbOfEvents)
{
ExpectedNbOfEvents = expectedNbOfEvents;
ReceivedNbOfEvents = receivedNbOfEvents;
}

/// <summary>
/// Gets or Sets ExpectedNbOfEvents
/// </summary>
[JsonPropertyName("expectedNbOfEvents")]
public int? ExpectedNbOfEvents { get; set; }
public int ExpectedNbOfEvents { get; set; }

/// <summary>
/// Gets or Sets ReceivedNbOfEvents
/// </summary>
[JsonPropertyName("receivedNbOfEvents")]
public int? ReceivedNbOfEvents { get; set; }
public int ReceivedNbOfEvents { get; set; }

/// <summary>
/// Returns the string presentation of the object
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public RunProgress setExpectedNbOfEvents(Integer expectedNbOfEvents) {
}

/** Get expectedNbOfEvents */
@javax.annotation.Nullable
@javax.annotation.Nonnull
public Integer getExpectedNbOfEvents() {
return expectedNbOfEvents;
}
Expand All @@ -33,7 +33,7 @@ public RunProgress setReceivedNbOfEvents(Integer receivedNbOfEvents) {
}

/** Get receivedNbOfEvents */
@javax.annotation.Nullable
@javax.annotation.Nonnull
public Integer getReceivedNbOfEvents() {
return receivedNbOfEvents;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// 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.

export type RunProgress = {
expectedNbOfEvents?: number;
expectedNbOfEvents: number;

receivedNbOfEvents?: number;
receivedNbOfEvents: number;
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import kotlinx.serialization.json.*
@Serializable
public data class RunProgress(

@SerialName(value = "expectedNbOfEvents") val expectedNbOfEvents: Int? = null,
@SerialName(value = "expectedNbOfEvents") val expectedNbOfEvents: Int,

@SerialName(value = "receivedNbOfEvents") val receivedNbOfEvents: Int? = null,
@SerialName(value = "receivedNbOfEvents") val receivedNbOfEvents: Int,
)
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,16 @@ public static function getters()
*/
public function listInvalidProperties()
{
return [];
$invalidProperties = [];

if (!isset($this->container['expectedNbOfEvents']) || null === $this->container['expectedNbOfEvents']) {
$invalidProperties[] = "'expectedNbOfEvents' can't be null";
}
if (!isset($this->container['receivedNbOfEvents']) || null === $this->container['receivedNbOfEvents']) {
$invalidProperties[] = "'receivedNbOfEvents' can't be null";
}

return $invalidProperties;
}

/**
Expand All @@ -162,7 +171,7 @@ public function valid()
/**
* Gets expectedNbOfEvents.
*
* @return null|int
* @return int
*/
public function getExpectedNbOfEvents()
{
Expand All @@ -172,7 +181,7 @@ public function getExpectedNbOfEvents()
/**
* Sets expectedNbOfEvents.
*
* @param null|int $expectedNbOfEvents expectedNbOfEvents
* @param int $expectedNbOfEvents expectedNbOfEvents
*
* @return self
*/
Expand All @@ -186,7 +195,7 @@ public function setExpectedNbOfEvents($expectedNbOfEvents)
/**
* Gets receivedNbOfEvents.
*
* @return null|int
* @return int
*/
public function getReceivedNbOfEvents()
{
Expand All @@ -196,7 +205,7 @@ public function getReceivedNbOfEvents()
/**
* Sets receivedNbOfEvents.
*
* @param null|int $receivedNbOfEvents receivedNbOfEvents
* @param int $receivedNbOfEvents receivedNbOfEvents
*
* @return self
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class RunProgress(BaseModel):
RunProgress
"""

expected_nb_of_events: Optional[int] = None
received_nb_of_events: Optional[int] = None
expected_nb_of_events: int
received_nb_of_events: int

model_config = ConfigDict(
strict=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ def initialize(attributes = {})

if attributes.key?(:expected_nb_of_events)
self.expected_nb_of_events = attributes[:expected_nb_of_events]
else
self.expected_nb_of_events = nil
end

if attributes.key?(:received_nb_of_events)
self.received_nb_of_events = attributes[:received_nb_of_events]
else
self.received_nb_of_events = nil
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ package algoliasearch.ingestion
/** RunProgress
*/
case class RunProgress(
expectedNbOfEvents: Option[Int] = scala.None,
receivedNbOfEvents: Option[Int] = scala.None
expectedNbOfEvents: Int,
receivedNbOfEvents: Int
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import Foundation
#endif

public struct RunProgress: Codable, JSONEncodable {
public var expectedNbOfEvents: Int?
public var receivedNbOfEvents: Int?
public var expectedNbOfEvents: Int
public var receivedNbOfEvents: Int

public init(expectedNbOfEvents: Int? = nil, receivedNbOfEvents: Int? = nil) {
public init(expectedNbOfEvents: Int, receivedNbOfEvents: Int) {
self.expectedNbOfEvents = expectedNbOfEvents
self.receivedNbOfEvents = receivedNbOfEvents
}
Expand All @@ -24,8 +24,8 @@ public struct RunProgress: Codable, JSONEncodable {

public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(self.expectedNbOfEvents, forKey: .expectedNbOfEvents)
try container.encodeIfPresent(self.receivedNbOfEvents, forKey: .receivedNbOfEvents)
try container.encode(self.expectedNbOfEvents, forKey: .expectedNbOfEvents)
try container.encode(self.receivedNbOfEvents, forKey: .receivedNbOfEvents)
}
}

Expand All @@ -38,7 +38,7 @@ extension RunProgress: Equatable {

extension RunProgress: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.expectedNbOfEvents?.hashValue)
hasher.combine(self.receivedNbOfEvents?.hashValue)
hasher.combine(self.expectedNbOfEvents.hashValue)
hasher.combine(self.receivedNbOfEvents.hashValue)
}
}
3 changes: 3 additions & 0 deletions docs/bundled/ingestion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14600,6 +14600,9 @@ components:
type: integer
receivedNbOfEvents:
type: integer
required:
- expectedNbOfEvents
- receivedNbOfEvents
outcome:
$ref: '#/components/schemas/RunOutcome'
failureThreshold:
Expand Down
3 changes: 3 additions & 0 deletions specs/bundled/ingestion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4128,6 +4128,9 @@ components:
type: integer
receivedNbOfEvents:
type: integer
required:
- expectedNbOfEvents
- receivedNbOfEvents
outcome:
$ref: '#/components/schemas/RunOutcome'
failureThreshold:
Expand Down

0 comments on commit f2e89e6

Please sign in to comment.