Skip to content

Commit 00f36a6

Browse files
algolia-botmillotp
andcommitted
fix(specs): message is not required in WatchResponse (#4723) (generated) [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent e150cd9 commit 00f36a6

File tree

12 files changed

+71
-71
lines changed

12 files changed

+71
-71
lines changed

clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/WatchResponse.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public WatchResponse() { }
2424
/// <summary>
2525
/// Initializes a new instance of the WatchResponse class.
2626
/// </summary>
27-
/// <param name="message">a message describing the outcome of a validate run. (required).</param>
28-
public WatchResponse(string message)
27+
/// <param name="runID">Universally unique identifier (UUID) of a task run. (required).</param>
28+
public WatchResponse(string runID)
2929
{
30-
Message = message ?? throw new ArgumentNullException(nameof(message));
30+
RunID = runID ?? throw new ArgumentNullException(nameof(runID));
3131
}
3232

3333
/// <summary>

clients/algoliasearch-client-go/algolia/ingestion/model_watch_response.go

+38-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/WatchResponse.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public WatchResponse setRunID(String runID) {
3030
}
3131

3232
/** Universally unique identifier (UUID) of a task run. */
33-
@javax.annotation.Nullable
33+
@javax.annotation.Nonnull
3434
public String getRunID() {
3535
return runID;
3636
}
@@ -81,7 +81,7 @@ public WatchResponse setMessage(String message) {
8181
}
8282

8383
/** a message describing the outcome of a validate run. */
84-
@javax.annotation.Nonnull
84+
@javax.annotation.Nullable
8585
public String getMessage() {
8686
return message;
8787
}

clients/algoliasearch-client-javascript/packages/ingestion/model/watchResponse.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export type WatchResponse = {
66
/**
77
* Universally unique identifier (UUID) of a task run.
88
*/
9-
runID?: string;
9+
runID: string;
1010

1111
/**
1212
* when used with discovering or validating sources, the sampled data of your source is returned.
@@ -21,5 +21,5 @@ export type WatchResponse = {
2121
/**
2222
* a message describing the outcome of a validate run.
2323
*/
24-
message: string;
24+
message?: string;
2525
};

clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/WatchResponse.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ import kotlinx.serialization.json.*
77
/**
88
* WatchResponse
99
*
10-
* @param message a message describing the outcome of a validate run.
1110
* @param runID Universally unique identifier (UUID) of a task run.
1211
* @param `data` when used with discovering or validating sources, the sampled data of your source is returned.
1312
* @param events in case of error, observability events will be added to the response, if any.
13+
* @param message a message describing the outcome of a validate run.
1414
*/
1515
@Serializable
1616
public data class WatchResponse(
1717

18-
/** a message describing the outcome of a validate run. */
19-
@SerialName(value = "message") val message: String,
20-
2118
/** Universally unique identifier (UUID) of a task run. */
22-
@SerialName(value = "runID") val runID: String? = null,
19+
@SerialName(value = "runID") val runID: String,
2320

2421
/** when used with discovering or validating sources, the sampled data of your source is returned. */
2522
@SerialName(value = "data") val `data`: List<JsonObject>? = null,
2623

2724
/** in case of error, observability events will be added to the response, if any. */
2825
@SerialName(value = "events") val events: List<Event>? = null,
26+
27+
/** a message describing the outcome of a validate run. */
28+
@SerialName(value = "message") val message: String? = null,
2929
)

clients/algoliasearch-client-php/lib/Model/Ingestion/WatchResponse.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ public function listInvalidProperties()
163163
{
164164
$invalidProperties = [];
165165

166-
if (!isset($this->container['message']) || null === $this->container['message']) {
167-
$invalidProperties[] = "'message' can't be null";
166+
if (!isset($this->container['runID']) || null === $this->container['runID']) {
167+
$invalidProperties[] = "'runID' can't be null";
168168
}
169169

170170
return $invalidProperties;
@@ -184,7 +184,7 @@ public function valid()
184184
/**
185185
* Gets runID.
186186
*
187-
* @return null|string
187+
* @return string
188188
*/
189189
public function getRunID()
190190
{
@@ -194,7 +194,7 @@ public function getRunID()
194194
/**
195195
* Sets runID.
196196
*
197-
* @param null|string $runID universally unique identifier (UUID) of a task run
197+
* @param string $runID universally unique identifier (UUID) of a task run
198198
*
199199
* @return self
200200
*/
@@ -256,7 +256,7 @@ public function setEvents($events)
256256
/**
257257
* Gets message.
258258
*
259-
* @return string
259+
* @return null|string
260260
*/
261261
public function getMessage()
262262
{
@@ -266,7 +266,7 @@ public function getMessage()
266266
/**
267267
* Sets message.
268268
*
269-
* @param string $message a message describing the outcome of a validate run
269+
* @param null|string $message a message describing the outcome of a validate run
270270
*
271271
* @return self
272272
*/

clients/algoliasearch-client-python/algoliasearch/ingestion/models/watch_response.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ class WatchResponse(BaseModel):
3737
WatchResponse
3838
"""
3939

40-
run_id: Optional[str] = None
40+
run_id: str
4141
""" Universally unique identifier (UUID) of a task run. """
4242
data: Optional[List[object]] = None
4343
""" when used with discovering or validating sources, the sampled data of your source is returned. """
4444
events: Optional[List[Event]] = None
4545
""" in case of error, observability events will be added to the response, if any. """
46-
message: str
46+
message: Optional[str] = None
4747
""" a message describing the outcome of a validate run. """
4848

4949
model_config = ConfigDict(

clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/watch_response.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ def initialize(attributes = {})
7272

7373
if attributes.key?(:run_id)
7474
self.run_id = attributes[:run_id]
75+
else
76+
self.run_id = nil
7577
end
7678

7779
if attributes.key?(:data)
@@ -88,8 +90,6 @@ def initialize(attributes = {})
8890

8991
if attributes.key?(:message)
9092
self.message = attributes[:message]
91-
else
92-
self.message = nil
9393
end
9494
end
9595

clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/WatchResponse.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ package algoliasearch.ingestion
3131
* a message describing the outcome of a validate run.
3232
*/
3333
case class WatchResponse(
34-
runID: Option[String] = scala.None,
34+
runID: String,
3535
data: Option[Seq[Any]] = scala.None,
3636
events: Option[Seq[Event]] = scala.None,
37-
message: String
37+
message: Option[String] = scala.None
3838
)

clients/algoliasearch-client-swift/Sources/Ingestion/Models/WatchResponse.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import Foundation
88

99
public struct WatchResponse: Codable, JSONEncodable {
1010
/// Universally unique identifier (UUID) of a task run.
11-
public var runID: String?
11+
public var runID: String
1212
/// when used with discovering or validating sources, the sampled data of your source is returned.
1313
public var data: [AnyCodable]?
1414
/// in case of error, observability events will be added to the response, if any.
1515
public var events: [Event]?
1616
/// a message describing the outcome of a validate run.
17-
public var message: String
17+
public var message: String?
1818

19-
public init(runID: String? = nil, data: [AnyCodable]? = nil, events: [Event]? = nil, message: String) {
19+
public init(runID: String, data: [AnyCodable]? = nil, events: [Event]? = nil, message: String? = nil) {
2020
self.runID = runID
2121
self.data = data
2222
self.events = events
@@ -34,10 +34,10 @@ public struct WatchResponse: Codable, JSONEncodable {
3434

3535
public func encode(to encoder: Encoder) throws {
3636
var container = encoder.container(keyedBy: CodingKeys.self)
37-
try container.encodeIfPresent(self.runID, forKey: .runID)
37+
try container.encode(self.runID, forKey: .runID)
3838
try container.encodeIfPresent(self.data, forKey: .data)
3939
try container.encodeIfPresent(self.events, forKey: .events)
40-
try container.encode(self.message, forKey: .message)
40+
try container.encodeIfPresent(self.message, forKey: .message)
4141
}
4242
}
4343

@@ -52,9 +52,9 @@ extension WatchResponse: Equatable {
5252

5353
extension WatchResponse: Hashable {
5454
public func hash(into hasher: inout Hasher) {
55-
hasher.combine(self.runID?.hashValue)
55+
hasher.combine(self.runID.hashValue)
5656
hasher.combine(self.data?.hashValue)
5757
hasher.combine(self.events?.hashValue)
58-
hasher.combine(self.message.hashValue)
58+
hasher.combine(self.message?.hashValue)
5959
}
6060
}

docs/bundled/ingestion.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16554,7 +16554,7 @@ components:
1655416554
description: a message describing the outcome of a validate run.
1655516555
type: string
1655616556
required:
16557-
- message
16557+
- runID
1655816558
SourceSearch:
1655916559
type: object
1656016560
additionalProperties: false

specs/bundled/ingestion.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3211,7 +3211,7 @@ components:
32113211
description: a message describing the outcome of a validate run.
32123212
type: string
32133213
required:
3214-
- message
3214+
- runID
32153215
SourceSearch:
32163216
type: object
32173217
additionalProperties: false

0 commit comments

Comments
 (0)