mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
712 lines
42 KiB
Swift
712 lines
42 KiB
Swift
//
|
||
// MqAPI.swift
|
||
//
|
||
// Generated by openapi-generator
|
||
// https://openapi-generator.tech
|
||
//
|
||
|
||
import Foundation
|
||
|
||
open class MqAPI {
|
||
|
||
/**
|
||
Removes a stream with all its messages and consumers.
|
||
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: Void
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func deleteMqStreamByName(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
|
||
return try await deleteMqStreamByNameWithRequestBuilder(name: name, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Removes a stream with all its messages and consumers.
|
||
- DELETE /v1/mq/stream/{name}
|
||
- Removes a stream with all its messages and consumers. Irreversible.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<Void>
|
||
*/
|
||
open class func deleteMqStreamByNameWithRequestBuilder(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
|
||
var localVariablePath = "/v1/mq/stream/{name}"
|
||
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
|
||
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Erases one message by sequence; the sequence gap remains.
|
||
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter seq: (path) Seq is the message's stream sequence, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: Void
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func deleteMqStreamByNameMessageBySeq(name: String, seq: Int, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
|
||
return try await deleteMqStreamByNameMessageBySeqWithRequestBuilder(name: name, seq: seq, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Erases one message by sequence; the sequence gap remains.
|
||
- DELETE /v1/mq/stream/{name}/message/{seq}
|
||
- Erases one message by sequence; the sequence gap remains.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter seq: (path) Seq is the message's stream sequence, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<Void>
|
||
*/
|
||
open class func deleteMqStreamByNameMessageBySeqWithRequestBuilder(name: String, seq: Int, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
|
||
var localVariablePath = "/v1/mq/stream/{name}/message/{seq}"
|
||
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
|
||
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
|
||
let seqPreEscape = "\(APIHelper.mapValueToPathItem(seq))"
|
||
let seqPostEscape = seqPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{seq}", with: seqPostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Removes a consumer and its delivery state; unacknowledged messages stay in the stream.
|
||
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter name: (path) Name is the consumer name, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: Void
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func deleteMqStreamByStreamConsumerByName(stream: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) {
|
||
return try await deleteMqStreamByStreamConsumerByNameWithRequestBuilder(stream: stream, name: name, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Removes a consumer and its delivery state; unacknowledged messages stay in the stream.
|
||
- DELETE /v1/mq/stream/{stream}/consumer/{name}
|
||
- Removes a consumer and its delivery state; unacknowledged messages stay in the stream.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter name: (path) Name is the consumer name, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<Void>
|
||
*/
|
||
open class func deleteMqStreamByStreamConsumerByNameWithRequestBuilder(stream: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Void> {
|
||
var localVariablePath = "/v1/mq/stream/{stream}/consumer/{name}"
|
||
let streamPreEscape = "\(APIHelper.mapValueToPathItem(stream))"
|
||
let streamPostEscape = streamPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{stream}", with: streamPostEscape, options: .literal, range: nil)
|
||
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
|
||
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<Void>.Type = apiConfiguration.requestBuilderFactory.getNonDecodableBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Reports whether the message plane behind this surface answers.
|
||
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: Health
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func getMqHealth(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Health {
|
||
return try await getMqHealthWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Reports whether the message plane behind this surface answers.
|
||
- GET /v1/mq/health
|
||
- Reports whether the message plane behind this surface answers.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<Health>
|
||
*/
|
||
open class func getMqHealthWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Health> {
|
||
let localVariablePath = "/v1/mq/health"
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<Health>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Returns the broker's identity and the org's stream count.
|
||
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: InfoOut
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func getMqInfo(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> InfoOut {
|
||
return try await getMqInfoWithRequestBuilder(apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Returns the broker's identity and the org's stream count.
|
||
- GET /v1/mq/info
|
||
- Returns the broker's identity and the org's stream count.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<InfoOut>
|
||
*/
|
||
open class func getMqInfoWithRequestBuilder(apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<InfoOut> {
|
||
let localVariablePath = "/v1/mq/info"
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<InfoOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Returns the org's streams, name-ordered, with their live state.
|
||
|
||
- parameter limit: (query) Limit caps the streams returned (1–1000, default 100). (optional)
|
||
- parameter offset: (query) Offset skips that many streams, name-ordered. (optional)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: Streams
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func getMqStream(limit: Int64? = nil, offset: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Streams {
|
||
return try await getMqStreamWithRequestBuilder(limit: limit, offset: offset, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Returns the org's streams, name-ordered, with their live state.
|
||
- GET /v1/mq/stream
|
||
- Returns the org's streams, name-ordered, with their live state.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter limit: (query) Limit caps the streams returned (1–1000, default 100). (optional)
|
||
- parameter offset: (query) Offset skips that many streams, name-ordered. (optional)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<Streams>
|
||
*/
|
||
open class func getMqStreamWithRequestBuilder(limit: Int64? = nil, offset: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Streams> {
|
||
let localVariablePath = "/v1/mq/stream"
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
|
||
"limit": (wrappedValue: limit?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
|
||
"offset": (wrappedValue: offset?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
|
||
])
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<Streams>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Returns one stream's configuration and live state.
|
||
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: ModelStream
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func getMqStreamByName(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ModelStream {
|
||
return try await getMqStreamByNameWithRequestBuilder(name: name, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Returns one stream's configuration and live state.
|
||
- GET /v1/mq/stream/{name}
|
||
- Returns one stream's configuration and live state.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<ModelStream>
|
||
*/
|
||
open class func getMqStreamByNameWithRequestBuilder(name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ModelStream> {
|
||
var localVariablePath = "/v1/mq/stream/{name}"
|
||
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
|
||
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<ModelStream>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Reads stored messages without a consumer: by sequence, by newest on a subject, or walking a subject forward from a sequence.
|
||
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter seq: (query) Seq reads the message at this sequence (with next_by_subject: the walk's start). (optional)
|
||
- parameter lastBySubject: (query) LastBySubject reads the newest message on this org-relative subject. (optional)
|
||
- parameter nextBySubject: (query) NextBySubject walks forward from seq collecting messages on this org-relative subject (wildcards supported). (optional)
|
||
- parameter limit: (query) Limit caps a next_by_subject walk (1–1000, default 100). (optional)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: ReadOut
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func getMqStreamByNameMessage(name: String, seq: Int? = nil, lastBySubject: String? = nil, nextBySubject: String? = nil, limit: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ReadOut {
|
||
return try await getMqStreamByNameMessageWithRequestBuilder(name: name, seq: seq, lastBySubject: lastBySubject, nextBySubject: nextBySubject, limit: limit, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Reads stored messages without a consumer: by sequence, by newest on a subject, or walking a subject forward from a sequence.
|
||
- GET /v1/mq/stream/{name}/message
|
||
- Reads stored messages without a consumer: by sequence, by newest on a subject, or walking a subject forward from a sequence.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter seq: (query) Seq reads the message at this sequence (with next_by_subject: the walk's start). (optional)
|
||
- parameter lastBySubject: (query) LastBySubject reads the newest message on this org-relative subject. (optional)
|
||
- parameter nextBySubject: (query) NextBySubject walks forward from seq collecting messages on this org-relative subject (wildcards supported). (optional)
|
||
- parameter limit: (query) Limit caps a next_by_subject walk (1–1000, default 100). (optional)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<ReadOut>
|
||
*/
|
||
open class func getMqStreamByNameMessageWithRequestBuilder(name: String, seq: Int? = nil, lastBySubject: String? = nil, nextBySubject: String? = nil, limit: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ReadOut> {
|
||
var localVariablePath = "/v1/mq/stream/{name}/message"
|
||
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
|
||
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
|
||
"seq": (wrappedValue: seq?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
|
||
"last_by_subject": (wrappedValue: lastBySubject?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
|
||
"next_by_subject": (wrappedValue: nextBySubject?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
|
||
"limit": (wrappedValue: limit?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
|
||
])
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<ReadOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Returns a stream's consumers, name-ordered, with delivery state.
|
||
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter limit: (query) Limit caps the consumers returned (1–1000, default 100). (optional)
|
||
- parameter offset: (query) Offset skips that many consumers, name-ordered. (optional)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: PickOut
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func getMqStreamByStreamConsumer(stream: String, limit: Int64? = nil, offset: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PickOut {
|
||
return try await getMqStreamByStreamConsumerWithRequestBuilder(stream: stream, limit: limit, offset: offset, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Returns a stream's consumers, name-ordered, with delivery state.
|
||
- GET /v1/mq/stream/{stream}/consumer
|
||
- Returns a stream's consumers, name-ordered, with delivery state.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter limit: (query) Limit caps the consumers returned (1–1000, default 100). (optional)
|
||
- parameter offset: (query) Offset skips that many consumers, name-ordered. (optional)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<PickOut>
|
||
*/
|
||
open class func getMqStreamByStreamConsumerWithRequestBuilder(stream: String, limit: Int64? = nil, offset: Int64? = nil, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PickOut> {
|
||
var localVariablePath = "/v1/mq/stream/{stream}/consumer"
|
||
let streamPreEscape = "\(APIHelper.mapValueToPathItem(stream))"
|
||
let streamPostEscape = streamPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{stream}", with: streamPostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
var localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
|
||
"limit": (wrappedValue: limit?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
|
||
"offset": (wrappedValue: offset?.asParameter(codableHelper: apiConfiguration.codableHelper), isExplode: true),
|
||
])
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<PickOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Returns one consumer's configuration and delivery state.
|
||
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter name: (path) Name is the consumer name, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: Consumer
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func getMqStreamByStreamConsumerByName(stream: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Consumer {
|
||
return try await getMqStreamByStreamConsumerByNameWithRequestBuilder(stream: stream, name: name, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Returns one consumer's configuration and delivery state.
|
||
- GET /v1/mq/stream/{stream}/consumer/{name}
|
||
- Returns one consumer's configuration and delivery state.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter name: (path) Name is the consumer name, from the path.
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<Consumer>
|
||
*/
|
||
open class func getMqStreamByStreamConsumerByNameWithRequestBuilder(stream: String, name: String, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Consumer> {
|
||
var localVariablePath = "/v1/mq/stream/{stream}/consumer/{name}"
|
||
let streamPreEscape = "\(APIHelper.mapValueToPathItem(stream))"
|
||
let streamPostEscape = streamPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{stream}", with: streamPostEscape, options: .literal, range: nil)
|
||
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
|
||
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters: [String: any Sendable]? = nil
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
:
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<Consumer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Creates a durable stream in the org's namespace and returns it.
|
||
|
||
- parameter config: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: ModelStream
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func postMqStream(config: Config, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ModelStream {
|
||
return try await postMqStreamWithRequestBuilder(config: config, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Creates a durable stream in the org's namespace and returns it.
|
||
- POST /v1/mq/stream
|
||
- Creates a durable stream in the org's namespace and returns it.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter config: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<ModelStream>
|
||
*/
|
||
open class func postMqStreamWithRequestBuilder(config: Config, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ModelStream> {
|
||
let localVariablePath = "/v1/mq/stream"
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: config, codableHelper: apiConfiguration.codableHelper)
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
"Content-Type": "application/json",
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<ModelStream>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Removes messages from a stream, leaving its consumers in place.
|
||
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter purge: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: PurgeOut
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func postMqStreamByNamePurge(name: String, purge: Purge, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> PurgeOut {
|
||
return try await postMqStreamByNamePurgeWithRequestBuilder(name: name, purge: purge, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Removes messages from a stream, leaving its consumers in place.
|
||
- POST /v1/mq/stream/{name}/purge
|
||
- Removes messages from a stream, leaving its consumers in place.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter name: (path) Name is the stream name, from the path.
|
||
- parameter purge: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<PurgeOut>
|
||
*/
|
||
open class func postMqStreamByNamePurgeWithRequestBuilder(name: String, purge: Purge, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<PurgeOut> {
|
||
var localVariablePath = "/v1/mq/stream/{name}/purge"
|
||
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
|
||
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: purge, codableHelper: apiConfiguration.codableHelper)
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
"Content-Type": "application/json",
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<PurgeOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Creates a durable pull consumer on a stream and returns it.
|
||
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter makeIn: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: Consumer
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func postMqStreamByStreamConsumer(stream: String, makeIn: MakeIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> Consumer {
|
||
return try await postMqStreamByStreamConsumerWithRequestBuilder(stream: stream, makeIn: makeIn, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Creates a durable pull consumer on a stream and returns it.
|
||
- POST /v1/mq/stream/{stream}/consumer
|
||
- Creates a durable pull consumer on a stream and returns it.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter makeIn: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<Consumer>
|
||
*/
|
||
open class func postMqStreamByStreamConsumerWithRequestBuilder(stream: String, makeIn: MakeIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<Consumer> {
|
||
var localVariablePath = "/v1/mq/stream/{stream}/consumer"
|
||
let streamPreEscape = "\(APIHelper.mapValueToPathItem(stream))"
|
||
let streamPostEscape = streamPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{stream}", with: streamPostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: makeIn, codableHelper: apiConfiguration.codableHelper)
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
"Content-Type": "application/json",
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<Consumer>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Pulls the consumer's next batch.
|
||
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter name: (path) Name is the consumer name, from the path.
|
||
- parameter nextIn: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: ReadOut
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func postMqStreamByStreamConsumerByNameNext(stream: String, name: String, nextIn: NextIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ReadOut {
|
||
return try await postMqStreamByStreamConsumerByNameNextWithRequestBuilder(stream: stream, name: name, nextIn: nextIn, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Pulls the consumer's next batch.
|
||
- POST /v1/mq/stream/{stream}/consumer/{name}/next
|
||
- Pulls the consumer's next batch. Delivered messages are acknowledged on delivery — the broker will not redeliver what this call returns; an empty wait answers 408.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter stream: (path) Stream is the stream name, from the path.
|
||
- parameter name: (path) Name is the consumer name, from the path.
|
||
- parameter nextIn: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<ReadOut>
|
||
*/
|
||
open class func postMqStreamByStreamConsumerByNameNextWithRequestBuilder(stream: String, name: String, nextIn: NextIn, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ReadOut> {
|
||
var localVariablePath = "/v1/mq/stream/{stream}/consumer/{name}/next"
|
||
let streamPreEscape = "\(APIHelper.mapValueToPathItem(stream))"
|
||
let streamPostEscape = streamPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{stream}", with: streamPostEscape, options: .literal, range: nil)
|
||
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
|
||
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: nextIn, codableHelper: apiConfiguration.codableHelper)
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
"Content-Type": "application/json",
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<ReadOut>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
|
||
/**
|
||
Reconfigures an existing stream; the path names the stream, and the immutable fields (storage, retention) must restate what they are.
|
||
|
||
- parameter name: (path) Name is the stream name, unique within the org (alphanumeric, hyphens, underscores).
|
||
- parameter config: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: ModelStream
|
||
*/
|
||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||
open class func putMqStreamByName(name: String, config: Config, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) async throws(ErrorResponse) -> ModelStream {
|
||
return try await putMqStreamByNameWithRequestBuilder(name: name, config: config, apiConfiguration: apiConfiguration).execute().body
|
||
}
|
||
|
||
/**
|
||
Reconfigures an existing stream; the path names the stream, and the immutable fields (storage, retention) must restate what they are.
|
||
- PUT /v1/mq/stream/{name}
|
||
- Reconfigures an existing stream; the path names the stream, and the immutable fields (storage, retention) must restate what they are.
|
||
- Bearer Token:
|
||
- type: http
|
||
- name: bearer
|
||
- parameter name: (path) Name is the stream name, unique within the org (alphanumeric, hyphens, underscores).
|
||
- parameter config: (body)
|
||
- parameter apiConfiguration: The configuration for the http request.
|
||
- returns: RequestBuilder<ModelStream>
|
||
*/
|
||
open class func putMqStreamByNameWithRequestBuilder(name: String, config: Config, apiConfiguration: HanzoAPIConfiguration = HanzoAPIConfiguration.shared) -> RequestBuilder<ModelStream> {
|
||
var localVariablePath = "/v1/mq/stream/{name}"
|
||
let namePreEscape = "\(APIHelper.mapValueToPathItem(name))"
|
||
let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||
localVariablePath = localVariablePath.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil)
|
||
let localVariableURLString = apiConfiguration.basePath + localVariablePath
|
||
let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: config, codableHelper: apiConfiguration.codableHelper)
|
||
|
||
let localVariableUrlComponents = URLComponents(string: localVariableURLString)
|
||
|
||
let localVariableNillableHeaders: [String: (any Sendable)?] = [
|
||
"Content-Type": "application/json",
|
||
]
|
||
|
||
let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
|
||
|
||
let localVariableRequestBuilder: RequestBuilder<ModelStream>.Type = apiConfiguration.requestBuilderFactory.getBuilder()
|
||
|
||
return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true, apiConfiguration: apiConfiguration)
|
||
}
|
||
}
|