Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 13, 2024
1 parent 9955dbe commit ef81b17
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,10 @@ partial void ProcessAccountGetResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Replicate.AccountGetResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Replicate.AccountGetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,10 @@ partial void ProcessDeploymentsCreateResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Replicate.DeploymentsCreateResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Replicate.DeploymentsCreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,10 @@ partial void ProcessDeploymentsGetResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Replicate.DeploymentsGetResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Replicate.DeploymentsGetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,10 @@ partial void ProcessDeploymentsListResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Replicate.DeploymentsListResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Replicate.DeploymentsListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,10 @@ partial void ProcessDeploymentsUpdateResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Replicate.DeploymentsUpdateResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Replicate.DeploymentsUpdateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,10 @@ partial void ProcessHardwareListResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList<global::Replicate.HardwareListResponseItem>), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList<global::Replicate.HardwareListResponseItem>;
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList<global::Replicate.HardwareListResponseItem>), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList<global::Replicate.HardwareListResponseItem> ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,10 @@ partial void ProcessModelsPredictionsCreateResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Replicate.PredictionResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Replicate.PredictionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,10 @@ partial void ProcessPredictionsGetResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Replicate.PredictionResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Replicate.PredictionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,10 @@ partial void ProcessWebhooksDefaultSecretGetResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Replicate.WebhooksDefaultSecretGetResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Replicate.WebhooksDefaultSecretGetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down

0 comments on commit ef81b17

Please sign in to comment.