diff --git a/LICENSE b/LICENSE index 3eeb9992..fe736a4c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright © 2022 Twilio, Inc. +Copyright © 2024 Twilio, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/PublicApi.podspec b/PublicApi.podspec index 68a4e9e1..64a0744a 100644 --- a/PublicApi.podspec +++ b/PublicApi.podspec @@ -4,8 +4,8 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.11' s.tvos.deployment_target = '9.0' s.watchos.deployment_target = '3.0' - s.version = '33.0.4' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v33.0.4' } + s.version = '62.0.6' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v62.0.6' } s.authors = 'OpenAPI Generator' s.license = 'Proprietary' s.homepage = 'https://github.com/OpenAPITools/openapi-generator' diff --git a/PublicApi/Classes/OpenAPIs/APIs/APICallsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/APICallsAPI.swift index 258baf7d..b5a82e47 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/APICallsAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/APICallsAPI.swift @@ -16,12 +16,12 @@ open class APICallsAPI { Get Daily Per Source API Calls Usage - parameter period: (query) The start of the usage month in the ISO-8601 format. This parameter exists in v1. - - parameter pagination: (query) Pagination input for per Source API calls counts. This parameter exists in v1. + - parameter pagination: (query) Pagination input for per Source API calls counts. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func getDailyPerSourceAPICallsUsage(period: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDailyPerSourceAPICallsUsage200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func getDailyPerSourceAPICallsUsage(period: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDailyPerSourceAPICallsUsage200Response?, _ error: Error?) -> Void)) -> RequestTask { return getDailyPerSourceAPICallsUsageWithRequestBuilder(period: period, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -40,10 +40,10 @@ open class APICallsAPI { - type: http - name: token - parameter period: (query) The start of the usage month in the ISO-8601 format. This parameter exists in v1. - - parameter pagination: (query) Pagination input for per Source API calls counts. This parameter exists in v1. + - parameter pagination: (query) Pagination input for per Source API calls counts. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func getDailyPerSourceAPICallsUsageWithRequestBuilder(period: String, pagination: PaginationInput) -> RequestBuilder { + open class func getDailyPerSourceAPICallsUsageWithRequestBuilder(period: String, pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/usage/api-calls/sources/daily" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil @@ -51,7 +51,7 @@ open class APICallsAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ "period": period.encodeToJSON(), - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -69,12 +69,12 @@ open class APICallsAPI { Get Daily Workspace API Calls Usage - parameter period: (query) The start of the usage month in the ISO-8601 format. This parameter exists in v1. - - parameter pagination: (query) Pagination input for Workspace API call counts. This parameter exists in v1. + - parameter pagination: (query) Pagination input for Workspace API call counts. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func getDailyWorkspaceAPICallsUsage(period: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDailyWorkspaceAPICallsUsage200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func getDailyWorkspaceAPICallsUsage(period: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDailyWorkspaceAPICallsUsage200Response?, _ error: Error?) -> Void)) -> RequestTask { return getDailyWorkspaceAPICallsUsageWithRequestBuilder(period: period, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -93,10 +93,10 @@ open class APICallsAPI { - type: http - name: token - parameter period: (query) The start of the usage month in the ISO-8601 format. This parameter exists in v1. - - parameter pagination: (query) Pagination input for Workspace API call counts. This parameter exists in v1. + - parameter pagination: (query) Pagination input for Workspace API call counts. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func getDailyWorkspaceAPICallsUsageWithRequestBuilder(period: String, pagination: PaginationInput) -> RequestBuilder { + open class func getDailyWorkspaceAPICallsUsageWithRequestBuilder(period: String, pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/usage/api-calls/daily" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil @@ -104,7 +104,7 @@ open class APICallsAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ "period": period.encodeToJSON(), - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ diff --git a/PublicApi/Classes/OpenAPIs/APIs/ActivationsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/ActivationsAPI.swift new file mode 100644 index 00000000..5e90e53e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/ActivationsAPI.swift @@ -0,0 +1,498 @@ +// +// ActivationsAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class ActivationsAPI { + + /** + Add Activation to Audience + + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter connectionId: (path) + - parameter addActivationToAudienceAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func addActivationToAudience(spaceId: String, audienceId: String, connectionId: String, addActivationToAudienceAlphaInput: AddActivationToAudienceAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: AddActivationToAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return addActivationToAudienceWithRequestBuilder(spaceId: spaceId, audienceId: audienceId, connectionId: connectionId, addActivationToAudienceAlphaInput: addActivationToAudienceAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Add Activation to Audience + - POST /spaces/{spaceId}/audiences/{audienceId}/destination-connections/{connectionId}/activations + - Creates Activation. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Activation Created` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter connectionId: (path) + - parameter addActivationToAudienceAlphaInput: (body) + - returns: RequestBuilder + */ + open class func addActivationToAudienceWithRequestBuilder(spaceId: String, audienceId: String, connectionId: String, addActivationToAudienceAlphaInput: AddActivationToAudienceAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{audienceId}/destination-connections/{connectionId}/activations" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let audienceIdPreEscape = "\(APIHelper.mapValueToPathItem(audienceId))" + let audienceIdPostEscape = audienceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{audienceId}", with: audienceIdPostEscape, options: .literal, range: nil) + let connectionIdPreEscape = "\(APIHelper.mapValueToPathItem(connectionId))" + let connectionIdPostEscape = connectionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{connectionId}", with: connectionIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: addActivationToAudienceAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Add Destination to Audience + + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter addDestinationToAudienceAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func addDestinationToAudience(spaceId: String, audienceId: String, addDestinationToAudienceAlphaInput: AddDestinationToAudienceAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: AddDestinationToAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return addDestinationToAudienceWithRequestBuilder(spaceId: spaceId, audienceId: audienceId, addDestinationToAudienceAlphaInput: addDestinationToAudienceAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Add Destination to Audience + - POST /spaces/{spaceId}/audiences/{audienceId}/destination-connections + - Adds a Destination to an Audience. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Destination Added into Audience` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter addDestinationToAudienceAlphaInput: (body) + - returns: RequestBuilder + */ + open class func addDestinationToAudienceWithRequestBuilder(spaceId: String, audienceId: String, addDestinationToAudienceAlphaInput: AddDestinationToAudienceAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{audienceId}/destination-connections" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let audienceIdPreEscape = "\(APIHelper.mapValueToPathItem(audienceId))" + let audienceIdPostEscape = audienceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{audienceId}", with: audienceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: addDestinationToAudienceAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get Activation from Audience + + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter id: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getActivationFromAudience(spaceId: String, audienceId: String, id: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetActivationFromAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getActivationFromAudienceWithRequestBuilder(spaceId: spaceId, audienceId: audienceId, id: id).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Activation from Audience + - GET /spaces/{spaceId}/audiences/{audienceId}/activations/{id} + - Gets a single Activation by id. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter id: (path) + - returns: RequestBuilder + */ + open class func getActivationFromAudienceWithRequestBuilder(spaceId: String, audienceId: String, id: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{audienceId}/activations/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let audienceIdPreEscape = "\(APIHelper.mapValueToPathItem(audienceId))" + let audienceIdPostEscape = audienceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{audienceId}", with: audienceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Activations from Audience + + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter pagination: (query) Optional pagination. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listActivationsFromAudience(spaceId: String, audienceId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListActivationsFromAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listActivationsFromAudienceWithRequestBuilder(spaceId: spaceId, audienceId: audienceId, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Activations from Audience + - GET /spaces/{spaceId}/audiences/{audienceId}/activations + - Lists all Activations. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter pagination: (query) Optional pagination. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listActivationsFromAudienceWithRequestBuilder(spaceId: String, audienceId: String, pagination: PaginationInput? = nil) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{audienceId}/activations" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let audienceIdPreEscape = "\(APIHelper.mapValueToPathItem(audienceId))" + let audienceIdPostEscape = audienceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{audienceId}", with: audienceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Destinations from Audience + + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter pagination: (query) Optional pagination. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listDestinationsFromAudience(spaceId: String, audienceId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListDestinationsFromAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listDestinationsFromAudienceWithRequestBuilder(spaceId: spaceId, audienceId: audienceId, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Destinations from Audience + - GET /spaces/{spaceId}/audiences/{audienceId}/destination-connections + - Lists all Destinations from an Audience. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Destinations Listed from Audience` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter pagination: (query) Optional pagination. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listDestinationsFromAudienceWithRequestBuilder(spaceId: String, audienceId: String, pagination: PaginationInput? = nil) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{audienceId}/destination-connections" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let audienceIdPreEscape = "\(APIHelper.mapValueToPathItem(audienceId))" + let audienceIdPostEscape = audienceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{audienceId}", with: audienceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Supported Destinations from Audience + + - parameter spaceId: (path) + - parameter audienceType: (path) + - parameter slug: (query) Optional destination slug to filter results. This parameter exists in alpha. (optional) + - parameter actionId: (query) Optional destination action id to filter results. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listSupportedDestinationsFromAudience(spaceId: String, audienceType: String, slug: String? = nil, actionId: String? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSupportedDestinationsFromAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listSupportedDestinationsFromAudienceWithRequestBuilder(spaceId: spaceId, audienceType: audienceType, slug: slug, actionId: actionId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Supported Destinations from Audience + - GET /spaces/{spaceId}/audienceType/{audienceType}/supported-destinations + - Lists all Supported Destinations for this audience type that can be activated. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Supported Destinations Listed For Audience` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter audienceType: (path) + - parameter slug: (query) Optional destination slug to filter results. This parameter exists in alpha. (optional) + - parameter actionId: (query) Optional destination action id to filter results. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listSupportedDestinationsFromAudienceWithRequestBuilder(spaceId: String, audienceType: String, slug: String? = nil, actionId: String? = nil) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audienceType/{audienceType}/supported-destinations" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let audienceTypePreEscape = "\(APIHelper.mapValueToPathItem(audienceType))" + let audienceTypePostEscape = audienceTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{audienceType}", with: audienceTypePostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "slug": slug?.encodeToJSON(), + "actionId": actionId?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Remove Activation from Audience + + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter id: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func removeActivationFromAudience(spaceId: String, audienceId: String, id: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: RemoveActivationFromAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return removeActivationFromAudienceWithRequestBuilder(spaceId: spaceId, audienceId: audienceId, id: id).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Remove Activation from Audience + - DELETE /spaces/{spaceId}/audiences/{audienceId}/activations/{id} + - Deletes an Activation. The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter id: (path) + - returns: RequestBuilder + */ + open class func removeActivationFromAudienceWithRequestBuilder(spaceId: String, audienceId: String, id: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{audienceId}/activations/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let audienceIdPreEscape = "\(APIHelper.mapValueToPathItem(audienceId))" + let audienceIdPostEscape = audienceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{audienceId}", with: audienceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Update Activation for Audience + + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter id: (path) + - parameter updateActivationForAudienceAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func updateActivationForAudience(spaceId: String, audienceId: String, id: String, updateActivationForAudienceAlphaInput: UpdateActivationForAudienceAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: UpdateActivationForAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return updateActivationForAudienceWithRequestBuilder(spaceId: spaceId, audienceId: audienceId, id: id, updateActivationForAudienceAlphaInput: updateActivationForAudienceAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update Activation for Audience + - PATCH /spaces/{spaceId}/audiences/{audienceId}/activations/{id} + - Updates an Activation. The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter id: (path) + - parameter updateActivationForAudienceAlphaInput: (body) + - returns: RequestBuilder + */ + open class func updateActivationForAudienceWithRequestBuilder(spaceId: String, audienceId: String, id: String, updateActivationForAudienceAlphaInput: UpdateActivationForAudienceAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{audienceId}/activations/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let audienceIdPreEscape = "\(APIHelper.mapValueToPathItem(audienceId))" + let audienceIdPostEscape = audienceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{audienceId}", with: audienceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: updateActivationForAudienceAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/AudiencesAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/AudiencesAPI.swift new file mode 100644 index 00000000..e508ff7d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/AudiencesAPI.swift @@ -0,0 +1,835 @@ +// +// AudiencesAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class AudiencesAPI { + + /** + Add Audience Schedule to Audience + + - parameter spaceId: (path) + - parameter id: (path) + - parameter addAudienceScheduleToAudienceAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func addAudienceScheduleToAudience(spaceId: String, id: String, addAudienceScheduleToAudienceAlphaInput: AddAudienceScheduleToAudienceAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: AddAudienceScheduleToAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return addAudienceScheduleToAudienceWithRequestBuilder(spaceId: spaceId, id: id, addAudienceScheduleToAudienceAlphaInput: addAudienceScheduleToAudienceAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Add Audience Schedule to Audience + - POST /spaces/{spaceId}/audiences/{id}/schedules + - The ability to configure the run schedule for an Audience is limited to Linked Audiences (audienceType = LINKED). Note that if a Linked Audience remains disabled for 90 days Segment will delete the associated schedule and a new schedule will need to be created. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - parameter addAudienceScheduleToAudienceAlphaInput: (body) + - returns: RequestBuilder + */ + open class func addAudienceScheduleToAudienceWithRequestBuilder(spaceId: String, id: String, addAudienceScheduleToAudienceAlphaInput: AddAudienceScheduleToAudienceAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{id}/schedules" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: addAudienceScheduleToAudienceAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Create Audience + + - parameter spaceId: (path) + - parameter createAudienceBetaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createAudience(spaceId: String, createAudienceBetaInput: CreateAudienceBetaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createAudienceWithRequestBuilder(spaceId: spaceId, createAudienceBetaInput: createAudienceBetaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Audience + - POST /spaces/{spaceId}/audiences + - Creates Audience. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Created` event in the [audit trail](/tag/Audit-Trail). Note: The definition for an Audience created using the API is not editable through the Segment App. The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter createAudienceBetaInput: (body) + - returns: RequestBuilder + */ + open class func createAudienceWithRequestBuilder(spaceId: String, createAudienceBetaInput: CreateAudienceBetaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createAudienceBetaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Create Audience Preview + + - parameter spaceId: (path) + - parameter createAudiencePreviewBetaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createAudiencePreview(spaceId: String, createAudiencePreviewBetaInput: CreateAudiencePreviewBetaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateAudiencePreview200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createAudiencePreviewWithRequestBuilder(spaceId: spaceId, createAudiencePreviewBetaInput: createAudiencePreviewBetaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Audience Preview + - POST /spaces/{spaceId}/audiences/previews + - Previews Audience. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Preview Created` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 5 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. This endpoint also has a rate limit of 700 requests per month per spaceId, which is lower than the default due to access pattern restrictions. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter createAudiencePreviewBetaInput: (body) + - returns: RequestBuilder + */ + open class func createAudiencePreviewWithRequestBuilder(spaceId: String, createAudiencePreviewBetaInput: CreateAudiencePreviewBetaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/previews" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createAudiencePreviewBetaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Force Execute Audience Run + + - parameter spaceId: (path) + - parameter audienceId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func forceExecuteAudienceRun(spaceId: String, audienceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ForceExecuteAudienceRun200Response?, _ error: Error?) -> Void)) -> RequestTask { + return forceExecuteAudienceRunWithRequestBuilder(spaceId: spaceId, audienceId: audienceId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Force Execute Audience Run + - POST /spaces/{spaceId}/audiences/{audienceId}/runs + - The ability to force execute a run for an Audience is limited to Linked Audiences (audienceType = `LINKED`). • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Run Forced` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter audienceId: (path) + - returns: RequestBuilder + */ + open class func forceExecuteAudienceRunWithRequestBuilder(spaceId: String, audienceId: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{audienceId}/runs" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let audienceIdPreEscape = "\(APIHelper.mapValueToPathItem(audienceId))" + let audienceIdPostEscape = audienceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{audienceId}", with: audienceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + * enum for parameter include + */ + public enum Include_getAudience: String, CaseIterable { + case schedules = "schedules" + } + + /** + Get Audience + + - parameter spaceId: (path) + - parameter id: (path) + - parameter include: (query) Additional resource to include, support schedules only. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getAudience(spaceId: String, id: String, include: Include_getAudience? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getAudienceWithRequestBuilder(spaceId: spaceId, id: id, include: include).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Audience + - GET /spaces/{spaceId}/audiences/{id} + - Returns the Audience by id and spaceId. Supports including audience schedules using `?include=schedules`. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 100 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - parameter include: (query) Additional resource to include, support schedules only. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func getAudienceWithRequestBuilder(spaceId: String, id: String, include: Include_getAudience? = nil) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "include": include?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get Audience Preview + + - parameter spaceId: (path) + - parameter id: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getAudiencePreview(spaceId: String, id: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetAudiencePreview200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getAudiencePreviewWithRequestBuilder(spaceId: spaceId, id: id).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Audience Preview + - GET /spaces/{spaceId}/audiences/previews/{id} + - Reads the results of an audience preview. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 300 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - returns: RequestBuilder + */ + open class func getAudiencePreviewWithRequestBuilder(spaceId: String, id: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/previews/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get Audience Schedule from Space And Audience + + - parameter spaceId: (path) + - parameter id: (path) + - parameter scheduleId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getAudienceScheduleFromSpaceAndAudience(spaceId: String, id: String, scheduleId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetAudienceScheduleFromSpaceAndAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getAudienceScheduleFromSpaceAndAudienceWithRequestBuilder(spaceId: spaceId, id: id, scheduleId: scheduleId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Audience Schedule from Space And Audience + - GET /spaces/{spaceId}/audiences/{id}/schedules/{scheduleId} + - Returns the schedule for the given audience and scheduleId. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - parameter scheduleId: (path) + - returns: RequestBuilder + */ + open class func getAudienceScheduleFromSpaceAndAudienceWithRequestBuilder(spaceId: String, id: String, scheduleId: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{id}/schedules/{scheduleId}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let scheduleIdPreEscape = "\(APIHelper.mapValueToPathItem(scheduleId))" + let scheduleIdPostEscape = scheduleIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{scheduleId}", with: scheduleIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Audience Consumers from Space And Audience + + - parameter spaceId: (path) + - parameter id: (path) + - parameter pagination: (query) Information about the pagination of this response. [See pagination](https://docs.segmentapis.com/tag/Pagination/#section/Pagination-parameters) for more info. This parameter exists in alpha. (optional) + - parameter search: (query) Optional search criteria This parameter exists in alpha. (optional) + - parameter sort: (query) Optional sort criteria This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listAudienceConsumersFromSpaceAndAudience(spaceId: String, id: String, pagination: PaginationInput? = nil, search: ListAudienceSearchInput? = nil, sort: ListAudienceConsumersSortInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListAudienceConsumersFromSpaceAndAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listAudienceConsumersFromSpaceAndAudienceWithRequestBuilder(spaceId: spaceId, id: id, pagination: pagination, search: search, sort: sort).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Audience Consumers from Space And Audience + - GET /spaces/{spaceId}/audiences/{id}/audience-references + - Returns the list of consumers for the given audience. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - parameter pagination: (query) Information about the pagination of this response. [See pagination](https://docs.segmentapis.com/tag/Pagination/#section/Pagination-parameters) for more info. This parameter exists in alpha. (optional) + - parameter search: (query) Optional search criteria This parameter exists in alpha. (optional) + - parameter sort: (query) Optional sort criteria This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listAudienceConsumersFromSpaceAndAudienceWithRequestBuilder(spaceId: String, id: String, pagination: PaginationInput? = nil, search: ListAudienceSearchInput? = nil, sort: ListAudienceConsumersSortInput? = nil) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{id}/audience-references" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + "search": search?.encodeToJSON(), + "sort": sort?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Audience Schedules from Space And Audience + + - parameter spaceId: (path) + - parameter id: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listAudienceSchedulesFromSpaceAndAudience(spaceId: String, id: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListAudienceSchedulesFromSpaceAndAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listAudienceSchedulesFromSpaceAndAudienceWithRequestBuilder(spaceId: spaceId, id: id).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Audience Schedules from Space And Audience + - GET /spaces/{spaceId}/audiences/{id}/schedules + - Returns the list of schedules for the given audience. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - returns: RequestBuilder + */ + open class func listAudienceSchedulesFromSpaceAndAudienceWithRequestBuilder(spaceId: String, id: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{id}/schedules" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + * enum for parameter include + */ + public enum Include_listAudiences: String, CaseIterable { + case schedules = "schedules" + } + + /** + List Audiences + + - parameter spaceId: (path) + - parameter search: (query) Optional search criteria This parameter exists in alpha. (optional) + - parameter pagination: (query) Information about the pagination of this response. [See pagination](https://docs.segmentapis.com/tag/Pagination/#section/Pagination-parameters) for more info. This parameter exists in alpha. (optional) + - parameter include: (query) Additional resource to include, support schedules only. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listAudiences(spaceId: String, search: ListAudienceSearchInput? = nil, pagination: ListAudiencesPaginationInput? = nil, include: Include_listAudiences? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListAudiences200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listAudiencesWithRequestBuilder(spaceId: spaceId, search: search, pagination: pagination, include: include).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Audiences + - GET /spaces/{spaceId}/audiences + - Returns Audiences by spaceId. Supports including audience schedules using `?include=schedules`. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter search: (query) Optional search criteria This parameter exists in alpha. (optional) + - parameter pagination: (query) Information about the pagination of this response. [See pagination](https://docs.segmentapis.com/tag/Pagination/#section/Pagination-parameters) for more info. This parameter exists in alpha. (optional) + - parameter include: (query) Additional resource to include, support schedules only. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listAudiencesWithRequestBuilder(spaceId: String, search: ListAudienceSearchInput? = nil, pagination: ListAudiencesPaginationInput? = nil, include: Include_listAudiences? = nil) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "search": search?.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), + "include": include?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Remove Audience from Space + + - parameter spaceId: (path) + - parameter id: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func removeAudienceFromSpace(spaceId: String, id: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: RemoveAudienceFromSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return removeAudienceFromSpaceWithRequestBuilder(spaceId: spaceId, id: id).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Remove Audience from Space + - DELETE /spaces/{spaceId}/audiences/{id} + - Deletes an Audience by id and spaceId. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - returns: RequestBuilder + */ + open class func removeAudienceFromSpaceWithRequestBuilder(spaceId: String, id: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Remove Audience Schedule from Audience + + - parameter spaceId: (path) + - parameter id: (path) + - parameter scheduleId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func removeAudienceScheduleFromAudience(spaceId: String, id: String, scheduleId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: RemoveAudienceScheduleFromAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return removeAudienceScheduleFromAudienceWithRequestBuilder(spaceId: spaceId, id: id, scheduleId: scheduleId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Remove Audience Schedule from Audience + - DELETE /spaces/{spaceId}/audiences/{id}/schedules/{scheduleId} + - Deletes an audience schedule for a Linked Audience (audienceType = LINKED). • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - parameter scheduleId: (path) + - returns: RequestBuilder + */ + open class func removeAudienceScheduleFromAudienceWithRequestBuilder(spaceId: String, id: String, scheduleId: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{id}/schedules/{scheduleId}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let scheduleIdPreEscape = "\(APIHelper.mapValueToPathItem(scheduleId))" + let scheduleIdPostEscape = scheduleIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{scheduleId}", with: scheduleIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Update Audience for Space + + - parameter spaceId: (path) + - parameter id: (path) + - parameter updateAudienceForSpaceBetaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func updateAudienceForSpace(spaceId: String, id: String, updateAudienceForSpaceBetaInput: UpdateAudienceForSpaceBetaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: UpdateAudienceForSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return updateAudienceForSpaceWithRequestBuilder(spaceId: spaceId, id: id, updateAudienceForSpaceBetaInput: updateAudienceForSpaceBetaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update Audience for Space + - PATCH /spaces/{spaceId}/audiences/{id} + - Updates the Audience. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Modified` event in the [audit trail](/tag/Audit-Trail). • Note that when an Audience is updated, the Audience will be locked from future edits until the changes have been incorporated. You can find more information [in the Segment docs](https://segment-docs.netlify.app/docs/engage/audiences/#editing-realtime-audiences-and-traits). Note: The definition for an Audience updated using the API is not editable through the Segment App. The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - parameter updateAudienceForSpaceBetaInput: (body) + - returns: RequestBuilder + */ + open class func updateAudienceForSpaceWithRequestBuilder(spaceId: String, id: String, updateAudienceForSpaceBetaInput: UpdateAudienceForSpaceBetaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: updateAudienceForSpaceBetaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Update Audience Schedule for Audience + + - parameter spaceId: (path) + - parameter id: (path) + - parameter scheduleId: (path) + - parameter updateAudienceScheduleForAudienceAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func updateAudienceScheduleForAudience(spaceId: String, id: String, scheduleId: String, updateAudienceScheduleForAudienceAlphaInput: UpdateAudienceScheduleForAudienceAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: UpdateAudienceScheduleForAudience200Response?, _ error: Error?) -> Void)) -> RequestTask { + return updateAudienceScheduleForAudienceWithRequestBuilder(spaceId: spaceId, id: id, scheduleId: scheduleId, updateAudienceScheduleForAudienceAlphaInput: updateAudienceScheduleForAudienceAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update Audience Schedule for Audience + - PATCH /spaces/{spaceId}/audiences/{id}/schedules/{scheduleId} + - Updates an audience schedule for a Linked Audience (audienceType = LINKED). • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - parameter scheduleId: (path) + - parameter updateAudienceScheduleForAudienceAlphaInput: (body) + - returns: RequestBuilder + */ + open class func updateAudienceScheduleForAudienceWithRequestBuilder(spaceId: String, id: String, scheduleId: String, updateAudienceScheduleForAudienceAlphaInput: UpdateAudienceScheduleForAudienceAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/audiences/{id}/schedules/{scheduleId}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let scheduleIdPreEscape = "\(APIHelper.mapValueToPathItem(scheduleId))" + let scheduleIdPostEscape = scheduleIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{scheduleId}", with: scheduleIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: updateAudienceScheduleForAudienceAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/AuditTrailAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/AuditTrailAPI.swift index a16b0dfc..0a2c7aed 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/AuditTrailAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/AuditTrailAPI.swift @@ -15,17 +15,17 @@ open class AuditTrailAPI { /** List Audit Events - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. - parameter startTime: (query) Filter response to events that happened after this time. This parameter exists in v1. (optional) - parameter endTime: (query) Filter response to events that happened before this time. Defaults to the current time, or the end time from the pagination cursor. This parameter exists in v1. (optional) - parameter resourceId: (query) Filter response to events that affect a specific resource, for example, a single Source. This parameter exists in v1. (optional) - parameter resourceType: (query) Filter response to events that affect a specific type, for example, Sources, Warehouses, and Tracking Plans. This parameter exists in v1. (optional) + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listAuditEvents(pagination: PaginationInput, startTime: String? = nil, endTime: String? = nil, resourceId: String? = nil, resourceType: String? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListAuditEvents200Response?, _ error: Error?) -> Void)) -> RequestTask { - return listAuditEventsWithRequestBuilder(pagination: pagination, startTime: startTime, endTime: endTime, resourceId: resourceId, resourceType: resourceType).execute(apiResponseQueue) { result in + open class func listAuditEvents(startTime: String? = nil, endTime: String? = nil, resourceId: String? = nil, resourceType: String? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListAuditEvents200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listAuditEventsWithRequestBuilder(startTime: startTime, endTime: endTime, resourceId: resourceId, resourceType: resourceType, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -42,14 +42,14 @@ open class AuditTrailAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. - parameter startTime: (query) Filter response to events that happened after this time. This parameter exists in v1. (optional) - parameter endTime: (query) Filter response to events that happened before this time. Defaults to the current time, or the end time from the pagination cursor. This parameter exists in v1. (optional) - parameter resourceId: (query) Filter response to events that affect a specific resource, for example, a single Source. This parameter exists in v1. (optional) - parameter resourceType: (query) Filter response to events that affect a specific type, for example, Sources, Warehouses, and Tracking Plans. This parameter exists in v1. (optional) + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listAuditEventsWithRequestBuilder(pagination: PaginationInput, startTime: String? = nil, endTime: String? = nil, resourceId: String? = nil, resourceType: String? = nil) -> RequestBuilder { + open class func listAuditEventsWithRequestBuilder(startTime: String? = nil, endTime: String? = nil, resourceId: String? = nil, resourceType: String? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/audit-events" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil @@ -60,7 +60,7 @@ open class AuditTrailAPI { "endTime": endTime?.encodeToJSON(), "resourceId": resourceId?.encodeToJSON(), "resourceType": resourceType?.encodeToJSON(), - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ diff --git a/PublicApi/Classes/OpenAPIs/APIs/CatalogAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/CatalogAPI.swift index c55b3610..c673b5f8 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/CatalogAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/CatalogAPI.swift @@ -65,12 +65,12 @@ open class CatalogAPI { /** Get Destinations Catalog - - parameter pagination: (query) Required pagination parameters used to filter the Destinations catalog. This parameter exists in v1. + - parameter pagination: (query) Required pagination parameters used to filter the Destinations catalog. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func getDestinationsCatalog(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDestinationsCatalog200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func getDestinationsCatalog(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDestinationsCatalog200Response?, _ error: Error?) -> Void)) -> RequestTask { return getDestinationsCatalogWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -88,17 +88,17 @@ open class CatalogAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Required pagination parameters used to filter the Destinations catalog. This parameter exists in v1. + - parameter pagination: (query) Required pagination parameters used to filter the Destinations catalog. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func getDestinationsCatalogWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func getDestinationsCatalogWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/catalog/destinations" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -165,12 +165,12 @@ open class CatalogAPI { /** Get Sources Catalog - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func getSourcesCatalog(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetSourcesCatalog200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func getSourcesCatalog(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetSourcesCatalog200Response?, _ error: Error?) -> Void)) -> RequestTask { return getSourcesCatalogWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -188,17 +188,17 @@ open class CatalogAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func getSourcesCatalogWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func getSourcesCatalogWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/catalog/sources" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -265,12 +265,12 @@ open class CatalogAPI { /** Get Warehouses Catalog - - parameter pagination: (query) Required pagination params used to filter the Warehouses catalog. This parameter exists in v1. + - parameter pagination: (query) Optional pagination params used to filter the Warehouses catalog. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func getWarehousesCatalog(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetWarehousesCatalog200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func getWarehousesCatalog(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetWarehousesCatalog200Response?, _ error: Error?) -> Void)) -> RequestTask { return getWarehousesCatalogWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -288,17 +288,17 @@ open class CatalogAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Required pagination params used to filter the Warehouses catalog. This parameter exists in v1. + - parameter pagination: (query) Optional pagination params used to filter the Warehouses catalog. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func getWarehousesCatalogWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func getWarehousesCatalogWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/catalog/warehouses" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ diff --git a/PublicApi/Classes/OpenAPIs/APIs/ComputedTraitsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/ComputedTraitsAPI.swift new file mode 100644 index 00000000..3f66e8c8 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/ComputedTraitsAPI.swift @@ -0,0 +1,288 @@ +// +// ComputedTraitsAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class ComputedTraitsAPI { + + /** + Create Computed Trait + + - parameter spaceId: (path) + - parameter createComputedTraitAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createComputedTrait(spaceId: String, createComputedTraitAlphaInput: CreateComputedTraitAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateComputedTrait200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createComputedTraitWithRequestBuilder(spaceId: spaceId, createComputedTraitAlphaInput: createComputedTraitAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Computed Trait + - POST /spaces/{spaceId}/computed-traits + - Creates a Computed Trait • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Computed Trait feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Computed Trait Created` event in the [audit trail](/tag/Audit-Trail). Note: The definition for a Computed Trait created using the API is not editable through the Segment App. The rate limit for this endpoint is 10 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter createComputedTraitAlphaInput: (body) + - returns: RequestBuilder + */ + open class func createComputedTraitWithRequestBuilder(spaceId: String, createComputedTraitAlphaInput: CreateComputedTraitAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/computed-traits" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createComputedTraitAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get Computed Trait + + - parameter spaceId: (path) + - parameter id: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getComputedTrait(spaceId: String, id: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetComputedTrait200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getComputedTraitWithRequestBuilder(spaceId: spaceId, id: id).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Computed Trait + - GET /spaces/{spaceId}/computed-traits/{id} + - Returns the Computed Trait by id and spaceId • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Computed Trait feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 100 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - returns: RequestBuilder + */ + open class func getComputedTraitWithRequestBuilder(spaceId: String, id: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/computed-traits/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Computed Traits + + - parameter spaceId: (path) + - parameter pagination: (query) Information about the pagination of this response. [See pagination](https://docs.segmentapis.com/tag/Pagination/#section/Pagination-parameters) for more info. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listComputedTraits(spaceId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListComputedTraits200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listComputedTraitsWithRequestBuilder(spaceId: spaceId, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Computed Traits + - GET /spaces/{spaceId}/computed-traits + - Returns Computed Traits by spaceId. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Computed Trait feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter pagination: (query) Information about the pagination of this response. [See pagination](https://docs.segmentapis.com/tag/Pagination/#section/Pagination-parameters) for more info. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listComputedTraitsWithRequestBuilder(spaceId: String, pagination: PaginationInput? = nil) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/computed-traits" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Remove Computed Trait from Space + + - parameter spaceId: (path) + - parameter id: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func removeComputedTraitFromSpace(spaceId: String, id: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: RemoveComputedTraitFromSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return removeComputedTraitFromSpaceWithRequestBuilder(spaceId: spaceId, id: id).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Remove Computed Trait from Space + - DELETE /spaces/{spaceId}/computed-traits/{id} + - Deletes a Computed Trait by id and spaceId. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Computed Trait feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Computed Trait Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - returns: RequestBuilder + */ + open class func removeComputedTraitFromSpaceWithRequestBuilder(spaceId: String, id: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/computed-traits/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Update Computed Trait for Space + + - parameter spaceId: (path) + - parameter id: (path) + - parameter updateComputedTraitForSpaceAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func updateComputedTraitForSpace(spaceId: String, id: String, updateComputedTraitForSpaceAlphaInput: UpdateComputedTraitForSpaceAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: UpdateComputedTraitForSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return updateComputedTraitForSpaceWithRequestBuilder(spaceId: spaceId, id: id, updateComputedTraitForSpaceAlphaInput: updateComputedTraitForSpaceAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update Computed Trait for Space + - PATCH /spaces/{spaceId}/computed-traits/{id} + - Updates the Computed Trait. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Computed Trait feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Computed Trait Modified` event in the [audit trail](/tag/Audit-Trail). • Note that when a Computed Trait is updated, the Computed Trait will be locked from future edits until the changes have been incorporated. You can find more information [in the Segment docs](https://segment-docs.netlify.app/docs/unify/traits/computed-traits/#editing-realtime-traits). Note: The definition for a Computed Trait updated using the API is not editable through the Segment App. The rate limit for this endpoint is 10 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter id: (path) + - parameter updateComputedTraitForSpaceAlphaInput: (body) + - returns: RequestBuilder + */ + open class func updateComputedTraitForSpaceWithRequestBuilder(spaceId: String, id: String, updateComputedTraitForSpaceAlphaInput: UpdateComputedTraitForSpaceAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/computed-traits/{id}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: updateComputedTraitForSpaceAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/CustomerInsightsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/CustomerInsightsAPI.swift new file mode 100644 index 00000000..3a159e0e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/CustomerInsightsAPI.swift @@ -0,0 +1,61 @@ +// +// CustomerInsightsAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class CustomerInsightsAPI { + + /** + Create Download + + - parameter createDownloadAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createDownload(createDownloadAlphaInput: CreateDownloadAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateDownload200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createDownloadWithRequestBuilder(createDownloadAlphaInput: createDownloadAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Download + - POST /customer-insights/download + - Create Customer Insights Presigned URLsThe rate limit for this endpoint is 120 requests per day per workspaceId, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter createDownloadAlphaInput: (body) + - returns: RequestBuilder + */ + open class func createDownloadWithRequestBuilder(createDownloadAlphaInput: CreateDownloadAlphaInput) -> RequestBuilder { + let localVariablePath = "/customer-insights/download" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createDownloadAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/DbtAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/DbtAPI.swift new file mode 100644 index 00000000..f3ed27e9 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/DbtAPI.swift @@ -0,0 +1,61 @@ +// +// DbtAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class DbtAPI { + + /** + Create Dbt Model Sync Trigger + + - parameter createDbtModelSyncTriggerInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createDbtModelSyncTrigger(createDbtModelSyncTriggerInput: CreateDbtModelSyncTriggerInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateDbtModelSyncTrigger200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createDbtModelSyncTriggerWithRequestBuilder(createDbtModelSyncTriggerInput: createDbtModelSyncTriggerInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Dbt Model Sync Trigger + - POST /dbt-model-syncs/trigger + - Creates a trigger for a new dbt model sync for a Source. The rate limit for this endpoint is 10 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter createDbtModelSyncTriggerInput: (body) + - returns: RequestBuilder + */ + open class func createDbtModelSyncTriggerWithRequestBuilder(createDbtModelSyncTriggerInput: CreateDbtModelSyncTriggerInput) -> RequestBuilder { + let localVariablePath = "/dbt-model-syncs/trigger" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createDbtModelSyncTriggerInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/DeletionAndSuppressionAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/DeletionAndSuppressionAPI.swift index 6cd972b5..936823a6 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/DeletionAndSuppressionAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/DeletionAndSuppressionAPI.swift @@ -35,10 +35,11 @@ open class DeletionAndSuppressionAPI { /** Create Cloud Source Regulation - POST /regulations/cloudsources/{sourceId} - - Creates a Source-scoped regulation. Config API omitted fields: - `attributes`, - `userAgent` + - Creates a Source-scoped regulation. Please Note: Suppression rules at the Workspace level take precedence over those at the Source level. If a user has been suppressed at the Workspace level, any attempt to un-suppress at the Source level is not supported and the processing of the request will fail in Segment Config API omitted fields: - `attributes`, - `userAgent` Rate limit headers will be updated to reflect regulation-specific limits (tracked separately for Segment-only vs Segment & Destination regulation types): - X-RateLimit-Remaining: Remaining requests for the regulation type category - Segment-only Regulations: DELETE_INTERNAL, SUPPRESS_WITH_DELETE_INTERNAL, SUPPRESS_ONLY, UNSUPPRESS, DELETE_ARCHIVE_ONLY - Segment & Destination Regulations: DELETE_ONLY, SUPPRESS_WITH_DELETE - X-RateLimit-Reset: RFC 5322 timestamp for when the quota resets (for example, Tue, 31 Dec 2024 23:59:59 GMT) - BASIC: - type: http - name: token + - responseHeaders: [X-RateLimit-Remaining(String), X-RateLimit-Consumed(String), X-RateLimit-Reset(String)] - parameter sourceId: (path) - parameter createCloudSourceRegulationV1Input: (body) - returns: RequestBuilder @@ -87,10 +88,11 @@ open class DeletionAndSuppressionAPI { /** Create Source Regulation - POST /regulations/sources/{sourceId} - - Creates a Source-scoped regulation. When called, this endpoint may generate the `Source Regulation Created` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `attributes`, - `userAgent` + - Creates a Source-scoped regulation. Please Note: Suppression rules at the Workspace level take precedence over those at the Source level. If a user has been suppressed at the Workspace level, any attempt to un-suppress at the Source level is not supported and the processing of the request will fail in Segment • When called, this endpoint may generate the `Source Regulation Created` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `attributes`, - `userAgent` Rate limit headers will be updated to reflect regulation-specific limits (tracked separately for Segment-only vs Segment & Destination regulation types): - X-RateLimit-Remaining: Remaining requests for the regulation type category - Segment-only Regulations: DELETE_INTERNAL, SUPPRESS_WITH_DELETE_INTERNAL, SUPPRESS_ONLY, UNSUPPRESS, DELETE_ARCHIVE_ONLY - Segment & Destination Regulations: DELETE_ONLY, SUPPRESS_WITH_DELETE - X-RateLimit-Reset: RFC 5322 timestamp for when the quota resets (for example, Tue, 31 Dec 2024 23:59:59 GMT) - BASIC: - type: http - name: token + - responseHeaders: [X-RateLimit-Remaining(String), X-RateLimit-Consumed(String), X-RateLimit-Reset(String)] - parameter sourceId: (path) - parameter createSourceRegulationV1Input: (body) - returns: RequestBuilder @@ -138,10 +140,11 @@ open class DeletionAndSuppressionAPI { /** Create Workspace Regulation - POST /regulations - - Creates a Workspace-scoped regulation. When called, this endpoint may generate the `Workspace Regulation Created` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `attributes`, - `userAgent` + - Creates a Workspace-scoped regulation. • When called, this endpoint may generate the `Workspace Regulation Created` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `attributes`, - `userAgent` Rate limit headers will be updated to reflect regulation-specific limits (tracked separately for Segment-only vs Segment & Destination regulation types): - X-RateLimit-Remaining: Remaining requests for the regulation type category - Segment-only Regulations: DELETE_INTERNAL, SUPPRESS_WITH_DELETE_INTERNAL, SUPPRESS_ONLY, UNSUPPRESS, DELETE_ARCHIVE_ONLY - Segment & Destination Regulations: DELETE_ONLY, SUPPRESS_WITH_DELETE - X-RateLimit-Reset: RFC 5322 timestamp for when the quota resets (for example, Tue, 31 Dec 2024 23:59:59 GMT) - BASIC: - type: http - name: token + - responseHeaders: [X-RateLimit-Remaining(String), X-RateLimit-Consumed(String), X-RateLimit-Reset(String)] - parameter createWorkspaceRegulationV1Input: (body) - returns: RequestBuilder */ @@ -170,6 +173,7 @@ open class DeletionAndSuppressionAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ + @available(*, deprecated, message: "This operation is deprecated.") @discardableResult open class func deleteRegulation(regulateId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: DeleteRegulation200Response?, _ error: Error?) -> Void)) -> RequestTask { return deleteRegulationWithRequestBuilder(regulateId: regulateId).execute(apiResponseQueue) { result in @@ -185,13 +189,14 @@ open class DeletionAndSuppressionAPI { /** Delete Regulation - DELETE /regulations/{regulateId} - - Deletes a regulation from the Workspace. The regulation must be in the initialized state to be deleted. When called, this endpoint may generate the `Regulation Deleted` event in the [audit trail](/tag/Audit-Trail). + - Deletes a regulation from the Workspace. The regulation must be in the initialized state to be deleted. • When called, this endpoint may generate the `Regulation Deleted` event in the [audit trail](/tag/Audit-Trail). **DEPRECATED**: this endpoint has been deprecated according to the guidelines, and may experience reduced SLA guarantees. - BASIC: - type: http - name: token - parameter regulateId: (path) - returns: RequestBuilder */ + @available(*, deprecated, message: "This operation is deprecated.") open class func deleteRegulationWithRequestBuilder(regulateId: String) -> RequestBuilder { var localVariablePath = "/regulations/{regulateId}" let regulateIdPreEscape = "\(APIHelper.mapValueToPathItem(regulateId))" @@ -280,10 +285,12 @@ open class DeletionAndSuppressionAPI { * enum for parameter regulationTypes */ public enum RegulationTypes_listRegulationsFromSource: String, CaseIterable { + case deleteArchiveOnly = "DELETE_ARCHIVE_ONLY" case deleteInternal = "DELETE_INTERNAL" case deleteOnly = "DELETE_ONLY" case suppressOnly = "SUPPRESS_ONLY" case suppressWithDelete = "SUPPRESS_WITH_DELETE" + case suppressWithDeleteInternal = "SUPPRESS_WITH_DELETE_INTERNAL" case unsuppress = "UNSUPPRESS" } @@ -291,15 +298,15 @@ open class DeletionAndSuppressionAPI { List Regulations from Source - parameter sourceId: (path) - - parameter pagination: (query) Pagination parameters. This parameter exists in v1. - parameter status: (query) The status on which to filter returned regulations. This parameter exists in v1. (optional) - parameter regulationTypes: (query) The regulation types on which to filter returned regulations. This parameter exists in v1. (optional) + - parameter pagination: (query) Pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listRegulationsFromSource(sourceId: String, pagination: PaginationInput, status: Status_listRegulationsFromSource? = nil, regulationTypes: [RegulationTypes_listRegulationsFromSource]? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListRegulationsFromSource200Response?, _ error: Error?) -> Void)) -> RequestTask { - return listRegulationsFromSourceWithRequestBuilder(sourceId: sourceId, pagination: pagination, status: status, regulationTypes: regulationTypes).execute(apiResponseQueue) { result in + open class func listRegulationsFromSource(sourceId: String, status: Status_listRegulationsFromSource? = nil, regulationTypes: [RegulationTypes_listRegulationsFromSource]? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListRegulationsFromSource200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listRegulationsFromSourceWithRequestBuilder(sourceId: sourceId, status: status, regulationTypes: regulationTypes, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -312,17 +319,17 @@ open class DeletionAndSuppressionAPI { /** List Regulations from Source - GET /regulations/sources/{sourceId} - - Lists all Source-scoped regulations. + - Lists all Source-scoped regulations. Please note: List regulations for Source only returns deletion requests from the past 90 days. Deletion requests older than 90 days are not retained and will result in 404 resource not found. - BASIC: - type: http - name: token - parameter sourceId: (path) - - parameter pagination: (query) Pagination parameters. This parameter exists in v1. - parameter status: (query) The status on which to filter returned regulations. This parameter exists in v1. (optional) - parameter regulationTypes: (query) The regulation types on which to filter returned regulations. This parameter exists in v1. (optional) + - parameter pagination: (query) Pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listRegulationsFromSourceWithRequestBuilder(sourceId: String, pagination: PaginationInput, status: Status_listRegulationsFromSource? = nil, regulationTypes: [RegulationTypes_listRegulationsFromSource]? = nil) -> RequestBuilder { + open class func listRegulationsFromSourceWithRequestBuilder(sourceId: String, status: Status_listRegulationsFromSource? = nil, regulationTypes: [RegulationTypes_listRegulationsFromSource]? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/regulations/sources/{sourceId}" let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -334,7 +341,7 @@ open class DeletionAndSuppressionAPI { localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status?.encodeToJSON(), "regulationTypes": regulationTypes?.encodeToJSON(), - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -351,12 +358,12 @@ open class DeletionAndSuppressionAPI { /** List Suppressions - - parameter pagination: (query) Pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listSuppressions(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSuppressions200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listSuppressions(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSuppressions200Response?, _ error: Error?) -> Void)) -> RequestTask { return listSuppressionsWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -374,17 +381,17 @@ open class DeletionAndSuppressionAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listSuppressionsWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func listSuppressionsWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/suppressions" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -419,21 +426,22 @@ open class DeletionAndSuppressionAPI { case deleteOnly = "DELETE_ONLY" case suppressOnly = "SUPPRESS_ONLY" case suppressWithDelete = "SUPPRESS_WITH_DELETE" + case suppressWithDeleteInternal = "SUPPRESS_WITH_DELETE_INTERNAL" case unsuppress = "UNSUPPRESS" } /** List Workspace Regulations - - parameter pagination: (query) Pagination parameters. This parameter exists in v1. - parameter status: (query) The status on which to filter the returned regulations. This parameter exists in v1. (optional) - parameter regulationTypes: (query) The regulation types on which to filter returned regulations. This parameter exists in v1. (optional) + - parameter pagination: (query) Pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listWorkspaceRegulations(pagination: PaginationInput, status: Status_listWorkspaceRegulations? = nil, regulationTypes: [RegulationTypes_listWorkspaceRegulations]? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListWorkspaceRegulations200Response?, _ error: Error?) -> Void)) -> RequestTask { - return listWorkspaceRegulationsWithRequestBuilder(pagination: pagination, status: status, regulationTypes: regulationTypes).execute(apiResponseQueue) { result in + open class func listWorkspaceRegulations(status: Status_listWorkspaceRegulations? = nil, regulationTypes: [RegulationTypes_listWorkspaceRegulations]? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListWorkspaceRegulations200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listWorkspaceRegulationsWithRequestBuilder(status: status, regulationTypes: regulationTypes, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -446,16 +454,16 @@ open class DeletionAndSuppressionAPI { /** List Workspace Regulations - GET /regulations - - Lists all Workspace-scoped regulations. + - Lists all Workspace-scoped regulations. Please note: List Workspace regulations only returns deletion requests from the past 90 days. Deletion requests older than 90 days are not retained and will result in 404 resource not found. - BASIC: - type: http - name: token - - parameter pagination: (query) Pagination parameters. This parameter exists in v1. - parameter status: (query) The status on which to filter the returned regulations. This parameter exists in v1. (optional) - parameter regulationTypes: (query) The regulation types on which to filter returned regulations. This parameter exists in v1. (optional) + - parameter pagination: (query) Pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listWorkspaceRegulationsWithRequestBuilder(pagination: PaginationInput, status: Status_listWorkspaceRegulations? = nil, regulationTypes: [RegulationTypes_listWorkspaceRegulations]? = nil) -> RequestBuilder { + open class func listWorkspaceRegulationsWithRequestBuilder(status: Status_listWorkspaceRegulations? = nil, regulationTypes: [RegulationTypes_listWorkspaceRegulations]? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/regulations" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil @@ -464,7 +472,7 @@ open class DeletionAndSuppressionAPI { localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status?.encodeToJSON(), "regulationTypes": regulationTypes?.encodeToJSON(), - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ diff --git a/PublicApi/Classes/OpenAPIs/APIs/DeliveryOverviewAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/DeliveryOverviewAPI.swift new file mode 100644 index 00000000..bd04abbb --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/DeliveryOverviewAPI.swift @@ -0,0 +1,485 @@ +// +// DeliveryOverviewAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class DeliveryOverviewAPI { + + /** + * enum for parameter granularity + */ + public enum Granularity_getEgressFailedMetricsFromDeliveryOverview: String, CaseIterable { + case day = "DAY" + case hour = "HOUR" + case minute = "MINUTE" + } + + /** + Get Egress Failed Metrics from Delivery Overview + + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter destinationConfigId: (query) The id tied to a Workspace Destination. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and `spaceId`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and/or `spaceId` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Params to specify the page cursor and count. This parameter exists in beta. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getEgressFailedMetricsFromDeliveryOverview(sourceId: String, destinationConfigId: String, startTime: String, endTime: String, granularity: Granularity_getEgressFailedMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewDestinationFilterBy? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetEgressFailedMetricsFromDeliveryOverview200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getEgressFailedMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: sourceId, destinationConfigId: destinationConfigId, startTime: startTime, endTime: endTime, granularity: granularity, groupBy: groupBy, filter: filter, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Egress Failed Metrics from Delivery Overview + - GET /delivery-overview/failed-delivery + - Get events that failed to be delivered to Destination. + - BASIC: + - type: http + - name: token + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter destinationConfigId: (query) The id tied to a Workspace Destination. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and `spaceId`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and/or `spaceId` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Params to specify the page cursor and count. This parameter exists in beta. (optional) + - returns: RequestBuilder + */ + open class func getEgressFailedMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: String, destinationConfigId: String, startTime: String, endTime: String, granularity: Granularity_getEgressFailedMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewDestinationFilterBy? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/delivery-overview/failed-delivery" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "sourceId": sourceId.encodeToJSON(), + "destinationConfigId": destinationConfigId.encodeToJSON(), + "startTime": startTime.encodeToJSON(), + "endTime": endTime.encodeToJSON(), + "groupBy": groupBy?.encodeToJSON(), + "granularity": granularity.encodeToJSON(), + "filter": filter?.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + * enum for parameter granularity + */ + public enum Granularity_getEgressSuccessMetricsFromDeliveryOverview: String, CaseIterable { + case day = "DAY" + case hour = "HOUR" + case minute = "MINUTE" + } + + /** + Get Egress Success Metrics from Delivery Overview + + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter destinationConfigId: (query) The id tied to a Workspace Destination. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and `spaceId`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, `appVersion`, `subscription Id`, `activationId`, `audienceId`, or `spaceId` that can be applied in addition to a `group By`. If you would like to view retry attempts for a successful delivery, you can filter `discard Reason` from `successes.attempt.1` through `successes.attempt.10`. This parameter exists in beta. (optional) + - parameter pagination: (query) Params to specify the page cursor and count. This parameter exists in beta. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getEgressSuccessMetricsFromDeliveryOverview(sourceId: String, destinationConfigId: String, startTime: String, endTime: String, granularity: Granularity_getEgressSuccessMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewDestinationFilterBy? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetEgressFailedMetricsFromDeliveryOverview200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getEgressSuccessMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: sourceId, destinationConfigId: destinationConfigId, startTime: startTime, endTime: endTime, granularity: granularity, groupBy: groupBy, filter: filter, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Egress Success Metrics from Delivery Overview + - GET /delivery-overview/successful-delivery + - Get events successfully delivered to Destination. + - BASIC: + - type: http + - name: token + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter destinationConfigId: (query) The id tied to a Workspace Destination. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and `spaceId`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, `appVersion`, `subscription Id`, `activationId`, `audienceId`, or `spaceId` that can be applied in addition to a `group By`. If you would like to view retry attempts for a successful delivery, you can filter `discard Reason` from `successes.attempt.1` through `successes.attempt.10`. This parameter exists in beta. (optional) + - parameter pagination: (query) Params to specify the page cursor and count. This parameter exists in beta. (optional) + - returns: RequestBuilder + */ + open class func getEgressSuccessMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: String, destinationConfigId: String, startTime: String, endTime: String, granularity: Granularity_getEgressSuccessMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewDestinationFilterBy? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/delivery-overview/successful-delivery" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "sourceId": sourceId.encodeToJSON(), + "destinationConfigId": destinationConfigId.encodeToJSON(), + "startTime": startTime.encodeToJSON(), + "endTime": endTime.encodeToJSON(), + "groupBy": groupBy?.encodeToJSON(), + "granularity": granularity.encodeToJSON(), + "filter": filter?.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + * enum for parameter granularity + */ + public enum Granularity_getFilteredAtDestinationMetricsFromDeliveryOverview: String, CaseIterable { + case day = "DAY" + case hour = "HOUR" + case minute = "MINUTE" + } + + /** + Get Filtered At Destination Metrics from Delivery Overview + + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter destinationConfigId: (query) The id tied to a Workspace Destination. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and `spaceId`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and/or `spaceId` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Params to specify the page cursor and count. This parameter exists in beta. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getFilteredAtDestinationMetricsFromDeliveryOverview(sourceId: String, destinationConfigId: String, startTime: String, endTime: String, granularity: Granularity_getFilteredAtDestinationMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewDestinationFilterBy? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetEgressFailedMetricsFromDeliveryOverview200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getFilteredAtDestinationMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: sourceId, destinationConfigId: destinationConfigId, startTime: startTime, endTime: endTime, granularity: granularity, groupBy: groupBy, filter: filter, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Filtered At Destination Metrics from Delivery Overview + - GET /delivery-overview/filtered-at-destination + - Get events that were filtered at Destination. + - BASIC: + - type: http + - name: token + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter destinationConfigId: (query) The id tied to a Workspace Destination. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and `spaceId`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, `app Version`, `subscription Id`, `activationId`, `audienceId`, and/or `spaceId` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Params to specify the page cursor and count. This parameter exists in beta. (optional) + - returns: RequestBuilder + */ + open class func getFilteredAtDestinationMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: String, destinationConfigId: String, startTime: String, endTime: String, granularity: Granularity_getFilteredAtDestinationMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewDestinationFilterBy? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/delivery-overview/filtered-at-destination" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "sourceId": sourceId.encodeToJSON(), + "destinationConfigId": destinationConfigId.encodeToJSON(), + "startTime": startTime.encodeToJSON(), + "endTime": endTime.encodeToJSON(), + "groupBy": groupBy?.encodeToJSON(), + "granularity": granularity.encodeToJSON(), + "filter": filter?.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + * enum for parameter granularity + */ + public enum Granularity_getFilteredAtSourceMetricsFromDeliveryOverview: String, CaseIterable { + case day = "DAY" + case hour = "HOUR" + case minute = "MINUTE" + } + + /** + Get Filtered At Source Metrics from Delivery Overview + + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, and `app Version`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, and/or `app Version` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Optional params to specify the page cursor and count. This parameter exists in beta. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getFilteredAtSourceMetricsFromDeliveryOverview(sourceId: String, startTime: String, endTime: String, granularity: Granularity_getFilteredAtSourceMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewSourceFilterBy? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetEgressFailedMetricsFromDeliveryOverview200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getFilteredAtSourceMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: sourceId, startTime: startTime, endTime: endTime, granularity: granularity, groupBy: groupBy, filter: filter, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Filtered At Source Metrics from Delivery Overview + - GET /delivery-overview/filtered-at-source + - Get events that were filtered at Source. + - BASIC: + - type: http + - name: token + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, and `app Version`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, and/or `app Version` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Optional params to specify the page cursor and count. This parameter exists in beta. (optional) + - returns: RequestBuilder + */ + open class func getFilteredAtSourceMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: String, startTime: String, endTime: String, granularity: Granularity_getFilteredAtSourceMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewSourceFilterBy? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/delivery-overview/filtered-at-source" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "sourceId": sourceId.encodeToJSON(), + "startTime": startTime.encodeToJSON(), + "endTime": endTime.encodeToJSON(), + "groupBy": groupBy?.encodeToJSON(), + "granularity": granularity.encodeToJSON(), + "filter": filter?.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + * enum for parameter granularity + */ + public enum Granularity_getIngressFailedMetricsFromDeliveryOverview: String, CaseIterable { + case day = "DAY" + case hour = "HOUR" + case minute = "MINUTE" + } + + /** + Get Ingress Failed Metrics from Delivery Overview + + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, and/or `appVersion`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, and/or `app Version` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Optional params to specify the page cursor and count. This parameter exists in beta. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getIngressFailedMetricsFromDeliveryOverview(sourceId: String, startTime: String, endTime: String, granularity: Granularity_getIngressFailedMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewSourceFilterBy? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetEgressFailedMetricsFromDeliveryOverview200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getIngressFailedMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: sourceId, startTime: startTime, endTime: endTime, granularity: granularity, groupBy: groupBy, filter: filter, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Ingress Failed Metrics from Delivery Overview + - GET /delivery-overview/failed-on-ingest + - Get events that failed on ingest. + - BASIC: + - type: http + - name: token + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, `discard Reason`, and/or `appVersion`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, `discard Reason`, and/or `app Version` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Optional params to specify the page cursor and count. This parameter exists in beta. (optional) + - returns: RequestBuilder + */ + open class func getIngressFailedMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: String, startTime: String, endTime: String, granularity: Granularity_getIngressFailedMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewSourceFilterBy? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/delivery-overview/failed-on-ingest" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "sourceId": sourceId.encodeToJSON(), + "startTime": startTime.encodeToJSON(), + "endTime": endTime.encodeToJSON(), + "groupBy": groupBy?.encodeToJSON(), + "granularity": granularity.encodeToJSON(), + "filter": filter?.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + * enum for parameter granularity + */ + public enum Granularity_getIngressSuccessMetricsFromDeliveryOverview: String, CaseIterable { + case day = "DAY" + case hour = "HOUR" + case minute = "MINUTE" + } + + /** + Get Ingress Success Metrics from Delivery Overview + + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, and/or `app Version`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, and/or `app Version` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Optional params to specify the page cursor and count. This parameter exists in beta. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getIngressSuccessMetricsFromDeliveryOverview(sourceId: String, startTime: String, endTime: String, granularity: Granularity_getIngressSuccessMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewSuccessfullyReceivedFilterBy? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetEgressFailedMetricsFromDeliveryOverview200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getIngressSuccessMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: sourceId, startTime: startTime, endTime: endTime, granularity: granularity, groupBy: groupBy, filter: filter, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Ingress Success Metrics from Delivery Overview + - GET /delivery-overview/successfully-received + - Get events that were successfully received by Segment. + - BASIC: + - type: http + - name: token + - parameter sourceId: (query) The sourceId for the Workspace. This parameter exists in beta. + - parameter startTime: (query) The ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. This parameter exists in beta. + - parameter endTime: (query) The ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. This parameter exists in beta. + - parameter granularity: (query) The size of each bucket in the requested window. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 14 days - Oldest possible start time: 30 days in the past **Day**: - Max time range: 30 days - Oldest possible start time: 30 days in the past This parameter exists in beta. + - parameter groupBy: (query) A comma-delimited list of strings representing one or more dimensions to group the result by. Valid options are: `event Name`, `event Type`, and/or `app Version`. This parameter exists in beta. (optional) + - parameter filter: (query) An optional filter for `event Name`, `event Type`, and/or `app Version` that can be applied in addition to a `group By`. This parameter exists in beta. (optional) + - parameter pagination: (query) Optional params to specify the page cursor and count. This parameter exists in beta. (optional) + - returns: RequestBuilder + */ + open class func getIngressSuccessMetricsFromDeliveryOverviewWithRequestBuilder(sourceId: String, startTime: String, endTime: String, granularity: Granularity_getIngressSuccessMetricsFromDeliveryOverview, groupBy: [String]? = nil, filter: DeliveryOverviewSuccessfullyReceivedFilterBy? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/delivery-overview/successfully-received" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "sourceId": sourceId.encodeToJSON(), + "startTime": startTime.encodeToJSON(), + "endTime": endTime.encodeToJSON(), + "groupBy": groupBy?.encodeToJSON(), + "granularity": granularity.encodeToJSON(), + "filter": filter?.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/DestinationFiltersAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/DestinationFiltersAPI.swift index 37b791c4..30ec389a 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/DestinationFiltersAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/DestinationFiltersAPI.swift @@ -35,7 +35,7 @@ open class DestinationFiltersAPI { /** Create Filter for Destination - POST /destination/{destinationId}/filters - - Creates a filter in a Destination. When called, this endpoint may generate the `Destination Filter Created` event in the [audit trail](/tag/Audit-Trail). + - Creates a filter in a Destination. • When called, this endpoint may generate the `Destination Filter Created` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token @@ -123,12 +123,12 @@ open class DestinationFiltersAPI { List Filters from Destination - parameter destinationId: (path) - - parameter pagination: (query) Pagination options. This parameter exists in v1. + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listFiltersFromDestination(destinationId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListFiltersFromDestination200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listFiltersFromDestination(destinationId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListFiltersFromDestination200Response?, _ error: Error?) -> Void)) -> RequestTask { return listFiltersFromDestinationWithRequestBuilder(destinationId: destinationId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -147,10 +147,10 @@ open class DestinationFiltersAPI { - type: http - name: token - parameter destinationId: (path) - - parameter pagination: (query) Pagination options. This parameter exists in v1. + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listFiltersFromDestinationWithRequestBuilder(destinationId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listFiltersFromDestinationWithRequestBuilder(destinationId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/destination/{destinationId}/filters" let destinationIdPreEscape = "\(APIHelper.mapValueToPathItem(destinationId))" let destinationIdPostEscape = destinationIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -160,7 +160,7 @@ open class DestinationFiltersAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -244,7 +244,7 @@ open class DestinationFiltersAPI { /** Remove Filter from Destination - DELETE /destination/{destinationId}/filters/{filterId} - - Deletes a Destination filter. When called, this endpoint may generate the `Destination Filter Deleted` event in the [audit trail](/tag/Audit-Trail). + - Deletes a Destination filter. • When called, this endpoint may generate the `Destination Filter Deleted` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token @@ -300,7 +300,7 @@ open class DestinationFiltersAPI { /** Update Filter for Destination - PATCH /destination/{destinationId}/filters/{filterId} - - Updates a filter in a Destination. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Destination Filter Enabled * Destination Filter Disabled + - Updates a filter in a Destination. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Destination Filter Enabled * Destination Filter Disabled - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/DestinationsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/DestinationsAPI.swift index d0bb5dba..2e2ec80a 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/DestinationsAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/DestinationsAPI.swift @@ -34,7 +34,7 @@ open class DestinationsAPI { /** Create Destination - POST /destinations - - Creates a new Destination. When called, this endpoint may generate the `Integration Created` event in the [audit trail](/tag/Audit-Trail). + - Creates a new Destination. • When called, this endpoint may generate the `Integration Created` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token @@ -82,7 +82,7 @@ open class DestinationsAPI { /** Create Destination Subscription - POST /destinations/{destinationId}/subscriptions - - Creates a new Destination subscription. + - Creates a new Destination subscription. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Destination Subscriptions feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 5 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -133,7 +133,7 @@ open class DestinationsAPI { /** Delete Destination - DELETE /destinations/{destinationId} - - Deletes an existing Destination. When called, this endpoint may generate the `Integration Deleted` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `catalogId` + - Deletes an existing Destination. • When called, this endpoint may generate the `Integration Deleted` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `catalogId` - BASIC: - type: http - name: token @@ -234,7 +234,7 @@ open class DestinationsAPI { /** Get Subscription from Destination - GET /destinations/{destinationId}/subscriptions/{id} - - Gets a Destination subscription by id. + - Gets a Destination subscription by id. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Destination Subscriptions feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -301,7 +301,7 @@ open class DestinationsAPI { /** List Delivery Metrics Summary from Destination - GET /destinations/{destinationId}/delivery-metrics - - Get event delivery metrics summary from a Destination. Based on the granularity, there are restrictions on the time range you can query: **Minute Granularity**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour Granularity**: - Max Time range: 1 week - Oldest possible start time: 10 days in the past **Day Granularity**: - Max time range: 60 days - Oldest possible start time: 60 days in the past + - Get an event delivery metrics summary from a Destination. Based on the granularity chosen, there are restrictions on the time range you can query: **Minute**: - Max time range: 4 hours - Oldest possible start time: 48 hours in the past **Hour**: - Max Time range: 7 days - Oldest possible start time: 7 days in the past **Day**: - Max time range: 14 days - Oldest possible start time: 14 days in the past - BASIC: - type: http - name: token @@ -342,12 +342,12 @@ open class DestinationsAPI { /** List Destinations - - parameter pagination: (query) Required pagination params for the request. This parameter exists in v1. + - parameter pagination: (query) Required pagination params for the request. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listDestinations(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListDestinations200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listDestinations(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListDestinations200Response?, _ error: Error?) -> Void)) -> RequestTask { return listDestinationsWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -365,17 +365,17 @@ open class DestinationsAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Required pagination params for the request. This parameter exists in v1. + - parameter pagination: (query) Required pagination params for the request. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listDestinationsWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func listDestinationsWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/destinations" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -393,12 +393,12 @@ open class DestinationsAPI { List Subscriptions from Destination - parameter destinationId: (path) - - parameter pagination: (query) Pagination options. This parameter exists in alpha. + - parameter pagination: (query) Pagination options. This parameter exists in alpha. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listSubscriptionsFromDestination(destinationId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSubscriptionsFromDestination200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listSubscriptionsFromDestination(destinationId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSubscriptionsFromDestination200Response?, _ error: Error?) -> Void)) -> RequestTask { return listSubscriptionsFromDestinationWithRequestBuilder(destinationId: destinationId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -412,15 +412,15 @@ open class DestinationsAPI { /** List Subscriptions from Destination - GET /destinations/{destinationId}/subscriptions - - Lists subscriptions for a Destination. + - Lists subscriptions for a Destination. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Destination Subscriptions feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token - parameter destinationId: (path) - - parameter pagination: (query) Pagination options. This parameter exists in alpha. + - parameter pagination: (query) Pagination options. This parameter exists in alpha. (optional) - returns: RequestBuilder */ - open class func listSubscriptionsFromDestinationWithRequestBuilder(destinationId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listSubscriptionsFromDestinationWithRequestBuilder(destinationId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/destinations/{destinationId}/subscriptions" let destinationIdPreEscape = "\(APIHelper.mapValueToPathItem(destinationId))" let destinationIdPostEscape = destinationIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -430,7 +430,7 @@ open class DestinationsAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -467,7 +467,7 @@ open class DestinationsAPI { /** Remove Subscription from Destination - DELETE /destinations/{destinationId}/subscriptions/{id} - - Deletes an existing Destination subscription. + - Deletes an existing Destination subscription. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Destination Subscriptions feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 5 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -522,7 +522,7 @@ open class DestinationsAPI { /** Update Destination - PATCH /destinations/{destinationId} - - Updates an existing Destination. **Note**: if you attempt to update read-only settings for your destination you'll encounter the following behavior: * If only read-only properties are being updated, the endpoint will return an HTTP 400 error. * If there's a mix of writable and read-only properties in the payload, the request will be accepted, the writable properties will be updated and the read-only properties ignored. When called, this endpoint may generate the `Integration Disabled` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `updateMask` + - Updates an existing Destination. **Note**: if you attempt to update read-only settings for your destination you'll encounter the following behavior: * If only read-only properties are being updated, the endpoint will return an HTTP 400 error. * If there's a mix of writable and read-only properties in the payload, the request will be accepted, the writable properties will be updated and the read-only properties ignored. • When called, this endpoint may generate the `Integration Disabled` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `updateMask` - BASIC: - type: http - name: token @@ -575,7 +575,7 @@ open class DestinationsAPI { /** Update Subscription for Destination - PATCH /destinations/{destinationId}/subscriptions/{id} - - Updates an existing Destination subscription. + - Updates an existing Destination subscription. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Destination Subscriptions feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 5 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/EdgeFunctionsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/EdgeFunctionsAPI.swift deleted file mode 100644 index 24c242ea..00000000 --- a/PublicApi/Classes/OpenAPIs/APIs/EdgeFunctionsAPI.swift +++ /dev/null @@ -1,216 +0,0 @@ -// -// EdgeFunctionsAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class EdgeFunctionsAPI { - - /** - Create Edge Functions - - - parameter sourceId: (path) - - parameter createEdgeFunctionsAlphaInput: (body) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func createEdgeFunctions(sourceId: String, createEdgeFunctionsAlphaInput: CreateEdgeFunctionsAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateEdgeFunctions200Response?, _ error: Error?) -> Void)) -> RequestTask { - return createEdgeFunctionsWithRequestBuilder(sourceId: sourceId, createEdgeFunctionsAlphaInput: createEdgeFunctionsAlphaInput).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - Create Edge Functions - - POST /sources/{sourceId}/edge-functions - - Create EdgeFunctions for your Source, given a valid upload URL for an Edge Functions bundle. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Edge Functions feature enabled. Please reach out to your customer success manager for more information. - - BASIC: - - type: http - - name: token - - parameter sourceId: (path) - - parameter createEdgeFunctionsAlphaInput: (body) - - returns: RequestBuilder - */ - open class func createEdgeFunctionsWithRequestBuilder(sourceId: String, createEdgeFunctionsAlphaInput: CreateEdgeFunctionsAlphaInput) -> RequestBuilder { - var localVariablePath = "/sources/{sourceId}/edge-functions" - let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" - let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{sourceId}", with: sourceIdPostEscape, options: .literal, range: nil) - let localVariableURLString = PublicApiAPI.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createEdgeFunctionsAlphaInput) - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) - } - - /** - Disable Edge Functions - - - parameter sourceId: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func disableEdgeFunctions(sourceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: DisableEdgeFunctions200Response?, _ error: Error?) -> Void)) -> RequestTask { - return disableEdgeFunctionsWithRequestBuilder(sourceId: sourceId).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - Disable Edge Functions - - PATCH /sources/{sourceId}/edge-functions/disable - - Disable Edge Functions for your Source. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Edge Functions feature enabled. Please reach out to your customer success manager for more information. - - BASIC: - - type: http - - name: token - - parameter sourceId: (path) - - returns: RequestBuilder - */ - open class func disableEdgeFunctionsWithRequestBuilder(sourceId: String) -> RequestBuilder { - var localVariablePath = "/sources/{sourceId}/edge-functions/disable" - let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" - let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{sourceId}", with: sourceIdPostEscape, options: .literal, range: nil) - let localVariableURLString = PublicApiAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) - } - - /** - Generate Upload URL for Edge Functions - - - parameter sourceId: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func generateUploadURLForEdgeFunctions(sourceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GenerateUploadURLForEdgeFunctions200Response?, _ error: Error?) -> Void)) -> RequestTask { - return generateUploadURLForEdgeFunctionsWithRequestBuilder(sourceId: sourceId).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - Generate Upload URL for Edge Functions - - POST /sources/{sourceId}/edge-functions/upload-url - - Generate a temporary upload URL, that can be used to upload an Edge Functions bundle. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Edge Functions feature enabled. Please reach out to your customer success manager for more information. - - BASIC: - - type: http - - name: token - - parameter sourceId: (path) - - returns: RequestBuilder - */ - open class func generateUploadURLForEdgeFunctionsWithRequestBuilder(sourceId: String) -> RequestBuilder { - var localVariablePath = "/sources/{sourceId}/edge-functions/upload-url" - let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" - let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{sourceId}", with: sourceIdPostEscape, options: .literal, range: nil) - let localVariableURLString = PublicApiAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) - } - - /** - Get Latest from Edge Functions - - - parameter sourceId: (path) - - parameter apiResponseQueue: The queue on which api response is dispatched. - - parameter completion: completion handler to receive the data and the error objects - */ - @discardableResult - open class func getLatestFromEdgeFunctions(sourceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetLatestFromEdgeFunctions200Response?, _ error: Error?) -> Void)) -> RequestTask { - return getLatestFromEdgeFunctionsWithRequestBuilder(sourceId: sourceId).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - /** - Get Latest from Edge Functions - - GET /sources/{sourceId}/edge-functions/latest - - Get the latest Edge Functions for your Source. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Edge Functions feature enabled. Please reach out to your customer success manager for more information. - - BASIC: - - type: http - - name: token - - parameter sourceId: (path) - - returns: RequestBuilder - */ - open class func getLatestFromEdgeFunctionsWithRequestBuilder(sourceId: String) -> RequestBuilder { - var localVariablePath = "/sources/{sourceId}/edge-functions/latest" - let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" - let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{sourceId}", with: sourceIdPostEscape, options: .literal, range: nil) - let localVariableURLString = PublicApiAPI.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - let localVariableUrlComponents = URLComponents(string: localVariableURLString) - - let localVariableNillableHeaders: [String: Any?] = [ - : - ] - - let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - - let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() - - return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) - } -} diff --git a/PublicApi/Classes/OpenAPIs/APIs/EventsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/EventsAPI.swift index 1e6ec484..fc1e856e 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/EventsAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/EventsAPI.swift @@ -51,7 +51,7 @@ open class EventsAPI { /** Get Events Volume from Workspace - GET /events/volume - - Enumerates the Workspace event volumes over time in minute increments. The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Enumerates the Workspace event volumes over time in minute increments. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/FunctionsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/FunctionsAPI.swift index 6600d72a..dae39e33 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/FunctionsAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/FunctionsAPI.swift @@ -34,7 +34,7 @@ open class FunctionsAPI { /** Create Function - POST /functions - - Creates a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - Creates a Function. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -81,7 +81,7 @@ open class FunctionsAPI { /** Create Function Deployment - POST /functions/{functionId}/deploy - - Deploys a Function. Only applicable to Source Function instances. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - Deploys a Function. Only applicable to Source Function instances. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -109,6 +109,53 @@ open class FunctionsAPI { return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } + /** + Create Insert Function Instance + + - parameter createInsertFunctionInstanceAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createInsertFunctionInstance(createInsertFunctionInstanceAlphaInput: CreateInsertFunctionInstanceAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateInsertFunctionInstance200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createInsertFunctionInstanceWithRequestBuilder(createInsertFunctionInstanceAlphaInput: createInsertFunctionInstanceAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Insert Function Instance + - POST /insert-function-instances + - Creates an insert Function instance connected to the given Destination. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter createInsertFunctionInstanceAlphaInput: (body) + - returns: RequestBuilder + */ + open class func createInsertFunctionInstanceWithRequestBuilder(createInsertFunctionInstanceAlphaInput: CreateInsertFunctionInstanceAlphaInput) -> RequestBuilder { + let localVariablePath = "/insert-function-instances" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createInsertFunctionInstanceAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + /** Delete Function @@ -131,7 +178,7 @@ open class FunctionsAPI { /** Delete Function - DELETE /functions/{functionId} - - Deletes a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - Deletes a Function. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -159,6 +206,56 @@ open class FunctionsAPI { return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } + /** + Delete Insert Function Instance + + - parameter instanceId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func deleteInsertFunctionInstance(instanceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: DeleteInsertFunctionInstance200Response?, _ error: Error?) -> Void)) -> RequestTask { + return deleteInsertFunctionInstanceWithRequestBuilder(instanceId: instanceId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete Insert Function Instance + - DELETE /insert-function-instances/{instanceId} + - Deletes an insert Function instance. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter instanceId: (path) + - returns: RequestBuilder + */ + open class func deleteInsertFunctionInstanceWithRequestBuilder(instanceId: String) -> RequestBuilder { + var localVariablePath = "/insert-function-instances/{instanceId}" + let instanceIdPreEscape = "\(APIHelper.mapValueToPathItem(instanceId))" + let instanceIdPostEscape = instanceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{instanceId}", with: instanceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + /** Get Function @@ -181,7 +278,7 @@ open class FunctionsAPI { /** Get Function - GET /functions/{functionId} - - Gets a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - Gets a Function. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -209,25 +306,188 @@ open class FunctionsAPI { return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } + /** + Get Function Version + + - parameter functionId: (path) + - parameter versionId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getFunctionVersion(functionId: String, versionId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetFunctionVersion200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getFunctionVersionWithRequestBuilder(functionId: functionId, versionId: versionId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Function Version + - GET /functions/{functionId}/versions/{versionId} + - Gets a Function version. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter functionId: (path) + - parameter versionId: (path) + - returns: RequestBuilder + */ + open class func getFunctionVersionWithRequestBuilder(functionId: String, versionId: String) -> RequestBuilder { + var localVariablePath = "/functions/{functionId}/versions/{versionId}" + let functionIdPreEscape = "\(APIHelper.mapValueToPathItem(functionId))" + let functionIdPostEscape = functionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{functionId}", with: functionIdPostEscape, options: .literal, range: nil) + let versionIdPreEscape = "\(APIHelper.mapValueToPathItem(versionId))" + let versionIdPostEscape = versionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{versionId}", with: versionIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get Insert Function Instance + + - parameter instanceId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getInsertFunctionInstance(instanceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetInsertFunctionInstance200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getInsertFunctionInstanceWithRequestBuilder(instanceId: instanceId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Insert Function Instance + - GET /insert-function-instances/{instanceId} + - Gets an insert Function instance. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter instanceId: (path) + - returns: RequestBuilder + */ + open class func getInsertFunctionInstanceWithRequestBuilder(instanceId: String) -> RequestBuilder { + var localVariablePath = "/insert-function-instances/{instanceId}" + let instanceIdPreEscape = "\(APIHelper.mapValueToPathItem(instanceId))" + let instanceIdPostEscape = instanceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{instanceId}", with: instanceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Function Versions + + - parameter functionId: (path) + - parameter pagination: (query) Pagination parameters. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listFunctionVersions(functionId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListFunctionVersions200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listFunctionVersionsWithRequestBuilder(functionId: functionId, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Function Versions + - GET /functions/{functionId}/versions + - Lists versions for a Function in a Workspace. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter functionId: (path) + - parameter pagination: (query) Pagination parameters. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listFunctionVersionsWithRequestBuilder(functionId: String, pagination: PaginationInput? = nil) -> RequestBuilder { + var localVariablePath = "/functions/{functionId}/versions" + let functionIdPreEscape = "\(APIHelper.mapValueToPathItem(functionId))" + let functionIdPostEscape = functionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{functionId}", with: functionIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + /** * enum for parameter resourceType */ public enum ResourceType_listFunctions: String, CaseIterable { case destination = "DESTINATION" + case insertDestination = "INSERT_DESTINATION" + case insertSource = "INSERT_SOURCE" + case insertTransformation = "INSERT_TRANSFORMATION" case source = "SOURCE" } /** List Functions - - parameter pagination: (query) Pagination parameters. This parameter exists in v1. - parameter resourceType: (query) The Function type. Config API note: equal to `type`. This parameter exists in v1. + - parameter pagination: (query) Pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listFunctions(pagination: PaginationInput, resourceType: ResourceType_listFunctions, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListFunctions200Response?, _ error: Error?) -> Void)) -> RequestTask { - return listFunctionsWithRequestBuilder(pagination: pagination, resourceType: resourceType).execute(apiResponseQueue) { result in + open class func listFunctions(resourceType: ResourceType_listFunctions, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListFunctions200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listFunctionsWithRequestBuilder(resourceType: resourceType, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -240,22 +500,22 @@ open class FunctionsAPI { /** List Functions - GET /functions - - Lists all Functions in a Workspace. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - Lists all Functions in a Workspace. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token - - parameter pagination: (query) Pagination parameters. This parameter exists in v1. - parameter resourceType: (query) The Function type. Config API note: equal to `type`. This parameter exists in v1. + - parameter pagination: (query) Pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listFunctionsWithRequestBuilder(pagination: PaginationInput, resourceType: ResourceType_listFunctions) -> RequestBuilder { + open class func listFunctionsWithRequestBuilder(resourceType: ResourceType_listFunctions, pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/functions" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), "resourceType": resourceType.encodeToJSON(), ]) @@ -270,6 +530,111 @@ open class FunctionsAPI { return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } + /** + List Insert Function Instances + + - parameter functionId: (query) The insert Function class id to lookup. This parameter exists in alpha. + - parameter pagination: (query) Pagination parameters. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listInsertFunctionInstances(functionId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListInsertFunctionInstances200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listInsertFunctionInstancesWithRequestBuilder(functionId: functionId, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Insert Function Instances + - GET /insert-function-instances + - Lists all insert Function instances connected to the given insert Function. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter functionId: (query) The insert Function class id to lookup. This parameter exists in alpha. + - parameter pagination: (query) Pagination parameters. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listInsertFunctionInstancesWithRequestBuilder(functionId: String, pagination: PaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/insert-function-instances" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + "functionId": functionId.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Restore Function Version + + - parameter functionId: (path) + - parameter restoreFunctionVersionAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func restoreFunctionVersion(functionId: String, restoreFunctionVersionAlphaInput: RestoreFunctionVersionAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: RestoreFunctionVersion200Response?, _ error: Error?) -> Void)) -> RequestTask { + return restoreFunctionVersionWithRequestBuilder(functionId: functionId, restoreFunctionVersionAlphaInput: restoreFunctionVersionAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Restore Function Version + - POST /functions/{functionId}/versions + - Restore an old Function version as the latest version. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter functionId: (path) + - parameter restoreFunctionVersionAlphaInput: (body) + - returns: RequestBuilder + */ + open class func restoreFunctionVersionWithRequestBuilder(functionId: String, restoreFunctionVersionAlphaInput: RestoreFunctionVersionAlphaInput) -> RequestBuilder { + var localVariablePath = "/functions/{functionId}/versions" + let functionIdPreEscape = "\(APIHelper.mapValueToPathItem(functionId))" + let functionIdPostEscape = functionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{functionId}", with: functionIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: restoreFunctionVersionAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + /** Update Function @@ -293,7 +658,7 @@ open class FunctionsAPI { /** Update Function - PATCH /functions/{functionId} - - Updates a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. Config API omitted fields: - `updateMask` + - Updates a Function. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. Config API omitted fields: - `updateMask` - BASIC: - type: http - name: token @@ -321,4 +686,56 @@ open class FunctionsAPI { return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } + + /** + Update Insert Function Instance + + - parameter instanceId: (path) + - parameter updateInsertFunctionInstanceAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func updateInsertFunctionInstance(instanceId: String, updateInsertFunctionInstanceAlphaInput: UpdateInsertFunctionInstanceAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: UpdateInsertFunctionInstance200Response?, _ error: Error?) -> Void)) -> RequestTask { + return updateInsertFunctionInstanceWithRequestBuilder(instanceId: instanceId, updateInsertFunctionInstanceAlphaInput: updateInsertFunctionInstanceAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update Insert Function Instance + - PATCH /insert-function-instances/{instanceId} + - Updates an insert Function instance connected to the given Destination. • In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter instanceId: (path) + - parameter updateInsertFunctionInstanceAlphaInput: (body) + - returns: RequestBuilder + */ + open class func updateInsertFunctionInstanceWithRequestBuilder(instanceId: String, updateInsertFunctionInstanceAlphaInput: UpdateInsertFunctionInstanceAlphaInput) -> RequestBuilder { + var localVariablePath = "/insert-function-instances/{instanceId}" + let instanceIdPreEscape = "\(APIHelper.mapValueToPathItem(instanceId))" + let instanceIdPostEscape = instanceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{instanceId}", with: instanceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: updateInsertFunctionInstanceAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } } diff --git a/PublicApi/Classes/OpenAPIs/APIs/IAMGroupsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/IAMGroupsAPI.swift index eb6a5fa5..84b5c83c 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/IAMGroupsAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/IAMGroupsAPI.swift @@ -35,7 +35,7 @@ open class IAMGroupsAPI { /** Add Permissions to User Group - POST /groups/{userGroupId}/permissions - - Adds a list of access permissions to a user group. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Policy Created * User Group Policy Updated The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Adds a list of access permissions to a user group. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Policy Created * User Group Policy Updated The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -87,7 +87,7 @@ open class IAMGroupsAPI { /** Add Users to User Group - POST /groups/{userGroupId}/users - - Adds a list of users or invites to a user group. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Subjects Added to Group * User Added To User Group The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Adds a list of users or invites to a user group. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Subjects Added to Group * User Added To User Group The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -138,7 +138,7 @@ open class IAMGroupsAPI { /** Create User Group - POST /groups - - Creates a user group. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * User Group Created * Policy Created The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Creates a user group. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* User Group Created * Policy Created The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -185,7 +185,7 @@ open class IAMGroupsAPI { /** Delete User Group - DELETE /groups/{userGroupId} - - Removes a user group from a Workspace. When called, this endpoint may generate the `User Group Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Removes a user group from a Workspace. • When called, this endpoint may generate the `User Group Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -267,12 +267,12 @@ open class IAMGroupsAPI { List Invites from User Group - parameter userGroupId: (path) - - parameter pagination: (query) Pagination for invites to the group. This parameter exists in v1. + - parameter pagination: (query) Pagination for invites to the group. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listInvitesFromUserGroup(userGroupId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListInvitesFromUserGroup200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listInvitesFromUserGroup(userGroupId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListInvitesFromUserGroup200Response?, _ error: Error?) -> Void)) -> RequestTask { return listInvitesFromUserGroupWithRequestBuilder(userGroupId: userGroupId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -291,10 +291,10 @@ open class IAMGroupsAPI { - type: http - name: token - parameter userGroupId: (path) - - parameter pagination: (query) Pagination for invites to the group. This parameter exists in v1. + - parameter pagination: (query) Pagination for invites to the group. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listInvitesFromUserGroupWithRequestBuilder(userGroupId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listInvitesFromUserGroupWithRequestBuilder(userGroupId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/groups/{userGroupId}/invites" let userGroupIdPreEscape = "\(APIHelper.mapValueToPathItem(userGroupId))" let userGroupIdPostEscape = userGroupIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -304,7 +304,7 @@ open class IAMGroupsAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -321,12 +321,12 @@ open class IAMGroupsAPI { /** List User Groups - - parameter pagination: (query) Pagination for user groups. This parameter exists in v1. + - parameter pagination: (query) Pagination for user groups. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listUserGroups(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListUserGroups200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listUserGroups(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListUserGroups200Response?, _ error: Error?) -> Void)) -> RequestTask { return listUserGroupsWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -344,17 +344,17 @@ open class IAMGroupsAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Pagination for user groups. This parameter exists in v1. + - parameter pagination: (query) Pagination for user groups. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listUserGroupsWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func listUserGroupsWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/groups" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -372,12 +372,12 @@ open class IAMGroupsAPI { List Users from User Group - parameter userGroupId: (path) - - parameter pagination: (query) Pagination for members of a group. This parameter exists in v1. + - parameter pagination: (query) Pagination for members of a group. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listUsersFromUserGroup(userGroupId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListUsersFromUserGroup200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listUsersFromUserGroup(userGroupId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListUsersFromUserGroup200Response?, _ error: Error?) -> Void)) -> RequestTask { return listUsersFromUserGroupWithRequestBuilder(userGroupId: userGroupId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -396,10 +396,10 @@ open class IAMGroupsAPI { - type: http - name: token - parameter userGroupId: (path) - - parameter pagination: (query) Pagination for members of a group. This parameter exists in v1. + - parameter pagination: (query) Pagination for members of a group. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listUsersFromUserGroupWithRequestBuilder(userGroupId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listUsersFromUserGroupWithRequestBuilder(userGroupId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/groups/{userGroupId}/users" let userGroupIdPreEscape = "\(APIHelper.mapValueToPathItem(userGroupId))" let userGroupIdPostEscape = userGroupIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -409,7 +409,7 @@ open class IAMGroupsAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -446,7 +446,7 @@ open class IAMGroupsAPI { /** Remove Users from User Group - DELETE /group/{userGroupId}/users - - Removes one or multiple users or invites from a user group by email. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Group Memberships Deleted * User Removed From User Group The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Removes one or multiple users or invites from a user group by email. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Group Memberships Deleted * User Removed From User Group The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -501,7 +501,7 @@ open class IAMGroupsAPI { /** Replace Permissions for User Group - PUT /groups/{userGroupId}/permissions - - Updates the list of access permissions for a user group. When called, this endpoint may generate the `Policy Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Updates the list of access permissions for a user group. • When called, this endpoint may generate the `Policy Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -553,7 +553,7 @@ open class IAMGroupsAPI { /** Replace Users in User Group - PUT /group/{userGroupId}/users - - Replaces the members of a user group by email. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Subjects Added to Group * User Added To User Group * Group Memberships Deleted The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Replaces the members of a user group by email. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Subjects Added to Group * User Added To User Group * Group Memberships Deleted The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -605,7 +605,7 @@ open class IAMGroupsAPI { /** Update User Group - PATCH /groups/{userGroupId} - - Updates a user group for a Workspace. When called, this endpoint may generate the `User Group Updated` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Updates a user group for a Workspace. • When called, this endpoint may generate the `User Group Updated` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/IAMRolesAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/IAMRolesAPI.swift index 81587f40..8f7adac4 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/IAMRolesAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/IAMRolesAPI.swift @@ -15,12 +15,12 @@ open class IAMRolesAPI { /** List Roles - - parameter pagination: (query) Pagination for roles. This parameter exists in v1. + - parameter pagination: (query) Pagination for roles. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listRoles(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListRoles200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listRoles(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListRoles200Response?, _ error: Error?) -> Void)) -> RequestTask { return listRolesWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -38,17 +38,17 @@ open class IAMRolesAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Pagination for roles. This parameter exists in v1. + - parameter pagination: (query) Pagination for roles. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listRolesWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func listRolesWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/roles" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ diff --git a/PublicApi/Classes/OpenAPIs/APIs/IAMUsersAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/IAMUsersAPI.swift index 53a1dc82..a88c4416 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/IAMUsersAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/IAMUsersAPI.swift @@ -35,7 +35,7 @@ open class IAMUsersAPI { /** Add Permissions to User - POST /users/{userId}/permissions - - Adds a list of access permissions to a user. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Policy Created * User Policy Updated The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Adds a list of access permissions to a user. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Policy Created * User Policy Updated The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -72,7 +72,7 @@ open class IAMUsersAPI { - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func createInvites(createInvitesV1Input: CreateInvitesV1Input, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateInvites200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func createInvites(createInvitesV1Input: CreateInvitesV1Input, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateInvites201Response?, _ error: Error?) -> Void)) -> RequestTask { return createInvitesWithRequestBuilder(createInvitesV1Input: createInvitesV1Input).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -86,14 +86,14 @@ open class IAMUsersAPI { /** Create Invites - POST /invites - - Invites a list of users to join a Workspace. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Non-Segment User Invited to Workspace * Policy Created * New Segment User Invited to Workspace Config API omitted fields: - `parent` The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Invites a list of users to join a Workspace. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Non-Segment User Invited to Workspace * Policy Created * New Segment User Invited to Workspace Config API omitted fields: - `parent` The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token - parameter createInvitesV1Input: (body) - - returns: RequestBuilder + - returns: RequestBuilder */ - open class func createInvitesWithRequestBuilder(createInvitesV1Input: CreateInvitesV1Input) -> RequestBuilder { + open class func createInvitesWithRequestBuilder(createInvitesV1Input: CreateInvitesV1Input) -> RequestBuilder { let localVariablePath = "/invites" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createInvitesV1Input) @@ -106,7 +106,7 @@ open class IAMUsersAPI { let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } @@ -133,7 +133,7 @@ open class IAMUsersAPI { /** Delete Invites - DELETE /invites - - Removes a list of invitations to join a Workspace. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Invite Deleted * Group Memberships Deleted The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Removes a list of invitations to join a Workspace. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Invite Deleted * Group Memberships Deleted The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -183,7 +183,7 @@ open class IAMUsersAPI { /** Delete Users - DELETE /users - - Removes one or multiple users. When called, this endpoint may generate the `Group Memberships Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Removes one or multiple users. • When called, this endpoint may generate the `Group Memberships Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -264,12 +264,12 @@ open class IAMUsersAPI { /** List Invites - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listInvites(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListInvites200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listInvites(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListInvites200Response?, _ error: Error?) -> Void)) -> RequestTask { return listInvitesWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -287,17 +287,17 @@ open class IAMUsersAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listInvitesWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func listInvitesWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/invites" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -315,12 +315,12 @@ open class IAMUsersAPI { List User Groups from User - parameter userId: (path) - - parameter pagination: (query) Pagination for groups. This parameter exists in v1. + - parameter pagination: (query) Pagination for groups. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listUserGroupsFromUser(userId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListUserGroupsFromUser200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listUserGroupsFromUser(userId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListUserGroupsFromUser200Response?, _ error: Error?) -> Void)) -> RequestTask { return listUserGroupsFromUserWithRequestBuilder(userId: userId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -339,10 +339,10 @@ open class IAMUsersAPI { - type: http - name: token - parameter userId: (path) - - parameter pagination: (query) Pagination for groups. This parameter exists in v1. + - parameter pagination: (query) Pagination for groups. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listUserGroupsFromUserWithRequestBuilder(userId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listUserGroupsFromUserWithRequestBuilder(userId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/users/{userId}/groups" let userIdPreEscape = "\(APIHelper.mapValueToPathItem(userId))" let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -352,7 +352,7 @@ open class IAMUsersAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -369,12 +369,12 @@ open class IAMUsersAPI { /** List Users - - parameter pagination: (query) Pagination for users. This parameter exists in v1. + - parameter pagination: (query) Pagination for users. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listUsers(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListUsers200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listUsers(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListUsers200Response?, _ error: Error?) -> Void)) -> RequestTask { return listUsersWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -392,17 +392,17 @@ open class IAMUsersAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Pagination for users. This parameter exists in v1. + - parameter pagination: (query) Pagination for users. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listUsersWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func listUsersWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/users" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -439,7 +439,7 @@ open class IAMUsersAPI { /** Replace Permissions for User - PUT /users/{userId}/permissions - - Updates the list of access permissions for a user. When called, this endpoint may generate the `Policy Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Updates the list of access permissions for a user. • When called, this endpoint may generate the `Policy Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/LabelsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/LabelsAPI.swift index affe54bd..fab0ff66 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/LabelsAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/LabelsAPI.swift @@ -20,7 +20,7 @@ open class LabelsAPI { - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func createLabel(createLabelV1Input: CreateLabelV1Input, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateLabel200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func createLabel(createLabelV1Input: CreateLabelV1Input, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateLabel201Response?, _ error: Error?) -> Void)) -> RequestTask { return createLabelWithRequestBuilder(createLabelV1Input: createLabelV1Input).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -34,14 +34,14 @@ open class LabelsAPI { /** Create Label - POST /labels - - Creates a new label. When called, this endpoint may generate the `Label Created` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Creates a new label. • When called, this endpoint may generate the `Label Created` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token - parameter createLabelV1Input: (body) - - returns: RequestBuilder + - returns: RequestBuilder */ - open class func createLabelWithRequestBuilder(createLabelV1Input: CreateLabelV1Input) -> RequestBuilder { + open class func createLabelWithRequestBuilder(createLabelV1Input: CreateLabelV1Input) -> RequestBuilder { let localVariablePath = "/labels" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createLabelV1Input) @@ -54,7 +54,7 @@ open class LabelsAPI { let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } @@ -82,7 +82,7 @@ open class LabelsAPI { /** Delete Label - DELETE /labels/{key}/{value} - - Deletes a label. When called, this endpoint may generate the `Label Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Deletes a label. • When called, this endpoint may generate the `Label Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/LivePluginsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/LivePluginsAPI.swift new file mode 100644 index 00000000..6e288dc7 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/LivePluginsAPI.swift @@ -0,0 +1,166 @@ +// +// LivePluginsAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class LivePluginsAPI { + + /** + Create Live Plugin + + - parameter sourceId: (path) + - parameter createLivePluginAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createLivePlugin(sourceId: String, createLivePluginAlphaInput: CreateLivePluginAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateLivePlugin200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createLivePluginWithRequestBuilder(sourceId: sourceId, createLivePluginAlphaInput: createLivePluginAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Live Plugin + - POST /sources/{sourceId}/live-plugins/create + - Creates or updates a Live Plugin for your Source with given code. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Live Plugins feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter sourceId: (path) + - parameter createLivePluginAlphaInput: (body) + - returns: RequestBuilder + */ + open class func createLivePluginWithRequestBuilder(sourceId: String, createLivePluginAlphaInput: CreateLivePluginAlphaInput) -> RequestBuilder { + var localVariablePath = "/sources/{sourceId}/live-plugins/create" + let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" + let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{sourceId}", with: sourceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createLivePluginAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Delete Live Plugin Code + + - parameter sourceId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func deleteLivePluginCode(sourceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: DeleteLivePluginCode200Response?, _ error: Error?) -> Void)) -> RequestTask { + return deleteLivePluginCodeWithRequestBuilder(sourceId: sourceId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete Live Plugin Code + - DELETE /sources/{sourceId}/live-plugins/delete-code + - Delete the Live Plugin code for a Source. This will not disable Live Plugins for the Source, but will remove any existing code. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Live Plugins feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter sourceId: (path) + - returns: RequestBuilder + */ + open class func deleteLivePluginCodeWithRequestBuilder(sourceId: String) -> RequestBuilder { + var localVariablePath = "/sources/{sourceId}/live-plugins/delete-code" + let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" + let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{sourceId}", with: sourceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get Latest from Live Plugins + + - parameter sourceId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getLatestFromLivePlugins(sourceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetLatestFromLivePlugins200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getLatestFromLivePluginsWithRequestBuilder(sourceId: sourceId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Latest from Live Plugins + - GET /sources/{sourceId}/live-plugins/latest + - Get the latest Live Plugins for your Source. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Live Plugins feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter sourceId: (path) + - returns: RequestBuilder + */ + open class func getLatestFromLivePluginsWithRequestBuilder(sourceId: String) -> RequestBuilder { + var localVariablePath = "/sources/{sourceId}/live-plugins/latest" + let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" + let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{sourceId}", with: sourceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/MonthlyTrackedUsersAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/MonthlyTrackedUsersAPI.swift index 1d0d930a..ece8ad85 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/MonthlyTrackedUsersAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/MonthlyTrackedUsersAPI.swift @@ -16,12 +16,12 @@ open class MonthlyTrackedUsersAPI { Get Daily Per Source MTU Usage - parameter period: (query) The start of the usage month, in the ISO-8601 format. This parameter exists in v1. - - parameter pagination: (query) Pagination input for per Source MTU counts. This parameter exists in v1. + - parameter pagination: (query) Pagination input for per Source MTU counts. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func getDailyPerSourceMTUUsage(period: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDailyPerSourceMTUUsage200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func getDailyPerSourceMTUUsage(period: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDailyPerSourceMTUUsage200Response?, _ error: Error?) -> Void)) -> RequestTask { return getDailyPerSourceMTUUsageWithRequestBuilder(period: period, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -40,10 +40,10 @@ open class MonthlyTrackedUsersAPI { - type: http - name: token - parameter period: (query) The start of the usage month, in the ISO-8601 format. This parameter exists in v1. - - parameter pagination: (query) Pagination input for per Source MTU counts. This parameter exists in v1. + - parameter pagination: (query) Pagination input for per Source MTU counts. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func getDailyPerSourceMTUUsageWithRequestBuilder(period: String, pagination: PaginationInput) -> RequestBuilder { + open class func getDailyPerSourceMTUUsageWithRequestBuilder(period: String, pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/usage/mtu/sources/daily" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil @@ -51,7 +51,7 @@ open class MonthlyTrackedUsersAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ "period": period.encodeToJSON(), - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -69,12 +69,12 @@ open class MonthlyTrackedUsersAPI { Get Daily Workspace MTU Usage - parameter period: (query) The start of the usage month, in the ISO-8601 format. This parameter exists in v1. - - parameter pagination: (query) Pagination input for Workspace MTU counts. This parameter exists in v1. + - parameter pagination: (query) Pagination input for Workspace MTU counts. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func getDailyWorkspaceMTUUsage(period: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDailyWorkspaceMTUUsage200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func getDailyWorkspaceMTUUsage(period: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetDailyWorkspaceMTUUsage200Response?, _ error: Error?) -> Void)) -> RequestTask { return getDailyWorkspaceMTUUsageWithRequestBuilder(period: period, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -93,10 +93,10 @@ open class MonthlyTrackedUsersAPI { - type: http - name: token - parameter period: (query) The start of the usage month, in the ISO-8601 format. This parameter exists in v1. - - parameter pagination: (query) Pagination input for Workspace MTU counts. This parameter exists in v1. + - parameter pagination: (query) Pagination input for Workspace MTU counts. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func getDailyWorkspaceMTUUsageWithRequestBuilder(period: String, pagination: PaginationInput) -> RequestBuilder { + open class func getDailyWorkspaceMTUUsageWithRequestBuilder(period: String, pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/usage/mtu/daily" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil @@ -104,7 +104,7 @@ open class MonthlyTrackedUsersAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ "period": period.encodeToJSON(), - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ diff --git a/PublicApi/Classes/OpenAPIs/APIs/ProfilesSyncAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/ProfilesSyncAPI.swift new file mode 100644 index 00000000..61e8fc54 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/ProfilesSyncAPI.swift @@ -0,0 +1,350 @@ +// +// ProfilesSyncAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class ProfilesSyncAPI { + + /** + Create Profiles Warehouse + + - parameter spaceId: (path) + - parameter createProfilesWarehouseAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createProfilesWarehouse(spaceId: String, createProfilesWarehouseAlphaInput: CreateProfilesWarehouseAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateProfilesWarehouse201Response?, _ error: Error?) -> Void)) -> RequestTask { + return createProfilesWarehouseWithRequestBuilder(spaceId: spaceId, createProfilesWarehouseAlphaInput: createProfilesWarehouseAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Profiles Warehouse + - POST /spaces/{spaceId}/profiles-warehouses + - Creates a new Profiles Warehouse. • When called, this endpoint may generate the `Profiles Sync Warehouse Created` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter createProfilesWarehouseAlphaInput: (body) + - returns: RequestBuilder + */ + open class func createProfilesWarehouseWithRequestBuilder(spaceId: String, createProfilesWarehouseAlphaInput: CreateProfilesWarehouseAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/profiles-warehouses" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createProfilesWarehouseAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Profiles Warehouse in Space + + - parameter spaceId: (path) + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listProfilesWarehouseInSpace(spaceId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListProfilesWarehouseInSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listProfilesWarehouseInSpaceWithRequestBuilder(spaceId: spaceId, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Profiles Warehouse in Space + - GET /spaces/{spaceId}/profiles-warehouses + - Lists all Profile Warehouses for a given space id. • When called, this endpoint may generate the `Profiles Sync Warehouse Retrieved` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listProfilesWarehouseInSpaceWithRequestBuilder(spaceId: String, pagination: PaginationInput? = nil) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/profiles-warehouses" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Selective Syncs from Warehouse And Space + + - parameter spaceId: (path) + - parameter warehouseId: (path) + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listSelectiveSyncsFromWarehouseAndSpace(spaceId: String, warehouseId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSelectiveSyncsFromWarehouseAndSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listSelectiveSyncsFromWarehouseAndSpaceWithRequestBuilder(spaceId: spaceId, warehouseId: warehouseId, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Selective Syncs from Warehouse And Space + - GET /spaces/{spaceId}/profiles-warehouses/{warehouseId}/selective-syncs + - Returns the schema for a Space Warehouse connection, including Collections and Properties. + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter warehouseId: (path) + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listSelectiveSyncsFromWarehouseAndSpaceWithRequestBuilder(spaceId: String, warehouseId: String, pagination: PaginationInput? = nil) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/profiles-warehouses/{warehouseId}/selective-syncs" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let warehouseIdPreEscape = "\(APIHelper.mapValueToPathItem(warehouseId))" + let warehouseIdPostEscape = warehouseIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{warehouseId}", with: warehouseIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Remove Profiles Warehouse from Space + + - parameter spaceId: (path) + - parameter warehouseId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func removeProfilesWarehouseFromSpace(spaceId: String, warehouseId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: RemoveProfilesWarehouseFromSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return removeProfilesWarehouseFromSpaceWithRequestBuilder(spaceId: spaceId, warehouseId: warehouseId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Remove Profiles Warehouse from Space + - DELETE /spaces/{spaceId}/profiles-warehouses/{warehouseId} + - Deletes an existing Profiles Warehouse. • When called, this endpoint may generate the `Profiles Sync Warehouse Deleted` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter warehouseId: (path) + - returns: RequestBuilder + */ + open class func removeProfilesWarehouseFromSpaceWithRequestBuilder(spaceId: String, warehouseId: String) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/profiles-warehouses/{warehouseId}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let warehouseIdPreEscape = "\(APIHelper.mapValueToPathItem(warehouseId))" + let warehouseIdPostEscape = warehouseIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{warehouseId}", with: warehouseIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Update Profiles Warehouse for Space Warehouse + + - parameter spaceId: (path) + - parameter warehouseId: (path) + - parameter updateProfilesWarehouseForSpaceWarehouseAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func updateProfilesWarehouseForSpaceWarehouse(spaceId: String, warehouseId: String, updateProfilesWarehouseForSpaceWarehouseAlphaInput: UpdateProfilesWarehouseForSpaceWarehouseAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: UpdateProfilesWarehouseForSpaceWarehouse200Response?, _ error: Error?) -> Void)) -> RequestTask { + return updateProfilesWarehouseForSpaceWarehouseWithRequestBuilder(spaceId: spaceId, warehouseId: warehouseId, updateProfilesWarehouseForSpaceWarehouseAlphaInput: updateProfilesWarehouseForSpaceWarehouseAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update Profiles Warehouse for Space Warehouse + - PATCH /spaces/{spaceId}/profiles-warehouses/{warehouseId} + - Updates an existing Profiles Warehouse. • When called, this endpoint may generate the `Profiles Sync Warehouse Updated` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter warehouseId: (path) + - parameter updateProfilesWarehouseForSpaceWarehouseAlphaInput: (body) + - returns: RequestBuilder + */ + open class func updateProfilesWarehouseForSpaceWarehouseWithRequestBuilder(spaceId: String, warehouseId: String, updateProfilesWarehouseForSpaceWarehouseAlphaInput: UpdateProfilesWarehouseForSpaceWarehouseAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/profiles-warehouses/{warehouseId}" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let warehouseIdPreEscape = "\(APIHelper.mapValueToPathItem(warehouseId))" + let warehouseIdPostEscape = warehouseIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{warehouseId}", with: warehouseIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: updateProfilesWarehouseForSpaceWarehouseAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Update Selective Sync for Warehouse And Space + + - parameter spaceId: (path) + - parameter warehouseId: (path) + - parameter updateSelectiveSyncForWarehouseAndSpaceAlphaInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func updateSelectiveSyncForWarehouseAndSpace(spaceId: String, warehouseId: String, updateSelectiveSyncForWarehouseAndSpaceAlphaInput: UpdateSelectiveSyncForWarehouseAndSpaceAlphaInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: UpdateSelectiveSyncForWarehouseAndSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return updateSelectiveSyncForWarehouseAndSpaceWithRequestBuilder(spaceId: spaceId, warehouseId: warehouseId, updateSelectiveSyncForWarehouseAndSpaceAlphaInput: updateSelectiveSyncForWarehouseAndSpaceAlphaInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update Selective Sync for Warehouse And Space + - PATCH /spaces/{spaceId}/profiles-warehouses/{warehouseId}/selective-syncs + - Updates the schema for a Space Warehouse connection, including Collections and Properties. • When called, this endpoint may generate the `Profiles Sync Warehouse Modified` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter spaceId: (path) + - parameter warehouseId: (path) + - parameter updateSelectiveSyncForWarehouseAndSpaceAlphaInput: (body) + - returns: RequestBuilder + */ + open class func updateSelectiveSyncForWarehouseAndSpaceWithRequestBuilder(spaceId: String, warehouseId: String, updateSelectiveSyncForWarehouseAndSpaceAlphaInput: UpdateSelectiveSyncForWarehouseAndSpaceAlphaInput) -> RequestBuilder { + var localVariablePath = "/spaces/{spaceId}/profiles-warehouses/{warehouseId}/selective-syncs" + let spaceIdPreEscape = "\(APIHelper.mapValueToPathItem(spaceId))" + let spaceIdPostEscape = spaceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{spaceId}", with: spaceIdPostEscape, options: .literal, range: nil) + let warehouseIdPreEscape = "\(APIHelper.mapValueToPathItem(warehouseId))" + let warehouseIdPostEscape = warehouseIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{warehouseId}", with: warehouseIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: updateSelectiveSyncForWarehouseAndSpaceAlphaInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/ReverseETLAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/ReverseETLAPI.swift new file mode 100644 index 00000000..d04d1e4b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/ReverseETLAPI.swift @@ -0,0 +1,485 @@ +// +// ReverseETLAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class ReverseETLAPI { + + /** + Cancel Reverse ETL Sync for Model + + - parameter modelId: (path) + - parameter syncId: (path) + - parameter cancelReverseETLSyncForModelInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func cancelReverseETLSyncForModel(modelId: String, syncId: String, cancelReverseETLSyncForModelInput: CancelReverseETLSyncForModelInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CancelReverseETLSyncForModel200Response?, _ error: Error?) -> Void)) -> RequestTask { + return cancelReverseETLSyncForModelWithRequestBuilder(modelId: modelId, syncId: syncId, cancelReverseETLSyncForModelInput: cancelReverseETLSyncForModelInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Cancel Reverse ETL Sync for Model + - POST /reverse-etl-models/{modelId}/syncs/{syncId}/cancel + - Cancels a sync for a Reverse ETL Connection. It might take a few seconds to completely cancel the sync. Will return an error if the sync is already completed or cancelled. + - BASIC: + - type: http + - name: token + - parameter modelId: (path) + - parameter syncId: (path) + - parameter cancelReverseETLSyncForModelInput: (body) + - returns: RequestBuilder + */ + open class func cancelReverseETLSyncForModelWithRequestBuilder(modelId: String, syncId: String, cancelReverseETLSyncForModelInput: CancelReverseETLSyncForModelInput) -> RequestBuilder { + var localVariablePath = "/reverse-etl-models/{modelId}/syncs/{syncId}/cancel" + let modelIdPreEscape = "\(APIHelper.mapValueToPathItem(modelId))" + let modelIdPostEscape = modelIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{modelId}", with: modelIdPostEscape, options: .literal, range: nil) + let syncIdPreEscape = "\(APIHelper.mapValueToPathItem(syncId))" + let syncIdPostEscape = syncIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{syncId}", with: syncIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: cancelReverseETLSyncForModelInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Create Reverse ETL Manual Sync + + - parameter createReverseETLManualSyncInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createReverseETLManualSync(createReverseETLManualSyncInput: CreateReverseETLManualSyncInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateReverseETLManualSync200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createReverseETLManualSyncWithRequestBuilder(createReverseETLManualSyncInput: createReverseETLManualSyncInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Reverse ETL Manual Sync + - POST /reverse-etl-syncs + - Triggers a manual sync for a Reverse ETL Connection. In the request body, the `subscription id` is the id that follows after `/mappings/` portion in the URL of the sync. For example, the `subscription id` would be `2` for this sync: https://app.Segment.com/example-workspace/reverse-etl/destinations/example-destination/sources/example-source/instances/1/mappings/2/source-id/3/model-id/4/sync-details The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter createReverseETLManualSyncInput: (body) + - returns: RequestBuilder + */ + open class func createReverseETLManualSyncWithRequestBuilder(createReverseETLManualSyncInput: CreateReverseETLManualSyncInput) -> RequestBuilder { + let localVariablePath = "/reverse-etl-syncs" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createReverseETLManualSyncInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Create Reverse Etl Model + + - parameter createReverseEtlModelInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createReverseEtlModel(createReverseEtlModelInput: CreateReverseEtlModelInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateReverseEtlModel201Response?, _ error: Error?) -> Void)) -> RequestTask { + return createReverseEtlModelWithRequestBuilder(createReverseEtlModelInput: createReverseEtlModelInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Reverse Etl Model + - POST /reverse-etl-models + - Creates a new Reverse ETL Model. • When called, this endpoint may generate the `Model Created` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter createReverseEtlModelInput: (body) + - returns: RequestBuilder + */ + open class func createReverseEtlModelWithRequestBuilder(createReverseEtlModelInput: CreateReverseEtlModelInput) -> RequestBuilder { + let localVariablePath = "/reverse-etl-models" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createReverseEtlModelInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Delete Reverse Etl Model + + - parameter modelId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func deleteReverseEtlModel(modelId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: DeleteReverseEtlModel200Response?, _ error: Error?) -> Void)) -> RequestTask { + return deleteReverseEtlModelWithRequestBuilder(modelId: modelId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete Reverse Etl Model + - DELETE /reverse-etl-models/{modelId} + - Deletes an existing Model. • When called, this endpoint may generate the `Model Deleted` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter modelId: (path) + - returns: RequestBuilder + */ + open class func deleteReverseEtlModelWithRequestBuilder(modelId: String) -> RequestBuilder { + var localVariablePath = "/reverse-etl-models/{modelId}" + let modelIdPreEscape = "\(APIHelper.mapValueToPathItem(modelId))" + let modelIdPostEscape = modelIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{modelId}", with: modelIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get Reverse ETL Sync Status + + - parameter modelId: (path) + - parameter syncId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getReverseETLSyncStatus(modelId: String, syncId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetReverseETLSyncStatus200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getReverseETLSyncStatusWithRequestBuilder(modelId: modelId, syncId: syncId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Reverse ETL Sync Status + - GET /reverse-etl-models/{modelId}/syncs/{syncId} + - Get the sync status for a Reverse ETL sync. The sync status includes all detailed information about the sync - sync status, duration, details about the extract and load phase if applicable, etc. The rate limit for this endpoint is 250 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - BASIC: + - type: http + - name: token + - parameter modelId: (path) + - parameter syncId: (path) + - returns: RequestBuilder + */ + open class func getReverseETLSyncStatusWithRequestBuilder(modelId: String, syncId: String) -> RequestBuilder { + var localVariablePath = "/reverse-etl-models/{modelId}/syncs/{syncId}" + let modelIdPreEscape = "\(APIHelper.mapValueToPathItem(modelId))" + let modelIdPostEscape = modelIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{modelId}", with: modelIdPostEscape, options: .literal, range: nil) + let syncIdPreEscape = "\(APIHelper.mapValueToPathItem(syncId))" + let syncIdPostEscape = syncIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{syncId}", with: syncIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get Reverse Etl Model + + - parameter modelId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getReverseEtlModel(modelId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetReverseEtlModel200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getReverseEtlModelWithRequestBuilder(modelId: modelId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Reverse Etl Model + - GET /reverse-etl-models/{modelId} + - Returns a Reverse ETL Model by its id. + - BASIC: + - type: http + - name: token + - parameter modelId: (path) + - returns: RequestBuilder + */ + open class func getReverseEtlModelWithRequestBuilder(modelId: String) -> RequestBuilder { + var localVariablePath = "/reverse-etl-models/{modelId}" + let modelIdPreEscape = "\(APIHelper.mapValueToPathItem(modelId))" + let modelIdPostEscape = modelIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{modelId}", with: modelIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Reverse ETL Sync Statuses from Model And Subscription Id + + - parameter modelId: (path) + - parameter subscriptionId: (path) + - parameter count: (query) The number of items to retrieve in a page, between 1 and 100. Default is 10 This parameter exists in alpha. (optional) + - parameter cursor: (query) The page to request. Acceptable values to use are from the `current`, `next`, and `previous` keys. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listReverseETLSyncStatusesFromModelAndSubscriptionId(modelId: String, subscriptionId: String, count: Double? = nil, cursor: String? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listReverseETLSyncStatusesFromModelAndSubscriptionIdWithRequestBuilder(modelId: modelId, subscriptionId: subscriptionId, count: count, cursor: cursor).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Reverse ETL Sync Statuses from Model And Subscription Id + - GET /reverse-etl-models/{modelId}/subscriptionId/{subscriptionId}/syncs + - Get the sync statuses for a Reverse ETL mapping subscription. The sync status includes all detailed information about the sync - sync status, duration, details about the extract and load phase if applicable, etc. The default page count is 10, and then the next page can be fetched by passing the `cursor` query parameter. + - BASIC: + - type: http + - name: token + - parameter modelId: (path) + - parameter subscriptionId: (path) + - parameter count: (query) The number of items to retrieve in a page, between 1 and 100. Default is 10 This parameter exists in alpha. (optional) + - parameter cursor: (query) The page to request. Acceptable values to use are from the `current`, `next`, and `previous` keys. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listReverseETLSyncStatusesFromModelAndSubscriptionIdWithRequestBuilder(modelId: String, subscriptionId: String, count: Double? = nil, cursor: String? = nil) -> RequestBuilder { + var localVariablePath = "/reverse-etl-models/{modelId}/subscriptionId/{subscriptionId}/syncs" + let modelIdPreEscape = "\(APIHelper.mapValueToPathItem(modelId))" + let modelIdPostEscape = modelIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{modelId}", with: modelIdPostEscape, options: .literal, range: nil) + let subscriptionIdPreEscape = "\(APIHelper.mapValueToPathItem(subscriptionId))" + let subscriptionIdPostEscape = subscriptionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{subscriptionId}", with: subscriptionIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "count": count?.encodeToJSON(), + "cursor": cursor?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Reverse Etl Models + + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listReverseEtlModels(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListReverseEtlModels200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listReverseEtlModelsWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Reverse Etl Models + - GET /reverse-etl-models + - Returns a list of Reverse ETL Models. + - BASIC: + - type: http + - name: token + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listReverseEtlModelsWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/reverse-etl-models" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Update Reverse Etl Model + + - parameter modelId: (path) + - parameter updateReverseEtlModelInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func updateReverseEtlModel(modelId: String, updateReverseEtlModelInput: UpdateReverseEtlModelInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: UpdateReverseEtlModel200Response?, _ error: Error?) -> Void)) -> RequestTask { + return updateReverseEtlModelWithRequestBuilder(modelId: modelId, updateReverseEtlModelInput: updateReverseEtlModelInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update Reverse Etl Model + - PATCH /reverse-etl-models/{modelId} + - Updates an existing Reverse ETL Model. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Model Settings Saved * Model State Change Toggled + - BASIC: + - type: http + - name: token + - parameter modelId: (path) + - parameter updateReverseEtlModelInput: (body) + - returns: RequestBuilder + */ + open class func updateReverseEtlModelWithRequestBuilder(modelId: String, updateReverseEtlModelInput: UpdateReverseEtlModelInput) -> RequestBuilder { + var localVariablePath = "/reverse-etl-models/{modelId}" + let modelIdPreEscape = "\(APIHelper.mapValueToPathItem(modelId))" + let modelIdPostEscape = modelIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{modelId}", with: modelIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: updateReverseEtlModelInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/SelectiveSyncAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/SelectiveSyncAPI.swift index 1c52fd7c..d5daecb4 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/SelectiveSyncAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/SelectiveSyncAPI.swift @@ -67,12 +67,12 @@ open class SelectiveSyncAPI { - parameter warehouseId: (path) - parameter sourceId: (path) - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listSelectiveSyncsFromWarehouseAndSource(warehouseId: String, sourceId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSelectiveSyncsFromWarehouseAndSource200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listSelectiveSyncsFromWarehouseAndSource(warehouseId: String, sourceId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSelectiveSyncsFromWarehouseAndSource200Response?, _ error: Error?) -> Void)) -> RequestTask { return listSelectiveSyncsFromWarehouseAndSourceWithRequestBuilder(warehouseId: warehouseId, sourceId: sourceId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -92,10 +92,10 @@ open class SelectiveSyncAPI { - name: token - parameter warehouseId: (path) - parameter sourceId: (path) - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listSelectiveSyncsFromWarehouseAndSourceWithRequestBuilder(warehouseId: String, sourceId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listSelectiveSyncsFromWarehouseAndSourceWithRequestBuilder(warehouseId: String, sourceId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/warehouses/{warehouseId}/connected-sources/{sourceId}/selective-syncs" let warehouseIdPreEscape = "\(APIHelper.mapValueToPathItem(warehouseId))" let warehouseIdPostEscape = warehouseIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -108,7 +108,7 @@ open class SelectiveSyncAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -126,12 +126,12 @@ open class SelectiveSyncAPI { List Syncs from Warehouse - parameter warehouseId: (path) - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listSyncsFromWarehouse(warehouseId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSyncsFromWarehouse200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listSyncsFromWarehouse(warehouseId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSyncsFromWarehouse200Response?, _ error: Error?) -> Void)) -> RequestTask { return listSyncsFromWarehouseWithRequestBuilder(warehouseId: warehouseId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -150,10 +150,10 @@ open class SelectiveSyncAPI { - type: http - name: token - parameter warehouseId: (path) - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listSyncsFromWarehouseWithRequestBuilder(warehouseId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listSyncsFromWarehouseWithRequestBuilder(warehouseId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/warehouses/{warehouseId}/syncs" let warehouseIdPreEscape = "\(APIHelper.mapValueToPathItem(warehouseId))" let warehouseIdPostEscape = warehouseIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -163,7 +163,7 @@ open class SelectiveSyncAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -182,12 +182,12 @@ open class SelectiveSyncAPI { - parameter warehouseId: (path) - parameter sourceId: (path) - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listSyncsFromWarehouseAndSource(warehouseId: String, sourceId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSyncsFromWarehouseAndSource200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listSyncsFromWarehouseAndSource(warehouseId: String, sourceId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSyncsFromWarehouseAndSource200Response?, _ error: Error?) -> Void)) -> RequestTask { return listSyncsFromWarehouseAndSourceWithRequestBuilder(warehouseId: warehouseId, sourceId: sourceId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -207,10 +207,10 @@ open class SelectiveSyncAPI { - name: token - parameter warehouseId: (path) - parameter sourceId: (path) - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listSyncsFromWarehouseAndSourceWithRequestBuilder(warehouseId: String, sourceId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listSyncsFromWarehouseAndSourceWithRequestBuilder(warehouseId: String, sourceId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/warehouses/{warehouseId}/connected-sources/{sourceId}/syncs" let warehouseIdPreEscape = "\(APIHelper.mapValueToPathItem(warehouseId))" let warehouseIdPostEscape = warehouseIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -223,7 +223,7 @@ open class SelectiveSyncAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -312,7 +312,7 @@ open class SelectiveSyncAPI { /** Update Selective Sync for Warehouse - PATCH /warehouses/{warehouseId}/selective-sync - - Configures the schema for a Warehouse, including Sources, Collections, and Properties. When called, this endpoint may generate the `Storage Destination Modified` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Configures the schema for a Warehouse, including Sources, Collections, and Properties. • When called, this endpoint may generate the `Storage Destination Modified` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 2 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/SourcesAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/SourcesAPI.swift index d14d81a2..10095622 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/SourcesAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/SourcesAPI.swift @@ -35,7 +35,7 @@ open class SourcesAPI { /** Add Labels to Source - POST /sources/{sourceId}/labels - - Adds an existing label to a Source. When called, this endpoint may generate the `Source Modified` event in the [audit trail](/tag/Audit-Trail). + - Adds an existing label to a Source. • When called, this endpoint may generate the `Source Modified` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token @@ -72,7 +72,7 @@ open class SourcesAPI { - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func createSource(createSourceV1Input: CreateSourceV1Input, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateSource200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func createSource(createSourceV1Input: CreateSourceV1Input, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateSource201Response?, _ error: Error?) -> Void)) -> RequestTask { return createSourceWithRequestBuilder(createSourceV1Input: createSourceV1Input).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -86,14 +86,14 @@ open class SourcesAPI { /** Create Source - POST /sources - - Creates a new Source. When called, this endpoint may generate the `Source Created` event in the [audit trail](/tag/Audit-Trail). + - Creates a new Source. • When called, this endpoint may generate the `Source Created` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token - parameter createSourceV1Input: (body) - - returns: RequestBuilder + - returns: RequestBuilder */ - open class func createSourceWithRequestBuilder(createSourceV1Input: CreateSourceV1Input) -> RequestBuilder { + open class func createSourceWithRequestBuilder(createSourceV1Input: CreateSourceV1Input) -> RequestBuilder { let localVariablePath = "/sources" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createSourceV1Input) @@ -106,7 +106,57 @@ open class SourcesAPI { let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Create Write Key for Source + + - parameter sourceId: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createWriteKeyForSource(sourceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateWriteKeyForSource200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createWriteKeyForSourceWithRequestBuilder(sourceId: sourceId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Write Key for Source + - POST /sources/{sourceId}/writekey + - Creates a new Write Key for the Source. • When called, this endpoint may generate the `Source Modified` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter sourceId: (path) + - returns: RequestBuilder + */ + open class func createWriteKeyForSourceWithRequestBuilder(sourceId: String) -> RequestBuilder { + var localVariablePath = "/sources/{sourceId}/writekey" + let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" + let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{sourceId}", with: sourceIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } @@ -133,7 +183,7 @@ open class SourcesAPI { /** Delete Source - DELETE /sources/{sourceId} - - Deletes an existing Source. When called, this endpoint may generate the `Source Deleted` event in the [audit trail](/tag/Audit-Trail). + - Deletes an existing Source. • When called, this endpoint may generate the `Source Deleted` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token @@ -215,12 +265,12 @@ open class SourcesAPI { List Connected Destinations from Source - parameter sourceId: (path) - - parameter pagination: (query) Required pagination params for the request. This parameter exists in alpha. + - parameter pagination: (query) Required pagination params for the request. This parameter exists in alpha. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listConnectedDestinationsFromSource(sourceId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListConnectedDestinationsFromSource200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listConnectedDestinationsFromSource(sourceId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListConnectedDestinationsFromSource200Response?, _ error: Error?) -> Void)) -> RequestTask { return listConnectedDestinationsFromSourceWithRequestBuilder(sourceId: sourceId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -239,10 +289,10 @@ open class SourcesAPI { - type: http - name: token - parameter sourceId: (path) - - parameter pagination: (query) Required pagination params for the request. This parameter exists in alpha. + - parameter pagination: (query) Required pagination params for the request. This parameter exists in alpha. (optional) - returns: RequestBuilder */ - open class func listConnectedDestinationsFromSourceWithRequestBuilder(sourceId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listConnectedDestinationsFromSourceWithRequestBuilder(sourceId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/sources/{sourceId}/connected-destinations" let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -252,7 +302,7 @@ open class SourcesAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -270,12 +320,12 @@ open class SourcesAPI { List Connected Warehouses from Source - parameter sourceId: (path) - - parameter pagination: (query) Required pagination params for the request. This parameter exists in alpha. + - parameter pagination: (query) Required pagination params for the request. This parameter exists in alpha. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listConnectedWarehousesFromSource(sourceId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListConnectedWarehousesFromSource200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listConnectedWarehousesFromSource(sourceId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListConnectedWarehousesFromSource200Response?, _ error: Error?) -> Void)) -> RequestTask { return listConnectedWarehousesFromSourceWithRequestBuilder(sourceId: sourceId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -294,10 +344,10 @@ open class SourcesAPI { - type: http - name: token - parameter sourceId: (path) - - parameter pagination: (query) Required pagination params for the request. This parameter exists in alpha. + - parameter pagination: (query) Required pagination params for the request. This parameter exists in alpha. (optional) - returns: RequestBuilder */ - open class func listConnectedWarehousesFromSourceWithRequestBuilder(sourceId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listConnectedWarehousesFromSourceWithRequestBuilder(sourceId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/sources/{sourceId}/connected-warehouses" let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -307,7 +357,7 @@ open class SourcesAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -374,12 +424,12 @@ open class SourcesAPI { /** List Sources - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listSources(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSources200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listSources(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSources200Response?, _ error: Error?) -> Void)) -> RequestTask { return listSourcesWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -397,17 +447,17 @@ open class SourcesAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in alpha. (optional) - returns: RequestBuilder */ - open class func listSourcesWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func listSourcesWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/sources" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -421,6 +471,61 @@ open class SourcesAPI { return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } + /** + Remove Write Key from Source + + - parameter sourceId: (path) + - parameter writeKey: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func removeWriteKeyFromSource(sourceId: String, writeKey: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: RemoveWriteKeyFromSource200Response?, _ error: Error?) -> Void)) -> RequestTask { + return removeWriteKeyFromSourceWithRequestBuilder(sourceId: sourceId, writeKey: writeKey).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Remove Write Key from Source + - DELETE /sources/{sourceId}/writekey/{writeKey} + - Removes a Write Key from a Source. • When called, this endpoint may generate the `Source Modified` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter sourceId: (path) + - parameter writeKey: (path) + - returns: RequestBuilder + */ + open class func removeWriteKeyFromSourceWithRequestBuilder(sourceId: String, writeKey: String) -> RequestBuilder { + var localVariablePath = "/sources/{sourceId}/writekey/{writeKey}" + let sourceIdPreEscape = "\(APIHelper.mapValueToPathItem(sourceId))" + let sourceIdPostEscape = sourceIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{sourceId}", with: sourceIdPostEscape, options: .literal, range: nil) + let writeKeyPreEscape = "\(APIHelper.mapValueToPathItem(writeKey))" + let writeKeyPostEscape = writeKeyPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{writeKey}", with: writeKeyPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + /** Replace Labels in Source @@ -548,7 +653,7 @@ open class SourcesAPI { /** Update Source - PATCH /sources/{sourceId} - - Updates an existing Source. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Source Modified * Source Enabled * Source Settings Modified * Source Disabled Config API omitted fields: - `updateMask` + - Updates an existing Source. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Source Modified * Source Enabled * Source Settings Modified * Source Disabled Config API omitted fields: - `updateMask` - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/SpaceFiltersAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/SpaceFiltersAPI.swift new file mode 100644 index 00000000..575dabe2 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/APIs/SpaceFiltersAPI.swift @@ -0,0 +1,266 @@ +// +// SpaceFiltersAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class SpaceFiltersAPI { + + /** + Create Filter for Space + + - parameter createFilterForSpaceInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func createFilterForSpace(createFilterForSpaceInput: CreateFilterForSpaceInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateFilterForSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return createFilterForSpaceWithRequestBuilder(createFilterForSpaceInput: createFilterForSpaceInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create Filter for Space + - POST /filters + - Creates a filter for a space. A space filter applies to events coming from all Sources connected to a space. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Filter Created` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter createFilterForSpaceInput: (body) + - returns: RequestBuilder + */ + open class func createFilterForSpaceWithRequestBuilder(createFilterForSpaceInput: CreateFilterForSpaceInput) -> RequestBuilder { + let localVariablePath = "/filters" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createFilterForSpaceInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Delete Filter By Id + + - parameter id: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func deleteFilterById(id: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: DeleteFilterById200Response?, _ error: Error?) -> Void)) -> RequestTask { + return deleteFilterByIdWithRequestBuilder(id: id).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete Filter By Id + - DELETE /filters/{id} + - Deletes a filter by id. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Filter Deleted` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter id: (path) + - returns: RequestBuilder + */ + open class func deleteFilterByIdWithRequestBuilder(id: String) -> RequestBuilder { + var localVariablePath = "/filters/{id}" + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get Filter By Id + + - parameter id: (path) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func getFilterById(id: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: GetFilterById200Response?, _ error: Error?) -> Void)) -> RequestTask { + return getFilterByIdWithRequestBuilder(id: id).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get Filter By Id + - GET /filters/{id} + - Gets a filter by id. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter id: (path) + - returns: RequestBuilder + */ + open class func getFilterByIdWithRequestBuilder(id: String) -> RequestBuilder { + var localVariablePath = "/filters/{id}" + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + List Filters for Space + + - parameter integrationId: (query) The Space Id for which to fetch filters This parameter exists in beta. + - parameter pagination: (query) Pagination parameters. This parameter exists in beta. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listFiltersForSpace(integrationId: String, pagination: ListFiltersPaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListFiltersForSpace200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listFiltersForSpaceWithRequestBuilder(integrationId: integrationId, pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Filters for Space + - GET /filters + - Lists filters for a space. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter integrationId: (query) The Space Id for which to fetch filters This parameter exists in beta. + - parameter pagination: (query) Pagination parameters. This parameter exists in beta. (optional) + - returns: RequestBuilder + */ + open class func listFiltersForSpaceWithRequestBuilder(integrationId: String, pagination: ListFiltersPaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/filters" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "integrationId": integrationId.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Update Filter By Id + + - parameter id: (path) + - parameter updateFilterByIdInput: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func updateFilterById(id: String, updateFilterByIdInput: UpdateFilterByIdInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: UpdateFilterById200Response?, _ error: Error?) -> Void)) -> RequestTask { + return updateFilterByIdWithRequestBuilder(id: id, updateFilterByIdInput: updateFilterByIdInput).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update Filter By Id + - PATCH /filters/{id} + - Updates a filter by id and replaces the existing filter. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Filter Updated` event in the [audit trail](/tag/Audit-Trail). + - BASIC: + - type: http + - name: token + - parameter id: (path) + - parameter updateFilterByIdInput: (body) + - returns: RequestBuilder + */ + open class func updateFilterByIdWithRequestBuilder(id: String, updateFilterByIdInput: UpdateFilterByIdInput) -> RequestBuilder { + var localVariablePath = "/filters/{id}" + let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" + let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil) + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: updateFilterByIdInput) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/PublicApi/Classes/OpenAPIs/APIs/SpacesAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/SpacesAPI.swift index 1ec329a9..c2a52115 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/SpacesAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/SpacesAPI.swift @@ -35,7 +35,7 @@ open class SpacesAPI { /** Batch Query Messaging Subscriptions for Space - POST /spaces/{spaceId}/messaging-subscriptions/batch - - Get Messaging Subscriptions for space. + -
⚠️
Engage Premier features will no longer be available after December 15, 2025.
This API will be deactivated after this date.
Get Messaging Subscriptions for space. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -86,7 +86,7 @@ open class SpacesAPI { /** Get Space - GET /spaces/{spaceId} - - Returns the Space by id. + - Returns the Space by id. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -114,6 +114,56 @@ open class SpacesAPI { return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } + /** + List Spaces + + - parameter pagination: (query) Pagination params This parameter exists in alpha. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + @discardableResult + open class func listSpaces(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSpaces200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listSpacesWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + List Spaces + - GET /spaces + - List Spaces. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information. + - BASIC: + - type: http + - name: token + - parameter pagination: (query) Pagination params This parameter exists in alpha. (optional) + - returns: RequestBuilder + */ + open class func listSpacesWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { + let localVariablePath = "/spaces" + let localVariableURLString = PublicApiAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "pagination": pagination?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + /** Replace Messaging Subscriptions in Spaces @@ -137,7 +187,7 @@ open class SpacesAPI { /** Replace Messaging Subscriptions in Spaces - PUT /spaces/{spaceId}/messaging-subscriptions - - Replace Messaging Subscriptions in Spaces. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + -
⚠️
Engage Premier features will no longer be available after December 15, 2025.
This API will be deactivated after this date.
Replace Messaging Subscriptions in Spaces. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/TrackingPlansAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/TrackingPlansAPI.swift index e9d226ea..93271fc0 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/TrackingPlansAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/TrackingPlansAPI.swift @@ -35,7 +35,7 @@ open class TrackingPlansAPI { /** Add Source to Tracking Plan - POST /tracking-plans/{trackingPlanId}/sources - - Connects a Source to a Tracking Plan. When called, this endpoint may generate the `Source Modified` event in the [audit trail](/tag/Audit-Trail). **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Connects a Source to a Tracking Plan. • When called, this endpoint may generate the `Source Modified` event in the [audit trail](/tag/Audit-Trail). • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -86,7 +86,7 @@ open class TrackingPlansAPI { /** Create Tracking Plan - POST /tracking-plans - - Creates a Tracking Plan. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Creates a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -133,7 +133,7 @@ open class TrackingPlansAPI { /** Delete Tracking Plan - DELETE /tracking-plans/{trackingPlanId} - - Deletes a Tracking Plan. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Deletes a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -183,7 +183,7 @@ open class TrackingPlansAPI { /** Get Tracking Plan - GET /tracking-plans/{trackingPlanId} - - Returns a Tracking Plan. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Returns a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -215,12 +215,12 @@ open class TrackingPlansAPI { List Rules from Tracking Plan - parameter trackingPlanId: (path) - - parameter pagination: (query) Pagination options. This parameter exists in v1. + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listRulesFromTrackingPlan(trackingPlanId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListRulesFromTrackingPlan200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listRulesFromTrackingPlan(trackingPlanId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListRulesFromTrackingPlan200Response?, _ error: Error?) -> Void)) -> RequestTask { return listRulesFromTrackingPlanWithRequestBuilder(trackingPlanId: trackingPlanId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -234,15 +234,15 @@ open class TrackingPlansAPI { /** List Rules from Tracking Plan - GET /tracking-plans/{trackingPlanId}/rules - - Lists Tracking Plan rules. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Lists Tracking Plan rules. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. The rate limit for this endpoint is 200 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token - parameter trackingPlanId: (path) - - parameter pagination: (query) Pagination options. This parameter exists in v1. + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listRulesFromTrackingPlanWithRequestBuilder(trackingPlanId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listRulesFromTrackingPlanWithRequestBuilder(trackingPlanId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/tracking-plans/{trackingPlanId}/rules" let trackingPlanIdPreEscape = "\(APIHelper.mapValueToPathItem(trackingPlanId))" let trackingPlanIdPostEscape = trackingPlanIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -252,7 +252,7 @@ open class TrackingPlansAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -270,12 +270,12 @@ open class TrackingPlansAPI { List Sources from Tracking Plan - parameter trackingPlanId: (path) - - parameter pagination: (query) Pagination options. This parameter exists in v1. + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listSourcesFromTrackingPlan(trackingPlanId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSourcesFromTrackingPlan200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listSourcesFromTrackingPlan(trackingPlanId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListSourcesFromTrackingPlan200Response?, _ error: Error?) -> Void)) -> RequestTask { return listSourcesFromTrackingPlanWithRequestBuilder(trackingPlanId: trackingPlanId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -289,15 +289,15 @@ open class TrackingPlansAPI { /** List Sources from Tracking Plan - GET /tracking-plans/{trackingPlanId}/sources - - Lists Sources connected to a Tracking Plan. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. This endpoint requires the user to have at least the following permission(s): * Source Read-only * Tracking Plan Read-only + - Lists Sources connected to a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. This endpoint requires the user to have at least the following permission(s): * Source Read-only * Tracking Plan Read-only - BASIC: - type: http - name: token - parameter trackingPlanId: (path) - - parameter pagination: (query) Pagination options. This parameter exists in v1. + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listSourcesFromTrackingPlanWithRequestBuilder(trackingPlanId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listSourcesFromTrackingPlanWithRequestBuilder(trackingPlanId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/tracking-plans/{trackingPlanId}/sources" let trackingPlanIdPreEscape = "\(APIHelper.mapValueToPathItem(trackingPlanId))" let trackingPlanIdPostEscape = trackingPlanIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -307,7 +307,7 @@ open class TrackingPlansAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -325,6 +325,7 @@ open class TrackingPlansAPI { * enum for parameter type */ public enum ModelType_listTrackingPlans: String, CaseIterable { + case engage = "ENGAGE" case live = "LIVE" case propertyLibrary = "PROPERTY_LIBRARY" case ruleLibrary = "RULE_LIBRARY" @@ -334,14 +335,14 @@ open class TrackingPlansAPI { /** List Tracking Plans - - parameter pagination: (query) Pagination options. This parameter exists in v1. - parameter type: (query) Requests Tracking Plans of a certain type. If omitted, lists all types. This parameter exists in v1. (optional) + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listTrackingPlans(pagination: PaginationInput, type: ModelType_listTrackingPlans? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListTrackingPlans200Response?, _ error: Error?) -> Void)) -> RequestTask { - return listTrackingPlansWithRequestBuilder(pagination: pagination, type: type).execute(apiResponseQueue) { result in + open class func listTrackingPlans(type: ModelType_listTrackingPlans? = nil, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListTrackingPlans200Response?, _ error: Error?) -> Void)) -> RequestTask { + return listTrackingPlansWithRequestBuilder(type: type, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -354,15 +355,15 @@ open class TrackingPlansAPI { /** List Tracking Plans - GET /tracking-plans - - Returns a list of Tracking Plans. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Returns a list of Tracking Plans. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token - - parameter pagination: (query) Pagination options. This parameter exists in v1. - parameter type: (query) Requests Tracking Plans of a certain type. If omitted, lists all types. This parameter exists in v1. (optional) + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listTrackingPlansWithRequestBuilder(pagination: PaginationInput, type: ModelType_listTrackingPlans? = nil) -> RequestBuilder { + open class func listTrackingPlansWithRequestBuilder(type: ModelType_listTrackingPlans? = nil, pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/tracking-plans" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil @@ -370,7 +371,7 @@ open class TrackingPlansAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ "type": type?.encodeToJSON(), - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -407,7 +408,7 @@ open class TrackingPlansAPI { /** Remove Rules from Tracking Plan - DELETE /tracking-plans/{trackingPlanId}/rules - - Deletes Tracking Plan rules. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Deletes Tracking Plan rules. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -462,7 +463,7 @@ open class TrackingPlansAPI { /** Remove Source from Tracking Plan - DELETE /tracking-plans/{trackingPlanId}/sources - - Disconnects a Source from a Tracking Plan. When called, this endpoint may generate the `Source Modified` event in the [audit trail](/tag/Audit-Trail). **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Disconnects a Source from a Tracking Plan. • When called, this endpoint may generate the `Source Modified` event in the [audit trail](/tag/Audit-Trail). • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -517,7 +518,7 @@ open class TrackingPlansAPI { /** Replace Rules in Tracking Plan - PUT /tracking-plans/{trackingPlanId}/rules - - Replaces Tracking Plan rules. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Replaces Tracking Plan rules. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -569,7 +570,7 @@ open class TrackingPlansAPI { /** Update Rules in Tracking Plan - PATCH /tracking-plans/{trackingPlanId}/rules - - Updates Tracking Plan rules. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Updates Tracking Plan rules. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -621,7 +622,7 @@ open class TrackingPlansAPI { /** Update Tracking Plan - PATCH /tracking-plans/{trackingPlanId} - - Updates a Tracking Plan. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. Config API omitted fields: - `updateMask` + - Updates a Tracking Plan. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. Config API omitted fields: - `updateMask` - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/TransformationsAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/TransformationsAPI.swift index 313c3f08..6fd5d53e 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/TransformationsAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/TransformationsAPI.swift @@ -34,7 +34,7 @@ open class TransformationsAPI { /** Create Transformation - POST /transformations - - Creates a new Transformation. When called, this endpoint may generate the `Transformation Created` event in the [audit trail](/tag/Audit-Trail). **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Creates a new Transformation. • When called, this endpoint may generate the `Transformation Created` event in the [audit trail](/tag/Audit-Trail). • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -81,7 +81,7 @@ open class TransformationsAPI { /** Delete Transformation - DELETE /transformations/{transformationId} - - Deletes a Transformation. When called, this endpoint may generate the `Transformation Deleted` event in the [audit trail](/tag/Audit-Trail). **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Deletes a Transformation. • When called, this endpoint may generate the `Transformation Deleted` event in the [audit trail](/tag/Audit-Trail). • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -131,7 +131,7 @@ open class TransformationsAPI { /** Get Transformation - GET /transformations/{transformationId} - - Gets a Transformation. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Gets a Transformation. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token @@ -162,12 +162,12 @@ open class TransformationsAPI { /** List Transformations - - parameter pagination: (query) Pagination options. This parameter exists in v1. + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listTransformations(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListTransformations200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listTransformations(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListTransformations200Response?, _ error: Error?) -> Void)) -> RequestTask { return listTransformationsWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -181,21 +181,21 @@ open class TransformationsAPI { /** List Transformations - GET /transformations - - Lists all Transformations in the Workspace. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Lists all Transformations in the Workspace. • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token - - parameter pagination: (query) Pagination options. This parameter exists in v1. + - parameter pagination: (query) Pagination options. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listTransformationsWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func listTransformationsWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/transformations" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -232,7 +232,7 @@ open class TransformationsAPI { /** Update Transformation - PATCH /transformations/{transformationId} - - Updates an existing Transformation. When called, this endpoint may generate the `Transformation Updated` event in the [audit trail](/tag/Audit-Trail). **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. + - Updates an existing Transformation. • When called, this endpoint may generate the `Transformation Updated` event in the [audit trail](/tag/Audit-Trail). • In order to successfully call this endpoint, the specified Workspace needs to have the Protocols feature enabled. Please reach out to your customer success manager for more information. - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/APIs/WarehousesAPI.swift b/PublicApi/Classes/OpenAPIs/APIs/WarehousesAPI.swift index bbc5fb7d..4beea0e6 100644 --- a/PublicApi/Classes/OpenAPIs/APIs/WarehousesAPI.swift +++ b/PublicApi/Classes/OpenAPIs/APIs/WarehousesAPI.swift @@ -21,7 +21,7 @@ open class WarehousesAPI { - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func addConnectionFromSourceToWarehouse(warehouseId: String, sourceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: AddConnectionFromSourceToWarehouse200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func addConnectionFromSourceToWarehouse(warehouseId: String, sourceId: String, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: AddConnectionFromSourceToWarehouse201Response?, _ error: Error?) -> Void)) -> RequestTask { return addConnectionFromSourceToWarehouseWithRequestBuilder(warehouseId: warehouseId, sourceId: sourceId).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -35,15 +35,15 @@ open class WarehousesAPI { /** Add Connection from Source to Warehouse - POST /warehouses/{warehouseId}/connected-sources/{sourceId} - - Connects a Source to a Warehouse. When called, this endpoint may generate the `Storage Destination Modified` event in the [audit trail](/tag/Audit-Trail). + - Connects a Source to a Warehouse. • When called, this endpoint may generate the `Storage Destination Modified` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token - parameter warehouseId: (path) - parameter sourceId: (path) - - returns: RequestBuilder + - returns: RequestBuilder */ - open class func addConnectionFromSourceToWarehouseWithRequestBuilder(warehouseId: String, sourceId: String) -> RequestBuilder { + open class func addConnectionFromSourceToWarehouseWithRequestBuilder(warehouseId: String, sourceId: String) -> RequestBuilder { var localVariablePath = "/warehouses/{warehouseId}/connected-sources/{sourceId}" let warehouseIdPreEscape = "\(APIHelper.mapValueToPathItem(warehouseId))" let warehouseIdPostEscape = warehouseIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -62,7 +62,7 @@ open class WarehousesAPI { let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } @@ -89,7 +89,7 @@ open class WarehousesAPI { /** Create Validation in Warehouse - POST /warehouses/validation - - Validates input settings against a Warehouse. When called, this endpoint may generate the `Storage Destination Settings Validation` event in the [audit trail](/tag/Audit-Trail). + - Validates input settings against a Warehouse. • When called, this endpoint may generate the `Storage Destination Settings Validation` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token @@ -122,7 +122,7 @@ open class WarehousesAPI { - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func createWarehouse(createWarehouseV1Input: CreateWarehouseV1Input, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateWarehouse200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func createWarehouse(createWarehouseV1Input: CreateWarehouseV1Input, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: CreateWarehouse201Response?, _ error: Error?) -> Void)) -> RequestTask { return createWarehouseWithRequestBuilder(createWarehouseV1Input: createWarehouseV1Input).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -136,14 +136,14 @@ open class WarehousesAPI { /** Create Warehouse - POST /warehouses - - Creates a new Warehouse. When called, this endpoint may generate the `Storage Destination Created` event in the [audit trail](/tag/Audit-Trail). + - Creates a new Warehouse. • When called, this endpoint may generate the `Storage Destination Created` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token - parameter createWarehouseV1Input: (body) - - returns: RequestBuilder + - returns: RequestBuilder */ - open class func createWarehouseWithRequestBuilder(createWarehouseV1Input: CreateWarehouseV1Input) -> RequestBuilder { + open class func createWarehouseWithRequestBuilder(createWarehouseV1Input: CreateWarehouseV1Input) -> RequestBuilder { let localVariablePath = "/warehouses" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: createWarehouseV1Input) @@ -156,7 +156,7 @@ open class WarehousesAPI { let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() + let localVariableRequestBuilder: RequestBuilder.Type = PublicApiAPI.requestBuilderFactory.getBuilder() return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } @@ -183,7 +183,7 @@ open class WarehousesAPI { /** Delete Warehouse - DELETE /warehouses/{warehouseId} - - Deletes an existing Warehouse. When called, this endpoint may generate the `Storage Destination Deleted` event in the [audit trail](/tag/Audit-Trail). + - Deletes an existing Warehouse. • When called, this endpoint may generate the `Storage Destination Deleted` event in the [audit trail](/tag/Audit-Trail). - BASIC: - type: http - name: token @@ -233,7 +233,7 @@ open class WarehousesAPI { /** Get Connection State from Warehouse - GET /warehouses/{warehouseId}/connection-state - - Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. + - Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 200 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. - BASIC: - type: http - name: token @@ -315,12 +315,12 @@ open class WarehousesAPI { List Connected Sources from Warehouse - parameter warehouseId: (path) - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listConnectedSourcesFromWarehouse(warehouseId: String, pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListConnectedSourcesFromWarehouse200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listConnectedSourcesFromWarehouse(warehouseId: String, pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListConnectedSourcesFromWarehouse200Response?, _ error: Error?) -> Void)) -> RequestTask { return listConnectedSourcesFromWarehouseWithRequestBuilder(warehouseId: warehouseId, pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -339,10 +339,10 @@ open class WarehousesAPI { - type: http - name: token - parameter warehouseId: (path) - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listConnectedSourcesFromWarehouseWithRequestBuilder(warehouseId: String, pagination: PaginationInput) -> RequestBuilder { + open class func listConnectedSourcesFromWarehouseWithRequestBuilder(warehouseId: String, pagination: PaginationInput? = nil) -> RequestBuilder { var localVariablePath = "/warehouses/{warehouseId}/connected-sources" let warehouseIdPreEscape = "\(APIHelper.mapValueToPathItem(warehouseId))" let warehouseIdPostEscape = warehouseIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -352,7 +352,7 @@ open class WarehousesAPI { var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -369,12 +369,12 @@ open class WarehousesAPI { /** List Warehouses - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func listWarehouses(pagination: PaginationInput, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListWarehouses200Response?, _ error: Error?) -> Void)) -> RequestTask { + open class func listWarehouses(pagination: PaginationInput? = nil, apiResponseQueue: DispatchQueue = PublicApiAPI.apiResponseQueue, completion: @escaping ((_ data: ListWarehouses200Response?, _ error: Error?) -> Void)) -> RequestTask { return listWarehousesWithRequestBuilder(pagination: pagination).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -392,17 +392,17 @@ open class WarehousesAPI { - BASIC: - type: http - name: token - - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. + - parameter pagination: (query) Defines the pagination parameters. This parameter exists in v1. (optional) - returns: RequestBuilder */ - open class func listWarehousesWithRequestBuilder(pagination: PaginationInput) -> RequestBuilder { + open class func listWarehousesWithRequestBuilder(pagination: PaginationInput? = nil) -> RequestBuilder { let localVariablePath = "/warehouses" let localVariableURLString = PublicApiAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "pagination": pagination.encodeToJSON(), + "pagination": pagination?.encodeToJSON(), ]) let localVariableNillableHeaders: [String: Any?] = [ @@ -494,7 +494,7 @@ open class WarehousesAPI { /** Update Warehouse - PATCH /warehouses/{warehouseId} - - Updates an existing Warehouse. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Storage Destination Modified * Storage Destination Enabled + - Updates an existing Warehouse. • When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events:* Storage Destination Modified * Storage Destination Enabled - BASIC: - type: http - name: token diff --git a/PublicApi/Classes/OpenAPIs/Models/Activation.swift b/PublicApi/Classes/OpenAPIs/Models/Activation.swift new file mode 100644 index 00000000..2eb3f81b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Activation.swift @@ -0,0 +1,81 @@ +// +// Activation.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Activation: Codable, JSONEncodable, Hashable { + + /** The activation id. */ + public var id: String + /** Activation Enabled Status. */ + public var enabled: Bool + /** The WORKSPACE id. */ + public var workspaceId: String + /** The space id. */ + public var spaceId: String + /** The audience id. */ + public var audienceId: String + /** The connection id. */ + public var connectionId: String + /** Type of activation trigger. */ + public var activationType: String + /** Name of the activation. */ + public var activationName: String + public var personalization: Personalization1 + public var destinationMapping: DestinationMapping1? + /** Whether to perform a resync after creation of the activation. */ + public var performResync: Bool? + + public init(id: String, enabled: Bool, workspaceId: String, spaceId: String, audienceId: String, connectionId: String, activationType: String, activationName: String, personalization: Personalization1, destinationMapping: DestinationMapping1? = nil, performResync: Bool? = nil) { + self.id = id + self.enabled = enabled + self.workspaceId = workspaceId + self.spaceId = spaceId + self.audienceId = audienceId + self.connectionId = connectionId + self.activationType = activationType + self.activationName = activationName + self.personalization = personalization + self.destinationMapping = destinationMapping + self.performResync = performResync + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case enabled + case workspaceId + case spaceId + case audienceId + case connectionId + case activationType + case activationName + case personalization + case destinationMapping + case performResync + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(enabled, forKey: .enabled) + try container.encode(workspaceId, forKey: .workspaceId) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(audienceId, forKey: .audienceId) + try container.encode(connectionId, forKey: .connectionId) + try container.encode(activationType, forKey: .activationType) + try container.encode(activationName, forKey: .activationName) + try container.encode(personalization, forKey: .personalization) + try container.encodeIfPresent(destinationMapping, forKey: .destinationMapping) + try container.encodeIfPresent(performResync, forKey: .performResync) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ActivationOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ActivationOutput.swift new file mode 100644 index 00000000..1f821815 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ActivationOutput.swift @@ -0,0 +1,82 @@ +// +// ActivationOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** A class that encapsulates the complete activation output with full details. */ +public struct ActivationOutput: Codable, JSONEncodable, Hashable { + + /** The activation id. */ + public var id: String + /** Activation Enabled Status. */ + public var enabled: Bool + /** The WORKSPACE id. */ + public var workspaceId: String + /** The space id. */ + public var spaceId: String + /** The audience id. */ + public var audienceId: String + /** The connection id. */ + public var connectionId: String + /** Type of activation trigger. */ + public var activationType: String + /** Name of the activation. */ + public var activationName: String + public var personalization: Personalization1 + public var destinationMapping: DestinationMapping1? + /** Whether to perform a resync after creation of the activation. */ + public var performResync: Bool? + + public init(id: String, enabled: Bool, workspaceId: String, spaceId: String, audienceId: String, connectionId: String, activationType: String, activationName: String, personalization: Personalization1, destinationMapping: DestinationMapping1? = nil, performResync: Bool? = nil) { + self.id = id + self.enabled = enabled + self.workspaceId = workspaceId + self.spaceId = spaceId + self.audienceId = audienceId + self.connectionId = connectionId + self.activationType = activationType + self.activationName = activationName + self.personalization = personalization + self.destinationMapping = destinationMapping + self.performResync = performResync + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case enabled + case workspaceId + case spaceId + case audienceId + case connectionId + case activationType + case activationName + case personalization + case destinationMapping + case performResync + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(enabled, forKey: .enabled) + try container.encode(workspaceId, forKey: .workspaceId) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(audienceId, forKey: .audienceId) + try container.encode(connectionId, forKey: .connectionId) + try container.encode(activationType, forKey: .activationType) + try container.encode(activationName, forKey: .activationName) + try container.encode(personalization, forKey: .personalization) + try container.encodeIfPresent(destinationMapping, forKey: .destinationMapping) + try container.encodeIfPresent(performResync, forKey: .performResync) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddActivationToAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/AddActivationToAudience200Response.swift new file mode 100644 index 00000000..661eba14 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AddActivationToAudience200Response.swift @@ -0,0 +1,32 @@ +// +// AddActivationToAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AddActivationToAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: AddActivationToAudienceAlphaOutput? + + public init(data: AddActivationToAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddActivationToAudienceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/AddActivationToAudienceAlphaInput.swift new file mode 100644 index 00000000..3360685b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AddActivationToAudienceAlphaInput.swift @@ -0,0 +1,57 @@ +// +// AddActivationToAudienceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to create an activation. */ +public struct AddActivationToAudienceAlphaInput: Codable, JSONEncodable, Hashable { + + /** Whether the event emitter should be created in an enabled state. Will trigger an audience run if enabled. */ + public var enabled: Bool? + /** Whether to perform a resync after creation of the activation. */ + public var performResync: Bool + /** Type of activation trigger. */ + public var activationType: String + /** Name of the activation. */ + public var activationName: String + public var personalization: Personalization + public var destinationMapping: DestinationMapping? + + public init(enabled: Bool? = nil, performResync: Bool, activationType: String, activationName: String, personalization: Personalization, destinationMapping: DestinationMapping? = nil) { + self.enabled = enabled + self.performResync = performResync + self.activationType = activationType + self.activationName = activationName + self.personalization = personalization + self.destinationMapping = destinationMapping + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enabled + case performResync + case activationType + case activationName + case personalization + case destinationMapping + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encode(performResync, forKey: .performResync) + try container.encode(activationType, forKey: .activationType) + try container.encode(activationName, forKey: .activationName) + try container.encode(personalization, forKey: .personalization) + try container.encodeIfPresent(destinationMapping, forKey: .destinationMapping) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddActivationToAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/AddActivationToAudienceAlphaOutput.swift new file mode 100644 index 00000000..b7fb272b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AddActivationToAudienceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// AddActivationToAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Activation output for create. */ +public struct AddActivationToAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var activation: Activation + + public init(activation: Activation) { + self.activation = activation + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case activation + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(activation, forKey: .activation) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddAudienceScheduleToAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/AddAudienceScheduleToAudience200Response.swift new file mode 100644 index 00000000..e33e4da6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AddAudienceScheduleToAudience200Response.swift @@ -0,0 +1,32 @@ +// +// AddAudienceScheduleToAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AddAudienceScheduleToAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: AddAudienceScheduleToAudienceAlphaOutput? + + public init(data: AddAudienceScheduleToAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddAudienceScheduleToAudienceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/AddAudienceScheduleToAudienceAlphaInput.swift new file mode 100644 index 00000000..49a76ebd --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AddAudienceScheduleToAudienceAlphaInput.swift @@ -0,0 +1,42 @@ +// +// AddAudienceScheduleToAudienceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines an input for creating an audience schedule. */ +public struct AddAudienceScheduleToAudienceAlphaInput: Codable, JSONEncodable, Hashable { + + public enum Strategy: String, Codable, CaseIterable { + case periodic = "PERIODIC" + case specificDays = "SPECIFIC_DAYS" + } + /** Strategy of the audience schedule (periodic or specific days). */ + public var strategy: Strategy + public var config: Config? + + public init(strategy: Strategy, config: Config?) { + self.strategy = strategy + self.config = config + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case strategy + case config + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(strategy, forKey: .strategy) + try container.encode(config, forKey: .config) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddAudienceScheduleToAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/AddAudienceScheduleToAudienceAlphaOutput.swift new file mode 100644 index 00000000..cbe1b900 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AddAudienceScheduleToAudienceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// AddAudienceScheduleToAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines the output of creating an audience schedule. */ +public struct AddAudienceScheduleToAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var audienceSchedule: AudienceSchedule + + public init(audienceSchedule: AudienceSchedule) { + self.audienceSchedule = audienceSchedule + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audienceSchedule + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audienceSchedule, forKey: .audienceSchedule) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddConnectionFromSourceToWarehouse200Response.swift b/PublicApi/Classes/OpenAPIs/Models/AddConnectionFromSourceToWarehouse201Response.swift similarity index 84% rename from PublicApi/Classes/OpenAPIs/Models/AddConnectionFromSourceToWarehouse200Response.swift rename to PublicApi/Classes/OpenAPIs/Models/AddConnectionFromSourceToWarehouse201Response.swift index 8a417138..11caa9b1 100644 --- a/PublicApi/Classes/OpenAPIs/Models/AddConnectionFromSourceToWarehouse200Response.swift +++ b/PublicApi/Classes/OpenAPIs/Models/AddConnectionFromSourceToWarehouse201Response.swift @@ -1,5 +1,5 @@ // -// AddConnectionFromSourceToWarehouse200Response.swift +// AddConnectionFromSourceToWarehouse201Response.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct AddConnectionFromSourceToWarehouse200Response: Codable, JSONEncodable, Hashable { +public struct AddConnectionFromSourceToWarehouse201Response: Codable, JSONEncodable, Hashable { public var data: AddConnectionFromSourceToWarehouseV1Output? diff --git a/PublicApi/Classes/OpenAPIs/Models/AddDestinationToAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/AddDestinationToAudience200Response.swift new file mode 100644 index 00000000..0a230037 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AddDestinationToAudience200Response.swift @@ -0,0 +1,32 @@ +// +// AddDestinationToAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AddDestinationToAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: AddDestinationToAudienceAlphaOutput? + + public init(data: AddDestinationToAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddDestinationToAudienceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/AddDestinationToAudienceAlphaInput.swift new file mode 100644 index 00000000..a510b07d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AddDestinationToAudienceAlphaInput.swift @@ -0,0 +1,43 @@ +// +// AddDestinationToAudienceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to Add a Destination into an Audience. */ +public struct AddDestinationToAudienceAlphaInput: Codable, JSONEncodable, Hashable { + + public var destination: Destination + /** Identifier sync configuration - array of external IDs to sync with their strategies. Maximum 5 items allowed. */ + public var idSyncConfiguration: [IDSyncConfigurationInput]? + /** The settings that a Destination requires to create audiences on a third-party platform. These settings are Destination-specific and thus are best defined as unknown. */ + public var connectionSettings: AnyCodable? + + public init(destination: Destination, idSyncConfiguration: [IDSyncConfigurationInput]? = nil, connectionSettings: AnyCodable? = nil) { + self.destination = destination + self.idSyncConfiguration = idSyncConfiguration + self.connectionSettings = connectionSettings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case destination + case idSyncConfiguration + case connectionSettings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(destination, forKey: .destination) + try container.encodeIfPresent(idSyncConfiguration, forKey: .idSyncConfiguration) + try container.encodeIfPresent(connectionSettings, forKey: .connectionSettings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddDestinationToAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/AddDestinationToAudienceAlphaOutput.swift new file mode 100644 index 00000000..21950d78 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AddDestinationToAudienceAlphaOutput.swift @@ -0,0 +1,42 @@ +// +// AddDestinationToAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AddDestinationToAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var connection: Connection + /** The id sync configuration for the Destination - array of external ids with their strategies. */ + public var idSyncConfiguration: [IDSyncConfigurationInput] + /** The settings that a Destination requires to create audiences on a third-party platform. These settings are Destination-specific and thus are best defined as unknown. */ + public var connectionSettings: AnyCodable? + + public init(connection: Connection, idSyncConfiguration: [IDSyncConfigurationInput], connectionSettings: AnyCodable? = nil) { + self.connection = connection + self.idSyncConfiguration = idSyncConfiguration + self.connectionSettings = connectionSettings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case connection + case idSyncConfiguration + case connectionSettings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(connection, forKey: .connection) + try container.encode(idSyncConfiguration, forKey: .idSyncConfiguration) + try container.encodeIfPresent(connectionSettings, forKey: .connectionSettings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AddLabelsToSourceV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/AddLabelsToSourceV1Input.swift index 2a84f64b..aa0e4abf 100644 --- a/PublicApi/Classes/OpenAPIs/Models/AddLabelsToSourceV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/AddLabelsToSourceV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct AddLabelsToSourceV1Input: Codable, JSONEncodable, Hashable { /** The labels to associate with a Source. */ - public var labels: [LabelV1]? + public var labels: [LabelV1] - public init(labels: [LabelV1]? = nil) { + public init(labels: [LabelV1]) { self.labels = labels } @@ -28,7 +28,7 @@ public struct AddLabelsToSourceV1Input: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(labels, forKey: .labels) + try container.encode(labels, forKey: .labels) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/AddPermissionsToUserGroupV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/AddPermissionsToUserGroupV1Input.swift index 4874c240..49889a28 100644 --- a/PublicApi/Classes/OpenAPIs/Models/AddPermissionsToUserGroupV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/AddPermissionsToUserGroupV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct AddPermissionsToUserGroupV1Input: Codable, JSONEncodable, Hashable { /** The permissions to add. */ - public var permissions: [PermissionInputV1]? + public var permissions: [PermissionInputV1] - public init(permissions: [PermissionInputV1]? = nil) { + public init(permissions: [PermissionInputV1]) { self.permissions = permissions } @@ -28,7 +28,7 @@ public struct AddPermissionsToUserGroupV1Input: Codable, JSONEncodable, Hashable public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(permissions, forKey: .permissions) + try container.encode(permissions, forKey: .permissions) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/AddPermissionsToUserV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/AddPermissionsToUserV1Input.swift index d7c945a8..292cec0a 100644 --- a/PublicApi/Classes/OpenAPIs/Models/AddPermissionsToUserV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/AddPermissionsToUserV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct AddPermissionsToUserV1Input: Codable, JSONEncodable, Hashable { /** The permissions to add. */ - public var permissions: [PermissionInputV1]? + public var permissions: [PermissionInputV1] - public init(permissions: [PermissionInputV1]? = nil) { + public init(permissions: [PermissionInputV1]) { self.permissions = permissions } @@ -28,7 +28,7 @@ public struct AddPermissionsToUserV1Input: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(permissions, forKey: .permissions) + try container.encode(permissions, forKey: .permissions) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/AddSourceToTrackingPlanV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/AddSourceToTrackingPlanV1Input.swift index c0e0f8a8..be82a66d 100644 --- a/PublicApi/Classes/OpenAPIs/Models/AddSourceToTrackingPlanV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/AddSourceToTrackingPlanV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct AddSourceToTrackingPlanV1Input: Codable, JSONEncodable, Hashable { /** The id of the Source associated with the Tracking Plan. Config API note: analogous to `sourceName`. */ - public var sourceId: String? + public var sourceId: String - public init(sourceId: String? = nil) { + public init(sourceId: String) { self.sourceId = sourceId } @@ -28,7 +28,7 @@ public struct AddSourceToTrackingPlanV1Input: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(sourceId, forKey: .sourceId) + try container.encode(sourceId, forKey: .sourceId) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/AddUsersToUserGroupV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/AddUsersToUserGroupV1Input.swift index cde7f582..92754a5a 100644 --- a/PublicApi/Classes/OpenAPIs/Models/AddUsersToUserGroupV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/AddUsersToUserGroupV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct AddUsersToUserGroupV1Input: Codable, JSONEncodable, Hashable { /** The email addresses of the users and invites to add. */ - public var emails: [String]? + public var emails: [String] - public init(emails: [String]? = nil) { + public init(emails: [String]) { self.emails = emails } @@ -28,7 +28,7 @@ public struct AddUsersToUserGroupV1Input: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(emails, forKey: .emails) + try container.encode(emails, forKey: .emails) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/Audience.swift b/PublicApi/Classes/OpenAPIs/Models/Audience.swift new file mode 100644 index 00000000..1ad6fdc6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Audience.swift @@ -0,0 +1,102 @@ +// +// Audience.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The audience summary output. */ +public struct Audience: Codable, JSONEncodable, Hashable { + + public enum AudienceType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case linked = "LINKED" + case users = "USERS" + } + /** Audience id. */ + public var id: String + /** Space id for the audience. */ + public var spaceId: String + /** Name of the audience. */ + public var name: String + /** Description of the audience. */ + public var description: String? + /** Key for the audience. */ + public var key: String + /** Enabled/disabled status for the audience. */ + public var enabled: Bool + public var definition: Definition4? + /** Status for the audience. Possible values: Backfilling, Computing, Failed, Live, Awaiting Destinations, Disabled. */ + public var status: String? + /** User id who created the audience. */ + public var createdBy: String + /** User id who last updated the audience. */ + public var updatedBy: String + /** Date the audience was created. */ + public var createdAt: String + /** Date the audience was last updated. */ + public var updatedAt: String + /** Denotes the type of audience product. */ + public var audienceType: AudienceType + public var options: Options2? + + public init(id: String, spaceId: String, name: String, description: String? = nil, key: String, enabled: Bool, definition: Definition4?, status: String? = nil, createdBy: String, updatedBy: String, createdAt: String, updatedAt: String, audienceType: AudienceType, options: Options2? = nil) { + self.id = id + self.spaceId = spaceId + self.name = name + self.description = description + self.key = key + self.enabled = enabled + self.definition = definition + self.status = status + self.createdBy = createdBy + self.updatedBy = updatedBy + self.createdAt = createdAt + self.updatedAt = updatedAt + self.audienceType = audienceType + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case spaceId + case name + case description + case key + case enabled + case definition + case status + case createdBy + case updatedBy + case createdAt + case updatedAt + case audienceType + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(key, forKey: .key) + try container.encode(enabled, forKey: .enabled) + try container.encode(definition, forKey: .definition) + try container.encodeIfPresent(status, forKey: .status) + try container.encode(createdBy, forKey: .createdBy) + try container.encode(updatedBy, forKey: .updatedBy) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encode(audienceType, forKey: .audienceType) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Audience1.swift b/PublicApi/Classes/OpenAPIs/Models/Audience1.swift new file mode 100644 index 00000000..29b7016b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Audience1.swift @@ -0,0 +1,115 @@ +// +// Audience1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The audience summary output. */ +public struct Audience1: Codable, JSONEncodable, Hashable { + + public enum AudienceType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case linked = "LINKED" + case users = "USERS" + } + public var computeCadence: ComputeCadence + public var size: Size? + public var options: Options3? + /** List of schedules for the audience. */ + public var schedules: [AudienceSchedule]? + /** Audience id. */ + public var id: String + /** Space id for the audience. */ + public var spaceId: String + /** Name of the audience. */ + public var name: String + /** Description of the audience. */ + public var description: String? + /** Key for the audience. */ + public var key: String + /** Enabled/disabled status for the audience. */ + public var enabled: Bool + public var definition: Definition4? + /** Status for the audience. Possible values: Backfilling, Computing, Failed, Live, Awaiting Destinations, Disabled. */ + public var status: String? + /** User id who created the audience. */ + public var createdBy: String + /** User id who last updated the audience. */ + public var updatedBy: String + /** Date the audience was created. */ + public var createdAt: String + /** Date the audience was last updated. */ + public var updatedAt: String + /** Denotes the type of audience product. */ + public var audienceType: AudienceType + + public init(computeCadence: ComputeCadence, size: Size? = nil, options: Options3? = nil, schedules: [AudienceSchedule]? = nil, id: String, spaceId: String, name: String, description: String? = nil, key: String, enabled: Bool, definition: Definition4?, status: String? = nil, createdBy: String, updatedBy: String, createdAt: String, updatedAt: String, audienceType: AudienceType) { + self.computeCadence = computeCadence + self.size = size + self.options = options + self.schedules = schedules + self.id = id + self.spaceId = spaceId + self.name = name + self.description = description + self.key = key + self.enabled = enabled + self.definition = definition + self.status = status + self.createdBy = createdBy + self.updatedBy = updatedBy + self.createdAt = createdAt + self.updatedAt = updatedAt + self.audienceType = audienceType + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case computeCadence + case size + case options + case schedules + case id + case spaceId + case name + case description + case key + case enabled + case definition + case status + case createdBy + case updatedBy + case createdAt + case updatedAt + case audienceType + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(computeCadence, forKey: .computeCadence) + try container.encodeIfPresent(size, forKey: .size) + try container.encodeIfPresent(options, forKey: .options) + try container.encodeIfPresent(schedules, forKey: .schedules) + try container.encode(id, forKey: .id) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(key, forKey: .key) + try container.encode(enabled, forKey: .enabled) + try container.encode(definition, forKey: .definition) + try container.encodeIfPresent(status, forKey: .status) + try container.encode(createdBy, forKey: .createdBy) + try container.encode(updatedBy, forKey: .updatedBy) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encode(audienceType, forKey: .audienceType) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceComputeCadence.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceComputeCadence.swift new file mode 100644 index 00000000..bda8772f --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceComputeCadence.swift @@ -0,0 +1,37 @@ +// +// AudienceComputeCadence.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AudienceComputeCadence: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case batch = "BATCH" + case realtime = "REALTIME" + } + /** The cadence type on which the audience's membership is computed. If 'BATCH', the audience is computed on a periodic basis. If 'REALTIME', the audience is continously computed. */ + public var type: ModelType + + public init(type: ModelType) { + self.type = type + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceDefinition.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceDefinition.swift new file mode 100644 index 00000000..ddef6e04 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceDefinition.swift @@ -0,0 +1,38 @@ +// +// AudienceDefinition.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AudienceDefinition: Codable, JSONEncodable, Hashable { + + /** The target entity relationship slug, only applicable for linked audiences. Use ```profile``` when the targeting the profile. Note that the value defaults to profile if not specified. Also note, that the value will be returned as null if the target entity is removed from the data graph. */ + public var targetEntity: String? + /** The query language string defining the audience segmentation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(targetEntity: String? = nil, query: String) { + self.targetEntity = targetEntity + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case targetEntity + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(targetEntity, forKey: .targetEntity) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceDefinitionWithoutTargetEntity.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceDefinitionWithoutTargetEntity.swift new file mode 100644 index 00000000..6c0a9616 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceDefinitionWithoutTargetEntity.swift @@ -0,0 +1,33 @@ +// +// AudienceDefinitionWithoutTargetEntity.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AudienceDefinitionWithoutTargetEntity: Codable, JSONEncodable, Hashable { + + /** The query language string defining the audience segmentation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(query: String) { + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceOptions.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceOptions.swift new file mode 100644 index 00000000..85bbb28a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceOptions.swift @@ -0,0 +1,43 @@ +// +// AudienceOptions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AudienceOptions: Codable, JSONEncodable, Hashable { + + /** Determines whether data prior to the audience being created is included when determining audience membership. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** The set of profile external identifiers being used to determine audience membership. Profiles will only be considered for audience membership if the profile has at least one external id whose key matches a value in this set. If unspecified, a default set of external identifiers will be used: ['user_id', 'email', 'android.idfa', 'ios.idfa']. */ + public var filterByExternalIds: [String]? + /** If specified, the value of this field indicates the number of days (specified from the date the audience was created) that event data will be included from when determining audience membership. If not specified, the default is set to the maximum event window size, or 7 days if no window condition is defined. Note that this is applied on a best-effort basis and may not always be applicable. In such cases, the response will not return a backfillEventDataDays value, and all available data will be taken into account. Note that includeHistoricalData must be set to true. */ + public var backfillEventDataDays: Double? + + public init(includeHistoricalData: Bool? = nil, filterByExternalIds: [String]? = nil, backfillEventDataDays: Double? = nil) { + self.includeHistoricalData = includeHistoricalData + self.filterByExternalIds = filterByExternalIds + self.backfillEventDataDays = backfillEventDataDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case includeHistoricalData + case filterByExternalIds + case backfillEventDataDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(filterByExternalIds, forKey: .filterByExternalIds) + try container.encodeIfPresent(backfillEventDataDays, forKey: .backfillEventDataDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceOptionsWithLookback.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceOptionsWithLookback.swift new file mode 100644 index 00000000..1cabca58 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceOptionsWithLookback.swift @@ -0,0 +1,43 @@ +// +// AudienceOptionsWithLookback.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AudienceOptionsWithLookback: Codable, JSONEncodable, Hashable { + + /** The set of profile external identifiers being used to determine audience membership. Profiles will only be considered for audience membership if the profile has at least one external id whose key matches a value in this set. */ + public var filterByExternalIds: [String] + /** Determines whether data prior to the audience being created is included when determining audience membership. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** If specified, the value of this field indicates the number of days (specified from the date the audience was created) that event data will be included from when determining audience membership. If not specified, the default is set to the maximum event window size, or 7 days if no window condition is defined. Note that this is applied on a best-effort basis and may not always be applicable. In such cases, the response will not return a backfillEventDataDays value, and all available data will be taken into account. Note that includeHistoricalData must be set to true. */ + public var backfillEventDataDays: Double? + + public init(filterByExternalIds: [String], includeHistoricalData: Bool? = nil, backfillEventDataDays: Double? = nil) { + self.filterByExternalIds = filterByExternalIds + self.includeHistoricalData = includeHistoricalData + self.backfillEventDataDays = backfillEventDataDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filterByExternalIds + case includeHistoricalData + case backfillEventDataDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(filterByExternalIds, forKey: .filterByExternalIds) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(backfillEventDataDays, forKey: .backfillEventDataDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudiencePreview.swift b/PublicApi/Classes/OpenAPIs/Models/AudiencePreview.swift new file mode 100644 index 00000000..6016b758 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudiencePreview.swift @@ -0,0 +1,34 @@ +// +// AudiencePreview.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The audience preview identifier. The audience preview results are calculated asyncronously and can be obtained by polling the getAudiencePreview endpoint. */ +public struct AudiencePreview: Codable, JSONEncodable, Hashable { + + /** Unique identifier for tracking and retrieving results of an audience preview. */ + public var id: String + + public init(id: String) { + self.id = id + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudiencePreview1.swift b/PublicApi/Classes/OpenAPIs/Models/AudiencePreview1.swift new file mode 100644 index 00000000..496c569c --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudiencePreview1.swift @@ -0,0 +1,76 @@ +// +// AudiencePreview1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The audience preview. */ +public struct AudiencePreview1: Codable, JSONEncodable, Hashable { + + public enum AudienceType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case linked = "LINKED" + case users = "USERS" + } + public enum Status: String, Codable, CaseIterable { + case completed = "COMPLETED" + case failed = "FAILED" + case running = "RUNNING" + } + /** Unique identifier for tracking and retrieving results of an audience preview. */ + public var id: String + /** The audience type of the preview. Possible values: USERS, ACCOUNTS, LINKED. */ + public var audienceType: AudienceType + public var definition: Definition5 + public var options: Options4 + /** Status for the audience preview. */ + public var status: Status + /** Sampled result membership for the audience preview. Only has a value if the status is 'COMPLETED'. */ + public var results: [AudiencePreviewResult]? + public var size: Size1? + /** Explanation of why the audience preview failed. Only has a value if status is 'FAILED'. */ + public var failureReason: String? + + public init(id: String, audienceType: AudienceType, definition: Definition5, options: Options4, status: Status, results: [AudiencePreviewResult]? = nil, size: Size1? = nil, failureReason: String? = nil) { + self.id = id + self.audienceType = audienceType + self.definition = definition + self.options = options + self.status = status + self.results = results + self.size = size + self.failureReason = failureReason + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case audienceType + case definition + case options + case status + case results + case size + case failureReason + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(audienceType, forKey: .audienceType) + try container.encode(definition, forKey: .definition) + try container.encode(options, forKey: .options) + try container.encode(status, forKey: .status) + try container.encodeIfPresent(results, forKey: .results) + try container.encodeIfPresent(size, forKey: .size) + try container.encodeIfPresent(failureReason, forKey: .failureReason) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewAccountResult.swift b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewAccountResult.swift new file mode 100644 index 00000000..ca5a62d5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewAccountResult.swift @@ -0,0 +1,34 @@ +// +// AudiencePreviewAccountResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Result membership object for an audience preview with `audienceType: ACCOUNTS`. */ +public struct AudiencePreviewAccountResult: Codable, JSONEncodable, Hashable { + + /** Account id. */ + public var id: String + + public init(id: String) { + self.id = id + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewEntitiesResult.swift b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewEntitiesResult.swift new file mode 100644 index 00000000..bb0d4742 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewEntitiesResult.swift @@ -0,0 +1,64 @@ +// +// AudiencePreviewEntitiesResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Result membership object for an audience preview with `audienceType: USERS` or `audienceType: LINKED`. */ +public struct AudiencePreviewEntitiesResult: Codable, JSONEncodable, Hashable { + + /** Entity id. */ + public var id: String + /** The entity primary key column name. */ + public var idProperty: String + /** The entity relationship slug. */ + public var relationshipSlug: String + /** The entity properties. */ + public var properties: JSON? + /** Related entities that are one level deeper will only be returned if those entities are referenced in the audience definition. */ + public var entities: [String: AnyCodable]? + /** Related list of profiles. */ + public var profiles: [Profile]? + /** Indicates if only a subset of the profiles associated with the entity were returned. */ + public var profilesTruncated: Bool + + public init(id: String, idProperty: String, relationshipSlug: String, properties: JSON? = nil, entities: [String: AnyCodable]? = nil, profiles: [Profile]? = nil, profilesTruncated: Bool) { + self.id = id + self.idProperty = idProperty + self.relationshipSlug = relationshipSlug + self.properties = properties + self.entities = entities + self.profiles = profiles + self.profilesTruncated = profilesTruncated + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case idProperty + case relationshipSlug + case properties + case entities + case profiles + case profilesTruncated + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(idProperty, forKey: .idProperty) + try container.encode(relationshipSlug, forKey: .relationshipSlug) + try container.encodeIfPresent(properties, forKey: .properties) + try container.encodeIfPresent(entities, forKey: .entities) + try container.encodeIfPresent(profiles, forKey: .profiles) + try container.encode(profilesTruncated, forKey: .profilesTruncated) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewIdentifier.swift b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewIdentifier.swift new file mode 100644 index 00000000..f67cca64 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewIdentifier.swift @@ -0,0 +1,34 @@ +// +// AudiencePreviewIdentifier.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Identifier for an audience preview. */ +public struct AudiencePreviewIdentifier: Codable, JSONEncodable, Hashable { + + /** Unique identifier for tracking and retrieving results of an audience preview. */ + public var id: String + + public init(id: String) { + self.id = id + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewProfileResult.swift b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewProfileResult.swift new file mode 100644 index 00000000..6d6de38a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewProfileResult.swift @@ -0,0 +1,39 @@ +// +// AudiencePreviewProfileResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Result membership object for an audience preview with `audienceType: USERS` or `audienceType: LINKED`. */ +public struct AudiencePreviewProfileResult: Codable, JSONEncodable, Hashable { + + /** Segment id. */ + public var id: String + /** The entities associated with the profile. Will only have a value if the audience preview has `audienceType: LINKED` and entities are referenced in the audience preview's definition. */ + public var entities: JSON? + + public init(id: String, entities: JSON? = nil) { + self.id = id + self.entities = entities + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case entities + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(entities, forKey: .entities) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewResult.swift b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewResult.swift new file mode 100644 index 00000000..9e4698cf --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudiencePreviewResult.swift @@ -0,0 +1,63 @@ +// +// AudiencePreviewResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AudiencePreviewResult: Codable, JSONEncodable, Hashable { + + /** Entity id. */ + public var id: String + /** Related entities that are one level deeper will only be returned if those entities are referenced in the audience definition. */ + public var entities: [String: AnyCodable]? + /** The entity primary key column name. */ + public var idProperty: String + /** The entity relationship slug. */ + public var relationshipSlug: String + /** The entity properties. */ + public var properties: JSON? + /** Related list of profiles. */ + public var profiles: [Profile]? + /** Indicates if only a subset of the profiles associated with the entity were returned. */ + public var profilesTruncated: Bool + + public init(id: String, entities: [String: AnyCodable]? = nil, idProperty: String, relationshipSlug: String, properties: JSON? = nil, profiles: [Profile]? = nil, profilesTruncated: Bool) { + self.id = id + self.entities = entities + self.idProperty = idProperty + self.relationshipSlug = relationshipSlug + self.properties = properties + self.profiles = profiles + self.profilesTruncated = profilesTruncated + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case entities + case idProperty + case relationshipSlug + case properties + case profiles + case profilesTruncated + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(entities, forKey: .entities) + try container.encode(idProperty, forKey: .idProperty) + try container.encode(relationshipSlug, forKey: .relationshipSlug) + try container.encodeIfPresent(properties, forKey: .properties) + try container.encodeIfPresent(profiles, forKey: .profiles) + try container.encode(profilesTruncated, forKey: .profilesTruncated) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceRunInfo.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceRunInfo.swift new file mode 100644 index 00000000..5f3f3602 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceRunInfo.swift @@ -0,0 +1,34 @@ +// +// AudienceRunInfo.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Run information for force execute audience output. */ +public struct AudienceRunInfo: Codable, JSONEncodable, Hashable { + + /** The workflow id of the execution workflow that was started. */ + public var id: String + + public init(id: String) { + self.id = id + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceSchedule.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceSchedule.swift new file mode 100644 index 00000000..2ffaf777 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceSchedule.swift @@ -0,0 +1,52 @@ +// +// AudienceSchedule.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The audience schedule. */ +public struct AudienceSchedule: Codable, JSONEncodable, Hashable { + + public enum Strategy: String, Codable, CaseIterable { + case periodic = "PERIODIC" + case specificDays = "SPECIFIC_DAYS" + } + /** Distinct identifier for the schedule. */ + public var id: String + /** Strategy of the audience schedule (periodic or specific days). */ + public var strategy: Strategy + public var config: Config? + /** The next scheduled execution time (RFC3339). */ + public var nextExecution: String? + + public init(id: String, strategy: Strategy, config: Config?, nextExecution: String? = nil) { + self.id = id + self.strategy = strategy + self.config = config + self.nextExecution = nextExecution + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case strategy + case config + case nextExecution + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(strategy, forKey: .strategy) + try container.encode(config, forKey: .config) + try container.encodeIfPresent(nextExecution, forKey: .nextExecution) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceSchedule1.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceSchedule1.swift new file mode 100644 index 00000000..e9280672 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceSchedule1.swift @@ -0,0 +1,52 @@ +// +// AudienceSchedule1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The updated audience schedule. */ +public struct AudienceSchedule1: Codable, JSONEncodable, Hashable { + + public enum Strategy: String, Codable, CaseIterable { + case periodic = "PERIODIC" + case specificDays = "SPECIFIC_DAYS" + } + /** Distinct identifier for the schedule. */ + public var id: String + /** Strategy of the audience schedule (periodic or specific days). */ + public var strategy: Strategy + public var config: Config? + /** The next scheduled execution time (RFC3339). */ + public var nextExecution: String? + + public init(id: String, strategy: Strategy, config: Config?, nextExecution: String? = nil) { + self.id = id + self.strategy = strategy + self.config = config + self.nextExecution = nextExecution + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case strategy + case config + case nextExecution + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(strategy, forKey: .strategy) + try container.encode(config, forKey: .config) + try container.encodeIfPresent(nextExecution, forKey: .nextExecution) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceSize.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceSize.swift new file mode 100644 index 00000000..009d0a41 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceSize.swift @@ -0,0 +1,48 @@ +// +// AudienceSize.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AudienceSize: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case entities = "ENTITIES" + case users = "USERS" + } + /** The total audience membership count. Refer to the type field to determine the unit for this field (profiles, accounts, etc). */ + public var count: Double? + /** The unit type for the count(s) being returned. */ + public var type: ModelType + /** The unique audience membership count. */ + public var uniqueCount: Double? + + public init(count: Double? = nil, type: ModelType, uniqueCount: Double? = nil) { + self.count = count + self.type = type + self.uniqueCount = uniqueCount + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case count + case type + case uniqueCount + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(count, forKey: .count) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(uniqueCount, forKey: .uniqueCount) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceSummary.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceSummary.swift new file mode 100644 index 00000000..2c813e64 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceSummary.swift @@ -0,0 +1,102 @@ +// +// AudienceSummary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines an Audience. */ +public struct AudienceSummary: Codable, JSONEncodable, Hashable { + + public enum AudienceType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case linked = "LINKED" + case users = "USERS" + } + /** Audience id. */ + public var id: String + /** Space id for the audience. */ + public var spaceId: String + /** Name of the audience. */ + public var name: String + /** Description of the audience. */ + public var description: String? + /** Key for the audience. */ + public var key: String + /** Enabled/disabled status for the audience. */ + public var enabled: Bool + public var definition: Definition4? + /** Status for the audience. Possible values: Backfilling, Computing, Failed, Live, Awaiting Destinations, Disabled. */ + public var status: String? + /** User id who created the audience. */ + public var createdBy: String + /** User id who last updated the audience. */ + public var updatedBy: String + /** Date the audience was created. */ + public var createdAt: String + /** Date the audience was last updated. */ + public var updatedAt: String + /** Denotes the type of audience product. */ + public var audienceType: AudienceType + public var options: Options2? + + public init(id: String, spaceId: String, name: String, description: String? = nil, key: String, enabled: Bool, definition: Definition4?, status: String? = nil, createdBy: String, updatedBy: String, createdAt: String, updatedAt: String, audienceType: AudienceType, options: Options2? = nil) { + self.id = id + self.spaceId = spaceId + self.name = name + self.description = description + self.key = key + self.enabled = enabled + self.definition = definition + self.status = status + self.createdBy = createdBy + self.updatedBy = updatedBy + self.createdAt = createdAt + self.updatedAt = updatedAt + self.audienceType = audienceType + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case spaceId + case name + case description + case key + case enabled + case definition + case status + case createdBy + case updatedBy + case createdAt + case updatedAt + case audienceType + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(key, forKey: .key) + try container.encode(enabled, forKey: .enabled) + try container.encode(definition, forKey: .definition) + try container.encodeIfPresent(status, forKey: .status) + try container.encode(createdBy, forKey: .createdBy) + try container.encode(updatedBy, forKey: .updatedBy) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encode(audienceType, forKey: .audienceType) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AudienceSummaryWithAudienceTypeAndLookback.swift b/PublicApi/Classes/OpenAPIs/Models/AudienceSummaryWithAudienceTypeAndLookback.swift new file mode 100644 index 00000000..65397a19 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/AudienceSummaryWithAudienceTypeAndLookback.swift @@ -0,0 +1,114 @@ +// +// AudienceSummaryWithAudienceTypeAndLookback.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AudienceSummaryWithAudienceTypeAndLookback: Codable, JSONEncodable, Hashable { + + public enum AudienceType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case linked = "LINKED" + case users = "USERS" + } + public var computeCadence: ComputeCadence + public var size: Size? + public var options: Options3? + /** List of schedules for the audience. */ + public var schedules: [AudienceSchedule]? + /** Audience id. */ + public var id: String + /** Space id for the audience. */ + public var spaceId: String + /** Name of the audience. */ + public var name: String + /** Description of the audience. */ + public var description: String? + /** Key for the audience. */ + public var key: String + /** Enabled/disabled status for the audience. */ + public var enabled: Bool + public var definition: Definition4? + /** Status for the audience. Possible values: Backfilling, Computing, Failed, Live, Awaiting Destinations, Disabled. */ + public var status: String? + /** User id who created the audience. */ + public var createdBy: String + /** User id who last updated the audience. */ + public var updatedBy: String + /** Date the audience was created. */ + public var createdAt: String + /** Date the audience was last updated. */ + public var updatedAt: String + /** Denotes the type of audience product. */ + public var audienceType: AudienceType + + public init(computeCadence: ComputeCadence, size: Size? = nil, options: Options3? = nil, schedules: [AudienceSchedule]? = nil, id: String, spaceId: String, name: String, description: String? = nil, key: String, enabled: Bool, definition: Definition4?, status: String? = nil, createdBy: String, updatedBy: String, createdAt: String, updatedAt: String, audienceType: AudienceType) { + self.computeCadence = computeCadence + self.size = size + self.options = options + self.schedules = schedules + self.id = id + self.spaceId = spaceId + self.name = name + self.description = description + self.key = key + self.enabled = enabled + self.definition = definition + self.status = status + self.createdBy = createdBy + self.updatedBy = updatedBy + self.createdAt = createdAt + self.updatedAt = updatedAt + self.audienceType = audienceType + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case computeCadence + case size + case options + case schedules + case id + case spaceId + case name + case description + case key + case enabled + case definition + case status + case createdBy + case updatedBy + case createdAt + case updatedAt + case audienceType + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(computeCadence, forKey: .computeCadence) + try container.encodeIfPresent(size, forKey: .size) + try container.encodeIfPresent(options, forKey: .options) + try container.encodeIfPresent(schedules, forKey: .schedules) + try container.encode(id, forKey: .id) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(key, forKey: .key) + try container.encode(enabled, forKey: .enabled) + try container.encode(definition, forKey: .definition) + try container.encodeIfPresent(status, forKey: .status) + try container.encode(createdBy, forKey: .createdBy) + try container.encode(updatedBy, forKey: .updatedBy) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encode(audienceType, forKey: .audienceType) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/AuditEventV1.swift b/PublicApi/Classes/OpenAPIs/Models/AuditEventV1.swift index 2ebec809..c51e410f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/AuditEventV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/AuditEventV1.swift @@ -21,6 +21,8 @@ public struct AuditEventV1: Codable, JSONEncodable, Hashable { public var type: String /** The user or API token that triggered this event. */ public var actor: String + /** The email of the user that triggered this event. */ + public var actorEmail: String? /** The identifier of the resource affected by this event. */ public var resourceId: String /** The kind of resource affected by this event. */ @@ -28,11 +30,12 @@ public struct AuditEventV1: Codable, JSONEncodable, Hashable { /** The name of the resource affected by this event. */ public var resourceName: String - public init(id: String, timestamp: String, type: String, actor: String, resourceId: String, resourceType: String, resourceName: String) { + public init(id: String, timestamp: String, type: String, actor: String, actorEmail: String? = nil, resourceId: String, resourceType: String, resourceName: String) { self.id = id self.timestamp = timestamp self.type = type self.actor = actor + self.actorEmail = actorEmail self.resourceId = resourceId self.resourceType = resourceType self.resourceName = resourceName @@ -43,6 +46,7 @@ public struct AuditEventV1: Codable, JSONEncodable, Hashable { case timestamp case type case actor + case actorEmail case resourceId case resourceType case resourceName @@ -56,6 +60,7 @@ public struct AuditEventV1: Codable, JSONEncodable, Hashable { try container.encode(timestamp, forKey: .timestamp) try container.encode(type, forKey: .type) try container.encode(actor, forKey: .actor) + try container.encodeIfPresent(actorEmail, forKey: .actorEmail) try container.encode(resourceId, forKey: .resourceId) try container.encode(resourceType, forKey: .resourceType) try container.encode(resourceName, forKey: .resourceName) diff --git a/PublicApi/Classes/OpenAPIs/Models/BatchQueryMessagingSubscriptionsForSpaceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/BatchQueryMessagingSubscriptionsForSpaceAlphaOutput.swift index a4639f53..d29bd4c2 100644 --- a/PublicApi/Classes/OpenAPIs/Models/BatchQueryMessagingSubscriptionsForSpaceAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/BatchQueryMessagingSubscriptionsForSpaceAlphaOutput.swift @@ -19,9 +19,9 @@ public struct BatchQueryMessagingSubscriptionsForSpaceAlphaOutput: Codable, JSON public var failures: [GetMessagingSubscriptionFailureResponse] /** General errors when making the request such as invalid payload or wrong http method errors. */ public var errors: [MessageSubscriptionResponseError] - public var pagination: Pagination? + public var pagination: Pagination3? - public init(successes: [GetMessagingSubscriptionSuccessResponse], failures: [GetMessagingSubscriptionFailureResponse], errors: [MessageSubscriptionResponseError], pagination: Pagination? = nil) { + public init(successes: [GetMessagingSubscriptionSuccessResponse], failures: [GetMessagingSubscriptionFailureResponse], errors: [MessageSubscriptionResponseError], pagination: Pagination3? = nil) { self.successes = successes self.failures = failures self.errors = errors diff --git a/PublicApi/Classes/OpenAPIs/Models/CancelReverseETLSyncForModel200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CancelReverseETLSyncForModel200Response.swift new file mode 100644 index 00000000..7e458365 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CancelReverseETLSyncForModel200Response.swift @@ -0,0 +1,32 @@ +// +// CancelReverseETLSyncForModel200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CancelReverseETLSyncForModel200Response: Codable, JSONEncodable, Hashable { + + public var data: CancelReverseETLSyncForModelOutput? + + public init(data: CancelReverseETLSyncForModelOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CancelReverseETLSyncForModelInput.swift b/PublicApi/Classes/OpenAPIs/Models/CancelReverseETLSyncForModelInput.swift new file mode 100644 index 00000000..65089c11 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CancelReverseETLSyncForModelInput.swift @@ -0,0 +1,34 @@ +// +// CancelReverseETLSyncForModelInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines the parameters needed to cancel a sync for a RETL connection. */ +public struct CancelReverseETLSyncForModelInput: Codable, JSONEncodable, Hashable { + + /** The reason for canceling the sync. - IncorrectModel = 0 - IncorrectDest = 1 - IncorrectKeys = 2 - IncorrectMapping = 3 - Other = 4 */ + public var reasonForCanceling: Double? + + public init(reasonForCanceling: Double? = nil) { + self.reasonForCanceling = reasonForCanceling + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case reasonForCanceling + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(reasonForCanceling, forKey: .reasonForCanceling) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CancelReverseETLSyncForModelOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CancelReverseETLSyncForModelOutput.swift new file mode 100644 index 00000000..b94c111e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CancelReverseETLSyncForModelOutput.swift @@ -0,0 +1,54 @@ +// +// CancelReverseETLSyncForModelOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** CancelReverseETLSyncForModelOutput either will return an error or a \"CANCELLING\" status. */ +public struct CancelReverseETLSyncForModelOutput: Codable, JSONEncodable, Hashable { + + /** The id of the Model. */ + public var modelId: String + /** The id of the Sync. */ + public var syncId: String + /** A place holder for a machine-friendly category for an error, if applicable. - \"SyncAlreadyCanceled\" - \"SyncFinishedCannotCancel\" */ + public var errorCode: String? + /** A place holder for a human-readable description of the error, if applicable. - \"sync already canceled\" - \"sync already finished\". */ + public var errorMessage: String? + /** If no error, status will be CANCELLING, as the extract/load might take some time to cancel. */ + public var status: String? + + public init(modelId: String, syncId: String, errorCode: String? = nil, errorMessage: String? = nil, status: String? = nil) { + self.modelId = modelId + self.syncId = syncId + self.errorCode = errorCode + self.errorMessage = errorMessage + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case modelId + case syncId + case errorCode + case errorMessage + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(modelId, forKey: .modelId) + try container.encode(syncId, forKey: .syncId) + try container.encodeIfPresent(errorCode, forKey: .errorCode) + try container.encodeIfPresent(errorMessage, forKey: .errorMessage) + try container.encodeIfPresent(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ComputeCadence.swift b/PublicApi/Classes/OpenAPIs/Models/ComputeCadence.swift new file mode 100644 index 00000000..c0b97159 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ComputeCadence.swift @@ -0,0 +1,38 @@ +// +// ComputeCadence.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Details the cadence on which the audience's membership is computed. */ +public struct ComputeCadence: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case batch = "BATCH" + case realtime = "REALTIME" + } + /** The cadence type on which the audience's membership is computed. If 'BATCH', the audience is computed on a periodic basis. If 'REALTIME', the audience is continously computed. */ + public var type: ModelType + + public init(type: ModelType) { + self.type = type + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ComputedTrait.swift b/PublicApi/Classes/OpenAPIs/Models/ComputedTrait.swift new file mode 100644 index 00000000..9149accd --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ComputedTrait.swift @@ -0,0 +1,92 @@ +// +// ComputedTrait.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The computed trait summary output. */ +public struct ComputedTrait: Codable, JSONEncodable, Hashable { + + /** Computed trait id. */ + public var id: String + /** Space id for the computed trait. */ + public var spaceId: String + /** Name of the computed trait. */ + public var name: String + /** Description of the computed trait. */ + public var description: String? + /** Key for the computed trait. */ + public var key: String + /** Enabled/disabled status for the computed trait. */ + public var enabled: Bool + public var definition: Definition7? + /** Status for the computed trait. Possible values: Backfilling, Computing, Failed, Live, Awaiting Destinations, Disabled. */ + public var status: String? + /** User id who created the computed trait. */ + public var createdBy: String + /** User id who last updated the computed trait. */ + public var updatedBy: String + /** The timestamp of the computed trait's creation. */ + public var createdAt: String + /** The timestamp of the computed trait's last change. */ + public var updatedAt: String + public var options: Options6? + + public init(id: String, spaceId: String, name: String, description: String? = nil, key: String, enabled: Bool, definition: Definition7?, status: String? = nil, createdBy: String, updatedBy: String, createdAt: String, updatedAt: String, options: Options6? = nil) { + self.id = id + self.spaceId = spaceId + self.name = name + self.description = description + self.key = key + self.enabled = enabled + self.definition = definition + self.status = status + self.createdBy = createdBy + self.updatedBy = updatedBy + self.createdAt = createdAt + self.updatedAt = updatedAt + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case spaceId + case name + case description + case key + case enabled + case definition + case status + case createdBy + case updatedBy + case createdAt + case updatedAt + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(key, forKey: .key) + try container.encode(enabled, forKey: .enabled) + try container.encode(definition, forKey: .definition) + try container.encodeIfPresent(status, forKey: .status) + try container.encode(createdBy, forKey: .createdBy) + try container.encode(updatedBy, forKey: .updatedBy) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ComputedTraitSummary.swift b/PublicApi/Classes/OpenAPIs/Models/ComputedTraitSummary.swift new file mode 100644 index 00000000..687c16a7 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ComputedTraitSummary.swift @@ -0,0 +1,92 @@ +// +// ComputedTraitSummary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines a Computed trait. */ +public struct ComputedTraitSummary: Codable, JSONEncodable, Hashable { + + /** Computed trait id. */ + public var id: String + /** Space id for the computed trait. */ + public var spaceId: String + /** Name of the computed trait. */ + public var name: String + /** Description of the computed trait. */ + public var description: String? + /** Key for the computed trait. */ + public var key: String + /** Enabled/disabled status for the computed trait. */ + public var enabled: Bool + public var definition: Definition7? + /** Status for the computed trait. Possible values: Backfilling, Computing, Failed, Live, Awaiting Destinations, Disabled. */ + public var status: String? + /** User id who created the computed trait. */ + public var createdBy: String + /** User id who last updated the computed trait. */ + public var updatedBy: String + /** The timestamp of the computed trait's creation. */ + public var createdAt: String + /** The timestamp of the computed trait's last change. */ + public var updatedAt: String + public var options: Options6? + + public init(id: String, spaceId: String, name: String, description: String? = nil, key: String, enabled: Bool, definition: Definition7?, status: String? = nil, createdBy: String, updatedBy: String, createdAt: String, updatedAt: String, options: Options6? = nil) { + self.id = id + self.spaceId = spaceId + self.name = name + self.description = description + self.key = key + self.enabled = enabled + self.definition = definition + self.status = status + self.createdBy = createdBy + self.updatedBy = updatedBy + self.createdAt = createdAt + self.updatedAt = updatedAt + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case spaceId + case name + case description + case key + case enabled + case definition + case status + case createdBy + case updatedBy + case createdAt + case updatedAt + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(key, forKey: .key) + try container.encode(enabled, forKey: .enabled) + try container.encode(definition, forKey: .definition) + try container.encodeIfPresent(status, forKey: .status) + try container.encode(createdBy, forKey: .createdBy) + try container.encode(updatedBy, forKey: .updatedBy) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ComputedTraitsDefinition.swift b/PublicApi/Classes/OpenAPIs/Models/ComputedTraitsDefinition.swift new file mode 100644 index 00000000..13255655 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ComputedTraitsDefinition.swift @@ -0,0 +1,43 @@ +// +// ComputedTraitsDefinition.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines an computed trait definition. */ +public struct ComputedTraitsDefinition: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case users = "USERS" + } + /** The query language string defining the computed trait aggregation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + /** The underlying data type being aggregated for this computed trait. Possible values: users, accounts. */ + public var type: ModelType + + public init(query: String, type: ModelType) { + self.query = query + self.type = type + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case query + case type + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(query, forKey: .query) + try container.encode(type, forKey: .type) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Config.swift b/PublicApi/Classes/OpenAPIs/Models/Config.swift new file mode 100644 index 00000000..8ac5d3de --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Config.swift @@ -0,0 +1,49 @@ +// +// Config.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Configuration for PERIODIC or SPECIFIC_DAYS strategies. */ +public struct Config: Codable, JSONEncodable, Hashable { + + /** Go duration format string, only supporting units \"d\" (days), \"h\" (hours) and \"m\" (minutes). Acceptable values are: - 15m - 30m - 1h - 2h - 4h - 6h - 8h - 12h - 1d */ + public var interval: String + /** Days of week for schedule (0=Sunday, 6=Saturday). */ + public var days: [Double] + /** Hours of day for schedule (0-23). */ + public var hours: [Double] + /** TZ database time zone identifier; for example, America/New_York. */ + public var timezone: String + + public init(interval: String, days: [Double], hours: [Double], timezone: String) { + self.interval = interval + self.days = days + self.hours = hours + self.timezone = timezone + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case interval + case days + case hours + case timezone + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(interval, forKey: .interval) + try container.encode(days, forKey: .days) + try container.encode(hours, forKey: .hours) + try container.encode(timezone, forKey: .timezone) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Config1.swift b/PublicApi/Classes/OpenAPIs/Models/Config1.swift new file mode 100644 index 00000000..cea8c9e9 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Config1.swift @@ -0,0 +1,64 @@ +// +// Config1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Config contains interval duration in case of periodic or day and hours in case of specific_days. Empty if strategy is MANUAL. */ +public struct Config1: Codable, JSONEncodable, Hashable { + + /** Duration is specified as a string, EG: 15m, 3h25m30s. */ + public var interval: String + /** Days of the week. */ + public var days: [Double] + /** Hours of the day. */ + public var hours: [Double] + /** Timezone respected by the cron string. Format must be in IANA Timezone Identifier. Example: 'America/Los_Angeles'. */ + public var timezone: String + /** 5 field cron string expression. The cron expression must be larger than 15 minutes. */ + public var spec: String + /** The dbt Cloud job used to trigger a sync for a Reverse ETL Connection. */ + public var jobId: String + /** The dbt Cloud account where the job belongs to. */ + public var accountId: String + + public init(interval: String, days: [Double], hours: [Double], timezone: String, spec: String, jobId: String, accountId: String) { + self.interval = interval + self.days = days + self.hours = hours + self.timezone = timezone + self.spec = spec + self.jobId = jobId + self.accountId = accountId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case interval + case days + case hours + case timezone + case spec + case jobId + case accountId + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(interval, forKey: .interval) + try container.encode(days, forKey: .days) + try container.encode(hours, forKey: .hours) + try container.encode(timezone, forKey: .timezone) + try container.encode(spec, forKey: .spec) + try container.encode(jobId, forKey: .jobId) + try container.encode(accountId, forKey: .accountId) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Connection.swift b/PublicApi/Classes/OpenAPIs/Models/Connection.swift new file mode 100644 index 00000000..84296fc5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Connection.swift @@ -0,0 +1,34 @@ +// +// Connection.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The connection that was created. */ +public struct Connection: Codable, JSONEncodable, Hashable { + + /** The id of the connection that was created. */ + public var id: String + + public init(id: String) { + self.id = id + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Contact.swift b/PublicApi/Classes/OpenAPIs/Models/Contact.swift index c5aa736c..41e05436 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Contact.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Contact.swift @@ -14,15 +14,15 @@ import AnyCodable public struct Contact: Codable, JSONEncodable, Hashable { /** Name of this contact. */ - public var name: String + public var name: String? /** Email of this contact. */ public var email: String /** Role of this contact. */ - public var role: String + public var role: String? /** Whether this is a primary contact. */ - public var isPrimary: Bool + public var isPrimary: Bool? - public init(name: String, email: String, role: String, isPrimary: Bool) { + public init(name: String? = nil, email: String, role: String? = nil, isPrimary: Bool? = nil) { self.name = name self.email = email self.role = role @@ -40,10 +40,10 @@ public struct Contact: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) + try container.encodeIfPresent(name, forKey: .name) try container.encode(email, forKey: .email) - try container.encode(role, forKey: .role) - try container.encode(isPrimary, forKey: .isPrimary) + try container.encodeIfPresent(role, forKey: .role) + try container.encodeIfPresent(isPrimary, forKey: .isPrimary) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudience200Response.swift new file mode 100644 index 00000000..46f30a3c --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudience200Response.swift @@ -0,0 +1,32 @@ +// +// CreateAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: CreateAudienceBetaOutput? + + public init(data: CreateAudienceBetaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudience200Response1.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudience200Response1.swift new file mode 100644 index 00000000..d88262d0 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudience200Response1.swift @@ -0,0 +1,32 @@ +// +// CreateAudience200Response1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateAudience200Response1: Codable, JSONEncodable, Hashable { + + public var data: CreateAudienceAlphaOutput? + + public init(data: CreateAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudienceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudienceAlphaInput.swift new file mode 100644 index 00000000..9b003870 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudienceAlphaInput.swift @@ -0,0 +1,61 @@ +// +// CreateAudienceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to create an audience. */ +public struct CreateAudienceAlphaInput: Codable, JSONEncodable, Hashable { + + public enum AudienceType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case users = "USERS" + } + /** Name of the audience. */ + public var name: String + /** Determines whether a computation is enabled. */ + public var enabled: Bool? + /** Description of the audience. */ + public var description: String? + public var definition: Definition + /** Denotes the type of audience product. Possible values: USERS, ACCOUNTS. */ + public var audienceType: AudienceType + public var options: Options? + + public init(name: String, enabled: Bool? = nil, description: String? = nil, definition: Definition, audienceType: AudienceType, options: Options? = nil) { + self.name = name + self.enabled = enabled + self.description = description + self.definition = definition + self.audienceType = audienceType + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case enabled + case description + case definition + case audienceType + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(definition, forKey: .definition) + try container.encode(audienceType, forKey: .audienceType) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudienceAlphaOutput.swift new file mode 100644 index 00000000..cc6c88fa --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudienceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// CreateAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Audience output for create. */ +public struct CreateAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var audience: Audience + + public init(audience: Audience) { + self.audience = audience + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audience + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audience, forKey: .audience) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudienceBetaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudienceBetaInput.swift new file mode 100644 index 00000000..f0e26cc6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudienceBetaInput.swift @@ -0,0 +1,62 @@ +// +// CreateAudienceBetaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to create an audience. */ +public struct CreateAudienceBetaInput: Codable, JSONEncodable, Hashable { + + public enum AudienceType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case linked = "LINKED" + case users = "USERS" + } + /** Name of the audience. */ + public var name: String + /** Determines whether a computation is enabled. */ + public var enabled: Bool? + /** Description of the audience. */ + public var description: String? + public var definition: Definition2 + /** Denotes the type of audience product. Possible values: USERS, ACCOUNTS, LINKED. */ + public var audienceType: AudienceType + public var options: Options? + + public init(name: String, enabled: Bool? = nil, description: String? = nil, definition: Definition2, audienceType: AudienceType, options: Options? = nil) { + self.name = name + self.enabled = enabled + self.description = description + self.definition = definition + self.audienceType = audienceType + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case enabled + case description + case definition + case audienceType + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(definition, forKey: .definition) + try container.encode(audienceType, forKey: .audienceType) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudienceBetaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudienceBetaOutput.swift new file mode 100644 index 00000000..412600c1 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudienceBetaOutput.swift @@ -0,0 +1,33 @@ +// +// CreateAudienceBetaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Audience output for create. */ +public struct CreateAudienceBetaOutput: Codable, JSONEncodable, Hashable { + + public var audience: Audience + + public init(audience: Audience) { + self.audience = audience + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audience + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audience, forKey: .audience) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreview200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreview200Response.swift new file mode 100644 index 00000000..7688385d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreview200Response.swift @@ -0,0 +1,32 @@ +// +// CreateAudiencePreview200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateAudiencePreview200Response: Codable, JSONEncodable, Hashable { + + public var data: CreateAudiencePreviewBetaOutput? + + public init(data: CreateAudiencePreviewBetaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreview200Response1.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreview200Response1.swift new file mode 100644 index 00000000..7acff458 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreview200Response1.swift @@ -0,0 +1,32 @@ +// +// CreateAudiencePreview200Response1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateAudiencePreview200Response1: Codable, JSONEncodable, Hashable { + + public var data: CreateAudiencePreviewAlphaOutput? + + public init(data: CreateAudiencePreviewAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewAlphaInput.swift new file mode 100644 index 00000000..5e4a9181 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewAlphaInput.swift @@ -0,0 +1,47 @@ +// +// CreateAudiencePreviewAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to create an audience preview. */ +public struct CreateAudiencePreviewAlphaInput: Codable, JSONEncodable, Hashable { + + public enum AudienceType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case linked = "LINKED" + case users = "USERS" + } + public var definition: Definition2 + /** Denotes the type of audience product. Possible values: USERS, ACCOUNTS, LINKED. */ + public var audienceType: AudienceType + public var options: Options1? + + public init(definition: Definition2, audienceType: AudienceType, options: Options1? = nil) { + self.definition = definition + self.audienceType = audienceType + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case definition + case audienceType + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(definition, forKey: .definition) + try container.encode(audienceType, forKey: .audienceType) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewAlphaOutput.swift new file mode 100644 index 00000000..9128e90b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// CreateAudiencePreviewAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output when creating an audience preview. */ +public struct CreateAudiencePreviewAlphaOutput: Codable, JSONEncodable, Hashable { + + public var audiencePreview: AudiencePreview + + public init(audiencePreview: AudiencePreview) { + self.audiencePreview = audiencePreview + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audiencePreview + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audiencePreview, forKey: .audiencePreview) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewBetaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewBetaInput.swift new file mode 100644 index 00000000..0859b4ed --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewBetaInput.swift @@ -0,0 +1,47 @@ +// +// CreateAudiencePreviewBetaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to create an audience preview. */ +public struct CreateAudiencePreviewBetaInput: Codable, JSONEncodable, Hashable { + + public enum AudienceType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case linked = "LINKED" + case users = "USERS" + } + public var definition: Definition2 + /** Denotes the type of audience product. Possible values: USERS, ACCOUNTS, LINKED. */ + public var audienceType: AudienceType + public var options: Options1? + + public init(definition: Definition2, audienceType: AudienceType, options: Options1? = nil) { + self.definition = definition + self.audienceType = audienceType + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case definition + case audienceType + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(definition, forKey: .definition) + try container.encode(audienceType, forKey: .audienceType) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewBetaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewBetaOutput.swift new file mode 100644 index 00000000..5f455886 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewBetaOutput.swift @@ -0,0 +1,33 @@ +// +// CreateAudiencePreviewBetaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output when creating an audience preview. */ +public struct CreateAudiencePreviewBetaOutput: Codable, JSONEncodable, Hashable { + + public var audiencePreview: AudiencePreview + + public init(audiencePreview: AudiencePreview) { + self.audiencePreview = audiencePreview + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audiencePreview + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audiencePreview, forKey: .audiencePreview) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewOptions.swift b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewOptions.swift new file mode 100644 index 00000000..7ba8a787 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateAudiencePreviewOptions.swift @@ -0,0 +1,39 @@ +// +// CreateAudiencePreviewOptions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Options which should be applied when segmenting audience previews. */ +public struct CreateAudiencePreviewOptions: Codable, JSONEncodable, Hashable { + + /** The set of profile external identifiers being used to determine audience preview membership. Profiles will only be considered for audience preview membership if the profile has at least one external id whose key matches a value in this set. If unspecified, a default set of external identifiers will be used: `['user_id', 'email', 'android.idfa', 'ios.idfa']`. */ + public var filterByExternalIds: [String]? + /** If specified, the value of this field indicates the number of days (specified from the date the audience preview was created) that event data will be included from when determining audience preview membership. If not specified, the default is set to the maximum event window size, or 7 days if no window condition is defined. Note that this is applied on a best-effort basis and may not always be applicable. In such cases, the response will not return a backfillEventDataDays value, and all available data will be taken into account. */ + public var backfillEventDataDays: Double? + + public init(filterByExternalIds: [String]? = nil, backfillEventDataDays: Double? = nil) { + self.filterByExternalIds = filterByExternalIds + self.backfillEventDataDays = backfillEventDataDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filterByExternalIds + case backfillEventDataDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(filterByExternalIds, forKey: .filterByExternalIds) + try container.encodeIfPresent(backfillEventDataDays, forKey: .backfillEventDataDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateCloudSourceRegulationV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateCloudSourceRegulationV1Input.swift index e2e13161..1ca8b43a 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateCloudSourceRegulationV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateCloudSourceRegulationV1Input.swift @@ -18,6 +18,7 @@ public struct CreateCloudSourceRegulationV1Input: Codable, JSONEncodable, Hashab case deleteOnly = "DELETE_ONLY" case suppressOnly = "SUPPRESS_ONLY" case suppressWithDelete = "SUPPRESS_WITH_DELETE" + case suppressWithDeleteInternal = "SUPPRESS_WITH_DELETE_INTERNAL" case unsuppress = "UNSUPPRESS" } public enum SubjectType: String, Codable, CaseIterable { @@ -26,13 +27,13 @@ public struct CreateCloudSourceRegulationV1Input: Codable, JSONEncodable, Hashab /** The regulation type to create. */ public var regulationType: RegulationType /** The subject type. Must be `objectId` for Cloud Sources. */ - public var subjectType: SubjectType? - /** The user or object ids of the subjects to regulate. Config API note: equal to `parent` but allows an array. */ - public var subjectIds: [String]? + public var subjectType: SubjectType + /** The list of `userId` or `objectId` values of the subjects to regulate. Config API note: equal to `parent` but allows an array. */ + public var subjectIds: [String] /** The Cloud Source collection to regulate. */ public var collection: String - public init(regulationType: RegulationType, subjectType: SubjectType? = nil, subjectIds: [String]? = nil, collection: String) { + public init(regulationType: RegulationType, subjectType: SubjectType, subjectIds: [String], collection: String) { self.regulationType = regulationType self.subjectType = subjectType self.subjectIds = subjectIds @@ -51,8 +52,8 @@ public struct CreateCloudSourceRegulationV1Input: Codable, JSONEncodable, Hashab public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(regulationType, forKey: .regulationType) - try container.encodeIfPresent(subjectType, forKey: .subjectType) - try container.encodeIfPresent(subjectIds, forKey: .subjectIds) + try container.encode(subjectType, forKey: .subjectType) + try container.encode(subjectIds, forKey: .subjectIds) try container.encode(collection, forKey: .collection) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateEdgeFunctions200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateComputedTrait200Response.swift similarity index 69% rename from PublicApi/Classes/OpenAPIs/Models/CreateEdgeFunctions200Response.swift rename to PublicApi/Classes/OpenAPIs/Models/CreateComputedTrait200Response.swift index 0bd95f51..1ec1a92b 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateEdgeFunctions200Response.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateComputedTrait200Response.swift @@ -1,5 +1,5 @@ // -// CreateEdgeFunctions200Response.swift +// CreateComputedTrait200Response.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,11 +10,11 @@ import Foundation import AnyCodable #endif -public struct CreateEdgeFunctions200Response: Codable, JSONEncodable, Hashable { +public struct CreateComputedTrait200Response: Codable, JSONEncodable, Hashable { - public var data: CreateEdgeFunctionsAlphaOutput? + public var data: CreateComputedTraitAlphaOutput? - public init(data: CreateEdgeFunctionsAlphaOutput? = nil) { + public init(data: CreateComputedTraitAlphaOutput? = nil) { self.data = data } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateComputedTraitAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateComputedTraitAlphaInput.swift new file mode 100644 index 00000000..8c8d048e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateComputedTraitAlphaInput.swift @@ -0,0 +1,52 @@ +// +// CreateComputedTraitAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to create a trait. */ +public struct CreateComputedTraitAlphaInput: Codable, JSONEncodable, Hashable { + + /** The name of the computation. */ + public var name: String + /** Determines whether a computation is enabled. */ + public var enabled: Bool? + /** The description of the computation. */ + public var description: String? + public var definition: Definition6 + public var options: Options5? + + public init(name: String, enabled: Bool? = nil, description: String? = nil, definition: Definition6, options: Options5? = nil) { + self.name = name + self.enabled = enabled + self.description = description + self.definition = definition + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case enabled + case description + case definition + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(definition, forKey: .definition) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateEdgeFunctionsAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateComputedTraitAlphaOutput.swift similarity index 52% rename from PublicApi/Classes/OpenAPIs/Models/CreateEdgeFunctionsAlphaOutput.swift rename to PublicApi/Classes/OpenAPIs/Models/CreateComputedTraitAlphaOutput.swift index dc48a3a9..36748f06 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateEdgeFunctionsAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateComputedTraitAlphaOutput.swift @@ -1,5 +1,5 @@ // -// CreateEdgeFunctionsAlphaOutput.swift +// CreateComputedTraitAlphaOutput.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,24 +10,24 @@ import Foundation import AnyCodable #endif -/** Output for CreateEdgeFunctions. */ -public struct CreateEdgeFunctionsAlphaOutput: Codable, JSONEncodable, Hashable { +/** Computed Trait output for create. */ +public struct CreateComputedTraitAlphaOutput: Codable, JSONEncodable, Hashable { - public var edgeFunctions: EdgeFunctions + public var computedTrait: ComputedTrait - public init(edgeFunctions: EdgeFunctions) { - self.edgeFunctions = edgeFunctions + public init(computedTrait: ComputedTrait) { + self.computedTrait = computedTrait } public enum CodingKeys: String, CodingKey, CaseIterable { - case edgeFunctions + case computedTrait } // Encodable protocol methods public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(edgeFunctions, forKey: .edgeFunctions) + try container.encode(computedTrait, forKey: .computedTrait) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateDbtModelSyncTrigger200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateDbtModelSyncTrigger200Response.swift new file mode 100644 index 00000000..67249c19 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateDbtModelSyncTrigger200Response.swift @@ -0,0 +1,32 @@ +// +// CreateDbtModelSyncTrigger200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateDbtModelSyncTrigger200Response: Codable, JSONEncodable, Hashable { + + public var data: CreateDbtModelSyncTriggerOutput? + + public init(data: CreateDbtModelSyncTriggerOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateDbtModelSyncTriggerInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateDbtModelSyncTriggerInput.swift new file mode 100644 index 00000000..41b9b552 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateDbtModelSyncTriggerInput.swift @@ -0,0 +1,34 @@ +// +// CreateDbtModelSyncTriggerInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input for the createDbtModelSyncTriggerBySourceId endpoint. */ +public struct CreateDbtModelSyncTriggerInput: Codable, JSONEncodable, Hashable { + + /** The Source id to trigger a dbt model sync. */ + public var sourceId: String + + public init(sourceId: String) { + self.sourceId = sourceId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case sourceId + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(sourceId, forKey: .sourceId) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateDbtModelSyncTriggerOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateDbtModelSyncTriggerOutput.swift new file mode 100644 index 00000000..16f11aba --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateDbtModelSyncTriggerOutput.swift @@ -0,0 +1,33 @@ +// +// CreateDbtModelSyncTriggerOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for the createDbtModelSyncTriggerBySourceId endpoint. */ +public struct CreateDbtModelSyncTriggerOutput: Codable, JSONEncodable, Hashable { + + public var dbtModelSyncTrigger: DbtModelSyncTrigger + + public init(dbtModelSyncTrigger: DbtModelSyncTrigger) { + self.dbtModelSyncTrigger = dbtModelSyncTrigger + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case dbtModelSyncTrigger + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(dbtModelSyncTrigger, forKey: .dbtModelSyncTrigger) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateDestinationSubscriptionAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateDestinationSubscriptionAlphaInput.swift index 13e223fd..bca21247 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateDestinationSubscriptionAlphaInput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateDestinationSubscriptionAlphaInput.swift @@ -23,13 +23,16 @@ public struct CreateDestinationSubscriptionAlphaInput: Codable, JSONEncodable, H public var enabled: Bool /** The fields used for configuring this action. */ public var settings: JSON? + /** When creating a Reverse ETL connection, indicates the Model being used to extract data. */ + public var modelId: String? - public init(name: String, actionId: String, trigger: String, enabled: Bool, settings: JSON? = nil) { + public init(name: String, actionId: String, trigger: String, enabled: Bool, settings: JSON? = nil, modelId: String? = nil) { self.name = name self.actionId = actionId self.trigger = trigger self.enabled = enabled self.settings = settings + self.modelId = modelId } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -38,6 +41,7 @@ public struct CreateDestinationSubscriptionAlphaInput: Codable, JSONEncodable, H case trigger case enabled case settings + case modelId } // Encodable protocol methods @@ -49,6 +53,7 @@ public struct CreateDestinationSubscriptionAlphaInput: Codable, JSONEncodable, H try container.encode(trigger, forKey: .trigger) try container.encode(enabled, forKey: .enabled) try container.encodeIfPresent(settings, forKey: .settings) + try container.encodeIfPresent(modelId, forKey: .modelId) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateDestinationV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/CreateDestinationV1Output.swift index 61e81b32..01bb90a9 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateDestinationV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateDestinationV1Output.swift @@ -13,9 +13,9 @@ import AnyCodable /** Creates a new Destination. */ public struct CreateDestinationV1Output: Codable, JSONEncodable, Hashable { - public var destination: Destination2 + public var destination: Destination3 - public init(destination: Destination2) { + public init(destination: Destination3) { self.destination = destination } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateDownload200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateDownload200Response.swift new file mode 100644 index 00000000..596cd32a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateDownload200Response.swift @@ -0,0 +1,32 @@ +// +// CreateDownload200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateDownload200Response: Codable, JSONEncodable, Hashable { + + public var data: CreateDownloadAlphaOutput? + + public init(data: CreateDownloadAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateDownloadAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateDownloadAlphaInput.swift new file mode 100644 index 00000000..3b2560be --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateDownloadAlphaInput.swift @@ -0,0 +1,39 @@ +// +// CreateDownloadAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to create presigned URLs for Granular Observability Collection logs. */ +public struct CreateDownloadAlphaInput: Codable, JSONEncodable, Hashable { + + /** The collection's unique id. */ + public var collectionId: String + /** The ISO8601 formatted timestamp corresponding to a specific hour and day to retrieve data for. E.g.: 2025-05-07T23:00:00Z Objects are bucketed by hour and a month of data is retained. */ + public var hour: String + + public init(collectionId: String, hour: String) { + self.collectionId = collectionId + self.hour = hour + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case collectionId + case hour + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(collectionId, forKey: .collectionId) + try container.encode(hour, forKey: .hour) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateDownloadAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateDownloadAlphaOutput.swift new file mode 100644 index 00000000..54ad4e74 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateDownloadAlphaOutput.swift @@ -0,0 +1,32 @@ +// +// CreateDownloadAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateDownloadAlphaOutput: Codable, JSONEncodable, Hashable { + + public var download: Download + + public init(download: Download) { + self.download = download + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case download + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(download, forKey: .download) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateFilterForDestinationV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateFilterForDestinationV1Input.swift index 84a0d31d..898d2435 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateFilterForDestinationV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateFilterForDestinationV1Input.swift @@ -14,19 +14,19 @@ import AnyCodable public struct CreateFilterForDestinationV1Input: Codable, JSONEncodable, Hashable { /** The id of the Source associated with this filter. */ - public var sourceId: String? + public var sourceId: String /** The filter's condition. */ public var _if: String /** Actions for the Destination filter. */ public var actions: [DestinationFilterActionV1] /** The title of the filter. */ - public var title: String? + public var title: String /** The description of the filter. */ public var description: String? /** When set to true, the Destination filter is active. */ public var enabled: Bool - public init(sourceId: String? = nil, _if: String, actions: [DestinationFilterActionV1], title: String? = nil, description: String? = nil, enabled: Bool) { + public init(sourceId: String, _if: String, actions: [DestinationFilterActionV1], title: String, description: String? = nil, enabled: Bool) { self.sourceId = sourceId self._if = _if self.actions = actions @@ -48,10 +48,10 @@ public struct CreateFilterForDestinationV1Input: Codable, JSONEncodable, Hashabl public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(sourceId, forKey: .sourceId) + try container.encode(sourceId, forKey: .sourceId) try container.encode(_if, forKey: ._if) try container.encode(actions, forKey: .actions) - try container.encodeIfPresent(title, forKey: .title) + try container.encode(title, forKey: .title) try container.encodeIfPresent(description, forKey: .description) try container.encode(enabled, forKey: .enabled) } diff --git a/PublicApi/Classes/OpenAPIs/Models/DisableEdgeFunctions200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateFilterForSpace200Response.swift similarity index 69% rename from PublicApi/Classes/OpenAPIs/Models/DisableEdgeFunctions200Response.swift rename to PublicApi/Classes/OpenAPIs/Models/CreateFilterForSpace200Response.swift index 12ae24cf..5aef5151 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DisableEdgeFunctions200Response.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateFilterForSpace200Response.swift @@ -1,5 +1,5 @@ // -// DisableEdgeFunctions200Response.swift +// CreateFilterForSpace200Response.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,11 +10,11 @@ import Foundation import AnyCodable #endif -public struct DisableEdgeFunctions200Response: Codable, JSONEncodable, Hashable { +public struct CreateFilterForSpace200Response: Codable, JSONEncodable, Hashable { - public var data: DisableEdgeFunctionsAlphaOutput? + public var data: CreateFilterForSpaceOutput? - public init(data: DisableEdgeFunctionsAlphaOutput? = nil) { + public init(data: CreateFilterForSpaceOutput? = nil) { self.data = data } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateFilterForSpaceInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateFilterForSpaceInput.swift new file mode 100644 index 00000000..3c4288d7 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateFilterForSpaceInput.swift @@ -0,0 +1,59 @@ +// +// CreateFilterForSpaceInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input for CreateFilter. */ +public struct CreateFilterForSpaceInput: Codable, JSONEncodable, Hashable { + + /** The Space id to filter on. */ + public var integrationId: String + /** Whether the filter is enabled. */ + public var enabled: Bool? + /** The name of the filter. */ + public var name: String + /** The description of the filter. */ + public var description: String? + /** The \"if\" statement for a filter. */ + public var _if: String + /** Whether the event is dropped. */ + public var drop: Bool? + + public init(integrationId: String, enabled: Bool? = nil, name: String, description: String? = nil, _if: String, drop: Bool? = nil) { + self.integrationId = integrationId + self.enabled = enabled + self.name = name + self.description = description + self._if = _if + self.drop = drop + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case integrationId + case enabled + case name + case description + case _if = "if" + case drop + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(integrationId, forKey: .integrationId) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encode(_if, forKey: ._if) + try container.encodeIfPresent(drop, forKey: .drop) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateFilterForSpaceOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateFilterForSpaceOutput.swift new file mode 100644 index 00000000..78b359ab --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateFilterForSpaceOutput.swift @@ -0,0 +1,33 @@ +// +// CreateFilterForSpaceOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for CreateFilter. */ +public struct CreateFilterForSpaceOutput: Codable, JSONEncodable, Hashable { + + public var filter: Filter4 + + public init(filter: Filter4) { + self.filter = filter + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filter + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(filter, forKey: .filter) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateFunctionV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateFunctionV1Input.swift index e615024f..b04e51c5 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateFunctionV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateFunctionV1Input.swift @@ -15,6 +15,9 @@ public struct CreateFunctionV1Input: Codable, JSONEncodable, Hashable { public enum ResourceType: String, Codable, CaseIterable { case destination = "DESTINATION" + case insertDestination = "INSERT_DESTINATION" + case insertSource = "INSERT_SOURCE" + case insertTransformation = "INSERT_TRANSFORMATION" case source = "SOURCE" } /** The Function code. */ diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateInsertFunctionInstance200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateInsertFunctionInstance200Response.swift new file mode 100644 index 00000000..b8973e8c --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateInsertFunctionInstance200Response.swift @@ -0,0 +1,32 @@ +// +// CreateInsertFunctionInstance200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateInsertFunctionInstance200Response: Codable, JSONEncodable, Hashable { + + public var data: CreateInsertFunctionInstanceAlphaOutput? + + public init(data: CreateInsertFunctionInstanceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateInsertFunctionInstanceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateInsertFunctionInstanceAlphaInput.swift new file mode 100644 index 00000000..57ea9062 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateInsertFunctionInstanceAlphaInput.swift @@ -0,0 +1,54 @@ +// +// CreateInsertFunctionInstanceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Creates an insert Function instance. */ +public struct CreateInsertFunctionInstanceAlphaInput: Codable, JSONEncodable, Hashable { + + /** Insert Function id to which this instance is associated. Note: Remove the ifnd_/ifns_ prefix from the id. */ + public var functionId: String + /** The Source or Destination id to be connected. */ + public var integrationId: String + /** Whether this insert Function instance should be enabled for the Destination. */ + public var enabled: Bool? + /** Defines the display name of the insert Function instance. */ + public var name: String + /** An object that contains settings for this insert Function instance based on the settings present in the insert Function class. */ + public var settings: [String: AnyCodable] + + public init(functionId: String, integrationId: String, enabled: Bool? = nil, name: String, settings: [String: AnyCodable]) { + self.functionId = functionId + self.integrationId = integrationId + self.enabled = enabled + self.name = name + self.settings = settings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case functionId + case integrationId + case enabled + case name + case settings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(functionId, forKey: .functionId) + try container.encode(integrationId, forKey: .integrationId) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encode(name, forKey: .name) + try container.encode(settings, forKey: .settings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateInsertFunctionInstanceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateInsertFunctionInstanceAlphaOutput.swift new file mode 100644 index 00000000..7c60c65d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateInsertFunctionInstanceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// CreateInsertFunctionInstanceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Creates an insert Function instance. */ +public struct CreateInsertFunctionInstanceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var insertFunctionInstance: InsertFunctionInstance + + public init(insertFunctionInstance: InsertFunctionInstance) { + self.insertFunctionInstance = insertFunctionInstance + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case insertFunctionInstance + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(insertFunctionInstance, forKey: .insertFunctionInstance) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateInvites200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateInvites201Response.swift similarity index 86% rename from PublicApi/Classes/OpenAPIs/Models/CreateInvites200Response.swift rename to PublicApi/Classes/OpenAPIs/Models/CreateInvites201Response.swift index 0696a693..0d25cda6 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateInvites200Response.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateInvites201Response.swift @@ -1,5 +1,5 @@ // -// CreateInvites200Response.swift +// CreateInvites201Response.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CreateInvites200Response: Codable, JSONEncodable, Hashable { +public struct CreateInvites201Response: Codable, JSONEncodable, Hashable { public var data: CreateInvitesV1Output? diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateLabel200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateLabel201Response.swift similarity index 86% rename from PublicApi/Classes/OpenAPIs/Models/CreateLabel200Response.swift rename to PublicApi/Classes/OpenAPIs/Models/CreateLabel201Response.swift index e3709b67..66d6f190 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateLabel200Response.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateLabel201Response.swift @@ -1,5 +1,5 @@ // -// CreateLabel200Response.swift +// CreateLabel201Response.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CreateLabel200Response: Codable, JSONEncodable, Hashable { +public struct CreateLabel201Response: Codable, JSONEncodable, Hashable { public var data: CreateLabelV1Output? diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateLabelAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateLabelAlphaOutput.swift deleted file mode 100644 index fdd39bde..00000000 --- a/PublicApi/Classes/OpenAPIs/Models/CreateLabelAlphaOutput.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// CreateLabelAlphaOutput.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Result of creating a new label in the current Workspace. */ -public struct CreateLabelAlphaOutput: Codable, JSONEncodable, Hashable { - - /** All labels associated with the current Workspace. */ - public var labels: [LabelAlpha] - - public init(labels: [LabelAlpha]) { - self.labels = labels - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case labels - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(labels, forKey: .labels) - } -} - diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateLabelV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateLabelV1Input.swift index 1c3429bc..53941147 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateLabelV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateLabelV1Input.swift @@ -13,9 +13,9 @@ import AnyCodable /** Creates a new label in the current Workspace. */ public struct CreateLabelV1Input: Codable, JSONEncodable, Hashable { - public var label: Label1 + public var label: Label - public init(label: Label1) { + public init(label: Label) { self.label = label } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateLabelV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/CreateLabelV1Output.swift index c200093f..d726e3ca 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateLabelV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateLabelV1Output.swift @@ -13,9 +13,9 @@ import AnyCodable /** Result of creating a new label in the current Workspace. */ public struct CreateLabelV1Output: Codable, JSONEncodable, Hashable { - public var label: Label2 + public var label: Label1 - public init(label: Label2) { + public init(label: Label1) { self.label = label } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateLivePlugin200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateLivePlugin200Response.swift new file mode 100644 index 00000000..eae4b405 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateLivePlugin200Response.swift @@ -0,0 +1,32 @@ +// +// CreateLivePlugin200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateLivePlugin200Response: Codable, JSONEncodable, Hashable { + + public var data: CreateLivePluginAlphaOutput? + + public init(data: CreateLivePluginAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateLivePluginAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateLivePluginAlphaInput.swift new file mode 100644 index 00000000..68f6d9bc --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateLivePluginAlphaInput.swift @@ -0,0 +1,34 @@ +// +// CreateLivePluginAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input for CreateLivePlugin. */ +public struct CreateLivePluginAlphaInput: Codable, JSONEncodable, Hashable { + + /** The Live Plugin code to be uploaded. */ + public var code: String + + public init(code: String) { + self.code = code + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case code + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(code, forKey: .code) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateLivePluginAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateLivePluginAlphaOutput.swift new file mode 100644 index 00000000..5783daa9 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateLivePluginAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// CreateLivePluginAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for CreateLivePlugin. */ +public struct CreateLivePluginAlphaOutput: Codable, JSONEncodable, Hashable { + + public var livePlugin: LivePlugin1 + + public init(livePlugin: LivePlugin1) { + self.livePlugin = livePlugin + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case livePlugin + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(livePlugin, forKey: .livePlugin) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateProfilesWarehouse201Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateProfilesWarehouse201Response.swift new file mode 100644 index 00000000..66751aa3 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateProfilesWarehouse201Response.swift @@ -0,0 +1,32 @@ +// +// CreateProfilesWarehouse201Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateProfilesWarehouse201Response: Codable, JSONEncodable, Hashable { + + public var data: CreateProfilesWarehouseAlphaOutput? + + public init(data: CreateProfilesWarehouseAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateProfilesWarehouseAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateProfilesWarehouseAlphaInput.swift new file mode 100644 index 00000000..c7d1e428 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateProfilesWarehouseAlphaInput.swift @@ -0,0 +1,54 @@ +// +// CreateProfilesWarehouseAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Create a new Profiles Warehouse based on a set of parameters. */ +public struct CreateProfilesWarehouseAlphaInput: Codable, JSONEncodable, Hashable { + + /** The Warehouse metadata to use. */ + public var metadataId: String + /** An optional human-readable name for this Warehouse. */ + public var name: String? + /** Enable to allow this Warehouse to receive data. Defaults to true. */ + public var enabled: Bool? + /** A key-value object that contains instance-specific settings for a Warehouse. Different kinds of Warehouses require different settings. The required and optional settings for a Warehouse are described in the `options` object of the associated Warehouse metadata. You can find the full list of Warehouse metadata and related settings information in the `/catalog/warehouses` endpoint. */ + public var settings: JSON? + /** The custom schema name that Segment uses on the Warehouse side. The space slug value is default otherwise. The schema name cannot be an existing schema name in the Warehouse. To use an existing schema name, please create a profiles Warehouse through the Segment app UI. */ + public var schemaName: String? + + public init(metadataId: String, name: String? = nil, enabled: Bool? = nil, settings: JSON?, schemaName: String? = nil) { + self.metadataId = metadataId + self.name = name + self.enabled = enabled + self.settings = settings + self.schemaName = schemaName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case metadataId + case name + case enabled + case settings + case schemaName + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(metadataId, forKey: .metadataId) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encode(settings, forKey: .settings) + try container.encodeIfPresent(schemaName, forKey: .schemaName) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateProfilesWarehouseAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateProfilesWarehouseAlphaOutput.swift new file mode 100644 index 00000000..076c6e5e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateProfilesWarehouseAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// CreateProfilesWarehouseAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns the newly created Warehouse. */ +public struct CreateProfilesWarehouseAlphaOutput: Codable, JSONEncodable, Hashable { + + public var profilesWarehouse: ProfilesWarehouse + + public init(profilesWarehouse: ProfilesWarehouse) { + self.profilesWarehouse = profilesWarehouse + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case profilesWarehouse + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(profilesWarehouse, forKey: .profilesWarehouse) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetLatestFromEdgeFunctions200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateReverseETLManualSync200Response.swift similarity index 68% rename from PublicApi/Classes/OpenAPIs/Models/GetLatestFromEdgeFunctions200Response.swift rename to PublicApi/Classes/OpenAPIs/Models/CreateReverseETLManualSync200Response.swift index 6c07dbbf..a2b4d246 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetLatestFromEdgeFunctions200Response.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateReverseETLManualSync200Response.swift @@ -1,5 +1,5 @@ // -// GetLatestFromEdgeFunctions200Response.swift +// CreateReverseETLManualSync200Response.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,11 +10,11 @@ import Foundation import AnyCodable #endif -public struct GetLatestFromEdgeFunctions200Response: Codable, JSONEncodable, Hashable { +public struct CreateReverseETLManualSync200Response: Codable, JSONEncodable, Hashable { - public var data: GetLatestFromEdgeFunctionsAlphaOutput? + public var data: CreateReverseETLManualSyncOutput? - public init(data: GetLatestFromEdgeFunctionsAlphaOutput? = nil) { + public init(data: CreateReverseETLManualSyncOutput? = nil) { self.data = data } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateReverseETLManualSyncInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateReverseETLManualSyncInput.swift new file mode 100644 index 00000000..fe83d54c --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateReverseETLManualSyncInput.swift @@ -0,0 +1,44 @@ +// +// CreateReverseETLManualSyncInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines the parameters needed to trigger a manual sync for a RETL connection. */ +public struct CreateReverseETLManualSyncInput: Codable, JSONEncodable, Hashable { + + /** The id of the Source. */ + public var sourceId: String + /** The id of the Model. */ + public var modelId: String + /** The id of the Subscription. */ + public var subscriptionId: String + + public init(sourceId: String, modelId: String, subscriptionId: String) { + self.sourceId = sourceId + self.modelId = modelId + self.subscriptionId = subscriptionId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case sourceId + case modelId + case subscriptionId + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(sourceId, forKey: .sourceId) + try container.encode(modelId, forKey: .modelId) + try container.encode(subscriptionId, forKey: .subscriptionId) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateReverseETLManualSyncOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateReverseETLManualSyncOutput.swift new file mode 100644 index 00000000..022b7e7a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateReverseETLManualSyncOutput.swift @@ -0,0 +1,33 @@ +// +// CreateReverseETLManualSyncOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for triggering a manual sync for a RETL connection. */ +public struct CreateReverseETLManualSyncOutput: Codable, JSONEncodable, Hashable { + + public var reverseETLManualSync: ReverseETLManualSync + + public init(reverseETLManualSync: ReverseETLManualSync) { + self.reverseETLManualSync = reverseETLManualSync + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case reverseETLManualSync + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(reverseETLManualSync, forKey: .reverseETLManualSync) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateReverseEtlModel201Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateReverseEtlModel201Response.swift new file mode 100644 index 00000000..dd60fc38 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateReverseEtlModel201Response.swift @@ -0,0 +1,32 @@ +// +// CreateReverseEtlModel201Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateReverseEtlModel201Response: Codable, JSONEncodable, Hashable { + + public var data: CreateReverseEtlModelOutput? + + public init(data: CreateReverseEtlModelOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateReverseEtlModelInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateReverseEtlModelInput.swift new file mode 100644 index 00000000..f0eae8c6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateReverseEtlModelInput.swift @@ -0,0 +1,59 @@ +// +// CreateReverseEtlModelInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines how to create a new Model. */ +public struct CreateReverseEtlModelInput: Codable, JSONEncodable, Hashable { + + /** Indicates which Source to attach this model to. */ + public var sourceId: String + /** A short, human-readable description of the Model. */ + public var name: String + /** A longer, more descriptive explanation of the Model. */ + public var description: String + /** Indicates whether the Model should have syncs enabled. When disabled, no syncs will be triggered, regardless of the enabled status of the attached destinations/subscriptions. */ + public var enabled: Bool + /** The SQL query that will be executed to extract data from the connected Source. */ + public var query: String + /** Indicates the column named in `query` that should be used to uniquely identify the extracted records. */ + public var queryIdentifierColumn: String + + public init(sourceId: String, name: String, description: String, enabled: Bool, query: String, queryIdentifierColumn: String) { + self.sourceId = sourceId + self.name = name + self.description = description + self.enabled = enabled + self.query = query + self.queryIdentifierColumn = queryIdentifierColumn + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case sourceId + case name + case description + case enabled + case query + case queryIdentifierColumn + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(sourceId, forKey: .sourceId) + try container.encode(name, forKey: .name) + try container.encode(description, forKey: .description) + try container.encode(enabled, forKey: .enabled) + try container.encode(query, forKey: .query) + try container.encode(queryIdentifierColumn, forKey: .queryIdentifierColumn) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateReverseEtlModelOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateReverseEtlModelOutput.swift new file mode 100644 index 00000000..9ac5f74b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateReverseEtlModelOutput.swift @@ -0,0 +1,33 @@ +// +// CreateReverseEtlModelOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines the results of creating a Model. */ +public struct CreateReverseEtlModelOutput: Codable, JSONEncodable, Hashable { + + public var reverseEtlModel: ReverseEtlModel + + public init(reverseEtlModel: ReverseEtlModel) { + self.reverseEtlModel = reverseEtlModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case reverseEtlModel + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(reverseEtlModel, forKey: .reverseEtlModel) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateSource200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateSource201Response.swift similarity index 86% rename from PublicApi/Classes/OpenAPIs/Models/CreateSource200Response.swift rename to PublicApi/Classes/OpenAPIs/Models/CreateSource201Response.swift index 536dbea4..d63c3bfd 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateSource200Response.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateSource201Response.swift @@ -1,5 +1,5 @@ // -// CreateSource200Response.swift +// CreateSource201Response.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CreateSource200Response: Codable, JSONEncodable, Hashable { +public struct CreateSource201Response: Codable, JSONEncodable, Hashable { public var data: CreateSourceV1Output? diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateSource200Response1.swift b/PublicApi/Classes/OpenAPIs/Models/CreateSource201Response1.swift similarity index 86% rename from PublicApi/Classes/OpenAPIs/Models/CreateSource200Response1.swift rename to PublicApi/Classes/OpenAPIs/Models/CreateSource201Response1.swift index 1b6981b3..cac26194 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateSource200Response1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateSource201Response1.swift @@ -1,5 +1,5 @@ // -// CreateSource200Response1.swift +// CreateSource201Response1.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CreateSource200Response1: Codable, JSONEncodable, Hashable { +public struct CreateSource201Response1: Codable, JSONEncodable, Hashable { public var data: CreateSourceAlphaOutput? diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateSourceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateSourceAlphaOutput.swift index 91f33a15..e79c9393 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateSourceAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateSourceAlphaOutput.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** Returns the newly Source. */ +/** Returns the newly created Source. */ public struct CreateSourceAlphaOutput: Codable, JSONEncodable, Hashable { public var source: Source2 diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateSourceRegulationV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateSourceRegulationV1Input.swift index 56f6862e..79274a3e 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateSourceRegulationV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateSourceRegulationV1Input.swift @@ -14,23 +14,26 @@ import AnyCodable public struct CreateSourceRegulationV1Input: Codable, JSONEncodable, Hashable { public enum RegulationType: String, Codable, CaseIterable { + case deleteArchiveOnly = "DELETE_ARCHIVE_ONLY" case deleteInternal = "DELETE_INTERNAL" case deleteOnly = "DELETE_ONLY" case suppressOnly = "SUPPRESS_ONLY" case suppressWithDelete = "SUPPRESS_WITH_DELETE" + case suppressWithDeleteInternal = "SUPPRESS_WITH_DELETE_INTERNAL" case unsuppress = "UNSUPPRESS" } public enum SubjectType: String, Codable, CaseIterable { + case anonymousId = "ANONYMOUS_ID" case userId = "USER_ID" } - /** The regulation type to create. */ + /** The regulation type to create. Please note that `DELETE_ARCHIVE_ONLY` is only supported for limited Workspaces for Source-scoped regulations. */ public var regulationType: RegulationType - /** The subject type. */ - public var subjectType: SubjectType? - /** The user or object ids of the subjects to regulate. Config API note: equal to `parent` but allows an array. */ - public var subjectIds: [String]? + /** The subject type. Note: `ANONYMOUS_ID` is only supported for limited Workspaces for Source-scoped regulations. `ANONYMOUS_ID` is only supported when regulationType is `DELETE_ARCHIVE_ONLY`. */ + public var subjectType: SubjectType + /** The list of `userId` or `objectId` or `anonymousId` values of the subjects to regulate. Config API note: equal to `parent` but allows an array. */ + public var subjectIds: [String] - public init(regulationType: RegulationType, subjectType: SubjectType? = nil, subjectIds: [String]? = nil) { + public init(regulationType: RegulationType, subjectType: SubjectType, subjectIds: [String]) { self.regulationType = regulationType self.subjectType = subjectType self.subjectIds = subjectIds @@ -47,8 +50,8 @@ public struct CreateSourceRegulationV1Input: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(regulationType, forKey: .regulationType) - try container.encodeIfPresent(subjectType, forKey: .subjectType) - try container.encodeIfPresent(subjectIds, forKey: .subjectIds) + try container.encode(subjectType, forKey: .subjectType) + try container.encode(subjectIds, forKey: .subjectIds) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateSourceV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateSourceV1Input.swift index 2161bdf6..5c232bd3 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateSourceV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateSourceV1Input.swift @@ -19,14 +19,17 @@ public struct CreateSourceV1Input: Codable, JSONEncodable, Hashable { public var enabled: Bool /** The id of the Source metadata from which this instance of the Source derives. All Source metadata is available under `/catalog/sources`. */ public var metadataId: String - /** A key-value object that contains instance-specific settings for the Source. */ + /** A key-value object that contains instance-specific settings for the Source. \"websiteUrl\" and \"apiHost\" can be configured here for the relevant Sources. */ public var settings: JSON? + /** Whether to disconnect all Warehouses from the Source. */ + public var disconnectAllWarehouses: Bool? - public init(slug: String, enabled: Bool, metadataId: String, settings: JSON? = nil) { + public init(slug: String, enabled: Bool, metadataId: String, settings: JSON? = nil, disconnectAllWarehouses: Bool? = nil) { self.slug = slug self.enabled = enabled self.metadataId = metadataId self.settings = settings + self.disconnectAllWarehouses = disconnectAllWarehouses } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -34,6 +37,7 @@ public struct CreateSourceV1Input: Codable, JSONEncodable, Hashable { case enabled case metadataId case settings + case disconnectAllWarehouses } // Encodable protocol methods @@ -44,6 +48,7 @@ public struct CreateSourceV1Input: Codable, JSONEncodable, Hashable { try container.encode(enabled, forKey: .enabled) try container.encode(metadataId, forKey: .metadataId) try container.encodeIfPresent(settings, forKey: .settings) + try container.encodeIfPresent(disconnectAllWarehouses, forKey: .disconnectAllWarehouses) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateSourceV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/CreateSourceV1Output.swift index 6cf3332d..3f063869 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateSourceV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateSourceV1Output.swift @@ -13,9 +13,9 @@ import AnyCodable /** Returns a newly created Source. */ public struct CreateSourceV1Output: Codable, JSONEncodable, Hashable { - public var source: Source5 + public var source: Source6 - public init(source: Source5) { + public init(source: Source6) { self.source = source } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateTrackingPlanV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateTrackingPlanV1Input.swift index e1539170..6ecef04c 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateTrackingPlanV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateTrackingPlanV1Input.swift @@ -14,6 +14,7 @@ import AnyCodable public struct CreateTrackingPlanV1Input: Codable, JSONEncodable, Hashable { public enum ModelType: String, Codable, CaseIterable { + case engage = "ENGAGE" case live = "LIVE" case propertyLibrary = "PROPERTY_LIBRARY" case ruleLibrary = "RULE_LIBRARY" diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateTransformationBetaInput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateTransformationBetaInput.swift index 87b6471e..f2b6ab0e 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateTransformationBetaInput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateTransformationBetaInput.swift @@ -21,7 +21,7 @@ public struct CreateTransformationBetaInput: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation should be enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateTransformationV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateTransformationV1Input.swift index eda89deb..212f7096 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateTransformationV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateTransformationV1Input.swift @@ -21,24 +21,35 @@ public struct CreateTransformationV1Input: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation should be enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String + /** Optional boolean value if the Transformation should drop the event entirely when the if statement matches, ignores all other transforms. */ + public var drop: Bool? /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? /** Optional array for renaming properties collected by your events. */ public var propertyRenames: [PropertyRenameV1]? /** Optional array for transforming properties and values collected by your events. Limited to 10 properties. */ public var propertyValueTransformations: [PropertyValueTransformationV1]? + /** Optional array for defining new properties in [FQL](https://segment.com/docs/config-api/fql/). Currently limited to 1 property. */ + public var fqlDefinedProperties: [FQLDefinedPropertyV1]? + /** Optional array for allowing properties from your events. */ + public var allowProperties: [String]? + public var hashPropertiesConfiguration: HashPropertiesConfiguration? - public init(name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil) { + public init(name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, drop: Bool? = nil, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil, fqlDefinedProperties: [FQLDefinedPropertyV1]? = nil, allowProperties: [String]? = nil, hashPropertiesConfiguration: HashPropertiesConfiguration? = nil) { self.name = name self.sourceId = sourceId self.destinationMetadataId = destinationMetadataId self.enabled = enabled self._if = _if + self.drop = drop self.newEventName = newEventName self.propertyRenames = propertyRenames self.propertyValueTransformations = propertyValueTransformations + self.fqlDefinedProperties = fqlDefinedProperties + self.allowProperties = allowProperties + self.hashPropertiesConfiguration = hashPropertiesConfiguration } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -47,9 +58,13 @@ public struct CreateTransformationV1Input: Codable, JSONEncodable, Hashable { case destinationMetadataId case enabled case _if = "if" + case drop case newEventName case propertyRenames case propertyValueTransformations + case fqlDefinedProperties + case allowProperties + case hashPropertiesConfiguration } // Encodable protocol methods @@ -61,9 +76,13 @@ public struct CreateTransformationV1Input: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(destinationMetadataId, forKey: .destinationMetadataId) try container.encode(enabled, forKey: .enabled) try container.encode(_if, forKey: ._if) + try container.encodeIfPresent(drop, forKey: .drop) try container.encodeIfPresent(newEventName, forKey: .newEventName) try container.encodeIfPresent(propertyRenames, forKey: .propertyRenames) try container.encodeIfPresent(propertyValueTransformations, forKey: .propertyValueTransformations) + try container.encodeIfPresent(fqlDefinedProperties, forKey: .fqlDefinedProperties) + try container.encodeIfPresent(allowProperties, forKey: .allowProperties) + try container.encodeIfPresent(hashPropertiesConfiguration, forKey: .hashPropertiesConfiguration) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateWarehouse200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateWarehouse201Response.swift similarity index 85% rename from PublicApi/Classes/OpenAPIs/Models/CreateWarehouse200Response.swift rename to PublicApi/Classes/OpenAPIs/Models/CreateWarehouse201Response.swift index 0fedf61e..76fa4947 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateWarehouse200Response.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateWarehouse201Response.swift @@ -1,5 +1,5 @@ // -// CreateWarehouse200Response.swift +// CreateWarehouse201Response.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -public struct CreateWarehouse200Response: Codable, JSONEncodable, Hashable { +public struct CreateWarehouse201Response: Codable, JSONEncodable, Hashable { public var data: CreateWarehouseV1Output? diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateWarehouseV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateWarehouseV1Input.swift index 3535b2e4..0851969d 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateWarehouseV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateWarehouseV1Input.swift @@ -21,12 +21,15 @@ public struct CreateWarehouseV1Input: Codable, JSONEncodable, Hashable { public var enabled: Bool? /** A key-value object that contains instance-specific settings for a Warehouse. Different kinds of Warehouses require different settings. The required and optional settings for a Warehouse are described in the `options` object of the associated Warehouse metadata. You can find the full list of Warehouse metadata and related settings information in the `/catalog/warehouses` endpoint. */ public var settings: JSON? + /** Whether to disconnect all Sources from this Warehouse. */ + public var disconnectAllSources: Bool? - public init(metadataId: String, name: String? = nil, enabled: Bool? = nil, settings: JSON?) { + public init(metadataId: String, name: String? = nil, enabled: Bool? = nil, settings: JSON?, disconnectAllSources: Bool? = nil) { self.metadataId = metadataId self.name = name self.enabled = enabled self.settings = settings + self.disconnectAllSources = disconnectAllSources } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -34,6 +37,7 @@ public struct CreateWarehouseV1Input: Codable, JSONEncodable, Hashable { case name case enabled case settings + case disconnectAllSources } // Encodable protocol methods @@ -44,6 +48,7 @@ public struct CreateWarehouseV1Input: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(name, forKey: .name) try container.encodeIfPresent(enabled, forKey: .enabled) try container.encode(settings, forKey: .settings) + try container.encodeIfPresent(disconnectAllSources, forKey: .disconnectAllSources) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateWorkspaceRegulationV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/CreateWorkspaceRegulationV1Input.swift index cc1c120f..fd7959b0 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateWorkspaceRegulationV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/CreateWorkspaceRegulationV1Input.swift @@ -18,6 +18,7 @@ public struct CreateWorkspaceRegulationV1Input: Codable, JSONEncodable, Hashable case deleteOnly = "DELETE_ONLY" case suppressOnly = "SUPPRESS_ONLY" case suppressWithDelete = "SUPPRESS_WITH_DELETE" + case suppressWithDeleteInternal = "SUPPRESS_WITH_DELETE_INTERNAL" case unsuppress = "UNSUPPRESS" } public enum SubjectType: String, Codable, CaseIterable { @@ -28,7 +29,7 @@ public struct CreateWorkspaceRegulationV1Input: Codable, JSONEncodable, Hashable public var regulationType: RegulationType /** The subject type. Use `objectId` for Cloud Source regulations. */ public var subjectType: SubjectType - /** The user or object ids of the subjects to regulate. Config API note: equal to `parent` but allows an array. */ + /** The list of `userId` or `objectId` values of the subjects to regulate. Config API note: equal to `parent` but allows an array. */ public var subjectIds: [String] public init(regulationType: RegulationType, subjectType: SubjectType, subjectIds: [String]) { diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateWriteKeyForSource200Response.swift b/PublicApi/Classes/OpenAPIs/Models/CreateWriteKeyForSource200Response.swift new file mode 100644 index 00000000..97ad71f6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateWriteKeyForSource200Response.swift @@ -0,0 +1,32 @@ +// +// CreateWriteKeyForSource200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CreateWriteKeyForSource200Response: Codable, JSONEncodable, Hashable { + + public var data: CreateWriteKeyForSourceAlphaOutput? + + public init(data: CreateWriteKeyForSourceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateWriteKeyForSourceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/CreateWriteKeyForSourceAlphaOutput.swift new file mode 100644 index 00000000..17995bc8 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/CreateWriteKeyForSourceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// CreateWriteKeyForSourceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns the updated Source. */ +public struct CreateWriteKeyForSourceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var source: Source3 + + public init(source: Source3) { + self.source = source + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case source + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(source, forKey: .source) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DbtModelSyncTrigger.swift b/PublicApi/Classes/OpenAPIs/Models/DbtModelSyncTrigger.swift new file mode 100644 index 00000000..19b55771 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DbtModelSyncTrigger.swift @@ -0,0 +1,44 @@ +// +// DbtModelSyncTrigger.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The dbt model sync trigger. */ +public struct DbtModelSyncTrigger: Codable, JSONEncodable, Hashable { + + /** The id of the dbt model sync. */ + public var id: String + /** The Source id that was triggered. */ + public var sourceId: String? + /** The status of the trigger. */ + public var status: String + + public init(id: String, sourceId: String? = nil, status: String) { + self.id = id + self.sourceId = sourceId + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case sourceId + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(sourceId, forKey: .sourceId) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Definition.swift b/PublicApi/Classes/OpenAPIs/Models/Definition.swift new file mode 100644 index 00000000..8bfc8db7 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Definition.swift @@ -0,0 +1,39 @@ +// +// Definition.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Query language definition and type. */ +public struct Definition: Codable, JSONEncodable, Hashable { + + /** The target entity relationship slug, only applicable for linked audiences. Use ```profile``` when the targeting the profile. Note that the value defaults to profile if not specified. Also note, that the value will be returned as null if the target entity is removed from the data graph. */ + public var targetEntity: String? + /** The query language string defining the audience segmentation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(targetEntity: String? = nil, query: String) { + self.targetEntity = targetEntity + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case targetEntity + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(targetEntity, forKey: .targetEntity) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Definition1.swift b/PublicApi/Classes/OpenAPIs/Models/Definition1.swift new file mode 100644 index 00000000..166bad02 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Definition1.swift @@ -0,0 +1,39 @@ +// +// Definition1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Represents the Compute Query Language definition of the computation and type of computation. Note: The definition for an Audience updated using the API is not editable through the Segment App. */ +public struct Definition1: Codable, JSONEncodable, Hashable { + + /** The target entity relationship slug, only applicable for linked audiences. Use ```profile``` when the targeting the profile. Note that the value defaults to profile if not specified. Also note, that the value will be returned as null if the target entity is removed from the data graph. */ + public var targetEntity: String? + /** The query language string defining the audience segmentation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(targetEntity: String? = nil, query: String) { + self.targetEntity = targetEntity + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case targetEntity + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(targetEntity, forKey: .targetEntity) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Definition2.swift b/PublicApi/Classes/OpenAPIs/Models/Definition2.swift new file mode 100644 index 00000000..8a6640ad --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Definition2.swift @@ -0,0 +1,39 @@ +// +// Definition2.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Query language definition. */ +public struct Definition2: Codable, JSONEncodable, Hashable { + + /** The target entity relationship slug, only applicable for linked audiences. Use ```profile``` when the targeting the profile. Note that the value defaults to profile if not specified. Also note, that the value will be returned as null if the target entity is removed from the data graph. */ + public var targetEntity: String? + /** The query language string defining the audience segmentation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(targetEntity: String? = nil, query: String) { + self.targetEntity = targetEntity + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case targetEntity + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(targetEntity, forKey: .targetEntity) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Definition3.swift b/PublicApi/Classes/OpenAPIs/Models/Definition3.swift new file mode 100644 index 00000000..e362fad3 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Definition3.swift @@ -0,0 +1,34 @@ +// +// Definition3.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Represents the Compute Query Language definition of the computation and type of computation. Note: The definition for an Audience updated using the API is not editable through the Segment App. */ +public struct Definition3: Codable, JSONEncodable, Hashable { + + /** The query language string defining the audience segmentation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(query: String) { + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Definition4.swift b/PublicApi/Classes/OpenAPIs/Models/Definition4.swift new file mode 100644 index 00000000..8ed2a744 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Definition4.swift @@ -0,0 +1,39 @@ +// +// Definition4.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Query language definition and type. */ +public struct Definition4: Codable, JSONEncodable, Hashable { + + /** The target entity relationship slug, only applicable for linked audiences. Use ```profile``` when the targeting the profile. Note that the value defaults to profile if not specified. Also note, that the value will be returned as null if the target entity is removed from the data graph. */ + public var targetEntity: String? + /** The query language string defining the audience segmentation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(targetEntity: String? = nil, query: String) { + self.targetEntity = targetEntity + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case targetEntity + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(targetEntity, forKey: .targetEntity) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Definition5.swift b/PublicApi/Classes/OpenAPIs/Models/Definition5.swift new file mode 100644 index 00000000..3e19a3d4 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Definition5.swift @@ -0,0 +1,39 @@ +// +// Definition5.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Definition that was used to calculate the audience preview. */ +public struct Definition5: Codable, JSONEncodable, Hashable { + + /** The target entity relationship slug, only applicable for linked audiences. Use ```profile``` when the targeting the profile. Note that the value defaults to profile if not specified. Also note, that the value will be returned as null if the target entity is removed from the data graph. */ + public var targetEntity: String? + /** The query language string defining the audience segmentation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(targetEntity: String? = nil, query: String) { + self.targetEntity = targetEntity + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case targetEntity + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(targetEntity, forKey: .targetEntity) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Definition6.swift b/PublicApi/Classes/OpenAPIs/Models/Definition6.swift new file mode 100644 index 00000000..24a9ecc7 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Definition6.swift @@ -0,0 +1,43 @@ +// +// Definition6.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Represents the Compute Query Language definition of the computation and type of computation. */ +public struct Definition6: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case users = "USERS" + } + /** The underlying data type being aggregated for this computed trait. Possible values: users, accounts. */ + public var type: ModelType + /** The query language string defining the computed trait aggregation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(type: ModelType, query: String) { + self.type = type + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Definition7.swift b/PublicApi/Classes/OpenAPIs/Models/Definition7.swift new file mode 100644 index 00000000..74c72be6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Definition7.swift @@ -0,0 +1,43 @@ +// +// Definition7.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Query language definition and type. */ +public struct Definition7: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case users = "USERS" + } + /** The query language string defining the computed trait aggregation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + /** The underlying data type being aggregated for this computed trait. Possible values: users, accounts. */ + public var type: ModelType + + public init(query: String, type: ModelType) { + self.query = query + self.type = type + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case query + case type + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(query, forKey: .query) + try container.encode(type, forKey: .type) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Definition8.swift b/PublicApi/Classes/OpenAPIs/Models/Definition8.swift new file mode 100644 index 00000000..27aa3a10 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Definition8.swift @@ -0,0 +1,43 @@ +// +// Definition8.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Query language definition and type. Note: The definition for a Computed Trait updated using the API is not editable through the Segment App. */ +public struct Definition8: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case users = "USERS" + } + /** The underlying data type being aggregated for this computed trait. Possible values: users, accounts. */ + public var type: ModelType + /** The query language string defining the computed trait aggregation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(type: ModelType, query: String) { + self.type = type + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeleteActivationAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/DeleteActivationAlphaOutput.swift new file mode 100644 index 00000000..2b147c2a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeleteActivationAlphaOutput.swift @@ -0,0 +1,34 @@ +// +// DeleteActivationAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for deleting an activation. */ +public struct DeleteActivationAlphaOutput: Codable, JSONEncodable, Hashable { + + /** Deletion status. */ + public var status: String + + public init(status: String) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeleteFilterById200Response.swift b/PublicApi/Classes/OpenAPIs/Models/DeleteFilterById200Response.swift new file mode 100644 index 00000000..346ce9fb --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeleteFilterById200Response.swift @@ -0,0 +1,32 @@ +// +// DeleteFilterById200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct DeleteFilterById200Response: Codable, JSONEncodable, Hashable { + + public var data: DeleteFilterByIdOutput? + + public init(data: DeleteFilterByIdOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeleteFilterByIdOutput.swift b/PublicApi/Classes/OpenAPIs/Models/DeleteFilterByIdOutput.swift new file mode 100644 index 00000000..1903c0de --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeleteFilterByIdOutput.swift @@ -0,0 +1,34 @@ +// +// DeleteFilterByIdOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for DeleteFilterById. */ +public struct DeleteFilterByIdOutput: Codable, JSONEncodable, Hashable { + + /** Filter deleted by filter id. */ + public var deleted: Bool + + public init(deleted: Bool) { + self.deleted = deleted + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case deleted + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(deleted, forKey: .deleted) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeleteInsertFunctionInstance200Response.swift b/PublicApi/Classes/OpenAPIs/Models/DeleteInsertFunctionInstance200Response.swift new file mode 100644 index 00000000..f9d4d084 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeleteInsertFunctionInstance200Response.swift @@ -0,0 +1,32 @@ +// +// DeleteInsertFunctionInstance200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct DeleteInsertFunctionInstance200Response: Codable, JSONEncodable, Hashable { + + public var data: DeleteInsertFunctionInstanceAlphaOutput? + + public init(data: DeleteInsertFunctionInstanceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeleteInsertFunctionInstanceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/DeleteInsertFunctionInstanceAlphaOutput.swift new file mode 100644 index 00000000..79d5839e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeleteInsertFunctionInstanceAlphaOutput.swift @@ -0,0 +1,37 @@ +// +// DeleteInsertFunctionInstanceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Delete an insert Function instance. */ +public struct DeleteInsertFunctionInstanceAlphaOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case success = "SUCCESS" + } + /** The status of the operation. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeleteLivePluginCode200Response.swift b/PublicApi/Classes/OpenAPIs/Models/DeleteLivePluginCode200Response.swift new file mode 100644 index 00000000..480b1d21 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeleteLivePluginCode200Response.swift @@ -0,0 +1,32 @@ +// +// DeleteLivePluginCode200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct DeleteLivePluginCode200Response: Codable, JSONEncodable, Hashable { + + public var data: DeleteLivePluginCodeAlphaOutput? + + public init(data: DeleteLivePluginCodeAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeleteLivePluginCodeAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/DeleteLivePluginCodeAlphaOutput.swift new file mode 100644 index 00000000..3d81e85e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeleteLivePluginCodeAlphaOutput.swift @@ -0,0 +1,37 @@ +// +// DeleteLivePluginCodeAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for DeleteLivePlugin. */ +public struct DeleteLivePluginCodeAlphaOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case success = "SUCCESS" + } + /** The status of the delete operation. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeleteReverseEtlModel200Response.swift b/PublicApi/Classes/OpenAPIs/Models/DeleteReverseEtlModel200Response.swift new file mode 100644 index 00000000..37d22eaf --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeleteReverseEtlModel200Response.swift @@ -0,0 +1,32 @@ +// +// DeleteReverseEtlModel200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct DeleteReverseEtlModel200Response: Codable, JSONEncodable, Hashable { + + public var data: DeleteReverseEtlModelOutput? + + public init(data: DeleteReverseEtlModelOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeleteReverseEtlModelOutput.swift b/PublicApi/Classes/OpenAPIs/Models/DeleteReverseEtlModelOutput.swift new file mode 100644 index 00000000..9b0f9841 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeleteReverseEtlModelOutput.swift @@ -0,0 +1,37 @@ +// +// DeleteReverseEtlModelOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines the result of getting a Model. */ +public struct DeleteReverseEtlModelOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case success = "SUCCESS" + } + /** The result of the deletion. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewDestinationFilterBy.swift b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewDestinationFilterBy.swift new file mode 100644 index 00000000..1f43c050 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewDestinationFilterBy.swift @@ -0,0 +1,69 @@ +// +// DeliveryOverviewDestinationFilterBy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The `DeliveryOverviewDestinationFilterBy` object is a map of the filterable fields and their values. */ +public struct DeliveryOverviewDestinationFilterBy: Codable, JSONEncodable, Hashable { + + /** A list of strings of discard reasons. See [Discard Record Documentation](https://segment.com/docs/connections/delivery-overview/#troubleshooting) for valid error codes. */ + public var discardReason: [String]? + /** A list of strings of event names. */ + public var eventName: [String]? + /** A list of strings of event types. Valid options are: `alias`, `group`, `identify`, `page`, `screen`, and `track`. */ + public var eventType: [String]? + /** A list of strings of app versions. */ + public var appVersion: [String]? + /** A list of strings of subscription IDs for Actions Destinations. */ + public var subscriptionId: [String]? + /** A list of strings of event context IDs from a Linked Audience mapping/activation. */ + public var activationId: [String]? + /** A list of strings of audience IDs for a Linked Audience. */ + public var audienceId: [String]? + /** A list of strings of space IDs for a Linked Audience. */ + public var spaceId: [String]? + + public init(discardReason: [String]? = nil, eventName: [String]? = nil, eventType: [String]? = nil, appVersion: [String]? = nil, subscriptionId: [String]? = nil, activationId: [String]? = nil, audienceId: [String]? = nil, spaceId: [String]? = nil) { + self.discardReason = discardReason + self.eventName = eventName + self.eventType = eventType + self.appVersion = appVersion + self.subscriptionId = subscriptionId + self.activationId = activationId + self.audienceId = audienceId + self.spaceId = spaceId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case discardReason + case eventName + case eventType + case appVersion + case subscriptionId + case activationId + case audienceId + case spaceId + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(discardReason, forKey: .discardReason) + try container.encodeIfPresent(eventName, forKey: .eventName) + try container.encodeIfPresent(eventType, forKey: .eventType) + try container.encodeIfPresent(appVersion, forKey: .appVersion) + try container.encodeIfPresent(subscriptionId, forKey: .subscriptionId) + try container.encodeIfPresent(activationId, forKey: .activationId) + try container.encodeIfPresent(audienceId, forKey: .audienceId) + try container.encodeIfPresent(spaceId, forKey: .spaceId) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewMetricsDatapoint.swift b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewMetricsDatapoint.swift new file mode 100644 index 00000000..e0d33784 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewMetricsDatapoint.swift @@ -0,0 +1,44 @@ +// +// DeliveryOverviewMetricsDatapoint.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Series within DeliveryOverviewMetricsDataset. */ +public struct DeliveryOverviewMetricsDatapoint: Codable, JSONEncodable, Hashable { + + /** The timestamp corresponding to the beginning of the window given by the requested granularity. */ + public var time: String + /** Holds the number of events within the specified granularity and group By options. */ + public var count: Double + /** The number of retried events that were successfully delivered. */ + public var retryCount: Double? + + public init(time: String, count: Double, retryCount: Double? = nil) { + self.time = time + self.count = count + self.retryCount = retryCount + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case time + case count + case retryCount + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(time, forKey: .time) + try container.encode(count, forKey: .count) + try container.encodeIfPresent(retryCount, forKey: .retryCount) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewMetricsDataset.swift b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewMetricsDataset.swift new file mode 100644 index 00000000..05866f79 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewMetricsDataset.swift @@ -0,0 +1,64 @@ +// +// DeliveryOverviewMetricsDataset.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Dataset within GetDeliveryOverviewMetricsBetaOutput. */ +public struct DeliveryOverviewMetricsDataset: Codable, JSONEncodable, Hashable { + + /** The name of the event if group By[] included 'event Name' in the request. */ + public var eventName: String? + /** The version of the app if group By[] included 'app Version' in the request. */ + public var appVersion: String? + /** The event type if group By[] included 'event Type' in the request. */ + public var eventType: String? + /** The discard reason for dropped events if group By[] included 'discard Reason' in the request. */ + public var discardReason: String? + /** Holds the count of all event counts over the time frame of the series. */ + public var total: Double + /** A list of the event counts broken down by the requested granularity, time frame, and group By options. */ + public var series: [DeliveryOverviewMetricsDatapoint] + /** The number of events successfully delivered upon retry. */ + public var totalRetryCount: Double? + + public init(eventName: String? = nil, appVersion: String? = nil, eventType: String? = nil, discardReason: String? = nil, total: Double, series: [DeliveryOverviewMetricsDatapoint], totalRetryCount: Double? = nil) { + self.eventName = eventName + self.appVersion = appVersion + self.eventType = eventType + self.discardReason = discardReason + self.total = total + self.series = series + self.totalRetryCount = totalRetryCount + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case eventName + case appVersion + case eventType + case discardReason + case total + case series + case totalRetryCount + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(eventName, forKey: .eventName) + try container.encodeIfPresent(appVersion, forKey: .appVersion) + try container.encodeIfPresent(eventType, forKey: .eventType) + try container.encodeIfPresent(discardReason, forKey: .discardReason) + try container.encode(total, forKey: .total) + try container.encode(series, forKey: .series) + try container.encodeIfPresent(totalRetryCount, forKey: .totalRetryCount) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewSourceFilterBy.swift b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewSourceFilterBy.swift new file mode 100644 index 00000000..60c793ea --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewSourceFilterBy.swift @@ -0,0 +1,49 @@ +// +// DeliveryOverviewSourceFilterBy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The `DeliveryOverviewSourceFilterBy` object is a map of the filterable fields and their values. */ +public struct DeliveryOverviewSourceFilterBy: Codable, JSONEncodable, Hashable { + + /** A list of strings of discard reasons. See [Discard Record Documentation](https://segment.com/docs/connections/delivery-overview/#troubleshooting) for valid error codes. */ + public var discardReason: [String]? + /** A list of strings of event names. */ + public var eventName: [String]? + /** A list of strings of event types. Valid options are: `alias`, `group`, `identify`, `page`, `screen`, and `track`. */ + public var eventType: [String]? + /** A list of strings of app versions. */ + public var appVersion: [String]? + + public init(discardReason: [String]? = nil, eventName: [String]? = nil, eventType: [String]? = nil, appVersion: [String]? = nil) { + self.discardReason = discardReason + self.eventName = eventName + self.eventType = eventType + self.appVersion = appVersion + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case discardReason + case eventName + case eventType + case appVersion + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(discardReason, forKey: .discardReason) + try container.encodeIfPresent(eventName, forKey: .eventName) + try container.encodeIfPresent(eventType, forKey: .eventType) + try container.encodeIfPresent(appVersion, forKey: .appVersion) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewSuccessfullyReceivedFilterBy.swift b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewSuccessfullyReceivedFilterBy.swift new file mode 100644 index 00000000..3699b8af --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DeliveryOverviewSuccessfullyReceivedFilterBy.swift @@ -0,0 +1,44 @@ +// +// DeliveryOverviewSuccessfullyReceivedFilterBy.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The `DeliveryOverviewSuccessfullyReceivedFilterBy` object is a map of the filterable fields and their values for the Successfully Received pipeline step. */ +public struct DeliveryOverviewSuccessfullyReceivedFilterBy: Codable, JSONEncodable, Hashable { + + /** A list of strings of event names. */ + public var eventName: [String]? + /** A list of strings of event types. Valid options are: `alias`, `group`, `identify`, `page`, `screen`, and `track`. */ + public var eventType: [String]? + /** A list of strings of app versions. */ + public var appVersion: [String]? + + public init(eventName: [String]? = nil, eventType: [String]? = nil, appVersion: [String]? = nil) { + self.eventName = eventName + self.eventType = eventType + self.appVersion = appVersion + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case eventName + case eventType + case appVersion + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(eventName, forKey: .eventName) + try container.encodeIfPresent(eventType, forKey: .eventType) + try container.encodeIfPresent(appVersion, forKey: .appVersion) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Destination.swift b/PublicApi/Classes/OpenAPIs/Models/Destination.swift index 7c22f94e..156780cf 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Destination.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Destination.swift @@ -10,37 +10,22 @@ import Foundation import AnyCodable #endif -/** The Destination looked up. */ +/** The Destination id. */ public struct Destination: Codable, JSONEncodable, Hashable { - /** The unique identifier of this instance of a Destination. Config API note: analogous to `name`. */ + /** The Destination instance id. */ public var id: String - /** The name of this instance of a Destination. Config API note: equal to `displayName`. */ - public var name: String? - /** Whether this instance of a Destination receives data. */ - public var enabled: Bool - public var metadata: Metadata - /** The id of a Source connected to this instance of a Destination. Config API note: analogous to `parent`. */ - public var sourceId: String - /** The collection of settings associated with a Destination. Config API note: equal to `config`. */ - public var settings: [String: AnyCodable] - - public init(id: String, name: String? = nil, enabled: Bool, metadata: Metadata, sourceId: String, settings: [String: AnyCodable]) { + /** Type of Destination to add to the audience. */ + public var type: String + + public init(id: String, type: String) { self.id = id - self.name = name - self.enabled = enabled - self.metadata = metadata - self.sourceId = sourceId - self.settings = settings + self.type = type } public enum CodingKeys: String, CodingKey, CaseIterable { case id - case name - case enabled - case metadata - case sourceId - case settings + case type } // Encodable protocol methods @@ -48,11 +33,7 @@ public struct Destination: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(id, forKey: .id) - try container.encodeIfPresent(name, forKey: .name) - try container.encode(enabled, forKey: .enabled) - try container.encode(metadata, forKey: .metadata) - try container.encode(sourceId, forKey: .sourceId) - try container.encode(settings, forKey: .settings) + try container.encode(type, forKey: .type) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/Destination1.swift b/PublicApi/Classes/OpenAPIs/Models/Destination1.swift index bfd0a359..6aa119f3 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Destination1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Destination1.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** The updated Destination. */ +/** The Destination looked up. */ public struct Destination1: Codable, JSONEncodable, Hashable { /** The unique identifier of this instance of a Destination. Config API note: analogous to `name`. */ @@ -19,13 +19,13 @@ public struct Destination1: Codable, JSONEncodable, Hashable { public var name: String? /** Whether this instance of a Destination receives data. */ public var enabled: Bool - public var metadata: Metadata + public var metadata: Metadata1 /** The id of a Source connected to this instance of a Destination. Config API note: analogous to `parent`. */ public var sourceId: String /** The collection of settings associated with a Destination. Config API note: equal to `config`. */ public var settings: [String: AnyCodable] - public init(id: String, name: String? = nil, enabled: Bool, metadata: Metadata, sourceId: String, settings: [String: AnyCodable]) { + public init(id: String, name: String? = nil, enabled: Bool, metadata: Metadata1, sourceId: String, settings: [String: AnyCodable]) { self.id = id self.name = name self.enabled = enabled diff --git a/PublicApi/Classes/OpenAPIs/Models/Destination2.swift b/PublicApi/Classes/OpenAPIs/Models/Destination2.swift index f7ba291e..ff50d879 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Destination2.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Destination2.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** The created Destination. */ +/** The updated Destination. */ public struct Destination2: Codable, JSONEncodable, Hashable { /** The unique identifier of this instance of a Destination. Config API note: analogous to `name`. */ @@ -19,13 +19,13 @@ public struct Destination2: Codable, JSONEncodable, Hashable { public var name: String? /** Whether this instance of a Destination receives data. */ public var enabled: Bool - public var metadata: Metadata + public var metadata: Metadata1 /** The id of a Source connected to this instance of a Destination. Config API note: analogous to `parent`. */ public var sourceId: String /** The collection of settings associated with a Destination. Config API note: equal to `config`. */ public var settings: [String: AnyCodable] - public init(id: String, name: String? = nil, enabled: Bool, metadata: Metadata, sourceId: String, settings: [String: AnyCodable]) { + public init(id: String, name: String? = nil, enabled: Bool, metadata: Metadata1, sourceId: String, settings: [String: AnyCodable]) { self.id = id self.name = name self.enabled = enabled diff --git a/PublicApi/Classes/OpenAPIs/Models/Destination3.swift b/PublicApi/Classes/OpenAPIs/Models/Destination3.swift new file mode 100644 index 00000000..111604c6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Destination3.swift @@ -0,0 +1,58 @@ +// +// Destination3.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The created Destination. */ +public struct Destination3: Codable, JSONEncodable, Hashable { + + /** The unique identifier of this instance of a Destination. Config API note: analogous to `name`. */ + public var id: String + /** The name of this instance of a Destination. Config API note: equal to `displayName`. */ + public var name: String? + /** Whether this instance of a Destination receives data. */ + public var enabled: Bool + public var metadata: Metadata1 + /** The id of a Source connected to this instance of a Destination. Config API note: analogous to `parent`. */ + public var sourceId: String + /** The collection of settings associated with a Destination. Config API note: equal to `config`. */ + public var settings: [String: AnyCodable] + + public init(id: String, name: String? = nil, enabled: Bool, metadata: Metadata1, sourceId: String, settings: [String: AnyCodable]) { + self.id = id + self.name = name + self.enabled = enabled + self.metadata = metadata + self.sourceId = sourceId + self.settings = settings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + case enabled + case metadata + case sourceId + case settings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(name, forKey: .name) + try container.encode(enabled, forKey: .enabled) + try container.encode(metadata, forKey: .metadata) + try container.encode(sourceId, forKey: .sourceId) + try container.encode(settings, forKey: .settings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationFilterActionV1.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationFilterActionV1.swift index c17fce51..379878d2 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DestinationFilterActionV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationFilterActionV1.swift @@ -21,7 +21,7 @@ public struct DestinationFilterActionV1: Codable, JSONEncodable, Hashable { } /** The kind of Transformation to apply to any matched properties. */ public var type: ModelType - /** A dictionary of paths to object keys that this filter applies to. The literal string '' represents the top level of the object. */ + /** A dictionary of paths to object keys that this filter applies to. The literal string '' represents the top level of the object. */ public var fields: [String: AnyCodable]? /** A decimal between 0 and 1 used for 'sample' type events and influences the likelihood of sampling to occur. */ public var percent: Double? diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationInput.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationInput.swift new file mode 100644 index 00000000..838433fc --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationInput.swift @@ -0,0 +1,39 @@ +// +// DestinationInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The Destination Input Object. */ +public struct DestinationInput: Codable, JSONEncodable, Hashable { + + /** The Destination instance id. */ + public var id: String + /** Type of Destination to add to the audience. */ + public var type: String + + public init(id: String, type: String) { + self.id = id + self.type = type + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case type + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(type, forKey: .type) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationMapping.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationMapping.swift new file mode 100644 index 00000000..11e83f1a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationMapping.swift @@ -0,0 +1,39 @@ +// +// DestinationMapping.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Configuration settings for the mappings to be created. */ +public struct DestinationMapping: Codable, JSONEncodable, Hashable { + + /** The action id to instantiate. */ + public var actionId: String + /** The action/mapping settings. */ + public var settings: JSON? + + public init(actionId: String, settings: JSON? = nil) { + self.actionId = actionId + self.settings = settings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case actionId + case settings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(actionId, forKey: .actionId) + try container.encodeIfPresent(settings, forKey: .settings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationMapping1.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationMapping1.swift new file mode 100644 index 00000000..cf530cd0 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationMapping1.swift @@ -0,0 +1,39 @@ +// +// DestinationMapping1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Configuration settings for the mappings. */ +public struct DestinationMapping1: Codable, JSONEncodable, Hashable { + + /** The action id to instantiate. */ + public var actionId: String + /** The action/mapping settings. */ + public var settings: JSON? + + public init(actionId: String, settings: JSON? = nil) { + self.actionId = actionId + self.settings = settings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case actionId + case settings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(actionId, forKey: .actionId) + try container.encodeIfPresent(settings, forKey: .settings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationMetadata.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationMetadata.swift index 64306c27..382e3f32 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DestinationMetadata.swift +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationMetadata.swift @@ -58,8 +58,10 @@ public struct DestinationMetadata: Codable, JSONEncodable, Hashable { public var supportedRegions: [String]? /** The list of regional endpoints for this Destination. */ public var regionEndpoints: [String]? + /** This Destination's support for multiple instance types. */ + public var multiInstanceSupportedVersion: String? - public init(id: String, name: String, description: String, slug: String, logos: Logos, options: [IntegrationOptionBeta], status: Status, previousNames: [String], categories: [String], website: String, components: [DestinationMetadataComponentV1], supportedFeatures: SupportedFeatures, supportedMethods: SupportedMethods, supportedPlatforms: SupportedPlatforms, actions: [DestinationMetadataActionV1], presets: [DestinationMetadataSubscriptionPresetV1], contacts: [Contact]? = nil, partnerOwned: Bool? = nil, supportedRegions: [String]? = nil, regionEndpoints: [String]? = nil) { + public init(id: String, name: String, description: String, slug: String, logos: Logos, options: [IntegrationOptionBeta], status: Status, previousNames: [String], categories: [String], website: String, components: [DestinationMetadataComponentV1], supportedFeatures: SupportedFeatures, supportedMethods: SupportedMethods, supportedPlatforms: SupportedPlatforms, actions: [DestinationMetadataActionV1], presets: [DestinationMetadataSubscriptionPresetV1], contacts: [Contact]? = nil, partnerOwned: Bool? = nil, supportedRegions: [String]? = nil, regionEndpoints: [String]? = nil, multiInstanceSupportedVersion: String? = nil) { self.id = id self.name = name self.description = description @@ -80,6 +82,7 @@ public struct DestinationMetadata: Codable, JSONEncodable, Hashable { self.partnerOwned = partnerOwned self.supportedRegions = supportedRegions self.regionEndpoints = regionEndpoints + self.multiInstanceSupportedVersion = multiInstanceSupportedVersion } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -103,6 +106,7 @@ public struct DestinationMetadata: Codable, JSONEncodable, Hashable { case partnerOwned case supportedRegions case regionEndpoints + case multiInstanceSupportedVersion } // Encodable protocol methods @@ -129,6 +133,7 @@ public struct DestinationMetadata: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(partnerOwned, forKey: .partnerOwned) try container.encodeIfPresent(supportedRegions, forKey: .supportedRegions) try container.encodeIfPresent(regionEndpoints, forKey: .regionEndpoints) + try container.encodeIfPresent(multiInstanceSupportedVersion, forKey: .multiInstanceSupportedVersion) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataActionFieldV1.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataActionFieldV1.swift index 28552ad2..fa46115f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataActionFieldV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataActionFieldV1.swift @@ -50,8 +50,10 @@ public struct DestinationMetadataActionFieldV1: Codable, JSONEncodable, Hashable public var _dynamic: Bool /** Whether this field allows null values. */ public var allowNull: Bool + /** Whether the action field should be hidden or not. */ + public var hidden: Bool? - public init(id: String, sortOrder: Double, fieldKey: String, label: String, type: ModelType, description: String, placeholder: String? = nil, defaultValue: AnyCodable? = nil, _required: Bool, multiple: Bool, choices: AnyCodable? = nil, _dynamic: Bool, allowNull: Bool) { + public init(id: String, sortOrder: Double, fieldKey: String, label: String, type: ModelType, description: String, placeholder: String? = nil, defaultValue: AnyCodable? = nil, _required: Bool, multiple: Bool, choices: AnyCodable? = nil, _dynamic: Bool, allowNull: Bool, hidden: Bool? = nil) { self.id = id self.sortOrder = sortOrder self.fieldKey = fieldKey @@ -65,6 +67,7 @@ public struct DestinationMetadataActionFieldV1: Codable, JSONEncodable, Hashable self.choices = choices self._dynamic = _dynamic self.allowNull = allowNull + self.hidden = hidden } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -81,6 +84,7 @@ public struct DestinationMetadataActionFieldV1: Codable, JSONEncodable, Hashable case choices case _dynamic = "dynamic" case allowNull + case hidden } // Encodable protocol methods @@ -100,6 +104,7 @@ public struct DestinationMetadataActionFieldV1: Codable, JSONEncodable, Hashable try container.encodeIfPresent(choices, forKey: .choices) try container.encode(_dynamic, forKey: ._dynamic) try container.encode(allowNull, forKey: .allowNull) + try container.encodeIfPresent(hidden, forKey: .hidden) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataPlatformsV1.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataPlatformsV1.swift index 02eaaf72..149d3e83 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataPlatformsV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataPlatformsV1.swift @@ -19,17 +19,29 @@ public struct DestinationMetadataPlatformsV1: Codable, JSONEncodable, Hashable { public var server: Bool? /** Whether this Destination supports mobile events. */ public var mobile: Bool? - - public init(browser: Bool? = nil, server: Bool? = nil, mobile: Bool? = nil) { + /** Whether this Destination supports Warehouse events. */ + public var warehouse: Bool? + /** Whether this Destination supports cloud app object events. */ + public var cloudAppObject: Bool? + /** Whether this Destination supports linked audiences. */ + public var linkedAudiences: Bool? + + public init(browser: Bool? = nil, server: Bool? = nil, mobile: Bool? = nil, warehouse: Bool? = nil, cloudAppObject: Bool? = nil, linkedAudiences: Bool? = nil) { self.browser = browser self.server = server self.mobile = mobile + self.warehouse = warehouse + self.cloudAppObject = cloudAppObject + self.linkedAudiences = linkedAudiences } public enum CodingKeys: String, CodingKey, CaseIterable { case browser case server case mobile + case warehouse + case cloudAppObject + case linkedAudiences } // Encodable protocol methods @@ -39,6 +51,9 @@ public struct DestinationMetadataPlatformsV1: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(browser, forKey: .browser) try container.encodeIfPresent(server, forKey: .server) try container.encodeIfPresent(mobile, forKey: .mobile) + try container.encodeIfPresent(warehouse, forKey: .warehouse) + try container.encodeIfPresent(cloudAppObject, forKey: .cloudAppObject) + try container.encodeIfPresent(linkedAudiences, forKey: .linkedAudiences) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataV1.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataV1.swift index 08cb9a81..ddcf135a 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationMetadataV1.swift @@ -58,8 +58,10 @@ public struct DestinationMetadataV1: Codable, JSONEncodable, Hashable { public var supportedRegions: [String]? /** The list of regional endpoints for this Destination. */ public var regionEndpoints: [String]? + /** This Destination's support for multiple instance types. */ + public var multiInstanceSupportedVersion: String? - public init(id: String, name: String, description: String, slug: String, logos: Logos, options: [IntegrationOptionBeta], status: Status, previousNames: [String], categories: [String], website: String, components: [DestinationMetadataComponentV1], supportedFeatures: SupportedFeatures, supportedMethods: SupportedMethods, supportedPlatforms: SupportedPlatforms, actions: [DestinationMetadataActionV1], presets: [DestinationMetadataSubscriptionPresetV1], contacts: [Contact]? = nil, partnerOwned: Bool? = nil, supportedRegions: [String]? = nil, regionEndpoints: [String]? = nil) { + public init(id: String, name: String, description: String, slug: String, logos: Logos, options: [IntegrationOptionBeta], status: Status, previousNames: [String], categories: [String], website: String, components: [DestinationMetadataComponentV1], supportedFeatures: SupportedFeatures, supportedMethods: SupportedMethods, supportedPlatforms: SupportedPlatforms, actions: [DestinationMetadataActionV1], presets: [DestinationMetadataSubscriptionPresetV1], contacts: [Contact]? = nil, partnerOwned: Bool? = nil, supportedRegions: [String]? = nil, regionEndpoints: [String]? = nil, multiInstanceSupportedVersion: String? = nil) { self.id = id self.name = name self.description = description @@ -80,6 +82,7 @@ public struct DestinationMetadataV1: Codable, JSONEncodable, Hashable { self.partnerOwned = partnerOwned self.supportedRegions = supportedRegions self.regionEndpoints = regionEndpoints + self.multiInstanceSupportedVersion = multiInstanceSupportedVersion } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -103,6 +106,7 @@ public struct DestinationMetadataV1: Codable, JSONEncodable, Hashable { case partnerOwned case supportedRegions case regionEndpoints + case multiInstanceSupportedVersion } // Encodable protocol methods @@ -129,6 +133,7 @@ public struct DestinationMetadataV1: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(partnerOwned, forKey: .partnerOwned) try container.encodeIfPresent(supportedRegions, forKey: .supportedRegions) try container.encodeIfPresent(regionEndpoints, forKey: .regionEndpoints) + try container.encodeIfPresent(multiInstanceSupportedVersion, forKey: .multiInstanceSupportedVersion) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationSubscription.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationSubscription.swift index a02b45c2..a5c4b81f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DestinationSubscription.swift +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationSubscription.swift @@ -29,8 +29,11 @@ public struct DestinationSubscription: Codable, JSONEncodable, Hashable { public var settings: JSON? /** FQL string that describes what events should trigger a Destination action. */ public var trigger: String + /** The unique identifier for the linked ReverseETLModel, if this part of a Reverse ETL connection. */ + public var modelId: String? + public var reverseETLSchedule: ReverseETLSchedule? - public init(id: String, name: String, actionId: String, actionSlug: String, destinationId: String, enabled: Bool, settings: JSON?, trigger: String) { + public init(id: String, name: String, actionId: String, actionSlug: String, destinationId: String, enabled: Bool, settings: JSON?, trigger: String, modelId: String? = nil, reverseETLSchedule: ReverseETLSchedule? = nil) { self.id = id self.name = name self.actionId = actionId @@ -39,6 +42,8 @@ public struct DestinationSubscription: Codable, JSONEncodable, Hashable { self.enabled = enabled self.settings = settings self.trigger = trigger + self.modelId = modelId + self.reverseETLSchedule = reverseETLSchedule } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -50,6 +55,8 @@ public struct DestinationSubscription: Codable, JSONEncodable, Hashable { case enabled case settings case trigger + case modelId + case reverseETLSchedule } // Encodable protocol methods @@ -64,6 +71,8 @@ public struct DestinationSubscription: Codable, JSONEncodable, Hashable { try container.encode(enabled, forKey: .enabled) try container.encode(settings, forKey: .settings) try container.encode(trigger, forKey: .trigger) + try container.encodeIfPresent(modelId, forKey: .modelId) + try container.encodeIfPresent(reverseETLSchedule, forKey: .reverseETLSchedule) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationSubscriptionConfiguration.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationSubscriptionConfiguration.swift new file mode 100644 index 00000000..088cf1b5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationSubscriptionConfiguration.swift @@ -0,0 +1,39 @@ +// +// DestinationSubscriptionConfiguration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Destination Subscription Configuration. */ +public struct DestinationSubscriptionConfiguration: Codable, JSONEncodable, Hashable { + + /** The action id to instantiate. */ + public var actionId: String + /** The action/mapping settings. */ + public var settings: JSON? + + public init(actionId: String, settings: JSON? = nil) { + self.actionId = actionId + self.settings = settings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case actionId + case settings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(actionId, forKey: .actionId) + try container.encodeIfPresent(settings, forKey: .settings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationSubscriptionUpdateInput.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationSubscriptionUpdateInput.swift index 89c94752..714d9ae3 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DestinationSubscriptionUpdateInput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationSubscriptionUpdateInput.swift @@ -21,12 +21,17 @@ public struct DestinationSubscriptionUpdateInput: Codable, JSONEncodable, Hashab public var enabled: Bool? /** The fields used for configuring this action. */ public var settings: JSON? + /** (Reverse ETL only) The reverse ETL model to attach this subscription to. */ + public var reverseETLModelId: String? + public var reverseETLSchedule: ReverseETLSchedule1? - public init(name: String? = nil, trigger: String? = nil, enabled: Bool? = nil, settings: JSON? = nil) { + public init(name: String? = nil, trigger: String? = nil, enabled: Bool? = nil, settings: JSON? = nil, reverseETLModelId: String? = nil, reverseETLSchedule: ReverseETLSchedule1? = nil) { self.name = name self.trigger = trigger self.enabled = enabled self.settings = settings + self.reverseETLModelId = reverseETLModelId + self.reverseETLSchedule = reverseETLSchedule } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -34,6 +39,8 @@ public struct DestinationSubscriptionUpdateInput: Codable, JSONEncodable, Hashab case trigger case enabled case settings + case reverseETLModelId + case reverseETLSchedule } // Encodable protocol methods @@ -44,6 +51,8 @@ public struct DestinationSubscriptionUpdateInput: Codable, JSONEncodable, Hashab try container.encodeIfPresent(trigger, forKey: .trigger) try container.encodeIfPresent(enabled, forKey: .enabled) try container.encodeIfPresent(settings, forKey: .settings) + try container.encodeIfPresent(reverseETLModelId, forKey: .reverseETLModelId) + try container.encodeIfPresent(reverseETLSchedule, forKey: .reverseETLSchedule) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/DestinationV1.swift b/PublicApi/Classes/OpenAPIs/Models/DestinationV1.swift index 4535044e..9464f90b 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DestinationV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/DestinationV1.swift @@ -19,13 +19,13 @@ public struct DestinationV1: Codable, JSONEncodable, Hashable { public var name: String? /** Whether this instance of a Destination receives data. */ public var enabled: Bool - public var metadata: Metadata + public var metadata: Metadata1 /** The id of a Source connected to this instance of a Destination. Config API note: analogous to `parent`. */ public var sourceId: String /** The collection of settings associated with a Destination. Config API note: equal to `config`. */ public var settings: [String: AnyCodable] - public init(id: String, name: String? = nil, enabled: Bool, metadata: Metadata, sourceId: String, settings: [String: AnyCodable]) { + public init(id: String, name: String? = nil, enabled: Bool, metadata: Metadata1, sourceId: String, settings: [String: AnyCodable]) { self.id = id self.name = name self.enabled = enabled diff --git a/PublicApi/Classes/OpenAPIs/Models/Download.swift b/PublicApi/Classes/OpenAPIs/Models/Download.swift new file mode 100644 index 00000000..c247b3a8 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Download.swift @@ -0,0 +1,34 @@ +// +// Download.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** An object containing the downloaded data. */ +public struct Download: Codable, JSONEncodable, Hashable { + + /** List of presigned URLs from S3. */ + public var urls: [String] + + public init(urls: [String]) { + self.urls = urls + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case urls + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(urls, forKey: .urls) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/EntityDetails.swift b/PublicApi/Classes/OpenAPIs/Models/EntityDetails.swift new file mode 100644 index 00000000..c8adc9f1 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/EntityDetails.swift @@ -0,0 +1,54 @@ +// +// EntityDetails.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Entity details. */ +public struct EntityDetails: Codable, JSONEncodable, Hashable { + + /** The entity primary key value. */ + public var id: String + /** The entity primary key column name. */ + public var idProperty: String + /** The entity relationship slug. */ + public var relationshipSlug: String + /** The entity properties. */ + public var properties: JSON? + /** Related entities that are one level deeper will only be returned if those entities are referenced in the audience definition. */ + public var entities: [String: AnyCodable]? + + public init(id: String, idProperty: String, relationshipSlug: String, properties: JSON? = nil, entities: [String: AnyCodable]? = nil) { + self.id = id + self.idProperty = idProperty + self.relationshipSlug = relationshipSlug + self.properties = properties + self.entities = entities + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case idProperty + case relationshipSlug + case properties + case entities + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(idProperty, forKey: .idProperty) + try container.encode(relationshipSlug, forKey: .relationshipSlug) + try container.encodeIfPresent(properties, forKey: .properties) + try container.encodeIfPresent(entities, forKey: .entities) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ExtractPhase.swift b/PublicApi/Classes/OpenAPIs/Models/ExtractPhase.swift new file mode 100644 index 00000000..5be2ea9d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ExtractPhase.swift @@ -0,0 +1,64 @@ +// +// ExtractPhase.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Object with extract phase details. */ +public struct ExtractPhase: Codable, JSONEncodable, Hashable { + + /** Counts the subset of records with status=new, which indicates records that were created/inserted/added. */ + public var addedCount: String + /** Counts the subset of records with status=updated, which indicates records that were modified/updated. */ + public var updatedCount: String + /** Counts the subset of records with status=deleted, which indicates records that were deleted/removed. */ + public var deletedCount: String + /** Counts the total number of records/rows handled by extract, across all statuses. */ + public var extractCount: String + /** Error code indicates a fatal sync error code, if applicable. */ + public var errorCode: String + /** Time that the extract phase started. */ + public var startedAt: String + /** Time that the extract phase finished. */ + public var finishedAt: String + + public init(addedCount: String, updatedCount: String, deletedCount: String, extractCount: String, errorCode: String, startedAt: String, finishedAt: String) { + self.addedCount = addedCount + self.updatedCount = updatedCount + self.deletedCount = deletedCount + self.extractCount = extractCount + self.errorCode = errorCode + self.startedAt = startedAt + self.finishedAt = finishedAt + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case addedCount + case updatedCount + case deletedCount + case extractCount + case errorCode + case startedAt + case finishedAt + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(addedCount, forKey: .addedCount) + try container.encode(updatedCount, forKey: .updatedCount) + try container.encode(deletedCount, forKey: .deletedCount) + try container.encode(extractCount, forKey: .extractCount) + try container.encode(errorCode, forKey: .errorCode) + try container.encode(startedAt, forKey: .startedAt) + try container.encode(finishedAt, forKey: .finishedAt) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/FQLDefinedPropertyV1.swift b/PublicApi/Classes/OpenAPIs/Models/FQLDefinedPropertyV1.swift new file mode 100644 index 00000000..03c54501 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/FQLDefinedPropertyV1.swift @@ -0,0 +1,38 @@ +// +// FQLDefinedPropertyV1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct FQLDefinedPropertyV1: Codable, JSONEncodable, Hashable { + + /** The FQL expression used to compute the property. */ + public var fql: String + /** The new property name. */ + public var propertyName: String + + public init(fql: String, propertyName: String) { + self.fql = fql + self.propertyName = propertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case fql + case propertyName + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(fql, forKey: .fql) + try container.encode(propertyName, forKey: .propertyName) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Filter4.swift b/PublicApi/Classes/OpenAPIs/Models/Filter4.swift new file mode 100644 index 00000000..b1a43cd5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Filter4.swift @@ -0,0 +1,78 @@ +// +// Filter4.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Filter4: Codable, JSONEncodable, Hashable { + + /** The newly created filter id. */ + public var id: String + /** The Workspace id to create the filter. */ + public var workspaceId: String + /** The Integration id of the resource. */ + public var integrationId: String + /** Whether the filter is enabled. */ + public var enabled: Bool? + /** The name of the filter. */ + public var name: String? + /** The description of the filter. */ + public var description: String? + /** The \"if\" statement for a filter. */ + public var _if: String? + /** Whether the event is dropped. */ + public var drop: Bool? + /** The timestamp of this filter's creation. */ + public var createdAt: String + /** The timestamp of this filter's last change. */ + public var updatedAt: String + + public init(id: String, workspaceId: String, integrationId: String, enabled: Bool? = nil, name: String? = nil, description: String? = nil, _if: String? = nil, drop: Bool? = nil, createdAt: String, updatedAt: String) { + self.id = id + self.workspaceId = workspaceId + self.integrationId = integrationId + self.enabled = enabled + self.name = name + self.description = description + self._if = _if + self.drop = drop + self.createdAt = createdAt + self.updatedAt = updatedAt + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case workspaceId + case integrationId + case enabled + case name + case description + case _if = "if" + case drop + case createdAt + case updatedAt + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(workspaceId, forKey: .workspaceId) + try container.encode(integrationId, forKey: .integrationId) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(_if, forKey: ._if) + try container.encodeIfPresent(drop, forKey: .drop) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ForceExecuteAudienceRun200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ForceExecuteAudienceRun200Response.swift new file mode 100644 index 00000000..f2f08840 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ForceExecuteAudienceRun200Response.swift @@ -0,0 +1,32 @@ +// +// ForceExecuteAudienceRun200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ForceExecuteAudienceRun200Response: Codable, JSONEncodable, Hashable { + + public var data: ForceExecuteAudienceRunAlphaOutput? + + public init(data: ForceExecuteAudienceRunAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ForceExecuteAudienceRunAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ForceExecuteAudienceRunAlphaOutput.swift new file mode 100644 index 00000000..085aeae3 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ForceExecuteAudienceRunAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// ForceExecuteAudienceRunAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output when forcing execution of an audience run. */ +public struct ForceExecuteAudienceRunAlphaOutput: Codable, JSONEncodable, Hashable { + + public var run: Run + + public init(run: Run) { + self.run = run + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case run + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(run, forKey: .run) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Function.swift b/PublicApi/Classes/OpenAPIs/Models/Function.swift index 7412f9d6..0293783e 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Function.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Function.swift @@ -15,6 +15,9 @@ public struct Function: Codable, JSONEncodable, Hashable { public enum ResourceType: String, Codable, CaseIterable { case destination = "DESTINATION" + case insertDestination = "INSERT_DESTINATION" + case insertSource = "INSERT_SOURCE" + case insertTransformation = "INSERT_TRANSFORMATION" case source = "SOURCE" } /** An identifier for this Function. */ diff --git a/PublicApi/Classes/OpenAPIs/Models/Function1.swift b/PublicApi/Classes/OpenAPIs/Models/Function1.swift index d51aab67..5c393fab 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Function1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Function1.swift @@ -15,6 +15,9 @@ public struct Function1: Codable, JSONEncodable, Hashable { public enum ResourceType: String, Codable, CaseIterable { case destination = "DESTINATION" + case insertDestination = "INSERT_DESTINATION" + case insertSource = "INSERT_SOURCE" + case insertTransformation = "INSERT_TRANSFORMATION" case source = "SOURCE" } /** An identifier for this Function. */ diff --git a/PublicApi/Classes/OpenAPIs/Models/Function2.swift b/PublicApi/Classes/OpenAPIs/Models/Function2.swift index b4989b6a..a9a23539 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Function2.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Function2.swift @@ -15,6 +15,9 @@ public struct Function2: Codable, JSONEncodable, Hashable { public enum ResourceType: String, Codable, CaseIterable { case destination = "DESTINATION" + case insertDestination = "INSERT_DESTINATION" + case insertSource = "INSERT_SOURCE" + case insertTransformation = "INSERT_TRANSFORMATION" case source = "SOURCE" } /** An identifier for this Function. */ diff --git a/PublicApi/Classes/OpenAPIs/Models/FunctionSettingV1.swift b/PublicApi/Classes/OpenAPIs/Models/FunctionSettingV1.swift index e6c90101..9965b222 100644 --- a/PublicApi/Classes/OpenAPIs/Models/FunctionSettingV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/FunctionSettingV1.swift @@ -18,17 +18,17 @@ public struct FunctionSettingV1: Codable, JSONEncodable, Hashable { case string = "STRING" case textMap = "TEXT_MAP" } - /** The name of this Function. */ + /** The name of this Function Setting. */ public var name: String - /** The label for this Function. */ + /** The label for this Function Setting. */ public var label: String - /** A description of this Function. */ + /** A description of this Function Setting. */ public var description: String - /** The Function type. */ + /** The type of this Function Setting. */ public var type: ModelType - /** Whether this Function is required. */ + /** Whether this Function Setting is required. */ public var _required: Bool - /** Whether this Function contains sensitive information. */ + /** Whether this Function Setting contains sensitive information. */ public var sensitive: Bool public init(name: String, label: String, description: String, type: ModelType, _required: Bool, sensitive: Bool) { diff --git a/PublicApi/Classes/OpenAPIs/Models/FunctionV1.swift b/PublicApi/Classes/OpenAPIs/Models/FunctionV1.swift index 53768551..005a9c62 100644 --- a/PublicApi/Classes/OpenAPIs/Models/FunctionV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/FunctionV1.swift @@ -15,6 +15,9 @@ public struct FunctionV1: Codable, JSONEncodable, Hashable { public enum ResourceType: String, Codable, CaseIterable { case destination = "DESTINATION" + case insertDestination = "INSERT_DESTINATION" + case insertSource = "INSERT_SOURCE" + case insertTransformation = "INSERT_TRANSFORMATION" case source = "SOURCE" } /** An identifier for this Function. */ diff --git a/PublicApi/Classes/OpenAPIs/Models/GenerateUploadURLForEdgeFunctionsAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GenerateUploadURLForEdgeFunctionsAlphaOutput.swift deleted file mode 100644 index 8999dbd4..00000000 --- a/PublicApi/Classes/OpenAPIs/Models/GenerateUploadURLForEdgeFunctionsAlphaOutput.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// GenerateUploadURLForEdgeFunctionsAlphaOutput.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Output for GenerateSignedUrl. */ -public struct GenerateUploadURLForEdgeFunctionsAlphaOutput: Codable, JSONEncodable, Hashable { - - /** A temporary URL that can be used to upload your Edge Functions bundle. Expires in 15 minutes. */ - public var uploadURL: String - - public init(uploadURL: String) { - self.uploadURL = uploadURL - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case uploadURL - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(uploadURL, forKey: .uploadURL) - } -} - diff --git a/PublicApi/Classes/OpenAPIs/Models/GetActivationFromAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetActivationFromAudience200Response.swift new file mode 100644 index 00000000..5d80c4b2 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetActivationFromAudience200Response.swift @@ -0,0 +1,32 @@ +// +// GetActivationFromAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetActivationFromAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: GetActivationFromAudienceOutput? + + public init(data: GetActivationFromAudienceOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/DisableEdgeFunctionsAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetActivationFromAudienceOutput.swift similarity index 52% rename from PublicApi/Classes/OpenAPIs/Models/DisableEdgeFunctionsAlphaOutput.swift rename to PublicApi/Classes/OpenAPIs/Models/GetActivationFromAudienceOutput.swift index 25b8f67b..d28b56de 100644 --- a/PublicApi/Classes/OpenAPIs/Models/DisableEdgeFunctionsAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetActivationFromAudienceOutput.swift @@ -1,5 +1,5 @@ // -// DisableEdgeFunctionsAlphaOutput.swift +// GetActivationFromAudienceOutput.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,24 +10,24 @@ import Foundation import AnyCodable #endif -/** Output for DisableEdgeFunctions. */ -public struct DisableEdgeFunctionsAlphaOutput: Codable, JSONEncodable, Hashable { +/** Output for getting an activation from space and audience. */ +public struct GetActivationFromAudienceOutput: Codable, JSONEncodable, Hashable { - public var edgeFunctions: EdgeFunctions1 + public var activation: Activation - public init(edgeFunctions: EdgeFunctions1) { - self.edgeFunctions = edgeFunctions + public init(activation: Activation) { + self.activation = activation } public enum CodingKeys: String, CodingKey, CaseIterable { - case edgeFunctions + case activation } // Encodable protocol methods public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(edgeFunctions, forKey: .edgeFunctions) + try container.encode(activation, forKey: .activation) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudience200Response.swift new file mode 100644 index 00000000..171b1481 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudience200Response.swift @@ -0,0 +1,32 @@ +// +// GetAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: GetAudienceBetaOutput? + + public init(data: GetAudienceBetaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateLabel200Response1.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudience200Response1.swift similarity index 71% rename from PublicApi/Classes/OpenAPIs/Models/CreateLabel200Response1.swift rename to PublicApi/Classes/OpenAPIs/Models/GetAudience200Response1.swift index 617d012a..034ffa17 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateLabel200Response1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudience200Response1.swift @@ -1,5 +1,5 @@ // -// CreateLabel200Response1.swift +// GetAudience200Response1.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,11 +10,11 @@ import Foundation import AnyCodable #endif -public struct CreateLabel200Response1: Codable, JSONEncodable, Hashable { +public struct GetAudience200Response1: Codable, JSONEncodable, Hashable { - public var data: CreateLabelAlphaOutput? + public var data: GetAudienceAlphaOutput? - public init(data: CreateLabelAlphaOutput? = nil) { + public init(data: GetAudienceAlphaOutput? = nil) { self.data = data } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudienceAlphaOutput.swift new file mode 100644 index 00000000..14635993 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudienceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// GetAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Audience output for get. */ +public struct GetAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var audience: Audience1 + + public init(audience: Audience1) { + self.audience = audience + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audience + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audience, forKey: .audience) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateLabelAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudienceBetaOutput.swift similarity index 55% rename from PublicApi/Classes/OpenAPIs/Models/CreateLabelAlphaInput.swift rename to PublicApi/Classes/OpenAPIs/Models/GetAudienceBetaOutput.swift index fe5975cc..eb979036 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateLabelAlphaInput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudienceBetaOutput.swift @@ -1,5 +1,5 @@ // -// CreateLabelAlphaInput.swift +// GetAudienceBetaOutput.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,24 +10,24 @@ import Foundation import AnyCodable #endif -/** Creates a new label in the current Workspace. */ -public struct CreateLabelAlphaInput: Codable, JSONEncodable, Hashable { +/** Audience output for get. */ +public struct GetAudienceBetaOutput: Codable, JSONEncodable, Hashable { - public var label: Label + public var audience: Audience1 - public init(label: Label) { - self.label = label + public init(audience: Audience1) { + self.audience = audience } public enum CodingKeys: String, CodingKey, CaseIterable { - case label + case audience } // Encodable protocol methods public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(label, forKey: .label) + try container.encode(audience, forKey: .audience) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreview200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreview200Response.swift new file mode 100644 index 00000000..97d20e39 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreview200Response.swift @@ -0,0 +1,32 @@ +// +// GetAudiencePreview200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetAudiencePreview200Response: Codable, JSONEncodable, Hashable { + + public var data: GetAudiencePreviewBetaOutput? + + public init(data: GetAudiencePreviewBetaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreview200Response1.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreview200Response1.swift new file mode 100644 index 00000000..3676eea5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreview200Response1.swift @@ -0,0 +1,32 @@ +// +// GetAudiencePreview200Response1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetAudiencePreview200Response1: Codable, JSONEncodable, Hashable { + + public var data: GetAudiencePreviewAlphaOutput? + + public init(data: GetAudiencePreviewAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/CreateEdgeFunctionsAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreviewAlphaOutput.swift similarity index 50% rename from PublicApi/Classes/OpenAPIs/Models/CreateEdgeFunctionsAlphaInput.swift rename to PublicApi/Classes/OpenAPIs/Models/GetAudiencePreviewAlphaOutput.swift index 95636850..02eb23f4 100644 --- a/PublicApi/Classes/OpenAPIs/Models/CreateEdgeFunctionsAlphaInput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreviewAlphaOutput.swift @@ -1,5 +1,5 @@ // -// CreateEdgeFunctionsAlphaInput.swift +// GetAudiencePreviewAlphaOutput.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,25 +10,24 @@ import Foundation import AnyCodable #endif -/** Input for CreateEdgeFunctions. */ -public struct CreateEdgeFunctionsAlphaInput: Codable, JSONEncodable, Hashable { +/** Output when reading an audience preview. */ +public struct GetAudiencePreviewAlphaOutput: Codable, JSONEncodable, Hashable { - /** The id of the Source associated with this Edge Function. */ - public var uploadURL: String + public var audiencePreview: AudiencePreview1 - public init(uploadURL: String) { - self.uploadURL = uploadURL + public init(audiencePreview: AudiencePreview1) { + self.audiencePreview = audiencePreview } public enum CodingKeys: String, CodingKey, CaseIterable { - case uploadURL + case audiencePreview } // Encodable protocol methods public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(uploadURL, forKey: .uploadURL) + try container.encode(audiencePreview, forKey: .audiencePreview) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreviewBetaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreviewBetaOutput.swift new file mode 100644 index 00000000..f69b416f --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudiencePreviewBetaOutput.swift @@ -0,0 +1,33 @@ +// +// GetAudiencePreviewBetaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output when reading an audience preview. */ +public struct GetAudiencePreviewBetaOutput: Codable, JSONEncodable, Hashable { + + public var audiencePreview: AudiencePreview1 + + public init(audiencePreview: AudiencePreview1) { + self.audiencePreview = audiencePreview + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audiencePreview + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audiencePreview, forKey: .audiencePreview) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetAudienceScheduleFromSpaceAndAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudienceScheduleFromSpaceAndAudience200Response.swift new file mode 100644 index 00000000..e5489e47 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudienceScheduleFromSpaceAndAudience200Response.swift @@ -0,0 +1,32 @@ +// +// GetAudienceScheduleFromSpaceAndAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetAudienceScheduleFromSpaceAndAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: GetAudienceScheduleFromSpaceAndAudienceAlphaOutput? + + public init(data: GetAudienceScheduleFromSpaceAndAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetAudienceScheduleFromSpaceAndAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetAudienceScheduleFromSpaceAndAudienceAlphaOutput.swift new file mode 100644 index 00000000..7641e2f6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetAudienceScheduleFromSpaceAndAudienceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// GetAudienceScheduleFromSpaceAndAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for get audience schedule. */ +public struct GetAudienceScheduleFromSpaceAndAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var audienceSchedule: AudienceSchedule + + public init(audienceSchedule: AudienceSchedule) { + self.audienceSchedule = audienceSchedule + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audienceSchedule + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audienceSchedule, forKey: .audienceSchedule) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetComputedTrait200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetComputedTrait200Response.swift new file mode 100644 index 00000000..2a14e0b6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetComputedTrait200Response.swift @@ -0,0 +1,32 @@ +// +// GetComputedTrait200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetComputedTrait200Response: Codable, JSONEncodable, Hashable { + + public var data: GetComputedTraitAlphaOutput? + + public init(data: GetComputedTraitAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetComputedTraitAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetComputedTraitAlphaOutput.swift new file mode 100644 index 00000000..9c18faa6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetComputedTraitAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// GetComputedTraitAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Computed Trait output for get and update. */ +public struct GetComputedTraitAlphaOutput: Codable, JSONEncodable, Hashable { + + public var computedTrait: ComputedTrait + + public init(computedTrait: ComputedTrait) { + self.computedTrait = computedTrait + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case computedTrait + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(computedTrait, forKey: .computedTrait) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetDailyPerSourceAPICallsUsageV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetDailyPerSourceAPICallsUsageV1Output.swift index d02339b6..944cc177 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetDailyPerSourceAPICallsUsageV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetDailyPerSourceAPICallsUsageV1Output.swift @@ -15,9 +15,9 @@ public struct GetDailyPerSourceAPICallsUsageV1Output: Codable, JSONEncodable, Ha /** The list of daily per Source API calls count aggregates. */ public var dailyPerSourceAPICallsUsage: [SourceAPICallSnapshotV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(dailyPerSourceAPICallsUsage: [SourceAPICallSnapshotV1], pagination: Pagination) { + public init(dailyPerSourceAPICallsUsage: [SourceAPICallSnapshotV1], pagination: Pagination3) { self.dailyPerSourceAPICallsUsage = dailyPerSourceAPICallsUsage self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetDailyPerSourceMTUUsageV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetDailyPerSourceMTUUsageV1Output.swift index 038a19fe..1191db85 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetDailyPerSourceMTUUsageV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetDailyPerSourceMTUUsageV1Output.swift @@ -15,9 +15,9 @@ public struct GetDailyPerSourceMTUUsageV1Output: Codable, JSONEncodable, Hashabl /** The list of daily per Source MTU count aggregates. */ public var dailyPerSourceMTUUsage: [UsersPerSourceSnapshotV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(dailyPerSourceMTUUsage: [UsersPerSourceSnapshotV1], pagination: Pagination) { + public init(dailyPerSourceMTUUsage: [UsersPerSourceSnapshotV1], pagination: Pagination3) { self.dailyPerSourceMTUUsage = dailyPerSourceMTUUsage self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetDailyWorkspaceAPICallsUsageV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetDailyWorkspaceAPICallsUsageV1Output.swift index 818d5bd7..4b34d5aa 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetDailyWorkspaceAPICallsUsageV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetDailyWorkspaceAPICallsUsageV1Output.swift @@ -15,9 +15,9 @@ public struct GetDailyWorkspaceAPICallsUsageV1Output: Codable, JSONEncodable, Ha /** The list of daily Workspace API calls count aggregates. */ public var dailyWorkspaceAPICallsUsage: [APICallSnapshotV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(dailyWorkspaceAPICallsUsage: [APICallSnapshotV1], pagination: Pagination) { + public init(dailyWorkspaceAPICallsUsage: [APICallSnapshotV1], pagination: Pagination3) { self.dailyWorkspaceAPICallsUsage = dailyWorkspaceAPICallsUsage self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetDailyWorkspaceMTUUsageV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetDailyWorkspaceMTUUsageV1Output.swift index baa27f49..34b0ec8a 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetDailyWorkspaceMTUUsageV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetDailyWorkspaceMTUUsageV1Output.swift @@ -15,9 +15,9 @@ public struct GetDailyWorkspaceMTUUsageV1Output: Codable, JSONEncodable, Hashabl /** The list of daily Workspace MTU count aggregates. */ public var dailyWorkspaceMTUUsage: [MtuSnapshotV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(dailyWorkspaceMTUUsage: [MtuSnapshotV1], pagination: Pagination) { + public init(dailyWorkspaceMTUUsage: [MtuSnapshotV1], pagination: Pagination3) { self.dailyWorkspaceMTUUsage = dailyWorkspaceMTUUsage self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetDeliveryOverviewMetricsBetaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetDeliveryOverviewMetricsBetaOutput.swift new file mode 100644 index 00000000..b0ffe9cf --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetDeliveryOverviewMetricsBetaOutput.swift @@ -0,0 +1,43 @@ +// +// GetDeliveryOverviewMetricsBetaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output of the Delivery Overview public API endpoints. */ +public struct GetDeliveryOverviewMetricsBetaOutput: Codable, JSONEncodable, Hashable { + + /** The total number of events for the returned dataset. */ + public var total: Double + /** Represents the list of series broken down by the dimensions and time frame requested. */ + public var dataset: [DeliveryOverviewMetricsDataset] + public var pagination: Pagination4 + + public init(total: Double, dataset: [DeliveryOverviewMetricsDataset], pagination: Pagination4) { + self.total = total + self.dataset = dataset + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case total + case dataset + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(total, forKey: .total) + try container.encode(dataset, forKey: .dataset) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetDestinationV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetDestinationV1Output.swift index a30ac8d9..69b3b04b 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetDestinationV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetDestinationV1Output.swift @@ -13,9 +13,9 @@ import AnyCodable /** Returns a single Destination by its id. */ public struct GetDestinationV1Output: Codable, JSONEncodable, Hashable { - public var destination: Destination + public var destination: Destination1 - public init(destination: Destination) { + public init(destination: Destination1) { self.destination = destination } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetDestinationsCatalogV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetDestinationsCatalogV1Output.swift index e0607bea..73b24993 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetDestinationsCatalogV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetDestinationsCatalogV1Output.swift @@ -15,9 +15,9 @@ public struct GetDestinationsCatalogV1Output: Codable, JSONEncodable, Hashable { /** All Destination catalog items contained within the requested page. */ public var destinationsCatalog: [DestinationMetadataV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(destinationsCatalog: [DestinationMetadataV1], pagination: Pagination) { + public init(destinationsCatalog: [DestinationMetadataV1], pagination: Pagination3) { self.destinationsCatalog = destinationsCatalog self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetEgressFailedMetricsFromDeliveryOverview200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetEgressFailedMetricsFromDeliveryOverview200Response.swift new file mode 100644 index 00000000..b49d641a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetEgressFailedMetricsFromDeliveryOverview200Response.swift @@ -0,0 +1,32 @@ +// +// GetEgressFailedMetricsFromDeliveryOverview200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetEgressFailedMetricsFromDeliveryOverview200Response: Codable, JSONEncodable, Hashable { + + public var data: GetDeliveryOverviewMetricsBetaOutput? + + public init(data: GetDeliveryOverviewMetricsBetaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetEventsVolumeFromWorkspaceV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetEventsVolumeFromWorkspaceV1Output.swift index d7406bfc..158ba561 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetEventsVolumeFromWorkspaceV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetEventsVolumeFromWorkspaceV1Output.swift @@ -13,16 +13,23 @@ import AnyCodable /** GetEventsVolumeFromWorkspaceV1Output represents the results given the input query. */ public struct GetEventsVolumeFromWorkspaceV1Output: Codable, JSONEncodable, Hashable { + /** Observability event volume path. */ + public var path: String + public var query: Query /** The resultant list of series broken down by the dimensions requested over the time frame requested and ordered by the total count of events in all series. Note: The limit of entries returned is 5000. */ public var result: [SourceEventVolumeV1] - public var pagination: Pagination? + public var pagination: Pagination3? - public init(result: [SourceEventVolumeV1], pagination: Pagination? = nil) { + public init(path: String, query: Query, result: [SourceEventVolumeV1], pagination: Pagination3? = nil) { + self.path = path + self.query = query self.result = result self.pagination = pagination } public enum CodingKeys: String, CodingKey, CaseIterable { + case path + case query case result case pagination } @@ -31,6 +38,8 @@ public struct GetEventsVolumeFromWorkspaceV1Output: Codable, JSONEncodable, Hash public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(path, forKey: .path) + try container.encode(query, forKey: .query) try container.encode(result, forKey: .result) try container.encodeIfPresent(pagination, forKey: .pagination) } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetEventsVolumeFromWorkspaceV1Query.swift b/PublicApi/Classes/OpenAPIs/Models/GetEventsVolumeFromWorkspaceV1Query.swift new file mode 100644 index 00000000..938adf2e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetEventsVolumeFromWorkspaceV1Query.swift @@ -0,0 +1,84 @@ +// +// GetEventsVolumeFromWorkspaceV1Query.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** GetEventVolumeOutputQuery represents the input query sent to output. */ +public struct GetEventsVolumeFromWorkspaceV1Query: Codable, JSONEncodable, Hashable { + + public enum Granularity: String, Codable, CaseIterable { + case day = "DAY" + case hour = "HOUR" + case minute = "MINUTE" + } + /** Workspace being requested. */ + public var workspaceId: String + /** Granularity corresponds to the requested bucket granularity. */ + public var granularity: Granularity + /** StartTime is the ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. */ + public var startTime: String + /** EndTime is the ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. */ + public var endTime: String + /** GroupBy is a comma-delimited list of strings representing the dimensions to group the result by. The current options are: `eventName` or `eventType`. */ + public var groupBy: [String]? + /** List of strings which allow you to restrict the result to just the given Sources. */ + public var sourceId: [String]? + /** EventName is a list of strings which allow you to restrict the result to just the given event names. */ + public var eventName: [String]? + /** EventType is a list of strings which allow you to restrict the result to just the given event types. */ + public var eventType: [String]? + /** AppVersion is a list of strings which allow you to restrict the result to just the given application versions. */ + public var appVersion: [String]? + /** Limit is the total number of items in the result. */ + public var limit: Double? + + public init(workspaceId: String, granularity: Granularity, startTime: String, endTime: String, groupBy: [String]? = nil, sourceId: [String]? = nil, eventName: [String]? = nil, eventType: [String]? = nil, appVersion: [String]? = nil, limit: Double? = nil) { + self.workspaceId = workspaceId + self.granularity = granularity + self.startTime = startTime + self.endTime = endTime + self.groupBy = groupBy + self.sourceId = sourceId + self.eventName = eventName + self.eventType = eventType + self.appVersion = appVersion + self.limit = limit + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case workspaceId + case granularity + case startTime + case endTime + case groupBy + case sourceId + case eventName + case eventType + case appVersion + case limit + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(workspaceId, forKey: .workspaceId) + try container.encode(granularity, forKey: .granularity) + try container.encode(startTime, forKey: .startTime) + try container.encode(endTime, forKey: .endTime) + try container.encodeIfPresent(groupBy, forKey: .groupBy) + try container.encodeIfPresent(sourceId, forKey: .sourceId) + try container.encodeIfPresent(eventName, forKey: .eventName) + try container.encodeIfPresent(eventType, forKey: .eventType) + try container.encodeIfPresent(appVersion, forKey: .appVersion) + try container.encodeIfPresent(limit, forKey: .limit) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetFilterById200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetFilterById200Response.swift new file mode 100644 index 00000000..bcdb0680 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetFilterById200Response.swift @@ -0,0 +1,32 @@ +// +// GetFilterById200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetFilterById200Response: Codable, JSONEncodable, Hashable { + + public var data: GetFilterByIdOutput? + + public init(data: GetFilterByIdOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetFilterByIdOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetFilterByIdOutput.swift new file mode 100644 index 00000000..3b517e6f --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetFilterByIdOutput.swift @@ -0,0 +1,33 @@ +// +// GetFilterByIdOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for GetFilterById. */ +public struct GetFilterByIdOutput: Codable, JSONEncodable, Hashable { + + public var filter: Filter4 + + public init(filter: Filter4) { + self.filter = filter + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filter + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(filter, forKey: .filter) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetFunctionVersion200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetFunctionVersion200Response.swift new file mode 100644 index 00000000..74787673 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetFunctionVersion200Response.swift @@ -0,0 +1,32 @@ +// +// GetFunctionVersion200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetFunctionVersion200Response: Codable, JSONEncodable, Hashable { + + public var data: GetFunctionVersionAlphaOutput? + + public init(data: GetFunctionVersionAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetFunctionVersionAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetFunctionVersionAlphaOutput.swift new file mode 100644 index 00000000..662bdb03 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetFunctionVersionAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// GetFunctionVersionAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Get Function version output. */ +public struct GetFunctionVersionAlphaOutput: Codable, JSONEncodable, Hashable { + + public var version: Version + + public init(version: Version) { + self.version = version + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case version + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(version, forKey: .version) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetInsertFunctionInstance200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetInsertFunctionInstance200Response.swift new file mode 100644 index 00000000..4c7a166b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetInsertFunctionInstance200Response.swift @@ -0,0 +1,32 @@ +// +// GetInsertFunctionInstance200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetInsertFunctionInstance200Response: Codable, JSONEncodable, Hashable { + + public var data: GetInsertFunctionInstanceAlphaOutput? + + public init(data: GetInsertFunctionInstanceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetInsertFunctionInstanceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetInsertFunctionInstanceAlphaOutput.swift new file mode 100644 index 00000000..0bed8de8 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetInsertFunctionInstanceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// GetInsertFunctionInstanceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns the insert Function instance. */ +public struct GetInsertFunctionInstanceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var insertFunctionInstance: InsertFunctionInstance2 + + public init(insertFunctionInstance: InsertFunctionInstance2) { + self.insertFunctionInstance = insertFunctionInstance + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case insertFunctionInstance + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(insertFunctionInstance, forKey: .insertFunctionInstance) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetLatestFromEdgeFunctionsAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetLatestFromEdgeFunctionsAlphaOutput.swift deleted file mode 100644 index c636bed6..00000000 --- a/PublicApi/Classes/OpenAPIs/Models/GetLatestFromEdgeFunctionsAlphaOutput.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// GetLatestFromEdgeFunctionsAlphaOutput.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** Output for GetLatestFromEdgeFunctions. */ -public struct GetLatestFromEdgeFunctionsAlphaOutput: Codable, JSONEncodable, Hashable { - - public var edgeFunctions: EdgeFunctions1 - - public init(edgeFunctions: EdgeFunctions1) { - self.edgeFunctions = edgeFunctions - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case edgeFunctions - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(edgeFunctions, forKey: .edgeFunctions) - } -} - diff --git a/PublicApi/Classes/OpenAPIs/Models/GetLatestFromLivePlugins200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetLatestFromLivePlugins200Response.swift new file mode 100644 index 00000000..5230ab40 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetLatestFromLivePlugins200Response.swift @@ -0,0 +1,32 @@ +// +// GetLatestFromLivePlugins200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetLatestFromLivePlugins200Response: Codable, JSONEncodable, Hashable { + + public var data: GetLatestFromLivePluginsAlphaOutput? + + public init(data: GetLatestFromLivePluginsAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetLatestFromLivePluginsAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetLatestFromLivePluginsAlphaOutput.swift new file mode 100644 index 00000000..938908de --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetLatestFromLivePluginsAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// GetLatestFromLivePluginsAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for GetLatestFromLivePlugins. */ +public struct GetLatestFromLivePluginsAlphaOutput: Codable, JSONEncodable, Hashable { + + public var livePlugin: LivePlugin + + public init(livePlugin: LivePlugin) { + self.livePlugin = livePlugin + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case livePlugin + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(livePlugin, forKey: .livePlugin) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetMessagingSubscriptionSuccessResponse.swift b/PublicApi/Classes/OpenAPIs/Models/GetMessagingSubscriptionSuccessResponse.swift index 5cac85a7..9da12d19 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetMessagingSubscriptionSuccessResponse.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetMessagingSubscriptionSuccessResponse.swift @@ -13,8 +13,11 @@ import AnyCodable public struct GetMessagingSubscriptionSuccessResponse: Codable, JSONEncodable, Hashable { public enum ModelType: String, Codable, CaseIterable { + case androidPush = "ANDROID_PUSH" case email = "EMAIL" + case iosPush = "IOS_PUSH" case sms = "SMS" + case whatsapp = "WHATSAPP" } public enum Status: String, Codable, CaseIterable { case didNotSubscribe = "DID_NOT_SUBSCRIBE" @@ -23,21 +26,29 @@ public struct GetMessagingSubscriptionSuccessResponse: Codable, JSONEncodable, H } /** Key is the phone number or email. */ public var key: String - /** Type is communication medium used. Either EMAIL or SMS. */ + /** Type is communication medium used. */ public var type: ModelType /** The user subscribed, unsubscribed, or on initial status. This is absent if the phone number or email is not found. */ public var status: Status? + /** Optional subscription groups. */ + public var groups: [GroupSubscriptionStatusResponse]? + /** The timestamp of this subscription status's last change. */ + public var updatedAt: String? - public init(key: String, type: ModelType, status: Status? = nil) { + public init(key: String, type: ModelType, status: Status? = nil, groups: [GroupSubscriptionStatusResponse]? = nil, updatedAt: String? = nil) { self.key = key self.type = type self.status = status + self.groups = groups + self.updatedAt = updatedAt } public enum CodingKeys: String, CodingKey, CaseIterable { case key case type case status + case groups + case updatedAt } // Encodable protocol methods @@ -47,6 +58,8 @@ public struct GetMessagingSubscriptionSuccessResponse: Codable, JSONEncodable, H try container.encode(key, forKey: .key) try container.encode(type, forKey: .type) try container.encodeIfPresent(status, forKey: .status) + try container.encodeIfPresent(groups, forKey: .groups) + try container.encodeIfPresent(updatedAt, forKey: .updatedAt) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetReverseETLSyncStatus200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetReverseETLSyncStatus200Response.swift new file mode 100644 index 00000000..9d77fb8c --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetReverseETLSyncStatus200Response.swift @@ -0,0 +1,32 @@ +// +// GetReverseETLSyncStatus200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetReverseETLSyncStatus200Response: Codable, JSONEncodable, Hashable { + + public var data: GetReverseETLSyncStatusOutput? + + public init(data: GetReverseETLSyncStatusOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetReverseETLSyncStatusOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetReverseETLSyncStatusOutput.swift new file mode 100644 index 00000000..2e9bb6df --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetReverseETLSyncStatusOutput.swift @@ -0,0 +1,33 @@ +// +// GetReverseETLSyncStatusOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for triggering a manual sync for a RETL connection. */ +public struct GetReverseETLSyncStatusOutput: Codable, JSONEncodable, Hashable { + + public var reverseETLSyncStatus: ReverseETLSyncStatus + + public init(reverseETLSyncStatus: ReverseETLSyncStatus) { + self.reverseETLSyncStatus = reverseETLSyncStatus + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case reverseETLSyncStatus + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(reverseETLSyncStatus, forKey: .reverseETLSyncStatus) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetReverseEtlModel200Response.swift b/PublicApi/Classes/OpenAPIs/Models/GetReverseEtlModel200Response.swift new file mode 100644 index 00000000..c2c1eceb --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetReverseEtlModel200Response.swift @@ -0,0 +1,32 @@ +// +// GetReverseEtlModel200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GetReverseEtlModel200Response: Codable, JSONEncodable, Hashable { + + public var data: GetReverseEtlModelOutput? + + public init(data: GetReverseEtlModelOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetReverseEtlModelOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetReverseEtlModelOutput.swift new file mode 100644 index 00000000..ce1a73ee --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GetReverseEtlModelOutput.swift @@ -0,0 +1,33 @@ +// +// GetReverseEtlModelOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines the result of getting a Model. */ +public struct GetReverseEtlModelOutput: Codable, JSONEncodable, Hashable { + + public var reverseEtlModel: ReverseEtlModel1 + + public init(reverseEtlModel: ReverseEtlModel1) { + self.reverseEtlModel = reverseEtlModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case reverseEtlModel + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(reverseEtlModel, forKey: .reverseEtlModel) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GetSourceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/GetSourceAlphaOutput.swift index d3cff54b..89e0e8f2 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetSourceAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetSourceAlphaOutput.swift @@ -14,13 +14,17 @@ import AnyCodable public struct GetSourceAlphaOutput: Codable, JSONEncodable, Hashable { public var source: Source1 + /** The id of the Tracking Plan connected to the Source. */ + public var trackingPlanId: String? - public init(source: Source1) { + public init(source: Source1, trackingPlanId: String?) { self.source = source + self.trackingPlanId = trackingPlanId } public enum CodingKeys: String, CodingKey, CaseIterable { case source + case trackingPlanId } // Encodable protocol methods @@ -28,6 +32,7 @@ public struct GetSourceAlphaOutput: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(source, forKey: .source) + try container.encode(trackingPlanId, forKey: .trackingPlanId) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetSourceV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetSourceV1Output.swift index 11c46f4c..9cd61e17 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetSourceV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetSourceV1Output.swift @@ -13,14 +13,18 @@ import AnyCodable /** Returns a Source. */ public struct GetSourceV1Output: Codable, JSONEncodable, Hashable { - public var source: Source4 + public var source: Source5 + /** The id of the Tracking Plan connected to the Source. */ + public var trackingPlanId: String? - public init(source: Source4) { + public init(source: Source5, trackingPlanId: String?) { self.source = source + self.trackingPlanId = trackingPlanId } public enum CodingKeys: String, CodingKey, CaseIterable { case source + case trackingPlanId } // Encodable protocol methods @@ -28,6 +32,7 @@ public struct GetSourceV1Output: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(source, forKey: .source) + try container.encode(trackingPlanId, forKey: .trackingPlanId) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetSourcesCatalogV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetSourcesCatalogV1Output.swift index 56dc6981..9670ffe6 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetSourcesCatalogV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetSourcesCatalogV1Output.swift @@ -15,9 +15,9 @@ public struct GetSourcesCatalogV1Output: Codable, JSONEncodable, Hashable { /** All Source catalog items contained within the requested page. */ public var sourcesCatalog: [SourceMetadataV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(sourcesCatalog: [SourceMetadataV1], pagination: Pagination) { + public init(sourcesCatalog: [SourceMetadataV1], pagination: Pagination3) { self.sourcesCatalog = sourcesCatalog self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/GetSubscriptionRequest.swift b/PublicApi/Classes/OpenAPIs/Models/GetSubscriptionRequest.swift index fc741ede..1f5a7ff5 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetSubscriptionRequest.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetSubscriptionRequest.swift @@ -13,12 +13,15 @@ import AnyCodable public struct GetSubscriptionRequest: Codable, JSONEncodable, Hashable { public enum ModelType: String, Codable, CaseIterable { + case androidPush = "ANDROID_PUSH" case email = "EMAIL" + case iosPush = "IOS_PUSH" case sms = "SMS" + case whatsapp = "WHATSAPP" } /** Key is the phone number or email. */ public var key: String - /** Type is communication medium used. Either EMAIL or SMS. */ + /** Type is communication medium used. */ public var type: ModelType public init(key: String, type: ModelType) { diff --git a/PublicApi/Classes/OpenAPIs/Models/GetWarehousesCatalogV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/GetWarehousesCatalogV1Output.swift index 5a2c0048..1193bd5d 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GetWarehousesCatalogV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/GetWarehousesCatalogV1Output.swift @@ -15,9 +15,9 @@ public struct GetWarehousesCatalogV1Output: Codable, JSONEncodable, Hashable { /** All Warehouse catalog items contained within the requested page. */ public var warehousesCatalog: [WarehouseMetadataV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(warehousesCatalog: [WarehouseMetadataV1], pagination: Pagination) { + public init(warehousesCatalog: [WarehouseMetadataV1], pagination: Pagination3) { self.warehousesCatalog = warehousesCatalog self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/GroupSubscriptionStatus.swift b/PublicApi/Classes/OpenAPIs/Models/GroupSubscriptionStatus.swift new file mode 100644 index 00000000..07bc82c3 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GroupSubscriptionStatus.swift @@ -0,0 +1,43 @@ +// +// GroupSubscriptionStatus.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GroupSubscriptionStatus: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case didNotSubscribe = "DID_NOT_SUBSCRIBE" + case subscribed = "SUBSCRIBED" + case unsubscribed = "UNSUBSCRIBED" + } + /** Name of the group. */ + public var name: String + /** The user subscribed, unsubscribed, or on initial status. */ + public var status: Status + + public init(name: String, status: Status) { + self.name = name + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GroupSubscriptionStatusResponse.swift b/PublicApi/Classes/OpenAPIs/Models/GroupSubscriptionStatusResponse.swift new file mode 100644 index 00000000..3d0e664a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/GroupSubscriptionStatusResponse.swift @@ -0,0 +1,53 @@ +// +// GroupSubscriptionStatusResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct GroupSubscriptionStatusResponse: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case didNotSubscribe = "DID_NOT_SUBSCRIBE" + case subscribed = "SUBSCRIBED" + case unsubscribed = "UNSUBSCRIBED" + } + /** Name of the group. */ + public var name: String + /** The user subscribed, unsubscribed, or on initial status. */ + public var status: Status + /** The group id. */ + public var id: String + /** The timestamp of this subscription status's last change. */ + public var updatedAt: String? + + public init(name: String, status: Status, id: String, updatedAt: String? = nil) { + self.name = name + self.status = status + self.id = id + self.updatedAt = updatedAt + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case status + case id + case updatedAt + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(status, forKey: .status) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(updatedAt, forKey: .updatedAt) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/HandleWebhookInput.swift b/PublicApi/Classes/OpenAPIs/Models/HandleWebhookInput.swift new file mode 100644 index 00000000..31815afa --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/HandleWebhookInput.swift @@ -0,0 +1,49 @@ +// +// HandleWebhookInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Function webhook input. */ +public struct HandleWebhookInput: Codable, JSONEncodable, Hashable { + + /** The Workspace id. */ + public var w: String + /** The webhook nonce. */ + public var n: String + /** The webhook timestamp. */ + public var t: String + /** The webhook signature. */ + public var s: String + + public init(w: String, n: String, t: String, s: String) { + self.w = w + self.n = n + self.t = t + self.s = s + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case w + case n + case t + case s + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(w, forKey: .w) + try container.encode(n, forKey: .n) + try container.encode(t, forKey: .t) + try container.encode(s, forKey: .s) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/HandleWebhookOutput.swift b/PublicApi/Classes/OpenAPIs/Models/HandleWebhookOutput.swift new file mode 100644 index 00000000..4e79c0c3 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/HandleWebhookOutput.swift @@ -0,0 +1,39 @@ +// +// HandleWebhookOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Function webhook output status. */ +public struct HandleWebhookOutput: Codable, JSONEncodable, Hashable { + + /** The http status code. */ + public var statusCode: Double + /** The status of the operation. */ + public var success: Bool + + public init(statusCode: Double, success: Bool) { + self.statusCode = statusCode + self.success = success + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case statusCode + case success + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(statusCode, forKey: .statusCode) + try container.encode(success, forKey: .success) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/HashPropertiesConfiguration.swift b/PublicApi/Classes/OpenAPIs/Models/HashPropertiesConfiguration.swift new file mode 100644 index 00000000..d5b29bfe --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/HashPropertiesConfiguration.swift @@ -0,0 +1,55 @@ +// +// HashPropertiesConfiguration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Optional object for hashing properties within an event. */ +public struct HashPropertiesConfiguration: Codable, JSONEncodable, Hashable { + + public enum Encoding: String, Codable, CaseIterable { + case base16 = "BASE16" + case base64 = "BASE64" + case base64url = "BASE64URL" + case hex = "HEX" + } + /** Which algorithm to use to hash to properties. */ + public var algorithm: String + /** Optional key to hash with. */ + public var key: String? + /** Optional encoding to use for the hashing. */ + public var encoding: Encoding? + /** The paths to the properties to be hashed. */ + public var paths: [String] + + public init(algorithm: String, key: String? = nil, encoding: Encoding? = nil, paths: [String]) { + self.algorithm = algorithm + self.key = key + self.encoding = encoding + self.paths = paths + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case algorithm + case key + case encoding + case paths + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(algorithm, forKey: .algorithm) + try container.encodeIfPresent(key, forKey: .key) + try container.encodeIfPresent(encoding, forKey: .encoding) + try container.encode(paths, forKey: .paths) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/IDSyncConfigurationInput.swift b/PublicApi/Classes/OpenAPIs/Models/IDSyncConfigurationInput.swift new file mode 100644 index 00000000..18566612 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/IDSyncConfigurationInput.swift @@ -0,0 +1,39 @@ +// +// IDSyncConfigurationInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The identifier sync configuration input. */ +public struct IDSyncConfigurationInput: Codable, JSONEncodable, Hashable { + + /** The external id to sync, for example \"user_id\" or \"email\". */ + public var externalId: String + /** The strategy for syncing this identifier. Valid values: \"first\", \"last\", \"all\". */ + public var strategy: String + + public init(externalId: String, strategy: String) { + self.externalId = externalId + self.strategy = strategy + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case externalId + case strategy + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(externalId, forKey: .externalId) + try container.encode(strategy, forKey: .strategy) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Input.swift b/PublicApi/Classes/OpenAPIs/Models/Input.swift index ba374781..5133ac30 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Input.swift @@ -21,12 +21,17 @@ public struct Input: Codable, JSONEncodable, Hashable { public var enabled: Bool? /** The fields used for configuring this action. */ public var settings: JSON? + /** (Reverse ETL only) The reverse ETL model to attach this subscription to. */ + public var reverseETLModelId: String? + public var reverseETLSchedule: ReverseETLSchedule1? - public init(name: String? = nil, trigger: String? = nil, enabled: Bool? = nil, settings: JSON? = nil) { + public init(name: String? = nil, trigger: String? = nil, enabled: Bool? = nil, settings: JSON? = nil, reverseETLModelId: String? = nil, reverseETLSchedule: ReverseETLSchedule1? = nil) { self.name = name self.trigger = trigger self.enabled = enabled self.settings = settings + self.reverseETLModelId = reverseETLModelId + self.reverseETLSchedule = reverseETLSchedule } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -34,6 +39,8 @@ public struct Input: Codable, JSONEncodable, Hashable { case trigger case enabled case settings + case reverseETLModelId + case reverseETLSchedule } // Encodable protocol methods @@ -44,6 +51,8 @@ public struct Input: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(trigger, forKey: .trigger) try container.encodeIfPresent(enabled, forKey: .enabled) try container.encodeIfPresent(settings, forKey: .settings) + try container.encodeIfPresent(reverseETLModelId, forKey: .reverseETLModelId) + try container.encodeIfPresent(reverseETLSchedule, forKey: .reverseETLSchedule) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstance.swift b/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstance.swift new file mode 100644 index 00000000..95f2addf --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstance.swift @@ -0,0 +1,65 @@ +// +// InsertFunctionInstance.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The created instance. */ +public struct InsertFunctionInstance: Codable, JSONEncodable, Hashable { + + public var id: String + public var name: String? + public var integrationId: String + public var classId: String + public var enabled: Bool + public var createdAt: String + public var updatedAt: String + public var settings: [String: AnyCodable] + public var encryptedSettings: [String: AnyCodable] + + public init(id: String, name: String? = nil, integrationId: String, classId: String, enabled: Bool, createdAt: String, updatedAt: String, settings: [String: AnyCodable], encryptedSettings: [String: AnyCodable]) { + self.id = id + self.name = name + self.integrationId = integrationId + self.classId = classId + self.enabled = enabled + self.createdAt = createdAt + self.updatedAt = updatedAt + self.settings = settings + self.encryptedSettings = encryptedSettings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + case integrationId + case classId + case enabled + case createdAt + case updatedAt + case settings + case encryptedSettings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(name, forKey: .name) + try container.encode(integrationId, forKey: .integrationId) + try container.encode(classId, forKey: .classId) + try container.encode(enabled, forKey: .enabled) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encode(settings, forKey: .settings) + try container.encode(encryptedSettings, forKey: .encryptedSettings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstance1.swift b/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstance1.swift new file mode 100644 index 00000000..cebb681e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstance1.swift @@ -0,0 +1,65 @@ +// +// InsertFunctionInstance1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The updated instance. */ +public struct InsertFunctionInstance1: Codable, JSONEncodable, Hashable { + + public var id: String + public var name: String? + public var integrationId: String + public var classId: String + public var enabled: Bool + public var createdAt: String + public var updatedAt: String + public var settings: [String: AnyCodable] + public var encryptedSettings: [String: AnyCodable] + + public init(id: String, name: String? = nil, integrationId: String, classId: String, enabled: Bool, createdAt: String, updatedAt: String, settings: [String: AnyCodable], encryptedSettings: [String: AnyCodable]) { + self.id = id + self.name = name + self.integrationId = integrationId + self.classId = classId + self.enabled = enabled + self.createdAt = createdAt + self.updatedAt = updatedAt + self.settings = settings + self.encryptedSettings = encryptedSettings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + case integrationId + case classId + case enabled + case createdAt + case updatedAt + case settings + case encryptedSettings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(name, forKey: .name) + try container.encode(integrationId, forKey: .integrationId) + try container.encode(classId, forKey: .classId) + try container.encode(enabled, forKey: .enabled) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encode(settings, forKey: .settings) + try container.encode(encryptedSettings, forKey: .encryptedSettings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstance2.swift b/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstance2.swift new file mode 100644 index 00000000..13cff3f9 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstance2.swift @@ -0,0 +1,65 @@ +// +// InsertFunctionInstance2.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The insert Function instance. */ +public struct InsertFunctionInstance2: Codable, JSONEncodable, Hashable { + + public var id: String + public var name: String? + public var integrationId: String + public var classId: String + public var enabled: Bool + public var createdAt: String + public var updatedAt: String + public var settings: [String: AnyCodable] + public var encryptedSettings: [String: AnyCodable] + + public init(id: String, name: String? = nil, integrationId: String, classId: String, enabled: Bool, createdAt: String, updatedAt: String, settings: [String: AnyCodable], encryptedSettings: [String: AnyCodable]) { + self.id = id + self.name = name + self.integrationId = integrationId + self.classId = classId + self.enabled = enabled + self.createdAt = createdAt + self.updatedAt = updatedAt + self.settings = settings + self.encryptedSettings = encryptedSettings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + case integrationId + case classId + case enabled + case createdAt + case updatedAt + case settings + case encryptedSettings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(name, forKey: .name) + try container.encode(integrationId, forKey: .integrationId) + try container.encode(classId, forKey: .classId) + try container.encode(enabled, forKey: .enabled) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encode(settings, forKey: .settings) + try container.encode(encryptedSettings, forKey: .encryptedSettings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstanceAlpha.swift b/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstanceAlpha.swift new file mode 100644 index 00000000..2f00963f --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/InsertFunctionInstanceAlpha.swift @@ -0,0 +1,64 @@ +// +// InsertFunctionInstanceAlpha.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct InsertFunctionInstanceAlpha: Codable, JSONEncodable, Hashable { + + public var id: String + public var name: String? + public var integrationId: String + public var classId: String + public var enabled: Bool + public var createdAt: String + public var updatedAt: String + public var settings: [String: AnyCodable] + public var encryptedSettings: [String: AnyCodable] + + public init(id: String, name: String? = nil, integrationId: String, classId: String, enabled: Bool, createdAt: String, updatedAt: String, settings: [String: AnyCodable], encryptedSettings: [String: AnyCodable]) { + self.id = id + self.name = name + self.integrationId = integrationId + self.classId = classId + self.enabled = enabled + self.createdAt = createdAt + self.updatedAt = updatedAt + self.settings = settings + self.encryptedSettings = encryptedSettings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + case integrationId + case classId + case enabled + case createdAt + case updatedAt + case settings + case encryptedSettings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(name, forKey: .name) + try container.encode(integrationId, forKey: .integrationId) + try container.encode(classId, forKey: .classId) + try container.encode(enabled, forKey: .enabled) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encode(settings, forKey: .settings) + try container.encode(encryptedSettings, forKey: .encryptedSettings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Label1.swift b/PublicApi/Classes/OpenAPIs/Models/Label1.swift index 345e1c88..c06550b9 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Label1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Label1.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** The new label to create in the Workspace. */ +/** The newly created label. */ public struct Label1: Codable, JSONEncodable, Hashable { /** The key that represents the name of this label. */ diff --git a/PublicApi/Classes/OpenAPIs/Models/Label2.swift b/PublicApi/Classes/OpenAPIs/Models/Label2.swift deleted file mode 100644 index 95bf03a4..00000000 --- a/PublicApi/Classes/OpenAPIs/Models/Label2.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// Label2.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** The newly created label. */ -public struct Label2: Codable, JSONEncodable, Hashable { - - /** The key that represents the name of this label. */ - public var key: String - /** The value associated with the key of this label. */ - public var value: String - /** An optional description of the purpose of this label. */ - public var description: String? - - public init(key: String, value: String, description: String? = nil) { - self.key = key - self.value = value - self.description = description - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case key - case value - case description - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(key, forKey: .key) - try container.encode(value, forKey: .value) - try container.encodeIfPresent(description, forKey: .description) - } -} - diff --git a/PublicApi/Classes/OpenAPIs/Models/ListActivationsAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListActivationsAlphaOutput.swift new file mode 100644 index 00000000..7efce46b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListActivationsAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// ListActivationsAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for listing all activations. */ +public struct ListActivationsAlphaOutput: Codable, JSONEncodable, Hashable { + + /** A list of activation results. */ + public var activations: [ActivationOutput] + public var pagination: Pagination1? + + public init(activations: [ActivationOutput], pagination: Pagination1? = nil) { + self.activations = activations + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case activations + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(activations, forKey: .activations) + try container.encodeIfPresent(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListActivationsFromAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListActivationsFromAudience200Response.swift new file mode 100644 index 00000000..fdef458e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListActivationsFromAudience200Response.swift @@ -0,0 +1,32 @@ +// +// ListActivationsFromAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListActivationsFromAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: ListActivationsFromAudienceOutput? + + public init(data: ListActivationsFromAudienceOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListActivationsFromAudienceOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListActivationsFromAudienceOutput.swift new file mode 100644 index 00000000..03d8dcb7 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListActivationsFromAudienceOutput.swift @@ -0,0 +1,38 @@ +// +// ListActivationsFromAudienceOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for listing activations from space and audience. */ +public struct ListActivationsFromAudienceOutput: Codable, JSONEncodable, Hashable { + + /** A list of activation results. */ + public var activations: [ActivationOutput] + public var pagination: Pagination1? + + public init(activations: [ActivationOutput], pagination: Pagination1? = nil) { + self.activations = activations + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case activations + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(activations, forKey: .activations) + try container.encodeIfPresent(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudienceConsumersFromSpaceAndAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudienceConsumersFromSpaceAndAudience200Response.swift new file mode 100644 index 00000000..9934c723 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudienceConsumersFromSpaceAndAudience200Response.swift @@ -0,0 +1,32 @@ +// +// ListAudienceConsumersFromSpaceAndAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListAudienceConsumersFromSpaceAndAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: ListAudienceConsumersFromSpaceAndAudienceAlphaOutput? + + public init(data: ListAudienceConsumersFromSpaceAndAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudienceConsumersFromSpaceAndAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudienceConsumersFromSpaceAndAudienceAlphaOutput.swift new file mode 100644 index 00000000..aa972673 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudienceConsumersFromSpaceAndAudienceAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// ListAudienceConsumersFromSpaceAndAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** List Audience consumers output. */ +public struct ListAudienceConsumersFromSpaceAndAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + /** The list of audience consumers. */ + public var audiences: [AudienceSummary] + public var pagination: Pagination2 + + public init(audiences: [AudienceSummary], pagination: Pagination2) { + self.audiences = audiences + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audiences + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audiences, forKey: .audiences) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudienceConsumersSortInput.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudienceConsumersSortInput.swift new file mode 100644 index 00000000..87374eac --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudienceConsumersSortInput.swift @@ -0,0 +1,48 @@ +// +// ListAudienceConsumersSortInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Sort criteria input for list audience consumers. */ +public struct ListAudienceConsumersSortInput: Codable, JSONEncodable, Hashable { + + public enum Field: String, Codable, CaseIterable { + case createdAt = "CREATED_AT" + case name = "NAME" + case updatedAt = "UPDATED_AT" + } + public enum Direction: String, Codable, CaseIterable { + case asc = "ASC" + case desc = "DESC" + } + /** Field to sort by. */ + public var field: Field + /** Sort direction (ascending or descending). */ + public var direction: Direction + + public init(field: Field, direction: Direction) { + self.field = field + self.direction = direction + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case field + case direction + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(field, forKey: .field) + try container.encode(direction, forKey: .direction) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudienceSchedulesFromSpaceAndAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudienceSchedulesFromSpaceAndAudience200Response.swift new file mode 100644 index 00000000..2dd2df10 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudienceSchedulesFromSpaceAndAudience200Response.swift @@ -0,0 +1,32 @@ +// +// ListAudienceSchedulesFromSpaceAndAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListAudienceSchedulesFromSpaceAndAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: ListAudienceSchedulesFromSpaceAndAudienceAlphaOutput? + + public init(data: ListAudienceSchedulesFromSpaceAndAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudienceSchedulesFromSpaceAndAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudienceSchedulesFromSpaceAndAudienceAlphaOutput.swift new file mode 100644 index 00000000..5c302156 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudienceSchedulesFromSpaceAndAudienceAlphaOutput.swift @@ -0,0 +1,34 @@ +// +// ListAudienceSchedulesFromSpaceAndAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for list audience schedules. */ +public struct ListAudienceSchedulesFromSpaceAndAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + /** A list of audience schedules. */ + public var audienceSchedules: [AudienceSchedule] + + public init(audienceSchedules: [AudienceSchedule]) { + self.audienceSchedules = audienceSchedules + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audienceSchedules + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audienceSchedules, forKey: .audienceSchedules) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudienceSearchInput.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudienceSearchInput.swift new file mode 100644 index 00000000..a26ac1ee --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudienceSearchInput.swift @@ -0,0 +1,44 @@ +// +// ListAudienceSearchInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Search criteria input for list audience consumers. */ +public struct ListAudienceSearchInput: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case definition = "DEFINITION" + case key = "KEY" + case name = "NAME" + } + /** Field to filter by. */ + public var type: ModelType + /** Text to match against the selected field (max 255 characters). When searching by KEY, a prefix match is used. For all other options, a full wildcard search will be used. */ + public var query: String + + public init(type: ModelType, query: String) { + self.type = type + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudiences200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudiences200Response.swift new file mode 100644 index 00000000..3b073c12 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudiences200Response.swift @@ -0,0 +1,32 @@ +// +// ListAudiences200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListAudiences200Response: Codable, JSONEncodable, Hashable { + + public var data: ListAudiencesBetaOutput? + + public init(data: ListAudiencesBetaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudiences200Response1.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudiences200Response1.swift new file mode 100644 index 00000000..1c70341c --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudiences200Response1.swift @@ -0,0 +1,32 @@ +// +// ListAudiences200Response1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListAudiences200Response1: Codable, JSONEncodable, Hashable { + + public var data: ListAudiencesAlphaOutput? + + public init(data: ListAudiencesAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudiencesAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudiencesAlphaOutput.swift new file mode 100644 index 00000000..6a66851b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudiencesAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// ListAudiencesAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** List audiences endpoint output. */ +public struct ListAudiencesAlphaOutput: Codable, JSONEncodable, Hashable { + + /** A list of audience summary results. */ + public var audiences: [AudienceSummaryWithAudienceTypeAndLookback] + public var pagination: Pagination2 + + public init(audiences: [AudienceSummaryWithAudienceTypeAndLookback], pagination: Pagination2) { + self.audiences = audiences + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audiences + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audiences, forKey: .audiences) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudiencesBetaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudiencesBetaOutput.swift new file mode 100644 index 00000000..b79a1684 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudiencesBetaOutput.swift @@ -0,0 +1,38 @@ +// +// ListAudiencesBetaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** List audiences endpoint output. */ +public struct ListAudiencesBetaOutput: Codable, JSONEncodable, Hashable { + + /** A list of audience summary results. */ + public var audiences: [AudienceSummaryWithAudienceTypeAndLookback] + public var pagination: Pagination2 + + public init(audiences: [AudienceSummaryWithAudienceTypeAndLookback], pagination: Pagination2) { + self.audiences = audiences + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audiences + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audiences, forKey: .audiences) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAudiencesPaginationInput.swift b/PublicApi/Classes/OpenAPIs/Models/ListAudiencesPaginationInput.swift new file mode 100644 index 00000000..9907ab02 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListAudiencesPaginationInput.swift @@ -0,0 +1,39 @@ +// +// ListAudiencesPaginationInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Fork of Autobahn's PaginationInput. Count is limited to 200 in this fork. Pagination parameters. Every resource that returns a list of items in its `Output` object may contain a `PaginationInput` in its `Input` object. Required, though some of its fields are optional. */ +public struct ListAudiencesPaginationInput: Codable, JSONEncodable, Hashable { + + /** The page to request. Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys. Consumers of the API must treat this value as opaque. */ + public var cursor: String? + /** The number of items to retrieve in a page, between 1 and 200. */ + public var count: Double + + public init(cursor: String? = nil, count: Double) { + self.cursor = cursor + self.count = count + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case cursor + case count + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(cursor, forKey: .cursor) + try container.encode(count, forKey: .count) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListAuditEventsV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListAuditEventsV1Output.swift index 89367f9d..4eee637f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListAuditEventsV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListAuditEventsV1Output.swift @@ -15,9 +15,9 @@ public struct ListAuditEventsV1Output: Codable, JSONEncodable, Hashable { /** Audit trail events for the current Workspace. */ public var events: [AuditEventV1] - public var pagination: Pagination? + public var pagination: Pagination3? - public init(events: [AuditEventV1], pagination: Pagination? = nil) { + public init(events: [AuditEventV1], pagination: Pagination3? = nil) { self.events = events self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListComputedTraits200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListComputedTraits200Response.swift new file mode 100644 index 00000000..0b63a745 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListComputedTraits200Response.swift @@ -0,0 +1,32 @@ +// +// ListComputedTraits200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListComputedTraits200Response: Codable, JSONEncodable, Hashable { + + public var data: ListComputedTraitsAlphaOutput? + + public init(data: ListComputedTraitsAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListComputedTraitsAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListComputedTraitsAlphaOutput.swift new file mode 100644 index 00000000..4f367892 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListComputedTraitsAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// ListComputedTraitsAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** List computed traits endpoint output. */ +public struct ListComputedTraitsAlphaOutput: Codable, JSONEncodable, Hashable { + + /** A list of computed trait summary results. */ + public var computedTraits: [ComputedTraitSummary] + public var pagination: Pagination2 + + public init(computedTraits: [ComputedTraitSummary], pagination: Pagination2) { + self.computedTraits = computedTraits + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case computedTraits + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(computedTraits, forKey: .computedTraits) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListConnectedDestinationsFromSourceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListConnectedDestinationsFromSourceAlphaOutput.swift index 757382eb..3d7a5574 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListConnectedDestinationsFromSourceAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListConnectedDestinationsFromSourceAlphaOutput.swift @@ -15,9 +15,9 @@ public struct ListConnectedDestinationsFromSourceAlphaOutput: Codable, JSONEncod /** A list that contains the Destinations connected to the Source. */ public var destinations: [DestinationV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(destinations: [DestinationV1], pagination: Pagination) { + public init(destinations: [DestinationV1], pagination: Pagination3) { self.destinations = destinations self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListConnectedDestinationsFromSourceV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListConnectedDestinationsFromSourceV1Output.swift index 34494879..127ed767 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListConnectedDestinationsFromSourceV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListConnectedDestinationsFromSourceV1Output.swift @@ -15,9 +15,9 @@ public struct ListConnectedDestinationsFromSourceV1Output: Codable, JSONEncodabl /** A list that contains the Destinations connected to the Source. */ public var destinations: [DestinationV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(destinations: [DestinationV1], pagination: Pagination) { + public init(destinations: [DestinationV1], pagination: Pagination3) { self.destinations = destinations self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListConnectedSourcesFromWarehouseV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListConnectedSourcesFromWarehouseV1Output.swift index 19be324e..c8d5a6b0 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListConnectedSourcesFromWarehouseV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListConnectedSourcesFromWarehouseV1Output.swift @@ -15,9 +15,9 @@ public struct ListConnectedSourcesFromWarehouseV1Output: Codable, JSONEncodable, /** A list that contains the Sources connected to the requested Warehouse. */ public var sources: [SourceV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(sources: [SourceV1], pagination: Pagination) { + public init(sources: [SourceV1], pagination: Pagination3) { self.sources = sources self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListConnectedWarehousesFromSourceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListConnectedWarehousesFromSourceAlphaOutput.swift index a6da2fb5..cedd8668 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListConnectedWarehousesFromSourceAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListConnectedWarehousesFromSourceAlphaOutput.swift @@ -15,9 +15,9 @@ public struct ListConnectedWarehousesFromSourceAlphaOutput: Codable, JSONEncodab /** A list that contains the Warehouses connected to the Source. */ public var warehouses: [WarehouseV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(warehouses: [WarehouseV1], pagination: Pagination) { + public init(warehouses: [WarehouseV1], pagination: Pagination3) { self.warehouses = warehouses self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListConnectedWarehousesFromSourceV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListConnectedWarehousesFromSourceV1Output.swift index 465f72ca..ecc01d27 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListConnectedWarehousesFromSourceV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListConnectedWarehousesFromSourceV1Output.swift @@ -15,9 +15,9 @@ public struct ListConnectedWarehousesFromSourceV1Output: Codable, JSONEncodable, /** A list that contains the Warehouses connected to the Source. */ public var warehouses: [WarehouseV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(warehouses: [WarehouseV1], pagination: Pagination) { + public init(warehouses: [WarehouseV1], pagination: Pagination3) { self.warehouses = warehouses self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListDestinationsFromAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListDestinationsFromAudience200Response.swift new file mode 100644 index 00000000..4e0cc597 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListDestinationsFromAudience200Response.swift @@ -0,0 +1,32 @@ +// +// ListDestinationsFromAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListDestinationsFromAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: ListDestinationsFromAudienceAlphaOutput? + + public init(data: ListDestinationsFromAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListDestinationsFromAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListDestinationsFromAudienceAlphaOutput.swift new file mode 100644 index 00000000..888dd3e4 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListDestinationsFromAudienceAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// ListDestinationsFromAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output to List all Destinations from an Audience. */ +public struct ListDestinationsFromAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + /** A list of connection results. */ + public var connections: [SimpleDestination] + public var pagination: Pagination1? + + public init(connections: [SimpleDestination], pagination: Pagination1? = nil) { + self.connections = connections + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case connections + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(connections, forKey: .connections) + try container.encodeIfPresent(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListDestinationsV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListDestinationsV1Output.swift index 721f7fb5..6c2f3d75 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListDestinationsV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListDestinationsV1Output.swift @@ -15,9 +15,9 @@ public struct ListDestinationsV1Output: Codable, JSONEncodable, Hashable { /** The list that contains the Destinations connected to the Workspace. */ public var destinations: [DestinationV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(destinations: [DestinationV1], pagination: Pagination) { + public init(destinations: [DestinationV1], pagination: Pagination3) { self.destinations = destinations self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListFiltersForSpace200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListFiltersForSpace200Response.swift new file mode 100644 index 00000000..d99d884d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListFiltersForSpace200Response.swift @@ -0,0 +1,32 @@ +// +// ListFiltersForSpace200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListFiltersForSpace200Response: Codable, JSONEncodable, Hashable { + + public var data: ListFiltersForSpaceOutput? + + public init(data: ListFiltersForSpaceOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListFiltersForSpaceOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListFiltersForSpaceOutput.swift new file mode 100644 index 00000000..d543db8b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListFiltersForSpaceOutput.swift @@ -0,0 +1,38 @@ +// +// ListFiltersForSpaceOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for ListFiltersByIntegrationId. */ +public struct ListFiltersForSpaceOutput: Codable, JSONEncodable, Hashable { + + /** Filter output. */ + public var filters: [Filter]? + public var pagination: Pagination5? + + public init(filters: [Filter]? = nil, pagination: Pagination5? = nil) { + self.filters = filters + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filters + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(filters, forKey: .filters) + try container.encodeIfPresent(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListFiltersFromDestinationV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListFiltersFromDestinationV1Output.swift index de8123e8..9ca76c80 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListFiltersFromDestinationV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListFiltersFromDestinationV1Output.swift @@ -15,9 +15,9 @@ public struct ListFiltersFromDestinationV1Output: Codable, JSONEncodable, Hashab /** A list of the filters that belong to the specified Destination instance. */ public var filters: [DestinationFilterV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(filters: [DestinationFilterV1], pagination: Pagination) { + public init(filters: [DestinationFilterV1], pagination: Pagination3) { self.filters = filters self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListFiltersPaginationInput.swift b/PublicApi/Classes/OpenAPIs/Models/ListFiltersPaginationInput.swift new file mode 100644 index 00000000..c5548965 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListFiltersPaginationInput.swift @@ -0,0 +1,39 @@ +// +// ListFiltersPaginationInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Pagination for list filters. */ +public struct ListFiltersPaginationInput: Codable, JSONEncodable, Hashable { + + /** The offset. */ + public var cursor: Double? + /** The number of items to retrieve in a page, between 1 and 10. */ + public var count: Double + + public init(cursor: Double? = nil, count: Double) { + self.cursor = cursor + self.count = count + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case cursor + case count + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(cursor, forKey: .cursor) + try container.encode(count, forKey: .count) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListFiltersPaginationOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListFiltersPaginationOutput.swift new file mode 100644 index 00000000..9110a57e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListFiltersPaginationOutput.swift @@ -0,0 +1,44 @@ +// +// ListFiltersPaginationOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Pagination for list filters. */ +public struct ListFiltersPaginationOutput: Codable, JSONEncodable, Hashable { + + /** Current. */ + public var current: Double? + /** Next. */ + public var next: Double? + /** Total entries. */ + public var totalEntries: Double? + + public init(current: Double? = nil, next: Double? = nil, totalEntries: Double? = nil) { + self.current = current + self.next = next + self.totalEntries = totalEntries + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case current + case next + case totalEntries + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(current, forKey: .current) + try container.encodeIfPresent(next, forKey: .next) + try container.encodeIfPresent(totalEntries, forKey: .totalEntries) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListFunctionItemV1.swift b/PublicApi/Classes/OpenAPIs/Models/ListFunctionItemV1.swift index 6d814c73..abf87c68 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListFunctionItemV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListFunctionItemV1.swift @@ -15,6 +15,9 @@ public struct ListFunctionItemV1: Codable, JSONEncodable, Hashable { public enum ResourceType: String, Codable, CaseIterable { case destination = "DESTINATION" + case insertDestination = "INSERT_DESTINATION" + case insertSource = "INSERT_SOURCE" + case insertTransformation = "INSERT_TRANSFORMATION" case source = "SOURCE" } /** An identifier for this Function. */ diff --git a/PublicApi/Classes/OpenAPIs/Models/ListFunctionVersions200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListFunctionVersions200Response.swift new file mode 100644 index 00000000..1286bbe2 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListFunctionVersions200Response.swift @@ -0,0 +1,32 @@ +// +// ListFunctionVersions200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListFunctionVersions200Response: Codable, JSONEncodable, Hashable { + + public var data: ListFunctionVersionsAlphaOutput? + + public init(data: ListFunctionVersionsAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListFunctionVersionsAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListFunctionVersionsAlphaOutput.swift new file mode 100644 index 00000000..29f94d12 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListFunctionVersionsAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// ListFunctionVersionsAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Lists Versions of a Function. */ +public struct ListFunctionVersionsAlphaOutput: Codable, JSONEncodable, Hashable { + + /** An array of Functions. */ + public var versions: [Version] + public var pagination: Pagination3 + + public init(versions: [Version], pagination: Pagination3) { + self.versions = versions + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case versions + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(versions, forKey: .versions) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListFunctionsV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListFunctionsV1Output.swift index 4dd90c2f..2533ec4b 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListFunctionsV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListFunctionsV1Output.swift @@ -15,9 +15,9 @@ public struct ListFunctionsV1Output: Codable, JSONEncodable, Hashable { /** An array of Functions. */ public var functions: [ListFunctionItemV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(functions: [ListFunctionItemV1], pagination: Pagination) { + public init(functions: [ListFunctionItemV1], pagination: Pagination3) { self.functions = functions self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListInsertFunctionInstances200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListInsertFunctionInstances200Response.swift new file mode 100644 index 00000000..8d12e8bf --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListInsertFunctionInstances200Response.swift @@ -0,0 +1,32 @@ +// +// ListInsertFunctionInstances200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListInsertFunctionInstances200Response: Codable, JSONEncodable, Hashable { + + public var data: ListInsertFunctionInstancesAlphaOutput? + + public init(data: ListInsertFunctionInstancesAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListInsertFunctionInstancesAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListInsertFunctionInstancesAlphaOutput.swift new file mode 100644 index 00000000..b0ccf925 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListInsertFunctionInstancesAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// ListInsertFunctionInstancesAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns a list of insert Function instances connected to the insert Function. */ +public struct ListInsertFunctionInstancesAlphaOutput: Codable, JSONEncodable, Hashable { + + /** All insert Function instances found. */ + public var instances: [InsertFunctionInstanceAlpha] + public var pagination: Pagination3 + + public init(instances: [InsertFunctionInstanceAlpha], pagination: Pagination3) { + self.instances = instances + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case instances + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(instances, forKey: .instances) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListInvitesFromUserGroupV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListInvitesFromUserGroupV1Output.swift index 74ba7ae3..7b967f39 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListInvitesFromUserGroupV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListInvitesFromUserGroupV1Output.swift @@ -15,9 +15,9 @@ public struct ListInvitesFromUserGroupV1Output: Codable, JSONEncodable, Hashable /** The emails of the invitees to the user group. */ public var emails: [String] - public var pagination: Pagination + public var pagination: Pagination3 - public init(emails: [String], pagination: Pagination) { + public init(emails: [String], pagination: Pagination3) { self.emails = emails self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListInvitesV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListInvitesV1Output.swift index 9fb6efdb..64159615 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListInvitesV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListInvitesV1Output.swift @@ -15,9 +15,9 @@ public struct ListInvitesV1Output: Codable, JSONEncodable, Hashable { /** The list of invites. */ public var invites: [String] - public var pagination: Pagination + public var pagination: Pagination3 - public init(invites: [String], pagination: Pagination) { + public init(invites: [String], pagination: Pagination3) { self.invites = invites self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListProfilesWarehouseInSpace200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListProfilesWarehouseInSpace200Response.swift new file mode 100644 index 00000000..59d04d26 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListProfilesWarehouseInSpace200Response.swift @@ -0,0 +1,32 @@ +// +// ListProfilesWarehouseInSpace200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListProfilesWarehouseInSpace200Response: Codable, JSONEncodable, Hashable { + + public var data: ListProfilesWarehouseInSpaceAlphaOutput? + + public init(data: ListProfilesWarehouseInSpaceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListProfilesWarehouseInSpaceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListProfilesWarehouseInSpaceAlphaOutput.swift new file mode 100644 index 00000000..aec62bc5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListProfilesWarehouseInSpaceAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// ListProfilesWarehouseInSpaceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns all Profiles Warehouse based on spaceID and pagination. */ +public struct ListProfilesWarehouseInSpaceAlphaOutput: Codable, JSONEncodable, Hashable { + + /** A list of Warehouses that belong to the Workspace. */ + public var profilesWarehouses: [ProfilesWarehouseAlpha] + public var pagination: Pagination3? + + public init(profilesWarehouses: [ProfilesWarehouseAlpha], pagination: Pagination3? = nil) { + self.profilesWarehouses = profilesWarehouses + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case profilesWarehouses + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(profilesWarehouses, forKey: .profilesWarehouses) + try container.encodeIfPresent(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.swift new file mode 100644 index 00000000..5817de6e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.swift @@ -0,0 +1,32 @@ +// +// ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response: Codable, JSONEncodable, Hashable { + + public var data: ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput? + + public init(data: ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.swift new file mode 100644 index 00000000..f1619754 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.swift @@ -0,0 +1,38 @@ +// +// ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The reverse ETL sync statuses that were looked up. */ +public struct ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput: Codable, JSONEncodable, Hashable { + + /** The reverse ETL sync statuses that were looked up of the subscription id. */ + public var syncStatuses: [ReverseETLSyncStatus] + public var pagination: Pagination6? + + public init(syncStatuses: [ReverseETLSyncStatus], pagination: Pagination6? = nil) { + self.syncStatuses = syncStatuses + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case syncStatuses + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(syncStatuses, forKey: .syncStatuses) + try container.encodeIfPresent(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListReverseEtlModels200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListReverseEtlModels200Response.swift new file mode 100644 index 00000000..ee872bc6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListReverseEtlModels200Response.swift @@ -0,0 +1,32 @@ +// +// ListReverseEtlModels200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListReverseEtlModels200Response: Codable, JSONEncodable, Hashable { + + public var data: ListReverseEtlModelsOutput? + + public init(data: ListReverseEtlModelsOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListReverseEtlModelsOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListReverseEtlModelsOutput.swift new file mode 100644 index 00000000..8f4ffbb7 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListReverseEtlModelsOutput.swift @@ -0,0 +1,38 @@ +// +// ListReverseEtlModelsOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines the result of listing Models. */ +public struct ListReverseEtlModelsOutput: Codable, JSONEncodable, Hashable { + + /** A list of Models that belong to the Workspace. */ + public var models: [ReverseEtlModel] + public var pagination: Pagination3 + + public init(models: [ReverseEtlModel], pagination: Pagination3) { + self.models = models + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case models + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(models, forKey: .models) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListRolesV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListRolesV1Output.swift index b08dc91c..f64401bc 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListRolesV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListRolesV1Output.swift @@ -15,9 +15,9 @@ public struct ListRolesV1Output: Codable, JSONEncodable, Hashable { /** The list of roles. */ public var roles: [RoleV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(roles: [RoleV1], pagination: Pagination) { + public init(roles: [RoleV1], pagination: Pagination3) { self.roles = roles self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListRulesFromTrackingPlanV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListRulesFromTrackingPlanV1Output.swift index 053bb4aa..324de062 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListRulesFromTrackingPlanV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListRulesFromTrackingPlanV1Output.swift @@ -15,9 +15,9 @@ public struct ListRulesFromTrackingPlanV1Output: Codable, JSONEncodable, Hashabl /** Rules associated with the given Tracking Plan. */ public var rules: [RuleV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(rules: [RuleV1], pagination: Pagination) { + public init(rules: [RuleV1], pagination: Pagination3) { self.rules = rules self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSourceV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSourceV1Output.swift index 8dcafc71..88ad1e44 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSourceV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSourceV1Output.swift @@ -15,9 +15,9 @@ public struct ListSelectiveSyncsFromWarehouseAndSourceV1Output: Codable, JSONEnc /** Represents a list of Source, collection, and properties synced to the Warehouse. */ public var items: [WarehouseSelectiveSyncItemV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(items: [WarehouseSelectiveSyncItemV1], pagination: Pagination) { + public init(items: [WarehouseSelectiveSyncItemV1], pagination: Pagination3) { self.items = items self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSpace200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSpace200Response.swift new file mode 100644 index 00000000..f6e11053 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSpace200Response.swift @@ -0,0 +1,32 @@ +// +// ListSelectiveSyncsFromWarehouseAndSpace200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListSelectiveSyncsFromWarehouseAndSpace200Response: Codable, JSONEncodable, Hashable { + + public var data: ListSelectiveSyncsFromWarehouseAndSpaceAlphaOutput? + + public init(data: ListSelectiveSyncsFromWarehouseAndSpaceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSpaceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSpaceAlphaOutput.swift new file mode 100644 index 00000000..53af9330 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListSelectiveSyncsFromWarehouseAndSpaceAlphaOutput.swift @@ -0,0 +1,43 @@ +// +// ListSelectiveSyncsFromWarehouseAndSpaceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Results containing the Selective Sync configuration for a Space Warehouse Connection. */ +public struct ListSelectiveSyncsFromWarehouseAndSpaceAlphaOutput: Codable, JSONEncodable, Hashable { + + /** Represents a list of collections and properties synced to the Warehouse. */ + public var items: [SpaceWarehouseSelectiveSyncItemAlpha] + /** Optional. Represents the enabled state of all event tables. */ + public var enableEventTables: Bool? + public var pagination: Pagination3 + + public init(items: [SpaceWarehouseSelectiveSyncItemAlpha], enableEventTables: Bool? = nil, pagination: Pagination3) { + self.items = items + self.enableEventTables = enableEventTables + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case items + case enableEventTables + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(items, forKey: .items) + try container.encodeIfPresent(enableEventTables, forKey: .enableEventTables) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSourcesAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListSourcesAlphaOutput.swift index f3a853ff..1b4248d1 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListSourcesAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListSourcesAlphaOutput.swift @@ -15,9 +15,9 @@ public struct ListSourcesAlphaOutput: Codable, JSONEncodable, Hashable { /** A list of Sources that belong to the Workspace. */ public var sources: [SourceAlpha] - public var pagination: Pagination + public var pagination: Pagination3 - public init(sources: [SourceAlpha], pagination: Pagination) { + public init(sources: [SourceAlpha], pagination: Pagination3) { self.sources = sources self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSourcesFromTrackingPlanV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListSourcesFromTrackingPlanV1Output.swift index 6661d1a1..d86c9e4f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListSourcesFromTrackingPlanV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListSourcesFromTrackingPlanV1Output.swift @@ -15,9 +15,9 @@ public struct ListSourcesFromTrackingPlanV1Output: Codable, JSONEncodable, Hasha /** A paginated list of Sources associated with the Tracking Plan. */ public var sources: [SourceV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(sources: [SourceV1], pagination: Pagination) { + public init(sources: [SourceV1], pagination: Pagination3) { self.sources = sources self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSourcesV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListSourcesV1Output.swift index ed0f9ded..171ba1ba 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListSourcesV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListSourcesV1Output.swift @@ -15,9 +15,9 @@ public struct ListSourcesV1Output: Codable, JSONEncodable, Hashable { /** A list of Sources that belong to the Workspace. */ public var sources: [SourceV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(sources: [SourceV1], pagination: Pagination) { + public init(sources: [SourceV1], pagination: Pagination3) { self.sources = sources self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSpaces200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListSpaces200Response.swift new file mode 100644 index 00000000..c2d87071 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListSpaces200Response.swift @@ -0,0 +1,32 @@ +// +// ListSpaces200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListSpaces200Response: Codable, JSONEncodable, Hashable { + + public var data: ListSpacesAlphaOutput? + + public init(data: ListSpacesAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSpacesAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListSpacesAlphaOutput.swift new file mode 100644 index 00000000..29f8daa5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListSpacesAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// ListSpacesAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Response for the list spaces endpoint. */ +public struct ListSpacesAlphaOutput: Codable, JSONEncodable, Hashable { + + /** A list of spaces. */ + public var spaces: [Space] + public var pagination: Pagination3 + + public init(spaces: [Space], pagination: Pagination3) { + self.spaces = spaces + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case spaces + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(spaces, forKey: .spaces) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSubscriptionsFromDestinationAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListSubscriptionsFromDestinationAlphaOutput.swift index eb7d8367..c5fef0ef 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListSubscriptionsFromDestinationAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListSubscriptionsFromDestinationAlphaOutput.swift @@ -15,9 +15,9 @@ public struct ListSubscriptionsFromDestinationAlphaOutput: Codable, JSONEncodabl /** A list of Destination subscriptions. */ public var subscriptions: [DestinationSubscription] - public var pagination: Pagination? + public var pagination: Pagination3? - public init(subscriptions: [DestinationSubscription], pagination: Pagination? = nil) { + public init(subscriptions: [DestinationSubscription], pagination: Pagination3? = nil) { self.subscriptions = subscriptions self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSupportedDestinationsFromAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/ListSupportedDestinationsFromAudience200Response.swift new file mode 100644 index 00000000..de41b013 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListSupportedDestinationsFromAudience200Response.swift @@ -0,0 +1,32 @@ +// +// ListSupportedDestinationsFromAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListSupportedDestinationsFromAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: ListSupportedDestinationsFromAudienceAlphaOutput? + + public init(data: ListSupportedDestinationsFromAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSupportedDestinationsFromAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListSupportedDestinationsFromAudienceAlphaOutput.swift new file mode 100644 index 00000000..418485dd --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ListSupportedDestinationsFromAudienceAlphaOutput.swift @@ -0,0 +1,37 @@ +// +// ListSupportedDestinationsFromAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ListSupportedDestinationsFromAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + /** The Destinations available for activation. */ + public var destinations: [String: AnyCodable] + public var pagination: Pagination? + + public init(destinations: [String: AnyCodable], pagination: Pagination? = nil) { + self.destinations = destinations + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case destinations + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(destinations, forKey: .destinations) + try container.encodeIfPresent(pagination, forKey: .pagination) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSuppressionsV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListSuppressionsV1Output.swift index c626ddc3..b5807819 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListSuppressionsV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListSuppressionsV1Output.swift @@ -15,9 +15,9 @@ public struct ListSuppressionsV1Output: Codable, JSONEncodable, Hashable { /** An array that lists the suppressions from the Workspace. Config API note: equal to `attributes`. */ public var suppressed: [SuppressedInner] - public var pagination: Pagination + public var pagination: Pagination3 - public init(suppressed: [SuppressedInner], pagination: Pagination) { + public init(suppressed: [SuppressedInner], pagination: Pagination3) { self.suppressed = suppressed self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSyncsFromWarehouseAndSourceV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListSyncsFromWarehouseAndSourceV1Output.swift index 385f965b..19276cbe 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListSyncsFromWarehouseAndSourceV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListSyncsFromWarehouseAndSourceV1Output.swift @@ -15,9 +15,9 @@ public struct ListSyncsFromWarehouseAndSourceV1Output: Codable, JSONEncodable, H /** A list that contains the latest syncs for the specified Warehouse-source pair. */ public var reports: [SyncV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(reports: [SyncV1], pagination: Pagination) { + public init(reports: [SyncV1], pagination: Pagination3) { self.reports = reports self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListSyncsFromWarehouseV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListSyncsFromWarehouseV1Output.swift index c1b3cb8a..51b4981f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListSyncsFromWarehouseV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListSyncsFromWarehouseV1Output.swift @@ -15,9 +15,9 @@ public struct ListSyncsFromWarehouseV1Output: Codable, JSONEncodable, Hashable { /** A list that contains the latest syncs for the specified Warehouse. */ public var reports: [SyncV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(reports: [SyncV1], pagination: Pagination) { + public init(reports: [SyncV1], pagination: Pagination3) { self.reports = reports self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListTrackingPlansV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListTrackingPlansV1Output.swift index 291b775f..2923694c 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListTrackingPlansV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListTrackingPlansV1Output.swift @@ -15,9 +15,9 @@ public struct ListTrackingPlansV1Output: Codable, JSONEncodable, Hashable { /** A paginated list of Tracking Plans. */ public var trackingPlans: [TrackingPlanV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(trackingPlans: [TrackingPlanV1], pagination: Pagination) { + public init(trackingPlans: [TrackingPlanV1], pagination: Pagination3) { self.trackingPlans = trackingPlans self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListTransformationsBetaInput.swift b/PublicApi/Classes/OpenAPIs/Models/ListTransformationsBetaInput.swift index 2269046f..507371c8 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListTransformationsBetaInput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListTransformationsBetaInput.swift @@ -13,9 +13,9 @@ import AnyCodable /** Lists the Transformations associated with the current Workspace. */ public struct ListTransformationsBetaInput: Codable, JSONEncodable, Hashable { - public var pagination: Pagination1 + public var pagination: Pagination7? - public init(pagination: Pagination1) { + public init(pagination: Pagination7? = nil) { self.pagination = pagination } @@ -27,7 +27,7 @@ public struct ListTransformationsBetaInput: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(pagination, forKey: .pagination) + try container.encodeIfPresent(pagination, forKey: .pagination) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListTransformationsBetaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ListTransformationsBetaOutput.swift index ee5109fc..dccc7625 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListTransformationsBetaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListTransformationsBetaOutput.swift @@ -15,9 +15,9 @@ public struct ListTransformationsBetaOutput: Codable, JSONEncodable, Hashable { /** A paginated list of Transformations. */ public var transformations: [TransformationBeta] - public var pagination: Pagination + public var pagination: Pagination3 - public init(transformations: [TransformationBeta], pagination: Pagination) { + public init(transformations: [TransformationBeta], pagination: Pagination3) { self.transformations = transformations self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListTransformationsV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListTransformationsV1Output.swift index 5e2b4ab0..3af86c73 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListTransformationsV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListTransformationsV1Output.swift @@ -15,9 +15,9 @@ public struct ListTransformationsV1Output: Codable, JSONEncodable, Hashable { /** A paginated list of Transformations. */ public var transformations: [TransformationV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(transformations: [TransformationV1], pagination: Pagination) { + public init(transformations: [TransformationV1], pagination: Pagination3) { self.transformations = transformations self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListUserGroupsFromUserV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListUserGroupsFromUserV1Output.swift index 8cd9f227..86e6613c 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListUserGroupsFromUserV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListUserGroupsFromUserV1Output.swift @@ -15,9 +15,9 @@ public struct ListUserGroupsFromUserV1Output: Codable, JSONEncodable, Hashable { /** The user groups that the user belongs to. */ public var groups: [MinimalUserGroupV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(groups: [MinimalUserGroupV1], pagination: Pagination) { + public init(groups: [MinimalUserGroupV1], pagination: Pagination3) { self.groups = groups self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListUserGroupsV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListUserGroupsV1Output.swift index ab0d2d66..9a801565 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListUserGroupsV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListUserGroupsV1Output.swift @@ -15,9 +15,9 @@ public struct ListUserGroupsV1Output: Codable, JSONEncodable, Hashable { /** The user group returned from the query. */ public var userGroups: [UserGroupV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(userGroups: [UserGroupV1], pagination: Pagination) { + public init(userGroups: [UserGroupV1], pagination: Pagination3) { self.userGroups = userGroups self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListUsersFromUserGroupV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListUsersFromUserGroupV1Output.swift index 7fee963f..1cab4fd1 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListUsersFromUserGroupV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListUsersFromUserGroupV1Output.swift @@ -15,9 +15,9 @@ public struct ListUsersFromUserGroupV1Output: Codable, JSONEncodable, Hashable { /** The users of the user group. */ public var users: [MinimalUserV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(users: [MinimalUserV1], pagination: Pagination) { + public init(users: [MinimalUserV1], pagination: Pagination3) { self.users = users self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListUsersV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListUsersV1Output.swift index 51692956..42ea027f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListUsersV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListUsersV1Output.swift @@ -15,9 +15,9 @@ public struct ListUsersV1Output: Codable, JSONEncodable, Hashable { /** The list of users. */ public var users: [UserV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(users: [UserV1], pagination: Pagination) { + public init(users: [UserV1], pagination: Pagination3) { self.users = users self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListWarehousesV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListWarehousesV1Output.swift index a2cc9a31..b9e42d58 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListWarehousesV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListWarehousesV1Output.swift @@ -15,9 +15,9 @@ public struct ListWarehousesV1Output: Codable, JSONEncodable, Hashable { /** A list of Warehouses that belong to the Workspace. */ public var warehouses: [WarehouseV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(warehouses: [WarehouseV1], pagination: Pagination) { + public init(warehouses: [WarehouseV1], pagination: Pagination3) { self.warehouses = warehouses self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/ListWorkspaceRegulationsV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/ListWorkspaceRegulationsV1Output.swift index 029e155c..fa70dc90 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ListWorkspaceRegulationsV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ListWorkspaceRegulationsV1Output.swift @@ -15,9 +15,9 @@ public struct ListWorkspaceRegulationsV1Output: Codable, JSONEncodable, Hashable /** List of Workspace-scoped regulations with statuses. */ public var regulations: [RegulationListEntryV1] - public var pagination: Pagination + public var pagination: Pagination3 - public init(regulations: [RegulationListEntryV1], pagination: Pagination) { + public init(regulations: [RegulationListEntryV1], pagination: Pagination3) { self.regulations = regulations self.pagination = pagination } diff --git a/PublicApi/Classes/OpenAPIs/Models/EdgeFunctions1.swift b/PublicApi/Classes/OpenAPIs/Models/LivePlugin.swift similarity index 71% rename from PublicApi/Classes/OpenAPIs/Models/EdgeFunctions1.swift rename to PublicApi/Classes/OpenAPIs/Models/LivePlugin.swift index 4f454a24..947b7292 100644 --- a/PublicApi/Classes/OpenAPIs/Models/EdgeFunctions1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/LivePlugin.swift @@ -1,5 +1,5 @@ // -// EdgeFunctions1.swift +// LivePlugin.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,10 +10,10 @@ import Foundation import AnyCodable #endif -/** The latest version of Edge Function bundle. */ -public struct EdgeFunctions1: Codable, JSONEncodable, Hashable { +/** The latest version of Live Plugin bundle. */ +public struct LivePlugin: Codable, JSONEncodable, Hashable { - /** The Edge Function id. */ + /** The Live Plugin id. */ public var id: String /** The Source id. */ public var sourceId: String @@ -21,18 +21,21 @@ public struct EdgeFunctions1: Codable, JSONEncodable, Hashable { public var createdAt: String /** Creating user's id. */ public var createdBy: String - /** The CDN URL that can be used to fetch your latest EdgeFunctions bundle. */ + /** The CDN URL that can be used to fetch your latest Live Plugin bundle. */ public var downloadURL: String - /** Revision number associated with the latest Edge Function. */ + /** Revision number associated with the latest Live Plugin. */ public var version: Double + /** The code of the Live Plugin. */ + public var code: String? - public init(id: String, sourceId: String, createdAt: String, createdBy: String, downloadURL: String, version: Double) { + public init(id: String, sourceId: String, createdAt: String, createdBy: String, downloadURL: String, version: Double, code: String? = nil) { self.id = id self.sourceId = sourceId self.createdAt = createdAt self.createdBy = createdBy self.downloadURL = downloadURL self.version = version + self.code = code } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -42,6 +45,7 @@ public struct EdgeFunctions1: Codable, JSONEncodable, Hashable { case createdBy case downloadURL case version + case code } // Encodable protocol methods @@ -54,6 +58,7 @@ public struct EdgeFunctions1: Codable, JSONEncodable, Hashable { try container.encode(createdBy, forKey: .createdBy) try container.encode(downloadURL, forKey: .downloadURL) try container.encode(version, forKey: .version) + try container.encodeIfPresent(code, forKey: .code) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/EdgeFunctions.swift b/PublicApi/Classes/OpenAPIs/Models/LivePlugin1.swift similarity index 71% rename from PublicApi/Classes/OpenAPIs/Models/EdgeFunctions.swift rename to PublicApi/Classes/OpenAPIs/Models/LivePlugin1.swift index df7fd62c..75ba1123 100644 --- a/PublicApi/Classes/OpenAPIs/Models/EdgeFunctions.swift +++ b/PublicApi/Classes/OpenAPIs/Models/LivePlugin1.swift @@ -1,5 +1,5 @@ // -// EdgeFunctions.swift +// LivePlugin1.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,10 +10,10 @@ import Foundation import AnyCodable #endif -/** The created Edge Function. */ -public struct EdgeFunctions: Codable, JSONEncodable, Hashable { +/** The created Live Plugin. */ +public struct LivePlugin1: Codable, JSONEncodable, Hashable { - /** The Edge Function id. */ + /** The Live Plugin id. */ public var id: String /** The Source id. */ public var sourceId: String @@ -21,18 +21,21 @@ public struct EdgeFunctions: Codable, JSONEncodable, Hashable { public var createdAt: String /** Creating user's id. */ public var createdBy: String - /** The CDN URL that can be used to fetch your latest EdgeFunctions bundle. */ + /** The CDN URL that can be used to fetch your latest Live Plugin bundle. */ public var downloadURL: String - /** Revision number associated with the latest Edge Function. */ + /** Revision number associated with the latest Live Plugin. */ public var version: Double + /** The code of the Live Plugin. */ + public var code: String? - public init(id: String, sourceId: String, createdAt: String, createdBy: String, downloadURL: String, version: Double) { + public init(id: String, sourceId: String, createdAt: String, createdBy: String, downloadURL: String, version: Double, code: String? = nil) { self.id = id self.sourceId = sourceId self.createdAt = createdAt self.createdBy = createdBy self.downloadURL = downloadURL self.version = version + self.code = code } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -42,6 +45,7 @@ public struct EdgeFunctions: Codable, JSONEncodable, Hashable { case createdBy case downloadURL case version + case code } // Encodable protocol methods @@ -54,6 +58,7 @@ public struct EdgeFunctions: Codable, JSONEncodable, Hashable { try container.encode(createdBy, forKey: .createdBy) try container.encode(downloadURL, forKey: .downloadURL) try container.encode(version, forKey: .version) + try container.encodeIfPresent(code, forKey: .code) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/EdgeFunctionsAlpha.swift b/PublicApi/Classes/OpenAPIs/Models/LivePluginsAlpha.swift similarity index 71% rename from PublicApi/Classes/OpenAPIs/Models/EdgeFunctionsAlpha.swift rename to PublicApi/Classes/OpenAPIs/Models/LivePluginsAlpha.swift index cdf3c049..91278152 100644 --- a/PublicApi/Classes/OpenAPIs/Models/EdgeFunctionsAlpha.swift +++ b/PublicApi/Classes/OpenAPIs/Models/LivePluginsAlpha.swift @@ -1,5 +1,5 @@ // -// EdgeFunctionsAlpha.swift +// LivePluginsAlpha.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,10 +10,10 @@ import Foundation import AnyCodable #endif -/** Represents an Edge Function bundle. */ -public struct EdgeFunctionsAlpha: Codable, JSONEncodable, Hashable { +/** Represents a Live Plugin bundle. */ +public struct LivePluginsAlpha: Codable, JSONEncodable, Hashable { - /** The Edge Function id. */ + /** The Live Plugin id. */ public var id: String /** The Source id. */ public var sourceId: String @@ -21,18 +21,21 @@ public struct EdgeFunctionsAlpha: Codable, JSONEncodable, Hashable { public var createdAt: String /** Creating user's id. */ public var createdBy: String - /** The CDN URL that can be used to fetch your latest EdgeFunctions bundle. */ + /** The CDN URL that can be used to fetch your latest Live Plugin bundle. */ public var downloadURL: String - /** Revision number associated with the latest Edge Function. */ + /** Revision number associated with the latest Live Plugin. */ public var version: Double + /** The code of the Live Plugin. */ + public var code: String? - public init(id: String, sourceId: String, createdAt: String, createdBy: String, downloadURL: String, version: Double) { + public init(id: String, sourceId: String, createdAt: String, createdBy: String, downloadURL: String, version: Double, code: String? = nil) { self.id = id self.sourceId = sourceId self.createdAt = createdAt self.createdBy = createdBy self.downloadURL = downloadURL self.version = version + self.code = code } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -42,6 +45,7 @@ public struct EdgeFunctionsAlpha: Codable, JSONEncodable, Hashable { case createdBy case downloadURL case version + case code } // Encodable protocol methods @@ -54,6 +58,7 @@ public struct EdgeFunctionsAlpha: Codable, JSONEncodable, Hashable { try container.encode(createdBy, forKey: .createdBy) try container.encode(downloadURL, forKey: .downloadURL) try container.encode(version, forKey: .version) + try container.encodeIfPresent(code, forKey: .code) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/LoadPhase.swift b/PublicApi/Classes/OpenAPIs/Models/LoadPhase.swift new file mode 100644 index 00000000..4a17d8a2 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/LoadPhase.swift @@ -0,0 +1,54 @@ +// +// LoadPhase.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Object with load phase details. */ +public struct LoadPhase: Codable, JSONEncodable, Hashable { + + /** Counts the subset of records successfully delivered to the downstream Destination. */ + public var deliverSuccessCount: String + /** Counts the subset of records status that failed to be delivered by either receiving a permanent error (for example, 400 Bad Request) or by exhausting all retries for temporary errors (for example, 429 Too Many Requests). */ + public var deliverFailureCount: String + /** Error code indicates a fatal sync error code, if applicable. */ + public var errorCode: String + /** Time that the load phase started. */ + public var startedAt: String + /** Time that the load phase finished. */ + public var finishedAt: String + + public init(deliverSuccessCount: String, deliverFailureCount: String, errorCode: String, startedAt: String, finishedAt: String) { + self.deliverSuccessCount = deliverSuccessCount + self.deliverFailureCount = deliverFailureCount + self.errorCode = errorCode + self.startedAt = startedAt + self.finishedAt = finishedAt + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case deliverSuccessCount + case deliverFailureCount + case errorCode + case startedAt + case finishedAt + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(deliverSuccessCount, forKey: .deliverSuccessCount) + try container.encode(deliverFailureCount, forKey: .deliverFailureCount) + try container.encode(errorCode, forKey: .errorCode) + try container.encode(startedAt, forKey: .startedAt) + try container.encode(finishedAt, forKey: .finishedAt) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/MessageSubscriptionResponse.swift b/PublicApi/Classes/OpenAPIs/Models/MessageSubscriptionResponse.swift index 8f0df5b4..504d4616 100644 --- a/PublicApi/Classes/OpenAPIs/Models/MessageSubscriptionResponse.swift +++ b/PublicApi/Classes/OpenAPIs/Models/MessageSubscriptionResponse.swift @@ -13,8 +13,11 @@ import AnyCodable public struct MessageSubscriptionResponse: Codable, JSONEncodable, Hashable { public enum ModelType: String, Codable, CaseIterable { + case androidPush = "ANDROID_PUSH" case email = "EMAIL" + case iosPush = "IOS_PUSH" case sms = "SMS" + case whatsapp = "WHATSAPP" } public enum Status: String, Codable, CaseIterable { case didNotSubscribe = "DID_NOT_SUBSCRIBE" @@ -23,18 +26,21 @@ public struct MessageSubscriptionResponse: Codable, JSONEncodable, Hashable { } /** Key is the phone number or email. */ public var key: String - /** Type is communication medium used. Either EMAIL or SMS. */ + /** Type is communication medium used. Either SMS, EMAIL or WHATSAPP. */ public var type: ModelType /** The user subscribed, unsubscribed, or on initial status. */ - public var status: Status + public var status: Status? /** Error messages. */ public var errors: [MessageSubscriptionResponseError]? + /** Optional subscription groups. */ + public var groups: [UpdateGroupSubscriptionStatusResponse]? - public init(key: String, type: ModelType, status: Status, errors: [MessageSubscriptionResponseError]? = nil) { + public init(key: String, type: ModelType, status: Status? = nil, errors: [MessageSubscriptionResponseError]? = nil, groups: [UpdateGroupSubscriptionStatusResponse]? = nil) { self.key = key self.type = type self.status = status self.errors = errors + self.groups = groups } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -42,6 +48,7 @@ public struct MessageSubscriptionResponse: Codable, JSONEncodable, Hashable { case type case status case errors + case groups } // Encodable protocol methods @@ -50,8 +57,9 @@ public struct MessageSubscriptionResponse: Codable, JSONEncodable, Hashable { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(key, forKey: .key) try container.encode(type, forKey: .type) - try container.encode(status, forKey: .status) + try container.encodeIfPresent(status, forKey: .status) try container.encodeIfPresent(errors, forKey: .errors) + try container.encodeIfPresent(groups, forKey: .groups) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/MessagesSubscriptionRequest.swift b/PublicApi/Classes/OpenAPIs/Models/MessagesSubscriptionRequest.swift index aaa4a9ed..4b652c31 100644 --- a/PublicApi/Classes/OpenAPIs/Models/MessagesSubscriptionRequest.swift +++ b/PublicApi/Classes/OpenAPIs/Models/MessagesSubscriptionRequest.swift @@ -13,8 +13,11 @@ import AnyCodable public struct MessagesSubscriptionRequest: Codable, JSONEncodable, Hashable { public enum ModelType: String, Codable, CaseIterable { + case androidPush = "ANDROID_PUSH" case email = "EMAIL" + case iosPush = "IOS_PUSH" case sms = "SMS" + case whatsapp = "WHATSAPP" } public enum Status: String, Codable, CaseIterable { case didNotSubscribe = "DID_NOT_SUBSCRIBE" @@ -23,21 +26,25 @@ public struct MessagesSubscriptionRequest: Codable, JSONEncodable, Hashable { } /** Key is the phone number or email. */ public var key: String - /** Type is communication medium used. Either EMAIL or SMS. */ + /** Type is communication medium used. */ public var type: ModelType - /** The user subscribed, unsubscribed, or on initial status. */ - public var status: Status + /** The user subscribed, unsubscribed, or on initial status globally. */ + public var status: Status? + /** Optional groups subscription status. */ + public var groups: [GroupSubscriptionStatus]? - public init(key: String, type: ModelType, status: Status) { + public init(key: String, type: ModelType, status: Status? = nil, groups: [GroupSubscriptionStatus]? = nil) { self.key = key self.type = type self.status = status + self.groups = groups } public enum CodingKeys: String, CodingKey, CaseIterable { case key case type case status + case groups } // Encodable protocol methods @@ -46,7 +53,8 @@ public struct MessagesSubscriptionRequest: Codable, JSONEncodable, Hashable { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(key, forKey: .key) try container.encode(type, forKey: .type) - try container.encode(status, forKey: .status) + try container.encodeIfPresent(status, forKey: .status) + try container.encodeIfPresent(groups, forKey: .groups) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/Metadata.swift b/PublicApi/Classes/OpenAPIs/Models/Metadata.swift index 99c53ed2..48c6f1cf 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Metadata.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Metadata.swift @@ -10,99 +10,23 @@ import Foundation import AnyCodable #endif -/** The metadata of the Destination of which this Destination is an instance of. For example, Google Analytics or Amplitude. */ +/** The Destination metadata. */ public struct Metadata: Codable, JSONEncodable, Hashable { - public enum Status: String, Codable, CaseIterable { - case deprecated = "DEPRECATED" - case privateBeta = "PRIVATE_BETA" - case privateBuilding = "PRIVATE_BUILDING" - case privateSubmitted = "PRIVATE_SUBMITTED" - case _public = "PUBLIC" - case publicBeta = "PUBLIC_BETA" - case unavailable = "UNAVAILABLE" - } - /** The id of the Destination metadata. Config API note: analogous to `name`. */ public var id: String - /** The user-friendly name of the Destination. Config API note: equal to `displayName`. */ public var name: String - /** The description of the Destination. */ - public var description: String - /** The slug used to identify the Destination in the Segment app. */ public var slug: String - public var logos: Logos - /** Options configured for the Destination. */ - public var options: [IntegrationOptionBeta] - /** Support status of the Destination. */ - public var status: Status - /** A list of names previously used by the Destination. */ - public var previousNames: [String] - /** A list of categories with which the Destination is associated. */ - public var categories: [String] - /** A website URL for this Destination. */ - public var website: String - /** A list of components this Destination provides. */ - public var components: [DestinationMetadataComponentV1] - public var supportedFeatures: SupportedFeatures - public var supportedMethods: SupportedMethods - public var supportedPlatforms: SupportedPlatforms - /** Actions available for the Destination. */ - public var actions: [DestinationMetadataActionV1] - /** Predefined Destination subscriptions that can optionally be applied when connecting a new instance of the Destination. */ - public var presets: [DestinationMetadataSubscriptionPresetV1] - /** Contact info for Integration Owners. */ - public var contacts: [Contact]? - /** Partner Owned flag. */ - public var partnerOwned: Bool? - /** A list of supported regions for this Destination. */ - public var supportedRegions: [String]? - /** The list of regional endpoints for this Destination. */ - public var regionEndpoints: [String]? - public init(id: String, name: String, description: String, slug: String, logos: Logos, options: [IntegrationOptionBeta], status: Status, previousNames: [String], categories: [String], website: String, components: [DestinationMetadataComponentV1], supportedFeatures: SupportedFeatures, supportedMethods: SupportedMethods, supportedPlatforms: SupportedPlatforms, actions: [DestinationMetadataActionV1], presets: [DestinationMetadataSubscriptionPresetV1], contacts: [Contact]? = nil, partnerOwned: Bool? = nil, supportedRegions: [String]? = nil, regionEndpoints: [String]? = nil) { + public init(id: String, name: String, slug: String) { self.id = id self.name = name - self.description = description self.slug = slug - self.logos = logos - self.options = options - self.status = status - self.previousNames = previousNames - self.categories = categories - self.website = website - self.components = components - self.supportedFeatures = supportedFeatures - self.supportedMethods = supportedMethods - self.supportedPlatforms = supportedPlatforms - self.actions = actions - self.presets = presets - self.contacts = contacts - self.partnerOwned = partnerOwned - self.supportedRegions = supportedRegions - self.regionEndpoints = regionEndpoints } public enum CodingKeys: String, CodingKey, CaseIterable { case id case name - case description case slug - case logos - case options - case status - case previousNames - case categories - case website - case components - case supportedFeatures - case supportedMethods - case supportedPlatforms - case actions - case presets - case contacts - case partnerOwned - case supportedRegions - case regionEndpoints } // Encodable protocol methods @@ -111,24 +35,7 @@ public struct Metadata: Codable, JSONEncodable, Hashable { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(id, forKey: .id) try container.encode(name, forKey: .name) - try container.encode(description, forKey: .description) try container.encode(slug, forKey: .slug) - try container.encode(logos, forKey: .logos) - try container.encode(options, forKey: .options) - try container.encode(status, forKey: .status) - try container.encode(previousNames, forKey: .previousNames) - try container.encode(categories, forKey: .categories) - try container.encode(website, forKey: .website) - try container.encode(components, forKey: .components) - try container.encode(supportedFeatures, forKey: .supportedFeatures) - try container.encode(supportedMethods, forKey: .supportedMethods) - try container.encode(supportedPlatforms, forKey: .supportedPlatforms) - try container.encode(actions, forKey: .actions) - try container.encode(presets, forKey: .presets) - try container.encodeIfPresent(contacts, forKey: .contacts) - try container.encodeIfPresent(partnerOwned, forKey: .partnerOwned) - try container.encodeIfPresent(supportedRegions, forKey: .supportedRegions) - try container.encodeIfPresent(regionEndpoints, forKey: .regionEndpoints) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/Metadata1.swift b/PublicApi/Classes/OpenAPIs/Models/Metadata1.swift index dc3c339e..1415fdca 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Metadata1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Metadata1.swift @@ -10,45 +10,103 @@ import Foundation import AnyCodable #endif -/** The metadata for the Source. Config API note: includes `catalogName` and `catalogId`. */ +/** The metadata of the Destination of which this Destination is an instance of. For example, Google Analytics or Amplitude. */ public struct Metadata1: Codable, JSONEncodable, Hashable { - /** The id for this Source metadata in the Segment catalog. Config API note: analogous to `name`. */ + public enum Status: String, Codable, CaseIterable { + case deprecated = "DEPRECATED" + case privateBeta = "PRIVATE_BETA" + case privateBuilding = "PRIVATE_BUILDING" + case privateSubmitted = "PRIVATE_SUBMITTED" + case _public = "PUBLIC" + case publicBeta = "PUBLIC_BETA" + case unavailable = "UNAVAILABLE" + } + /** The id of the Destination metadata. Config API note: analogous to `name`. */ public var id: String - /** The user-friendly name of this Source. Config API note: equal to `displayName`. */ + /** The user-friendly name of the Destination. Config API note: equal to `displayName`. */ public var name: String - /** The slug that identifies this Source in the Segment app. Config API note: equal to `name`. */ - public var slug: String - /** The description of this Source. */ + /** The description of the Destination. */ public var description: String - public var logos: Logos1 - /** Options for this Source. */ + /** The slug used to identify the Destination in the Segment app. */ + public var slug: String + public var logos: Logos + /** Options configured for the Destination. */ public var options: [IntegrationOptionBeta] - /** A list of categories this Source belongs to. */ + /** Support status of the Destination. */ + public var status: Status + /** A list of names previously used by the Destination. */ + public var previousNames: [String] + /** A list of categories with which the Destination is associated. */ public var categories: [String] - /** True if this is a Cloud Event Source. */ - public var isCloudEventSource: Bool + /** A website URL for this Destination. */ + public var website: String + /** A list of components this Destination provides. */ + public var components: [DestinationMetadataComponentV1] + public var supportedFeatures: SupportedFeatures + public var supportedMethods: SupportedMethods + public var supportedPlatforms: SupportedPlatforms + /** Actions available for the Destination. */ + public var actions: [DestinationMetadataActionV1] + /** Predefined Destination subscriptions that can optionally be applied when connecting a new instance of the Destination. */ + public var presets: [DestinationMetadataSubscriptionPresetV1] + /** Contact info for Integration Owners. */ + public var contacts: [Contact]? + /** Partner Owned flag. */ + public var partnerOwned: Bool? + /** A list of supported regions for this Destination. */ + public var supportedRegions: [String]? + /** The list of regional endpoints for this Destination. */ + public var regionEndpoints: [String]? + /** This Destination's support for multiple instance types. */ + public var multiInstanceSupportedVersion: String? - public init(id: String, name: String, slug: String, description: String, logos: Logos1, options: [IntegrationOptionBeta], categories: [String], isCloudEventSource: Bool) { + public init(id: String, name: String, description: String, slug: String, logos: Logos, options: [IntegrationOptionBeta], status: Status, previousNames: [String], categories: [String], website: String, components: [DestinationMetadataComponentV1], supportedFeatures: SupportedFeatures, supportedMethods: SupportedMethods, supportedPlatforms: SupportedPlatforms, actions: [DestinationMetadataActionV1], presets: [DestinationMetadataSubscriptionPresetV1], contacts: [Contact]? = nil, partnerOwned: Bool? = nil, supportedRegions: [String]? = nil, regionEndpoints: [String]? = nil, multiInstanceSupportedVersion: String? = nil) { self.id = id self.name = name - self.slug = slug self.description = description + self.slug = slug self.logos = logos self.options = options + self.status = status + self.previousNames = previousNames self.categories = categories - self.isCloudEventSource = isCloudEventSource + self.website = website + self.components = components + self.supportedFeatures = supportedFeatures + self.supportedMethods = supportedMethods + self.supportedPlatforms = supportedPlatforms + self.actions = actions + self.presets = presets + self.contacts = contacts + self.partnerOwned = partnerOwned + self.supportedRegions = supportedRegions + self.regionEndpoints = regionEndpoints + self.multiInstanceSupportedVersion = multiInstanceSupportedVersion } public enum CodingKeys: String, CodingKey, CaseIterable { case id case name - case slug case description + case slug case logos case options + case status + case previousNames case categories - case isCloudEventSource + case website + case components + case supportedFeatures + case supportedMethods + case supportedPlatforms + case actions + case presets + case contacts + case partnerOwned + case supportedRegions + case regionEndpoints + case multiInstanceSupportedVersion } // Encodable protocol methods @@ -57,12 +115,25 @@ public struct Metadata1: Codable, JSONEncodable, Hashable { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(id, forKey: .id) try container.encode(name, forKey: .name) - try container.encode(slug, forKey: .slug) try container.encode(description, forKey: .description) + try container.encode(slug, forKey: .slug) try container.encode(logos, forKey: .logos) try container.encode(options, forKey: .options) + try container.encode(status, forKey: .status) + try container.encode(previousNames, forKey: .previousNames) try container.encode(categories, forKey: .categories) - try container.encode(isCloudEventSource, forKey: .isCloudEventSource) + try container.encode(website, forKey: .website) + try container.encode(components, forKey: .components) + try container.encode(supportedFeatures, forKey: .supportedFeatures) + try container.encode(supportedMethods, forKey: .supportedMethods) + try container.encode(supportedPlatforms, forKey: .supportedPlatforms) + try container.encode(actions, forKey: .actions) + try container.encode(presets, forKey: .presets) + try container.encodeIfPresent(contacts, forKey: .contacts) + try container.encodeIfPresent(partnerOwned, forKey: .partnerOwned) + try container.encodeIfPresent(supportedRegions, forKey: .supportedRegions) + try container.encodeIfPresent(regionEndpoints, forKey: .regionEndpoints) + try container.encodeIfPresent(multiInstanceSupportedVersion, forKey: .multiInstanceSupportedVersion) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/Metadata3.swift b/PublicApi/Classes/OpenAPIs/Models/Metadata3.swift new file mode 100644 index 00000000..8f95198b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Metadata3.swift @@ -0,0 +1,87 @@ +// +// Metadata3.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The metadata for the Source. Config API note: includes `catalogName` and `catalogId`. */ +public struct Metadata3: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case deprecated = "DEPRECATED" + case privateBeta = "PRIVATE_BETA" + case privateBuilding = "PRIVATE_BUILDING" + case privateSubmitted = "PRIVATE_SUBMITTED" + case _public = "PUBLIC" + case publicBeta = "PUBLIC_BETA" + case unavailable = "UNAVAILABLE" + } + /** The id for this Source metadata in the Segment catalog. Config API note: analogous to `name`. */ + public var id: String + /** The user-friendly name of this Source. Config API note: equal to `displayName`. */ + public var name: String + /** The slug that identifies this Source in the Segment app. Config API note: equal to `name`. */ + public var slug: String + /** The description of this Source. */ + public var description: String + public var logos: Logos1 + /** Options for this Source. */ + public var options: [IntegrationOptionBeta] + /** A list of categories this Source belongs to. */ + public var categories: [String] + /** True if this is a Cloud Event Source. */ + public var isCloudEventSource: Bool + /** Support status of the Source. */ + public var status: Status + /** Partner Owned flag. */ + public var partnerOwned: Bool? + + public init(id: String, name: String, slug: String, description: String, logos: Logos1, options: [IntegrationOptionBeta], categories: [String], isCloudEventSource: Bool, status: Status, partnerOwned: Bool? = nil) { + self.id = id + self.name = name + self.slug = slug + self.description = description + self.logos = logos + self.options = options + self.categories = categories + self.isCloudEventSource = isCloudEventSource + self.status = status + self.partnerOwned = partnerOwned + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + case slug + case description + case logos + case options + case categories + case isCloudEventSource + case status + case partnerOwned + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(name, forKey: .name) + try container.encode(slug, forKey: .slug) + try container.encode(description, forKey: .description) + try container.encode(logos, forKey: .logos) + try container.encode(options, forKey: .options) + try container.encode(categories, forKey: .categories) + try container.encode(isCloudEventSource, forKey: .isCloudEventSource) + try container.encode(status, forKey: .status) + try container.encodeIfPresent(partnerOwned, forKey: .partnerOwned) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Options.swift b/PublicApi/Classes/OpenAPIs/Models/Options.swift new file mode 100644 index 00000000..c5102291 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Options.swift @@ -0,0 +1,44 @@ +// +// Options.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Represents the options of Including Anonymous users and Historical Data. */ +public struct Options: Codable, JSONEncodable, Hashable { + + /** Determines whether data prior to the audience being created is included when determining audience membership. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** The set of profile external identifiers being used to determine audience membership. Profiles will only be considered for audience membership if the profile has at least one external id whose key matches a value in this set. If unspecified, a default set of external identifiers will be used: ['user_id', 'email', 'android.idfa', 'ios.idfa']. */ + public var filterByExternalIds: [String]? + /** If specified, the value of this field indicates the number of days (specified from the date the audience was created) that event data will be included from when determining audience membership. If not specified, the default is set to the maximum event window size, or 7 days if no window condition is defined. Note that this is applied on a best-effort basis and may not always be applicable. In such cases, the response will not return a backfillEventDataDays value, and all available data will be taken into account. Note that includeHistoricalData must be set to true. */ + public var backfillEventDataDays: Double? + + public init(includeHistoricalData: Bool? = nil, filterByExternalIds: [String]? = nil, backfillEventDataDays: Double? = nil) { + self.includeHistoricalData = includeHistoricalData + self.filterByExternalIds = filterByExternalIds + self.backfillEventDataDays = backfillEventDataDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case includeHistoricalData + case filterByExternalIds + case backfillEventDataDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(filterByExternalIds, forKey: .filterByExternalIds) + try container.encodeIfPresent(backfillEventDataDays, forKey: .backfillEventDataDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Options1.swift b/PublicApi/Classes/OpenAPIs/Models/Options1.swift new file mode 100644 index 00000000..565d391c --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Options1.swift @@ -0,0 +1,39 @@ +// +// Options1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Options which should be applied when segmenting audiences. */ +public struct Options1: Codable, JSONEncodable, Hashable { + + /** The set of profile external identifiers being used to determine audience preview membership. Profiles will only be considered for audience preview membership if the profile has at least one external id whose key matches a value in this set. If unspecified, a default set of external identifiers will be used: `['user_id', 'email', 'android.idfa', 'ios.idfa']`. */ + public var filterByExternalIds: [String]? + /** If specified, the value of this field indicates the number of days (specified from the date the audience preview was created) that event data will be included from when determining audience preview membership. If not specified, the default is set to the maximum event window size, or 7 days if no window condition is defined. Note that this is applied on a best-effort basis and may not always be applicable. In such cases, the response will not return a backfillEventDataDays value, and all available data will be taken into account. */ + public var backfillEventDataDays: Double? + + public init(filterByExternalIds: [String]? = nil, backfillEventDataDays: Double? = nil) { + self.filterByExternalIds = filterByExternalIds + self.backfillEventDataDays = backfillEventDataDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filterByExternalIds + case backfillEventDataDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(filterByExternalIds, forKey: .filterByExternalIds) + try container.encodeIfPresent(backfillEventDataDays, forKey: .backfillEventDataDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Options2.swift b/PublicApi/Classes/OpenAPIs/Models/Options2.swift new file mode 100644 index 00000000..4293a79d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Options2.swift @@ -0,0 +1,44 @@ +// +// Options2.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Options which should be applied when segmenting audiences. */ +public struct Options2: Codable, JSONEncodable, Hashable { + + /** Determines whether data prior to the audience being created is included when determining audience membership. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** The set of profile external identifiers being used to determine audience membership. Profiles will only be considered for audience membership if the profile has at least one external id whose key matches a value in this set. If unspecified, a default set of external identifiers will be used: ['user_id', 'email', 'android.idfa', 'ios.idfa']. */ + public var filterByExternalIds: [String]? + /** If specified, the value of this field indicates the number of days (specified from the date the audience was created) that event data will be included from when determining audience membership. If not specified, the default is set to the maximum event window size, or 7 days if no window condition is defined. Note that this is applied on a best-effort basis and may not always be applicable. In such cases, the response will not return a backfillEventDataDays value, and all available data will be taken into account. Note that includeHistoricalData must be set to true. */ + public var backfillEventDataDays: Double? + + public init(includeHistoricalData: Bool? = nil, filterByExternalIds: [String]? = nil, backfillEventDataDays: Double? = nil) { + self.includeHistoricalData = includeHistoricalData + self.filterByExternalIds = filterByExternalIds + self.backfillEventDataDays = backfillEventDataDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case includeHistoricalData + case filterByExternalIds + case backfillEventDataDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(filterByExternalIds, forKey: .filterByExternalIds) + try container.encodeIfPresent(backfillEventDataDays, forKey: .backfillEventDataDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Options3.swift b/PublicApi/Classes/OpenAPIs/Models/Options3.swift new file mode 100644 index 00000000..03c4ee93 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Options3.swift @@ -0,0 +1,44 @@ +// +// Options3.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Options which should be applied when segmenting audiences. */ +public struct Options3: Codable, JSONEncodable, Hashable { + + /** The set of profile external identifiers being used to determine audience membership. Profiles will only be considered for audience membership if the profile has at least one external id whose key matches a value in this set. */ + public var filterByExternalIds: [String] + /** Determines whether data prior to the audience being created is included when determining audience membership. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** If specified, the value of this field indicates the number of days (specified from the date the audience was created) that event data will be included from when determining audience membership. If not specified, the default is set to the maximum event window size, or 7 days if no window condition is defined. Note that this is applied on a best-effort basis and may not always be applicable. In such cases, the response will not return a backfillEventDataDays value, and all available data will be taken into account. Note that includeHistoricalData must be set to true. */ + public var backfillEventDataDays: Double? + + public init(filterByExternalIds: [String], includeHistoricalData: Bool? = nil, backfillEventDataDays: Double? = nil) { + self.filterByExternalIds = filterByExternalIds + self.includeHistoricalData = includeHistoricalData + self.backfillEventDataDays = backfillEventDataDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filterByExternalIds + case includeHistoricalData + case backfillEventDataDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(filterByExternalIds, forKey: .filterByExternalIds) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(backfillEventDataDays, forKey: .backfillEventDataDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Options4.swift b/PublicApi/Classes/OpenAPIs/Models/Options4.swift new file mode 100644 index 00000000..5fd8be54 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Options4.swift @@ -0,0 +1,44 @@ +// +// Options4.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Options that were used to calculate the audience preview. */ +public struct Options4: Codable, JSONEncodable, Hashable { + + /** The set of profile external identifiers being used to determine audience preview membership. Profiles will only be considered for audience preview membership if the profile has at least one external id whose key matches a value in this set. */ + public var filterByExternalIds: [String]? + /** Determines whether data prior to the audience preview being created is included when determining audience preview membership. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** If specified, the value of this field indicates the number of days (specified from the date the audience preview was created) that event data will be included from when determining audience preview membership. If unspecified, defer to the value of `includeHistoricalData` to determine whether historical data is either entirely included or entirely excluded when determining audience preview membership. */ + public var backfillEventDataDays: Double? + + public init(filterByExternalIds: [String]? = nil, includeHistoricalData: Bool? = nil, backfillEventDataDays: Double? = nil) { + self.filterByExternalIds = filterByExternalIds + self.includeHistoricalData = includeHistoricalData + self.backfillEventDataDays = backfillEventDataDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filterByExternalIds + case includeHistoricalData + case backfillEventDataDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(filterByExternalIds, forKey: .filterByExternalIds) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(backfillEventDataDays, forKey: .backfillEventDataDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Options5.swift b/PublicApi/Classes/OpenAPIs/Models/Options5.swift new file mode 100644 index 00000000..26a03fad --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Options5.swift @@ -0,0 +1,44 @@ +// +// Options5.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Options which should be applied when aggregating computed traits. */ +public struct Options5: Codable, JSONEncodable, Hashable { + + /** Determines whether data prior to the computed trait being created is included when determining the computed trait value. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** Determines whether anonymous users should be included when determining the computed trait value. */ + public var includeAnonymousUsers: Bool? + /** If specified, the value of this field indicates the number of days, specified from the date the audience was created, that event data will be included from when determining audience membership. If unspecified, defer to the value of `includeHistoricalData` to determine whether historical data is either entirely included or entirely excluded when determining audience membership. */ + public var backfillDurationDays: Double? + + public init(includeHistoricalData: Bool? = nil, includeAnonymousUsers: Bool? = nil, backfillDurationDays: Double? = nil) { + self.includeHistoricalData = includeHistoricalData + self.includeAnonymousUsers = includeAnonymousUsers + self.backfillDurationDays = backfillDurationDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case includeHistoricalData + case includeAnonymousUsers + case backfillDurationDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(includeAnonymousUsers, forKey: .includeAnonymousUsers) + try container.encodeIfPresent(backfillDurationDays, forKey: .backfillDurationDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Options6.swift b/PublicApi/Classes/OpenAPIs/Models/Options6.swift new file mode 100644 index 00000000..27a5efcb --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Options6.swift @@ -0,0 +1,44 @@ +// +// Options6.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Options which should be applied when segmenting traits. */ +public struct Options6: Codable, JSONEncodable, Hashable { + + /** Determines whether data prior to the computed trait being created is included when determining the computed trait value. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** Determines whether anonymous users should be included when determining the computed trait value. */ + public var includeAnonymousUsers: Bool? + /** If specified, the value of this field indicates the number of days, specified from the date the audience was created, that event data will be included from when determining audience membership. If unspecified, defer to the value of `includeHistoricalData` to determine whether historical data is either entirely included or entirely excluded when determining audience membership. */ + public var backfillDurationDays: Double? + + public init(includeHistoricalData: Bool? = nil, includeAnonymousUsers: Bool? = nil, backfillDurationDays: Double? = nil) { + self.includeHistoricalData = includeHistoricalData + self.includeAnonymousUsers = includeAnonymousUsers + self.backfillDurationDays = backfillDurationDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case includeHistoricalData + case includeAnonymousUsers + case backfillDurationDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(includeAnonymousUsers, forKey: .includeAnonymousUsers) + try container.encodeIfPresent(backfillDurationDays, forKey: .backfillDurationDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Pagination.swift b/PublicApi/Classes/OpenAPIs/Models/Pagination.swift index 5627001b..caa8aeaa 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Pagination.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Pagination.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** Information about the pagination of this response. */ +/** Optional pagination. */ public struct Pagination: Codable, JSONEncodable, Hashable { /** The current cursor within a collection. Consumers of the API must treat this value as opaque. */ diff --git a/PublicApi/Classes/OpenAPIs/Models/Pagination1.swift b/PublicApi/Classes/OpenAPIs/Models/Pagination1.swift index de15ef85..f875c04a 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Pagination1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Pagination1.swift @@ -10,30 +10,40 @@ import Foundation import AnyCodable #endif -/** Pagination options. */ +/** An optional pagination object that is present when pagination input is present. */ public struct Pagination1: Codable, JSONEncodable, Hashable { - /** The page to request. Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys. Consumers of the API must treat this value as opaque. */ - public var cursor: String? - /** The number of items to retrieve in a page, between 1 and 200. */ - public var count: Double - - public init(cursor: String? = nil, count: Double) { - self.cursor = cursor - self.count = count + /** The current cursor within a collection. Consumers of the API must treat this value as opaque. */ + public var current: String + /** A pointer to the next page. This does not return when you retrieve the last page. Consumers of the API must treat this value as opaque. */ + public var next: String? + /** A pointer to the previous page. This does not return when you retrieve the first page. Consumers of the API must treat this value as opaque. */ + public var previous: String? + /** The total number of entries available in the collection. If calculating it impacts performance, the response may omit this field. */ + public var totalEntries: Double? + + public init(current: String, next: String? = nil, previous: String? = nil, totalEntries: Double? = nil) { + self.current = current + self.next = next + self.previous = previous + self.totalEntries = totalEntries } public enum CodingKeys: String, CodingKey, CaseIterable { - case cursor - case count + case current + case next + case previous + case totalEntries } // Encodable protocol methods public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(cursor, forKey: .cursor) - try container.encode(count, forKey: .count) + try container.encode(current, forKey: .current) + try container.encodeIfPresent(next, forKey: .next) + try container.encodeIfPresent(previous, forKey: .previous) + try container.encodeIfPresent(totalEntries, forKey: .totalEntries) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/Pagination2.swift b/PublicApi/Classes/OpenAPIs/Models/Pagination2.swift new file mode 100644 index 00000000..1edecbca --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Pagination2.swift @@ -0,0 +1,49 @@ +// +// Pagination2.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Information about the pagination of this response. [See pagination](https://docs.segmentapis.com/tag/Pagination/#section/Pagination-parameters) for more info. */ +public struct Pagination2: Codable, JSONEncodable, Hashable { + + /** The current cursor within a collection. Consumers of the API must treat this value as opaque. */ + public var current: String + /** A pointer to the next page. This does not return when you retrieve the last page. Consumers of the API must treat this value as opaque. */ + public var next: String? + /** A pointer to the previous page. This does not return when you retrieve the first page. Consumers of the API must treat this value as opaque. */ + public var previous: String? + /** The total number of entries available in the collection. If calculating it impacts performance, the response may omit this field. */ + public var totalEntries: Double? + + public init(current: String, next: String? = nil, previous: String? = nil, totalEntries: Double? = nil) { + self.current = current + self.next = next + self.previous = previous + self.totalEntries = totalEntries + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case current + case next + case previous + case totalEntries + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(current, forKey: .current) + try container.encodeIfPresent(next, forKey: .next) + try container.encodeIfPresent(previous, forKey: .previous) + try container.encodeIfPresent(totalEntries, forKey: .totalEntries) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Pagination3.swift b/PublicApi/Classes/OpenAPIs/Models/Pagination3.swift new file mode 100644 index 00000000..ad663bc2 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Pagination3.swift @@ -0,0 +1,49 @@ +// +// Pagination3.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Information about the pagination of this response. */ +public struct Pagination3: Codable, JSONEncodable, Hashable { + + /** The current cursor within a collection. Consumers of the API must treat this value as opaque. */ + public var current: String + /** A pointer to the next page. This does not return when you retrieve the last page. Consumers of the API must treat this value as opaque. */ + public var next: String? + /** A pointer to the previous page. This does not return when you retrieve the first page. Consumers of the API must treat this value as opaque. */ + public var previous: String? + /** The total number of entries available in the collection. If calculating it impacts performance, the response may omit this field. */ + public var totalEntries: Double? + + public init(current: String, next: String? = nil, previous: String? = nil, totalEntries: Double? = nil) { + self.current = current + self.next = next + self.previous = previous + self.totalEntries = totalEntries + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case current + case next + case previous + case totalEntries + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(current, forKey: .current) + try container.encodeIfPresent(next, forKey: .next) + try container.encodeIfPresent(previous, forKey: .previous) + try container.encodeIfPresent(totalEntries, forKey: .totalEntries) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Pagination4.swift b/PublicApi/Classes/OpenAPIs/Models/Pagination4.swift new file mode 100644 index 00000000..9ce8268f --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Pagination4.swift @@ -0,0 +1,49 @@ +// +// Pagination4.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The result object used to specify the page cursor and count. */ +public struct Pagination4: Codable, JSONEncodable, Hashable { + + /** The current cursor within a collection. Consumers of the API must treat this value as opaque. */ + public var current: String + /** A pointer to the next page. This does not return when you retrieve the last page. Consumers of the API must treat this value as opaque. */ + public var next: String? + /** A pointer to the previous page. This does not return when you retrieve the first page. Consumers of the API must treat this value as opaque. */ + public var previous: String? + /** The total number of entries available in the collection. If calculating it impacts performance, the response may omit this field. */ + public var totalEntries: Double? + + public init(current: String, next: String? = nil, previous: String? = nil, totalEntries: Double? = nil) { + self.current = current + self.next = next + self.previous = previous + self.totalEntries = totalEntries + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case current + case next + case previous + case totalEntries + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(current, forKey: .current) + try container.encodeIfPresent(next, forKey: .next) + try container.encodeIfPresent(previous, forKey: .previous) + try container.encodeIfPresent(totalEntries, forKey: .totalEntries) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Pagination5.swift b/PublicApi/Classes/OpenAPIs/Models/Pagination5.swift new file mode 100644 index 00000000..3463dcc0 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Pagination5.swift @@ -0,0 +1,44 @@ +// +// Pagination5.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Pagination parameters. */ +public struct Pagination5: Codable, JSONEncodable, Hashable { + + /** Current. */ + public var current: Double? + /** Next. */ + public var next: Double? + /** Total entries. */ + public var totalEntries: Double? + + public init(current: Double? = nil, next: Double? = nil, totalEntries: Double? = nil) { + self.current = current + self.next = next + self.totalEntries = totalEntries + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case current + case next + case totalEntries + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(current, forKey: .current) + try container.encodeIfPresent(next, forKey: .next) + try container.encodeIfPresent(totalEntries, forKey: .totalEntries) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Pagination6.swift b/PublicApi/Classes/OpenAPIs/Models/Pagination6.swift new file mode 100644 index 00000000..809e231b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Pagination6.swift @@ -0,0 +1,49 @@ +// +// Pagination6.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Optional pagination params. Present when output is paginated. */ +public struct Pagination6: Codable, JSONEncodable, Hashable { + + /** The current cursor within a collection. Consumers of the API must treat this value as opaque. */ + public var current: String + /** A pointer to the next page. This does not return when you retrieve the last page. Consumers of the API must treat this value as opaque. */ + public var next: String? + /** A pointer to the previous page. This does not return when you retrieve the first page. Consumers of the API must treat this value as opaque. */ + public var previous: String? + /** The total number of entries available in the collection. If calculating it impacts performance, the response may omit this field. */ + public var totalEntries: Double? + + public init(current: String, next: String? = nil, previous: String? = nil, totalEntries: Double? = nil) { + self.current = current + self.next = next + self.previous = previous + self.totalEntries = totalEntries + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case current + case next + case previous + case totalEntries + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(current, forKey: .current) + try container.encodeIfPresent(next, forKey: .next) + try container.encodeIfPresent(previous, forKey: .previous) + try container.encodeIfPresent(totalEntries, forKey: .totalEntries) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Pagination7.swift b/PublicApi/Classes/OpenAPIs/Models/Pagination7.swift new file mode 100644 index 00000000..6f5b8c75 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Pagination7.swift @@ -0,0 +1,39 @@ +// +// Pagination7.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Pagination options. */ +public struct Pagination7: Codable, JSONEncodable, Hashable { + + /** The page to request. Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys. Consumers of the API must treat this value as opaque. */ + public var cursor: String? + /** The number of items to retrieve in a page, between 1 and 1000. */ + public var count: Int + + public init(cursor: String? = nil, count: Int) { + self.cursor = cursor + self.count = count + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case cursor + case count + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(cursor, forKey: .cursor) + try container.encode(count, forKey: .count) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/PaginationInput.swift b/PublicApi/Classes/OpenAPIs/Models/PaginationInput.swift index c3fd29d6..cdc4f869 100644 --- a/PublicApi/Classes/OpenAPIs/Models/PaginationInput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/PaginationInput.swift @@ -15,10 +15,10 @@ public struct PaginationInput: Codable, JSONEncodable, Hashable { /** The page to request. Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys. Consumers of the API must treat this value as opaque. */ public var cursor: String? - /** The number of items to retrieve in a page, between 1 and 200. */ - public var count: Double + /** The number of items to retrieve in a page, between 1 and 1000. */ + public var count: Int - public init(cursor: String? = nil, count: Double) { + public init(cursor: String? = nil, count: Int) { self.cursor = cursor self.count = count } diff --git a/PublicApi/Classes/OpenAPIs/Models/PeriodicConfig.swift b/PublicApi/Classes/OpenAPIs/Models/PeriodicConfig.swift new file mode 100644 index 00000000..932eb636 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/PeriodicConfig.swift @@ -0,0 +1,34 @@ +// +// PeriodicConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Configures a periodic schedule interval. */ +public struct PeriodicConfig: Codable, JSONEncodable, Hashable { + + /** Go duration format string, only supporting units \"d\" (days), \"h\" (hours) and \"m\" (minutes). Acceptable values are: - 15m - 30m - 1h - 2h - 4h - 6h - 8h - 12h - 1d */ + public var interval: String + + public init(interval: String) { + self.interval = interval + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case interval + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(interval, forKey: .interval) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Personalization.swift b/PublicApi/Classes/OpenAPIs/Models/Personalization.swift new file mode 100644 index 00000000..2a2c2d53 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Personalization.swift @@ -0,0 +1,43 @@ +// +// Personalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Configuration settings for the event emitter to be created. */ +public struct Personalization: Codable, JSONEncodable, Hashable { + + public var profile: Profile + /** Entities V2 Object. */ + public var entities: [PersonalizationInputEntity]? + /** Sync entity property changes back to Segment. Only applicable if activationType is \"Audience Membership Changed\". */ + public var syncEntityPropertyChanges: Bool? + + public init(profile: Profile, entities: [PersonalizationInputEntity]? = nil, syncEntityPropertyChanges: Bool? = nil) { + self.profile = profile + self.entities = entities + self.syncEntityPropertyChanges = syncEntityPropertyChanges + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case profile + case entities + case syncEntityPropertyChanges + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(profile, forKey: .profile) + try container.encodeIfPresent(entities, forKey: .entities) + try container.encodeIfPresent(syncEntityPropertyChanges, forKey: .syncEntityPropertyChanges) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Personalization1.swift b/PublicApi/Classes/OpenAPIs/Models/Personalization1.swift new file mode 100644 index 00000000..58387a47 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Personalization1.swift @@ -0,0 +1,43 @@ +// +// Personalization1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Configuration settings for the event emitter. */ +public struct Personalization1: Codable, JSONEncodable, Hashable { + + public var profile: Profile + /** Entities V2 Object. */ + public var entities: [PersonalizationInputEntity]? + /** Sync entity property changes back to Segment. Only applicable if activationType is \"Audience Membership Changed\". */ + public var syncEntityPropertyChanges: Bool? + + public init(profile: Profile, entities: [PersonalizationInputEntity]? = nil, syncEntityPropertyChanges: Bool? = nil) { + self.profile = profile + self.entities = entities + self.syncEntityPropertyChanges = syncEntityPropertyChanges + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case profile + case entities + case syncEntityPropertyChanges + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(profile, forKey: .profile) + try container.encodeIfPresent(entities, forKey: .entities) + try container.encodeIfPresent(syncEntityPropertyChanges, forKey: .syncEntityPropertyChanges) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/PersonalizationInput.swift b/PublicApi/Classes/OpenAPIs/Models/PersonalizationInput.swift new file mode 100644 index 00000000..cf042e62 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/PersonalizationInput.swift @@ -0,0 +1,43 @@ +// +// PersonalizationInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The Personalization Input Object. */ +public struct PersonalizationInput: Codable, JSONEncodable, Hashable { + + public var profile: Profile + /** Entities V2 Object. */ + public var entities: [PersonalizationInputEntity]? + /** Sync entity property changes back to Segment. Only applicable if activationType is \"Audience Membership Changed\". */ + public var syncEntityPropertyChanges: Bool? + + public init(profile: Profile, entities: [PersonalizationInputEntity]? = nil, syncEntityPropertyChanges: Bool? = nil) { + self.profile = profile + self.entities = entities + self.syncEntityPropertyChanges = syncEntityPropertyChanges + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case profile + case entities + case syncEntityPropertyChanges + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(profile, forKey: .profile) + try container.encodeIfPresent(entities, forKey: .entities) + try container.encodeIfPresent(syncEntityPropertyChanges, forKey: .syncEntityPropertyChanges) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/PersonalizationInputEntity.swift b/PublicApi/Classes/OpenAPIs/Models/PersonalizationInputEntity.swift new file mode 100644 index 00000000..daae37c5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/PersonalizationInputEntity.swift @@ -0,0 +1,38 @@ +// +// PersonalizationInputEntity.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The Personalization Input Entity. */ +public struct PersonalizationInputEntity: Codable, JSONEncodable, Hashable { + + public var properties: [String] + /** The relationship slug for the entity. */ + public var relationshipSlug: String + + public init(properties: [String], relationshipSlug: String) { + self.properties = properties + self.relationshipSlug = relationshipSlug + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case properties + case relationshipSlug + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(properties, forKey: .properties) + try container.encode(relationshipSlug, forKey: .relationshipSlug) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Profile.swift b/PublicApi/Classes/OpenAPIs/Models/Profile.swift new file mode 100644 index 00000000..b7156665 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Profile.swift @@ -0,0 +1,37 @@ +// +// Profile.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Profile Object. */ +public struct Profile: Codable, JSONEncodable, Hashable { + + public var properties: [String] + public var mapping: [String: String]? + + public init(properties: [String], mapping: [String: String]? = nil) { + self.properties = properties + self.mapping = mapping + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case properties + case mapping + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(properties, forKey: .properties) + try container.encodeIfPresent(mapping, forKey: .mapping) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ProfilesWarehouse.swift b/PublicApi/Classes/OpenAPIs/Models/ProfilesWarehouse.swift new file mode 100644 index 00000000..4bb1c5db --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ProfilesWarehouse.swift @@ -0,0 +1,63 @@ +// +// ProfilesWarehouse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The newly created Warehouse. */ +public struct ProfilesWarehouse: Codable, JSONEncodable, Hashable { + + /** The id of the Warehouse. */ + public var id: String + /** The Space id. */ + public var spaceId: String + public var metadata: Metadata2 + /** The id of the Workspace that owns this Warehouse. */ + public var workspaceId: String + /** When set to true, this Warehouse receives data. */ + public var enabled: Bool + /** The settings associated with this Warehouse. Common settings are connection-related configuration used to connect to it, for example host, username, and port. */ + public var settings: JSON? + /** The custom schema name that Segment uses on the Warehouse side. */ + public var schemaName: String? + + public init(id: String, spaceId: String, metadata: Metadata2, workspaceId: String, enabled: Bool, settings: JSON?, schemaName: String? = nil) { + self.id = id + self.spaceId = spaceId + self.metadata = metadata + self.workspaceId = workspaceId + self.enabled = enabled + self.settings = settings + self.schemaName = schemaName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case spaceId + case metadata + case workspaceId + case enabled + case settings + case schemaName + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(metadata, forKey: .metadata) + try container.encode(workspaceId, forKey: .workspaceId) + try container.encode(enabled, forKey: .enabled) + try container.encode(settings, forKey: .settings) + try container.encodeIfPresent(schemaName, forKey: .schemaName) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ProfilesWarehouse1.swift b/PublicApi/Classes/OpenAPIs/Models/ProfilesWarehouse1.swift new file mode 100644 index 00000000..40105154 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ProfilesWarehouse1.swift @@ -0,0 +1,63 @@ +// +// ProfilesWarehouse1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The updated Warehouse. */ +public struct ProfilesWarehouse1: Codable, JSONEncodable, Hashable { + + /** The id of the Warehouse. */ + public var id: String + /** The Space id. */ + public var spaceId: String + public var metadata: Metadata2 + /** The id of the Workspace that owns this Warehouse. */ + public var workspaceId: String + /** When set to true, this Warehouse receives data. */ + public var enabled: Bool + /** The settings associated with this Warehouse. Common settings are connection-related configuration used to connect to it, for example host, username, and port. */ + public var settings: JSON? + /** The custom schema name that Segment uses on the Warehouse side. */ + public var schemaName: String? + + public init(id: String, spaceId: String, metadata: Metadata2, workspaceId: String, enabled: Bool, settings: JSON?, schemaName: String? = nil) { + self.id = id + self.spaceId = spaceId + self.metadata = metadata + self.workspaceId = workspaceId + self.enabled = enabled + self.settings = settings + self.schemaName = schemaName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case spaceId + case metadata + case workspaceId + case enabled + case settings + case schemaName + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(metadata, forKey: .metadata) + try container.encode(workspaceId, forKey: .workspaceId) + try container.encode(enabled, forKey: .enabled) + try container.encode(settings, forKey: .settings) + try container.encodeIfPresent(schemaName, forKey: .schemaName) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ProfilesWarehouseAlpha.swift b/PublicApi/Classes/OpenAPIs/Models/ProfilesWarehouseAlpha.swift new file mode 100644 index 00000000..0fdac9aa --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ProfilesWarehouseAlpha.swift @@ -0,0 +1,63 @@ +// +// ProfilesWarehouseAlpha.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines a Profiles data Warehouse used as a Destination for Segment data. */ +public struct ProfilesWarehouseAlpha: Codable, JSONEncodable, Hashable { + + /** The id of the Warehouse. */ + public var id: String + /** The Space id. */ + public var spaceId: String + public var metadata: Metadata2 + /** The id of the Workspace that owns this Warehouse. */ + public var workspaceId: String + /** When set to true, this Warehouse receives data. */ + public var enabled: Bool + /** The settings associated with this Warehouse. Common settings are connection-related configuration used to connect to it, for example host, username, and port. */ + public var settings: JSON? + /** The custom schema name that Segment uses on the Warehouse side. */ + public var schemaName: String? + + public init(id: String, spaceId: String, metadata: Metadata2, workspaceId: String, enabled: Bool, settings: JSON?, schemaName: String? = nil) { + self.id = id + self.spaceId = spaceId + self.metadata = metadata + self.workspaceId = workspaceId + self.enabled = enabled + self.settings = settings + self.schemaName = schemaName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case spaceId + case metadata + case workspaceId + case enabled + case settings + case schemaName + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(spaceId, forKey: .spaceId) + try container.encode(metadata, forKey: .metadata) + try container.encode(workspaceId, forKey: .workspaceId) + try container.encode(enabled, forKey: .enabled) + try container.encode(settings, forKey: .settings) + try container.encodeIfPresent(schemaName, forKey: .schemaName) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Query.swift b/PublicApi/Classes/OpenAPIs/Models/Query.swift new file mode 100644 index 00000000..685be38b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Query.swift @@ -0,0 +1,84 @@ +// +// Query.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input query returned. */ +public struct Query: Codable, JSONEncodable, Hashable { + + public enum Granularity: String, Codable, CaseIterable { + case day = "DAY" + case hour = "HOUR" + case minute = "MINUTE" + } + /** Workspace being requested. */ + public var workspaceId: String + /** Granularity corresponds to the requested bucket granularity. */ + public var granularity: Granularity + /** StartTime is the ISO8601 formatted timestamp corresponding to the beginning of the requested time frame, inclusive. */ + public var startTime: String + /** EndTime is the ISO8601 formatted timestamp corresponding to the end of the requested time frame, noninclusive. */ + public var endTime: String + /** GroupBy is a comma-delimited list of strings representing the dimensions to group the result by. The current options are: `eventName` or `eventType`. */ + public var groupBy: [String]? + /** List of strings which allow you to restrict the result to just the given Sources. */ + public var sourceId: [String]? + /** EventName is a list of strings which allow you to restrict the result to just the given event names. */ + public var eventName: [String]? + /** EventType is a list of strings which allow you to restrict the result to just the given event types. */ + public var eventType: [String]? + /** AppVersion is a list of strings which allow you to restrict the result to just the given application versions. */ + public var appVersion: [String]? + /** Limit is the total number of items in the result. */ + public var limit: Double? + + public init(workspaceId: String, granularity: Granularity, startTime: String, endTime: String, groupBy: [String]? = nil, sourceId: [String]? = nil, eventName: [String]? = nil, eventType: [String]? = nil, appVersion: [String]? = nil, limit: Double? = nil) { + self.workspaceId = workspaceId + self.granularity = granularity + self.startTime = startTime + self.endTime = endTime + self.groupBy = groupBy + self.sourceId = sourceId + self.eventName = eventName + self.eventType = eventType + self.appVersion = appVersion + self.limit = limit + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case workspaceId + case granularity + case startTime + case endTime + case groupBy + case sourceId + case eventName + case eventType + case appVersion + case limit + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(workspaceId, forKey: .workspaceId) + try container.encode(granularity, forKey: .granularity) + try container.encode(startTime, forKey: .startTime) + try container.encode(endTime, forKey: .endTime) + try container.encodeIfPresent(groupBy, forKey: .groupBy) + try container.encodeIfPresent(sourceId, forKey: .sourceId) + try container.encodeIfPresent(eventName, forKey: .eventName) + try container.encodeIfPresent(eventType, forKey: .eventType) + try container.encodeIfPresent(appVersion, forKey: .appVersion) + try container.encodeIfPresent(limit, forKey: .limit) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReadAudiencePreviewOptions.swift b/PublicApi/Classes/OpenAPIs/Models/ReadAudiencePreviewOptions.swift new file mode 100644 index 00000000..a72c34f1 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReadAudiencePreviewOptions.swift @@ -0,0 +1,44 @@ +// +// ReadAudiencePreviewOptions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Options which should be applied when segmenting audience previews. */ +public struct ReadAudiencePreviewOptions: Codable, JSONEncodable, Hashable { + + /** The set of profile external identifiers being used to determine audience preview membership. Profiles will only be considered for audience preview membership if the profile has at least one external id whose key matches a value in this set. */ + public var filterByExternalIds: [String]? + /** Determines whether data prior to the audience preview being created is included when determining audience preview membership. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** If specified, the value of this field indicates the number of days (specified from the date the audience preview was created) that event data will be included from when determining audience preview membership. If unspecified, defer to the value of `includeHistoricalData` to determine whether historical data is either entirely included or entirely excluded when determining audience preview membership. */ + public var backfillEventDataDays: Double? + + public init(filterByExternalIds: [String]? = nil, includeHistoricalData: Bool? = nil, backfillEventDataDays: Double? = nil) { + self.filterByExternalIds = filterByExternalIds + self.includeHistoricalData = includeHistoricalData + self.backfillEventDataDays = backfillEventDataDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filterByExternalIds + case includeHistoricalData + case backfillEventDataDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(filterByExternalIds, forKey: .filterByExternalIds) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(backfillEventDataDays, forKey: .backfillEventDataDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Regulation.swift b/PublicApi/Classes/OpenAPIs/Models/Regulation.swift index 2cdad17f..01e8779a 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Regulation.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Regulation.swift @@ -29,13 +29,13 @@ public struct Regulation: Codable, JSONEncodable, Hashable { /** The current status of the regulate request. */ public var overallStatus: OverallStatus /** The timestamp of when the request finished. */ - public var finishedAt: String + public var finishedAt: String? /** The timestamp of the creation of the request. */ public var createdAt: String /** The status of each stream including all the Destinations that correspond to the stream. */ public var streamStatus: [StreamStatusV1] - public init(id: String, workspaceId: String, overallStatus: OverallStatus, finishedAt: String, createdAt: String, streamStatus: [StreamStatusV1]) { + public init(id: String, workspaceId: String, overallStatus: OverallStatus, finishedAt: String? = nil, createdAt: String, streamStatus: [StreamStatusV1]) { self.id = id self.workspaceId = workspaceId self.overallStatus = overallStatus @@ -60,7 +60,7 @@ public struct Regulation: Codable, JSONEncodable, Hashable { try container.encode(id, forKey: .id) try container.encode(workspaceId, forKey: .workspaceId) try container.encode(overallStatus, forKey: .overallStatus) - try container.encode(finishedAt, forKey: .finishedAt) + try container.encodeIfPresent(finishedAt, forKey: .finishedAt) try container.encode(createdAt, forKey: .createdAt) try container.encode(streamStatus, forKey: .streamStatus) } diff --git a/PublicApi/Classes/OpenAPIs/Models/RegulationListEntryV1.swift b/PublicApi/Classes/OpenAPIs/Models/RegulationListEntryV1.swift index 4da25261..f79f81cd 100644 --- a/PublicApi/Classes/OpenAPIs/Models/RegulationListEntryV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/RegulationListEntryV1.swift @@ -21,19 +21,37 @@ public struct RegulationListEntryV1: Codable, JSONEncodable, Hashable { case partialSuccess = "PARTIAL_SUCCESS" case running = "RUNNING" } + public enum RegulationType: String, Codable, CaseIterable { + case deleteArchiveOnly = "DELETE_ARCHIVE_ONLY" + case deleteInternal = "DELETE_INTERNAL" + case deleteOnly = "DELETE_ONLY" + case suppressOnly = "SUPPRESS_ONLY" + case suppressWithDelete = "SUPPRESS_WITH_DELETE" + case suppressWithDeleteInternal = "SUPPRESS_WITH_DELETE_INTERNAL" + case unsuppress = "UNSUPPRESS" + } + /** The id of the regulate request. */ public var id: String + /** The subject type. */ public var subjectType: String + /** The list of `userId` or `objectId` values of the subjects to regulate. */ public var subjects: [String] + /** The current status of the regulate request. */ public var status: Status + /** The timestamp of the creation of the request. */ public var createdAt: String + /** The regulation type. */ + public var regulationType: RegulationType + /** The timestamp of when the request finished. */ public var finishedAt: String? - public init(id: String, subjectType: String, subjects: [String], status: Status, createdAt: String, finishedAt: String? = nil) { + public init(id: String, subjectType: String, subjects: [String], status: Status, createdAt: String, regulationType: RegulationType, finishedAt: String? = nil) { self.id = id self.subjectType = subjectType self.subjects = subjects self.status = status self.createdAt = createdAt + self.regulationType = regulationType self.finishedAt = finishedAt } @@ -43,6 +61,7 @@ public struct RegulationListEntryV1: Codable, JSONEncodable, Hashable { case subjects case status case createdAt + case regulationType case finishedAt } @@ -55,6 +74,7 @@ public struct RegulationListEntryV1: Codable, JSONEncodable, Hashable { try container.encode(subjects, forKey: .subjects) try container.encode(status, forKey: .status) try container.encode(createdAt, forKey: .createdAt) + try container.encode(regulationType, forKey: .regulationType) try container.encodeIfPresent(finishedAt, forKey: .finishedAt) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveActivationFromAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveActivationFromAudience200Response.swift new file mode 100644 index 00000000..6074ecd0 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveActivationFromAudience200Response.swift @@ -0,0 +1,32 @@ +// +// RemoveActivationFromAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct RemoveActivationFromAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: RemoveActivationFromAudienceOutput? + + public init(data: RemoveActivationFromAudienceOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveActivationFromAudienceOutput.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveActivationFromAudienceOutput.swift new file mode 100644 index 00000000..a7362f5a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveActivationFromAudienceOutput.swift @@ -0,0 +1,34 @@ +// +// RemoveActivationFromAudienceOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for removing an activation from audience. */ +public struct RemoveActivationFromAudienceOutput: Codable, JSONEncodable, Hashable { + + /** Deletion status. */ + public var status: String + + public init(status: String) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpace200Response.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpace200Response.swift new file mode 100644 index 00000000..3b3317e0 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpace200Response.swift @@ -0,0 +1,32 @@ +// +// RemoveAudienceFromSpace200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct RemoveAudienceFromSpace200Response: Codable, JSONEncodable, Hashable { + + public var data: RemoveAudienceFromSpaceBetaOutput? + + public init(data: RemoveAudienceFromSpaceBetaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpace200Response1.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpace200Response1.swift new file mode 100644 index 00000000..49ade1be --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpace200Response1.swift @@ -0,0 +1,32 @@ +// +// RemoveAudienceFromSpace200Response1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct RemoveAudienceFromSpace200Response1: Codable, JSONEncodable, Hashable { + + public var data: RemoveAudienceFromSpaceAlphaOutput? + + public init(data: RemoveAudienceFromSpaceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpaceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpaceAlphaOutput.swift new file mode 100644 index 00000000..08414e45 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpaceAlphaOutput.swift @@ -0,0 +1,37 @@ +// +// RemoveAudienceFromSpaceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Delete audience endpoint output. */ +public struct RemoveAudienceFromSpaceAlphaOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case success = "SUCCESS" + } + /** The status of the operation. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpaceBetaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpaceBetaOutput.swift new file mode 100644 index 00000000..706cf460 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceFromSpaceBetaOutput.swift @@ -0,0 +1,37 @@ +// +// RemoveAudienceFromSpaceBetaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Delete audience endpoint output. */ +public struct RemoveAudienceFromSpaceBetaOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case success = "SUCCESS" + } + /** The status of the operation. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceScheduleFromAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceScheduleFromAudience200Response.swift new file mode 100644 index 00000000..3cbbdb00 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceScheduleFromAudience200Response.swift @@ -0,0 +1,32 @@ +// +// RemoveAudienceScheduleFromAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct RemoveAudienceScheduleFromAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: RemoveAudienceScheduleFromAudienceAlphaOutput? + + public init(data: RemoveAudienceScheduleFromAudienceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceScheduleFromAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceScheduleFromAudienceAlphaOutput.swift new file mode 100644 index 00000000..99c387e4 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveAudienceScheduleFromAudienceAlphaOutput.swift @@ -0,0 +1,37 @@ +// +// RemoveAudienceScheduleFromAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Delete audience schedule endpoint output. */ +public struct RemoveAudienceScheduleFromAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case success = "SUCCESS" + } + /** The status of the operation. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveComputedTraitFromSpace200Response.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveComputedTraitFromSpace200Response.swift new file mode 100644 index 00000000..14226c07 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveComputedTraitFromSpace200Response.swift @@ -0,0 +1,32 @@ +// +// RemoveComputedTraitFromSpace200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct RemoveComputedTraitFromSpace200Response: Codable, JSONEncodable, Hashable { + + public var data: RemoveComputedTraitFromSpaceAlphaOutput? + + public init(data: RemoveComputedTraitFromSpaceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveComputedTraitFromSpaceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveComputedTraitFromSpaceAlphaOutput.swift new file mode 100644 index 00000000..321cd85d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveComputedTraitFromSpaceAlphaOutput.swift @@ -0,0 +1,37 @@ +// +// RemoveComputedTraitFromSpaceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Delete computed trait endpoint output. */ +public struct RemoveComputedTraitFromSpaceAlphaOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case success = "SUCCESS" + } + /** The status of the operation. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveProfilesWarehouseFromSpace200Response.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveProfilesWarehouseFromSpace200Response.swift new file mode 100644 index 00000000..04b43358 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveProfilesWarehouseFromSpace200Response.swift @@ -0,0 +1,32 @@ +// +// RemoveProfilesWarehouseFromSpace200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct RemoveProfilesWarehouseFromSpace200Response: Codable, JSONEncodable, Hashable { + + public var data: RemoveProfilesWarehouseFromSpaceAlphaOutput? + + public init(data: RemoveProfilesWarehouseFromSpaceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveProfilesWarehouseFromSpaceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveProfilesWarehouseFromSpaceAlphaOutput.swift new file mode 100644 index 00000000..dbdd984b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveProfilesWarehouseFromSpaceAlphaOutput.swift @@ -0,0 +1,37 @@ +// +// RemoveProfilesWarehouseFromSpaceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns the status of a Warehouse deletion. */ +public struct RemoveProfilesWarehouseFromSpaceAlphaOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case success = "SUCCESS" + } + /** The status of the Warehouse deletion operation. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveRuleV1.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveRuleV1.swift index cc2e5001..213df771 100644 --- a/PublicApi/Classes/OpenAPIs/Models/RemoveRuleV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveRuleV1.swift @@ -21,8 +21,11 @@ public struct RemoveRuleV1: Codable, JSONEncodable, Hashable { case screen = "SCREEN" case track = "TRACK" } + /** The type for this Tracking Plan rule. */ public var type: ModelType + /** Key to this rule (free-form string like 'Button clicked'). */ public var key: String? + /** Version of this rule. */ public var version: Double public init(type: ModelType, key: String? = nil, version: Double) { diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveWriteKeyFromSource200Response.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveWriteKeyFromSource200Response.swift new file mode 100644 index 00000000..4667c6cf --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveWriteKeyFromSource200Response.swift @@ -0,0 +1,32 @@ +// +// RemoveWriteKeyFromSource200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct RemoveWriteKeyFromSource200Response: Codable, JSONEncodable, Hashable { + + public var data: RemoveWriteKeyFromSourceAlphaOutput? + + public init(data: RemoveWriteKeyFromSourceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RemoveWriteKeyFromSourceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/RemoveWriteKeyFromSourceAlphaOutput.swift new file mode 100644 index 00000000..7b3f1f97 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RemoveWriteKeyFromSourceAlphaOutput.swift @@ -0,0 +1,37 @@ +// +// RemoveWriteKeyFromSourceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns the updated Source. */ +public struct RemoveWriteKeyFromSourceAlphaOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case success = "SUCCESS" + } + /** The status of the operation. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReplaceAdvancedSyncScheduleForWarehouseV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/ReplaceAdvancedSyncScheduleForWarehouseV1Input.swift index 3752141c..272da9e6 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ReplaceAdvancedSyncScheduleForWarehouseV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ReplaceAdvancedSyncScheduleForWarehouseV1Input.swift @@ -14,10 +14,10 @@ import AnyCodable public struct ReplaceAdvancedSyncScheduleForWarehouseV1Input: Codable, JSONEncodable, Hashable { /** Enable to turn on an advanced sync schedule for the Warehouse. */ - public var enabled: Bool? + public var enabled: Bool public var schedule: Schedule1? - public init(enabled: Bool? = nil, schedule: Schedule1? = nil) { + public init(enabled: Bool, schedule: Schedule1? = nil) { self.enabled = enabled self.schedule = schedule } @@ -31,7 +31,7 @@ public struct ReplaceAdvancedSyncScheduleForWarehouseV1Input: Codable, JSONEncod public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encode(enabled, forKey: .enabled) try container.encodeIfPresent(schedule, forKey: .schedule) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/ReplaceLabelsInSourceV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/ReplaceLabelsInSourceV1Input.swift index a77a6d27..b99812ec 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ReplaceLabelsInSourceV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ReplaceLabelsInSourceV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct ReplaceLabelsInSourceV1Input: Codable, JSONEncodable, Hashable { /** The list of labels to replace in the Source. */ - public var labels: [LabelV1]? + public var labels: [LabelV1] - public init(labels: [LabelV1]? = nil) { + public init(labels: [LabelV1]) { self.labels = labels } @@ -28,7 +28,7 @@ public struct ReplaceLabelsInSourceV1Input: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(labels, forKey: .labels) + try container.encode(labels, forKey: .labels) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/ReplaceMessagingSubscriptionsInSpacesAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ReplaceMessagingSubscriptionsInSpacesAlphaOutput.swift index 2eeb9839..71b9d37f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ReplaceMessagingSubscriptionsInSpacesAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ReplaceMessagingSubscriptionsInSpacesAlphaOutput.swift @@ -17,9 +17,9 @@ public struct ReplaceMessagingSubscriptionsInSpacesAlphaOutput: Codable, JSONEnc public var successes: [MessageSubscriptionResponse] /** Array of failure subscription status. */ public var failures: [MessageSubscriptionResponse] - public var pagination: Pagination? + public var pagination: Pagination3? - public init(successes: [MessageSubscriptionResponse], failures: [MessageSubscriptionResponse], pagination: Pagination? = nil) { + public init(successes: [MessageSubscriptionResponse], failures: [MessageSubscriptionResponse], pagination: Pagination3? = nil) { self.successes = successes self.failures = failures self.pagination = pagination diff --git a/PublicApi/Classes/OpenAPIs/Models/ReplacePermissionsForUserGroupV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/ReplacePermissionsForUserGroupV1Input.swift index dc04b3ac..a39e43a7 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ReplacePermissionsForUserGroupV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ReplacePermissionsForUserGroupV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct ReplacePermissionsForUserGroupV1Input: Codable, JSONEncodable, Hashable { /** The permissions to replace with. */ - public var permissions: [PermissionInputV1]? + public var permissions: [PermissionInputV1] - public init(permissions: [PermissionInputV1]? = nil) { + public init(permissions: [PermissionInputV1]) { self.permissions = permissions } @@ -28,7 +28,7 @@ public struct ReplacePermissionsForUserGroupV1Input: Codable, JSONEncodable, Has public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(permissions, forKey: .permissions) + try container.encode(permissions, forKey: .permissions) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/ReplacePermissionsForUserV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/ReplacePermissionsForUserV1Input.swift index 432da60d..6a99829b 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ReplacePermissionsForUserV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ReplacePermissionsForUserV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct ReplacePermissionsForUserV1Input: Codable, JSONEncodable, Hashable { /** The permissions to add. */ - public var permissions: [PermissionInputV1]? + public var permissions: [PermissionInputV1] - public init(permissions: [PermissionInputV1]? = nil) { + public init(permissions: [PermissionInputV1]) { self.permissions = permissions } @@ -28,7 +28,7 @@ public struct ReplacePermissionsForUserV1Input: Codable, JSONEncodable, Hashable public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(permissions, forKey: .permissions) + try container.encode(permissions, forKey: .permissions) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/ReplaceRulesInTrackingPlanV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/ReplaceRulesInTrackingPlanV1Input.swift index 3efc68b3..4d215d7a 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ReplaceRulesInTrackingPlanV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ReplaceRulesInTrackingPlanV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct ReplaceRulesInTrackingPlanV1Input: Codable, JSONEncodable, Hashable { /** Rules to replace. */ - public var rules: [RuleV1]? + public var rules: [RuleInputV1] - public init(rules: [RuleV1]? = nil) { + public init(rules: [RuleInputV1]) { self.rules = rules } @@ -28,7 +28,7 @@ public struct ReplaceRulesInTrackingPlanV1Input: Codable, JSONEncodable, Hashabl public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(rules, forKey: .rules) + try container.encode(rules, forKey: .rules) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/ReplaceUsersInUserGroupV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/ReplaceUsersInUserGroupV1Input.swift index 50d86b39..1bcd1c00 100644 --- a/PublicApi/Classes/OpenAPIs/Models/ReplaceUsersInUserGroupV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/ReplaceUsersInUserGroupV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct ReplaceUsersInUserGroupV1Input: Codable, JSONEncodable, Hashable { /** The email addresses of the users and invites to replace. */ - public var emails: [String]? + public var emails: [String] - public init(emails: [String]? = nil) { + public init(emails: [String]) { self.emails = emails } @@ -28,7 +28,7 @@ public struct ReplaceUsersInUserGroupV1Input: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(emails, forKey: .emails) + try container.encode(emails, forKey: .emails) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/RestoreFunctionVersion200Response.swift b/PublicApi/Classes/OpenAPIs/Models/RestoreFunctionVersion200Response.swift new file mode 100644 index 00000000..67526348 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RestoreFunctionVersion200Response.swift @@ -0,0 +1,32 @@ +// +// RestoreFunctionVersion200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct RestoreFunctionVersion200Response: Codable, JSONEncodable, Hashable { + + public var data: RestoreFunctionVersionAlphaOutput? + + public init(data: RestoreFunctionVersionAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RestoreFunctionVersionAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/RestoreFunctionVersionAlphaInput.swift new file mode 100644 index 00000000..03920f38 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RestoreFunctionVersionAlphaInput.swift @@ -0,0 +1,34 @@ +// +// RestoreFunctionVersionAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Restore a given Function version. */ +public struct RestoreFunctionVersionAlphaInput: Codable, JSONEncodable, Hashable { + + /** An identifier for this version. */ + public var versionId: String + + public init(versionId: String) { + self.versionId = versionId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case versionId + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(versionId, forKey: .versionId) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RestoreFunctionVersionAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/RestoreFunctionVersionAlphaOutput.swift new file mode 100644 index 00000000..a1df0c59 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RestoreFunctionVersionAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// RestoreFunctionVersionAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Restore version output. */ +public struct RestoreFunctionVersionAlphaOutput: Codable, JSONEncodable, Hashable { + + public var version: Version1 + + public init(version: Version1) { + self.version = version + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case version + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(version, forKey: .version) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseETLManualSync.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseETLManualSync.swift new file mode 100644 index 00000000..32258a29 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseETLManualSync.swift @@ -0,0 +1,39 @@ +// +// ReverseETLManualSync.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The reverse ETL connection job that was manually started. */ +public struct ReverseETLManualSync: Codable, JSONEncodable, Hashable { + + /** A datetime that indicates when the job was triggered. */ + public var startedAt: String + /** The unique id for the sync that was triggered. */ + public var syncId: String + + public init(startedAt: String, syncId: String) { + self.startedAt = startedAt + self.syncId = syncId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case startedAt + case syncId + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(startedAt, forKey: .startedAt) + try container.encode(syncId, forKey: .syncId) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseETLManualSyncJobOutput.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseETLManualSyncJobOutput.swift new file mode 100644 index 00000000..6b29602a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseETLManualSyncJobOutput.swift @@ -0,0 +1,39 @@ +// +// ReverseETLManualSyncJobOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** StartJobOutput returns the result of triggering the specified job. */ +public struct ReverseETLManualSyncJobOutput: Codable, JSONEncodable, Hashable { + + /** A datetime that indicates when the job was triggered. */ + public var startedAt: String + /** The unique id for the sync that was triggered. */ + public var syncId: String + + public init(startedAt: String, syncId: String) { + self.startedAt = startedAt + self.syncId = syncId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case startedAt + case syncId + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(startedAt, forKey: .startedAt) + try container.encode(syncId, forKey: .syncId) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseETLSchedule.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseETLSchedule.swift new file mode 100644 index 00000000..ff6927a2 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseETLSchedule.swift @@ -0,0 +1,45 @@ +// +// ReverseETLSchedule.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The schedule for the Reverse ETL subscription. */ +public struct ReverseETLSchedule: Codable, JSONEncodable, Hashable { + + public enum Strategy: String, Codable, CaseIterable { + case cron = "CRON" + case dbtCloud = "DBT_CLOUD" + case manual = "MANUAL" + case periodic = "PERIODIC" + case specificDays = "SPECIFIC_DAYS" + } + /** Strategy supports: Periodic, Specific Days, Manual, CRON and DBT_CLOUD. */ + public var strategy: Strategy + public var config: Config1? + + public init(strategy: Strategy, config: Config1? = nil) { + self.strategy = strategy + self.config = config + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case strategy + case config + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(strategy, forKey: .strategy) + try container.encodeIfPresent(config, forKey: .config) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseETLSchedule1.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseETLSchedule1.swift new file mode 100644 index 00000000..c0c9fd1d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseETLSchedule1.swift @@ -0,0 +1,45 @@ +// +// ReverseETLSchedule1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** (Reverse ETL only) The schedule for the subscription being attached to ReverseETL model. Schedule configuration is at https://docs.segmentapis.com/tag/Reverse-ETL#section/Sync-schedule-JSON-configuration. */ +public struct ReverseETLSchedule1: Codable, JSONEncodable, Hashable { + + public enum Strategy: String, Codable, CaseIterable { + case cron = "CRON" + case dbtCloud = "DBT_CLOUD" + case manual = "MANUAL" + case periodic = "PERIODIC" + case specificDays = "SPECIFIC_DAYS" + } + /** Strategy supports: Periodic, Specific Days, Manual, CRON and DBT_CLOUD. */ + public var strategy: Strategy + public var config: Config1? + + public init(strategy: Strategy, config: Config1? = nil) { + self.strategy = strategy + self.config = config + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case strategy + case config + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(strategy, forKey: .strategy) + try container.encodeIfPresent(config, forKey: .config) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseETLSyncStatus.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseETLSyncStatus.swift new file mode 100644 index 00000000..32a1e219 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseETLSyncStatus.swift @@ -0,0 +1,82 @@ +// +// ReverseETLSyncStatus.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The status of the reverse ETL connection job. */ +public struct ReverseETLSyncStatus: Codable, JSONEncodable, Hashable { + + /** The id of the sync. */ + public var syncId: String + /** The Model id of the sync. */ + public var modelId: String + /** The Source id of the sync. */ + public var sourceId: String + /** The status of the sync. It currently can be IN_PROGRESS, FAIL, SUCCESS, PARTIAL_SUCCESS. */ + public var syncStatus: String + /** The duration of the sync. */ + public var duration: String + /** When the sync started. */ + public var startedAt: String + /** When the sync started. */ + public var finishedAt: String? + public var extractPhase: ExtractPhase? + public var loadPhase: LoadPhase? + /** Error message if applicable. */ + public var error: String? + /** Error code indicates a fatal sync error code, if applicable. */ + public var errorCode: String? + + public init(syncId: String, modelId: String, sourceId: String, syncStatus: String, duration: String, startedAt: String, finishedAt: String? = nil, extractPhase: ExtractPhase? = nil, loadPhase: LoadPhase? = nil, error: String? = nil, errorCode: String? = nil) { + self.syncId = syncId + self.modelId = modelId + self.sourceId = sourceId + self.syncStatus = syncStatus + self.duration = duration + self.startedAt = startedAt + self.finishedAt = finishedAt + self.extractPhase = extractPhase + self.loadPhase = loadPhase + self.error = error + self.errorCode = errorCode + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case syncId + case modelId + case sourceId + case syncStatus + case duration + case startedAt + case finishedAt + case extractPhase + case loadPhase + case error + case errorCode + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(syncId, forKey: .syncId) + try container.encode(modelId, forKey: .modelId) + try container.encode(sourceId, forKey: .sourceId) + try container.encode(syncStatus, forKey: .syncStatus) + try container.encode(duration, forKey: .duration) + try container.encode(startedAt, forKey: .startedAt) + try container.encodeIfPresent(finishedAt, forKey: .finishedAt) + try container.encodeIfPresent(extractPhase, forKey: .extractPhase) + try container.encodeIfPresent(loadPhase, forKey: .loadPhase) + try container.encodeIfPresent(error, forKey: .error) + try container.encodeIfPresent(errorCode, forKey: .errorCode) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseEtlCronScheduleConfig.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlCronScheduleConfig.swift new file mode 100644 index 00000000..b26b8182 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlCronScheduleConfig.swift @@ -0,0 +1,38 @@ +// +// ReverseEtlCronScheduleConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ReverseEtlCronScheduleConfig: Codable, JSONEncodable, Hashable { + + /** 5 field cron string expression. The cron expression must be larger than 15 minutes. */ + public var spec: String + /** Timezone respected by the cron string. Format must be in IANA Timezone Identifier. Example: 'America/Los_Angeles'. */ + public var timezone: String + + public init(spec: String, timezone: String) { + self.spec = spec + self.timezone = timezone + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case spec + case timezone + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(spec, forKey: .spec) + try container.encode(timezone, forKey: .timezone) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseEtlDbtCloudScheduleConfig.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlDbtCloudScheduleConfig.swift new file mode 100644 index 00000000..0222311d --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlDbtCloudScheduleConfig.swift @@ -0,0 +1,39 @@ +// +// ReverseEtlDbtCloudScheduleConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Definition for a schedule triggered by dbt Cloud job events. */ +public struct ReverseEtlDbtCloudScheduleConfig: Codable, JSONEncodable, Hashable { + + /** The dbt Cloud job used to trigger a sync for a Reverse ETL Connection. */ + public var jobId: String + /** The dbt Cloud account where the job belongs to. */ + public var accountId: String + + public init(jobId: String, accountId: String) { + self.jobId = jobId + self.accountId = accountId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case jobId + case accountId + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(jobId, forKey: .jobId) + try container.encode(accountId, forKey: .accountId) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseEtlModel.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlModel.swift new file mode 100644 index 00000000..052beaca --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlModel.swift @@ -0,0 +1,64 @@ +// +// ReverseEtlModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The created Model. */ +public struct ReverseEtlModel: Codable, JSONEncodable, Hashable { + + /** The id of the Model. */ + public var id: String + /** The id for the attached Source. */ + public var sourceId: String + /** A short, human-readable description of the Model. */ + public var name: String + /** A longer, more descriptive explanation of the Model. */ + public var description: String + /** Indicates whether the Model should have syncs enabled. When disabled, no syncs will be triggered, regardless of the enabled status of the attached destinations/subscriptions. */ + public var enabled: Bool + /** The SQL query that will be executed to extract data from the connected Source. */ + public var query: String + /** Indicates the column named in `query` that should be used to uniquely identify the extracted records. */ + public var queryIdentifierColumn: String + + public init(id: String, sourceId: String, name: String, description: String, enabled: Bool, query: String, queryIdentifierColumn: String) { + self.id = id + self.sourceId = sourceId + self.name = name + self.description = description + self.enabled = enabled + self.query = query + self.queryIdentifierColumn = queryIdentifierColumn + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case sourceId + case name + case description + case enabled + case query + case queryIdentifierColumn + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(sourceId, forKey: .sourceId) + try container.encode(name, forKey: .name) + try container.encode(description, forKey: .description) + try container.encode(enabled, forKey: .enabled) + try container.encode(query, forKey: .query) + try container.encode(queryIdentifierColumn, forKey: .queryIdentifierColumn) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseEtlModel1.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlModel1.swift new file mode 100644 index 00000000..777502b0 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlModel1.swift @@ -0,0 +1,64 @@ +// +// ReverseEtlModel1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The requested Model. */ +public struct ReverseEtlModel1: Codable, JSONEncodable, Hashable { + + /** The id of the Model. */ + public var id: String + /** The id for the attached Source. */ + public var sourceId: String + /** A short, human-readable description of the Model. */ + public var name: String + /** A longer, more descriptive explanation of the Model. */ + public var description: String + /** Indicates whether the Model should have syncs enabled. When disabled, no syncs will be triggered, regardless of the enabled status of the attached destinations/subscriptions. */ + public var enabled: Bool + /** The SQL query that will be executed to extract data from the connected Source. */ + public var query: String + /** Indicates the column named in `query` that should be used to uniquely identify the extracted records. */ + public var queryIdentifierColumn: String + + public init(id: String, sourceId: String, name: String, description: String, enabled: Bool, query: String, queryIdentifierColumn: String) { + self.id = id + self.sourceId = sourceId + self.name = name + self.description = description + self.enabled = enabled + self.query = query + self.queryIdentifierColumn = queryIdentifierColumn + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case sourceId + case name + case description + case enabled + case query + case queryIdentifierColumn + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(sourceId, forKey: .sourceId) + try container.encode(name, forKey: .name) + try container.encode(description, forKey: .description) + try container.encode(enabled, forKey: .enabled) + try container.encode(query, forKey: .query) + try container.encode(queryIdentifierColumn, forKey: .queryIdentifierColumn) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseEtlPeriodicScheduleConfig.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlPeriodicScheduleConfig.swift new file mode 100644 index 00000000..48f09d6a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlPeriodicScheduleConfig.swift @@ -0,0 +1,34 @@ +// +// ReverseEtlPeriodicScheduleConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Definition for periodic interval. */ +public struct ReverseEtlPeriodicScheduleConfig: Codable, JSONEncodable, Hashable { + + /** Duration is specified as a string, EG: 15m, 3h25m30s. */ + public var interval: String + + public init(interval: String) { + self.interval = interval + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case interval + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(interval, forKey: .interval) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseEtlScheduleConfig.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlScheduleConfig.swift new file mode 100644 index 00000000..7b2ae555 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlScheduleConfig.swift @@ -0,0 +1,63 @@ +// +// ReverseEtlScheduleConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ReverseEtlScheduleConfig: Codable, JSONEncodable, Hashable { + + /** Duration is specified as a string, EG: 15m, 3h25m30s. */ + public var interval: String + /** Days of the week. */ + public var days: [Double] + /** Hours of the day. */ + public var hours: [Double] + /** Timezone respected by the cron string. Format must be in IANA Timezone Identifier. Example: 'America/Los_Angeles'. */ + public var timezone: String + /** 5 field cron string expression. The cron expression must be larger than 15 minutes. */ + public var spec: String + /** The dbt Cloud job used to trigger a sync for a Reverse ETL Connection. */ + public var jobId: String + /** The dbt Cloud account where the job belongs to. */ + public var accountId: String + + public init(interval: String, days: [Double], hours: [Double], timezone: String, spec: String, jobId: String, accountId: String) { + self.interval = interval + self.days = days + self.hours = hours + self.timezone = timezone + self.spec = spec + self.jobId = jobId + self.accountId = accountId + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case interval + case days + case hours + case timezone + case spec + case jobId + case accountId + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(interval, forKey: .interval) + try container.encode(days, forKey: .days) + try container.encode(hours, forKey: .hours) + try container.encode(timezone, forKey: .timezone) + try container.encode(spec, forKey: .spec) + try container.encode(jobId, forKey: .jobId) + try container.encode(accountId, forKey: .accountId) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseEtlScheduleDefinition.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlScheduleDefinition.swift new file mode 100644 index 00000000..db1985f5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlScheduleDefinition.swift @@ -0,0 +1,45 @@ +// +// ReverseEtlScheduleDefinition.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines a configuration object used for scheduling, which can vary depending on the configured strategy. */ +public struct ReverseEtlScheduleDefinition: Codable, JSONEncodable, Hashable { + + public enum Strategy: String, Codable, CaseIterable { + case cron = "CRON" + case dbtCloud = "DBT_CLOUD" + case manual = "MANUAL" + case periodic = "PERIODIC" + case specificDays = "SPECIFIC_DAYS" + } + /** Strategy supports: Periodic, Specific Days, Manual, CRON and DBT_CLOUD. */ + public var strategy: Strategy + public var config: Config1? + + public init(strategy: Strategy, config: Config1? = nil) { + self.strategy = strategy + self.config = config + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case strategy + case config + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(strategy, forKey: .strategy) + try container.encodeIfPresent(config, forKey: .config) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/ReverseEtlSpecificTimeScheduleConfig.swift b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlSpecificTimeScheduleConfig.swift new file mode 100644 index 00000000..835735a0 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/ReverseEtlSpecificTimeScheduleConfig.swift @@ -0,0 +1,44 @@ +// +// ReverseEtlSpecificTimeScheduleConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Definition for specific day and time schedule. Days is list of numbered day of the week and hours is a list of hour of the day. The corresponding Timezone is also input as string. */ +public struct ReverseEtlSpecificTimeScheduleConfig: Codable, JSONEncodable, Hashable { + + /** Days of the week. */ + public var days: [Double] + /** Hours of the day. */ + public var hours: [Double] + /** Timezone for the specified times. */ + public var timezone: String + + public init(days: [Double], hours: [Double], timezone: String) { + self.days = days + self.hours = hours + self.timezone = timezone + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case days + case hours + case timezone + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(days, forKey: .days) + try container.encode(hours, forKey: .hours) + try container.encode(timezone, forKey: .timezone) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/RuleInputV1.swift b/PublicApi/Classes/OpenAPIs/Models/RuleInputV1.swift new file mode 100644 index 00000000..2496e14b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/RuleInputV1.swift @@ -0,0 +1,57 @@ +// +// RuleInputV1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Represents a rule to add to a Tracking Plan. */ +public struct RuleInputV1: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case common = "COMMON" + case group = "GROUP" + case identify = "IDENTIFY" + case page = "PAGE" + case screen = "SCREEN" + case track = "TRACK" + } + /** The type for this Tracking Plan rule. */ + public var type: ModelType + /** Key to this rule (free-form string like 'Button clicked'). */ + public var key: String? + /** JSON Schema of this rule. */ + public var jsonSchema: AnyCodable? + /** Version of this rule. */ + public var version: Double + + public init(type: ModelType, key: String? = nil, jsonSchema: AnyCodable?, version: Double) { + self.type = type + self.key = key + self.jsonSchema = jsonSchema + self.version = version + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case key + case jsonSchema + case version + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(key, forKey: .key) + try container.encode(jsonSchema, forKey: .jsonSchema) + try container.encode(version, forKey: .version) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Run.swift b/PublicApi/Classes/OpenAPIs/Models/Run.swift new file mode 100644 index 00000000..8415eab3 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Run.swift @@ -0,0 +1,34 @@ +// +// Run.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The run information. */ +public struct Run: Codable, JSONEncodable, Hashable { + + /** The workflow id of the execution workflow that was started. */ + public var id: String + + public init(id: String) { + self.id = id + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/SimpleDestination.swift b/PublicApi/Classes/OpenAPIs/Models/SimpleDestination.swift new file mode 100644 index 00000000..773b0f73 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/SimpleDestination.swift @@ -0,0 +1,82 @@ +// +// SimpleDestination.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct SimpleDestination: Codable, JSONEncodable, Hashable { + + /** The id of the Integration. */ + public var id: String + /** The name of the Destination. */ + public var name: String? + /** The Source of the Destination. */ + public var sourceId: String + /** Whether the Integration is enabled or not. */ + public var enabled: Bool + /** When the Integration connection was created. */ + public var createdAt: String + /** When the Integration connection was last updated. */ + public var updatedAt: String + /** The Destination settings. */ + public var settings: [String: AnyCodable] + /** The Destination id. */ + public var destinationId: String + public var metadata: Metadata? + /** ID Sync configuration - array of external IDs with their strategies. */ + public var idSyncConfiguration: [IDSyncConfigurationInput]? + /** The settings that a Destination requires to create audiences on a third-party platform. These settings are Destination-specific and thus are best defined as unknown. */ + public var connectionSettings: AnyCodable? + + public init(id: String, name: String? = nil, sourceId: String, enabled: Bool, createdAt: String, updatedAt: String, settings: [String: AnyCodable], destinationId: String, metadata: Metadata? = nil, idSyncConfiguration: [IDSyncConfigurationInput]? = nil, connectionSettings: AnyCodable? = nil) { + self.id = id + self.name = name + self.sourceId = sourceId + self.enabled = enabled + self.createdAt = createdAt + self.updatedAt = updatedAt + self.settings = settings + self.destinationId = destinationId + self.metadata = metadata + self.idSyncConfiguration = idSyncConfiguration + self.connectionSettings = connectionSettings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + case sourceId + case enabled + case createdAt + case updatedAt + case settings + case destinationId + case metadata + case idSyncConfiguration + case connectionSettings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(name, forKey: .name) + try container.encode(sourceId, forKey: .sourceId) + try container.encode(enabled, forKey: .enabled) + try container.encode(createdAt, forKey: .createdAt) + try container.encode(updatedAt, forKey: .updatedAt) + try container.encode(settings, forKey: .settings) + try container.encode(destinationId, forKey: .destinationId) + try container.encodeIfPresent(metadata, forKey: .metadata) + try container.encodeIfPresent(idSyncConfiguration, forKey: .idSyncConfiguration) + try container.encodeIfPresent(connectionSettings, forKey: .connectionSettings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Size.swift b/PublicApi/Classes/OpenAPIs/Models/Size.swift new file mode 100644 index 00000000..0c2b62aa --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Size.swift @@ -0,0 +1,49 @@ +// +// Size.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Object containing details about audience membership size(s). */ +public struct Size: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case entities = "ENTITIES" + case users = "USERS" + } + /** The total audience membership count. Refer to the type field to determine the unit for this field (profiles, accounts, etc). */ + public var count: Double? + /** The unit type for the count(s) being returned. */ + public var type: ModelType + /** The unique audience membership count. */ + public var uniqueCount: Double? + + public init(count: Double? = nil, type: ModelType, uniqueCount: Double? = nil) { + self.count = count + self.type = type + self.uniqueCount = uniqueCount + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case count + case type + case uniqueCount + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(count, forKey: .count) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(uniqueCount, forKey: .uniqueCount) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Size1.swift b/PublicApi/Classes/OpenAPIs/Models/Size1.swift new file mode 100644 index 00000000..39279453 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Size1.swift @@ -0,0 +1,49 @@ +// +// Size1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Result membership size for the audience preview. Only has a value if status is 'COMPLETED'. */ +public struct Size1: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case entities = "ENTITIES" + case users = "USERS" + } + /** The total audience membership count. Refer to the type field to determine the unit for this field (profiles, accounts, etc). */ + public var count: Double? + /** The unit type for the count(s) being returned. */ + public var type: ModelType + /** The unique audience membership count. */ + public var uniqueCount: Double? + + public init(count: Double? = nil, type: ModelType, uniqueCount: Double? = nil) { + self.count = count + self.type = type + self.uniqueCount = uniqueCount + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case count + case type + case uniqueCount + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(count, forKey: .count) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(uniqueCount, forKey: .uniqueCount) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Source1.swift b/PublicApi/Classes/OpenAPIs/Models/Source1.swift index b95444a6..051cd7c4 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Source1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Source1.swift @@ -19,7 +19,7 @@ public struct Source1: Codable, JSONEncodable, Hashable { public var slug: String /** The name of the Source. Config API note: equal to `displayName`. */ public var name: String? - public var metadata: Metadata1 + public var metadata: Metadata3 /** The id of the Workspace that owns the Source. Config API note: equal to `parent`. */ public var workspaceId: String /** Enable to receive data from the Source. */ @@ -31,7 +31,7 @@ public struct Source1: Codable, JSONEncodable, Hashable { /** A list of labels applied to the Source. */ public var labels: [LabelV1] - public init(id: String, slug: String, name: String? = nil, metadata: Metadata1, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { + public init(id: String, slug: String, name: String? = nil, metadata: Metadata3, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { self.id = id self.slug = slug self.name = name diff --git a/PublicApi/Classes/OpenAPIs/Models/Source2.swift b/PublicApi/Classes/OpenAPIs/Models/Source2.swift index 9729b885..a81d8697 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Source2.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Source2.swift @@ -19,7 +19,7 @@ public struct Source2: Codable, JSONEncodable, Hashable { public var slug: String /** The name of the Source. Config API note: equal to `displayName`. */ public var name: String? - public var metadata: Metadata1 + public var metadata: Metadata3 /** The id of the Workspace that owns the Source. Config API note: equal to `parent`. */ public var workspaceId: String /** Enable to receive data from the Source. */ @@ -31,7 +31,7 @@ public struct Source2: Codable, JSONEncodable, Hashable { /** A list of labels applied to the Source. */ public var labels: [LabelV1] - public init(id: String, slug: String, name: String? = nil, metadata: Metadata1, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { + public init(id: String, slug: String, name: String? = nil, metadata: Metadata3, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { self.id = id self.slug = slug self.name = name diff --git a/PublicApi/Classes/OpenAPIs/Models/Source3.swift b/PublicApi/Classes/OpenAPIs/Models/Source3.swift index f3e7b001..83d51977 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Source3.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Source3.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** The updated Source. */ +/** The Source with a new write key appended to it. */ public struct Source3: Codable, JSONEncodable, Hashable { /** The id of the Source. Config API note: analogous to `name`. */ @@ -19,7 +19,7 @@ public struct Source3: Codable, JSONEncodable, Hashable { public var slug: String /** The name of the Source. Config API note: equal to `displayName`. */ public var name: String? - public var metadata: Metadata1 + public var metadata: Metadata3 /** The id of the Workspace that owns the Source. Config API note: equal to `parent`. */ public var workspaceId: String /** Enable to receive data from the Source. */ @@ -31,7 +31,7 @@ public struct Source3: Codable, JSONEncodable, Hashable { /** A list of labels applied to the Source. */ public var labels: [LabelV1] - public init(id: String, slug: String, name: String? = nil, metadata: Metadata1, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { + public init(id: String, slug: String, name: String? = nil, metadata: Metadata3, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { self.id = id self.slug = slug self.name = name diff --git a/PublicApi/Classes/OpenAPIs/Models/Source4.swift b/PublicApi/Classes/OpenAPIs/Models/Source4.swift index 7c1724b7..b327cfcf 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Source4.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Source4.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** The returned Source object. */ +/** The updated Source. */ public struct Source4: Codable, JSONEncodable, Hashable { /** The id of the Source. Config API note: analogous to `name`. */ @@ -19,7 +19,7 @@ public struct Source4: Codable, JSONEncodable, Hashable { public var slug: String /** The name of the Source. Config API note: equal to `displayName`. */ public var name: String? - public var metadata: Metadata1 + public var metadata: Metadata3 /** The id of the Workspace that owns the Source. Config API note: equal to `parent`. */ public var workspaceId: String /** Enable to receive data from the Source. */ @@ -31,7 +31,7 @@ public struct Source4: Codable, JSONEncodable, Hashable { /** A list of labels applied to the Source. */ public var labels: [LabelV1] - public init(id: String, slug: String, name: String? = nil, metadata: Metadata1, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { + public init(id: String, slug: String, name: String? = nil, metadata: Metadata3, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { self.id = id self.slug = slug self.name = name diff --git a/PublicApi/Classes/OpenAPIs/Models/Source5.swift b/PublicApi/Classes/OpenAPIs/Models/Source5.swift index a7edb68e..d30d6208 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Source5.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Source5.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** The newly created Source. */ +/** The returned Source object. */ public struct Source5: Codable, JSONEncodable, Hashable { /** The id of the Source. Config API note: analogous to `name`. */ @@ -19,7 +19,7 @@ public struct Source5: Codable, JSONEncodable, Hashable { public var slug: String /** The name of the Source. Config API note: equal to `displayName`. */ public var name: String? - public var metadata: Metadata1 + public var metadata: Metadata3 /** The id of the Workspace that owns the Source. Config API note: equal to `parent`. */ public var workspaceId: String /** Enable to receive data from the Source. */ @@ -31,7 +31,7 @@ public struct Source5: Codable, JSONEncodable, Hashable { /** A list of labels applied to the Source. */ public var labels: [LabelV1] - public init(id: String, slug: String, name: String? = nil, metadata: Metadata1, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { + public init(id: String, slug: String, name: String? = nil, metadata: Metadata3, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { self.id = id self.slug = slug self.name = name diff --git a/PublicApi/Classes/OpenAPIs/Models/Source6.swift b/PublicApi/Classes/OpenAPIs/Models/Source6.swift index 575f90c4..e0b72752 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Source6.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Source6.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** The updated Source. */ +/** The newly created Source. */ public struct Source6: Codable, JSONEncodable, Hashable { /** The id of the Source. Config API note: analogous to `name`. */ @@ -19,7 +19,7 @@ public struct Source6: Codable, JSONEncodable, Hashable { public var slug: String /** The name of the Source. Config API note: equal to `displayName`. */ public var name: String? - public var metadata: Metadata1 + public var metadata: Metadata3 /** The id of the Workspace that owns the Source. Config API note: equal to `parent`. */ public var workspaceId: String /** Enable to receive data from the Source. */ @@ -31,7 +31,7 @@ public struct Source6: Codable, JSONEncodable, Hashable { /** A list of labels applied to the Source. */ public var labels: [LabelV1] - public init(id: String, slug: String, name: String? = nil, metadata: Metadata1, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { + public init(id: String, slug: String, name: String? = nil, metadata: Metadata3, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { self.id = id self.slug = slug self.name = name diff --git a/PublicApi/Classes/OpenAPIs/Models/Source7.swift b/PublicApi/Classes/OpenAPIs/Models/Source7.swift new file mode 100644 index 00000000..48c356dc --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Source7.swift @@ -0,0 +1,73 @@ +// +// Source7.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** The updated Source. */ +public struct Source7: Codable, JSONEncodable, Hashable { + + /** The id of the Source. Config API note: analogous to `name`. */ + public var id: String + /** The slug used to identify the Source in the Segment app. Config API note: equal to `name`. */ + public var slug: String + /** The name of the Source. Config API note: equal to `displayName`. */ + public var name: String? + public var metadata: Metadata3 + /** The id of the Workspace that owns the Source. Config API note: equal to `parent`. */ + public var workspaceId: String + /** Enable to receive data from the Source. */ + public var enabled: Bool + /** The write keys used to send data from the Source. This field is left empty when the current token does not have the 'source admin' permission. */ + public var writeKeys: [String] + /** The settings associated with the Source. */ + public var settings: JSON? + /** A list of labels applied to the Source. */ + public var labels: [LabelV1] + + public init(id: String, slug: String, name: String? = nil, metadata: Metadata3, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { + self.id = id + self.slug = slug + self.name = name + self.metadata = metadata + self.workspaceId = workspaceId + self.enabled = enabled + self.writeKeys = writeKeys + self.settings = settings + self.labels = labels + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case slug + case name + case metadata + case workspaceId + case enabled + case writeKeys + case settings + case labels + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(slug, forKey: .slug) + try container.encodeIfPresent(name, forKey: .name) + try container.encode(metadata, forKey: .metadata) + try container.encode(workspaceId, forKey: .workspaceId) + try container.encode(enabled, forKey: .enabled) + try container.encode(writeKeys, forKey: .writeKeys) + try container.encodeIfPresent(settings, forKey: .settings) + try container.encode(labels, forKey: .labels) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/SourceAlpha.swift b/PublicApi/Classes/OpenAPIs/Models/SourceAlpha.swift index 90bfea64..a254b1de 100644 --- a/PublicApi/Classes/OpenAPIs/Models/SourceAlpha.swift +++ b/PublicApi/Classes/OpenAPIs/Models/SourceAlpha.swift @@ -19,7 +19,7 @@ public struct SourceAlpha: Codable, JSONEncodable, Hashable { public var slug: String /** The name of the Source. Config API note: equal to `displayName`. */ public var name: String? - public var metadata: Metadata1 + public var metadata: Metadata3 /** The id of the Workspace that owns the Source. Config API note: equal to `parent`. */ public var workspaceId: String /** Enable to receive data from the Source. */ @@ -31,7 +31,7 @@ public struct SourceAlpha: Codable, JSONEncodable, Hashable { /** A list of labels applied to the Source. */ public var labels: [LabelV1] - public init(id: String, slug: String, name: String? = nil, metadata: Metadata1, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { + public init(id: String, slug: String, name: String? = nil, metadata: Metadata3, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { self.id = id self.slug = slug self.name = name diff --git a/PublicApi/Classes/OpenAPIs/Models/SourceEventVolumeV1.swift b/PublicApi/Classes/OpenAPIs/Models/SourceEventVolumeV1.swift index acf30455..16d6c5bb 100644 --- a/PublicApi/Classes/OpenAPIs/Models/SourceEventVolumeV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/SourceEventVolumeV1.swift @@ -13,7 +13,7 @@ import AnyCodable /** SourceEventVolume represents a time series of event volume for a Workspace broken down by the dimensions which the customer specifies (optional parameters). */ public struct SourceEventVolumeV1: Codable, JSONEncodable, Hashable { - public var source: Source + public var source: Source? /** The name of the event, if applicable. */ public var eventName: String? /** The event type, if applicable. */ @@ -23,7 +23,7 @@ public struct SourceEventVolumeV1: Codable, JSONEncodable, Hashable { /** A list of the event counts broken down by the requested granularity. */ public var series: [SourceEventVolumeDatapointV1] - public init(source: Source, eventName: String? = nil, eventType: String? = nil, total: Double, series: [SourceEventVolumeDatapointV1]) { + public init(source: Source? = nil, eventName: String? = nil, eventType: String? = nil, total: Double, series: [SourceEventVolumeDatapointV1]) { self.source = source self.eventName = eventName self.eventType = eventType @@ -43,7 +43,7 @@ public struct SourceEventVolumeV1: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(source, forKey: .source) + try container.encodeIfPresent(source, forKey: .source) try container.encodeIfPresent(eventName, forKey: .eventName) try container.encodeIfPresent(eventType, forKey: .eventType) try container.encode(total, forKey: .total) diff --git a/PublicApi/Classes/OpenAPIs/Models/SourceMetadata.swift b/PublicApi/Classes/OpenAPIs/Models/SourceMetadata.swift index 1caef888..a315e1e8 100644 --- a/PublicApi/Classes/OpenAPIs/Models/SourceMetadata.swift +++ b/PublicApi/Classes/OpenAPIs/Models/SourceMetadata.swift @@ -13,6 +13,15 @@ import AnyCodable /** The catalog item matched by id. */ public struct SourceMetadata: Codable, JSONEncodable, Hashable { + public enum Status: String, Codable, CaseIterable { + case deprecated = "DEPRECATED" + case privateBeta = "PRIVATE_BETA" + case privateBuilding = "PRIVATE_BUILDING" + case privateSubmitted = "PRIVATE_SUBMITTED" + case _public = "PUBLIC" + case publicBeta = "PUBLIC_BETA" + case unavailable = "UNAVAILABLE" + } /** The id for this Source metadata in the Segment catalog. Config API note: analogous to `name`. */ public var id: String /** The user-friendly name of this Source. Config API note: equal to `displayName`. */ @@ -28,8 +37,12 @@ public struct SourceMetadata: Codable, JSONEncodable, Hashable { public var categories: [String] /** True if this is a Cloud Event Source. */ public var isCloudEventSource: Bool + /** Support status of the Source. */ + public var status: Status + /** Partner Owned flag. */ + public var partnerOwned: Bool? - public init(id: String, name: String, slug: String, description: String, logos: Logos1, options: [IntegrationOptionBeta], categories: [String], isCloudEventSource: Bool) { + public init(id: String, name: String, slug: String, description: String, logos: Logos1, options: [IntegrationOptionBeta], categories: [String], isCloudEventSource: Bool, status: Status, partnerOwned: Bool? = nil) { self.id = id self.name = name self.slug = slug @@ -38,6 +51,8 @@ public struct SourceMetadata: Codable, JSONEncodable, Hashable { self.options = options self.categories = categories self.isCloudEventSource = isCloudEventSource + self.status = status + self.partnerOwned = partnerOwned } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -49,6 +64,8 @@ public struct SourceMetadata: Codable, JSONEncodable, Hashable { case options case categories case isCloudEventSource + case status + case partnerOwned } // Encodable protocol methods @@ -63,6 +80,8 @@ public struct SourceMetadata: Codable, JSONEncodable, Hashable { try container.encode(options, forKey: .options) try container.encode(categories, forKey: .categories) try container.encode(isCloudEventSource, forKey: .isCloudEventSource) + try container.encode(status, forKey: .status) + try container.encodeIfPresent(partnerOwned, forKey: .partnerOwned) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/SourceMetadataV1.swift b/PublicApi/Classes/OpenAPIs/Models/SourceMetadataV1.swift index 05c779db..b72e37ca 100644 --- a/PublicApi/Classes/OpenAPIs/Models/SourceMetadataV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/SourceMetadataV1.swift @@ -13,6 +13,15 @@ import AnyCodable /** A website, server library, mobile SDK, or cloud application which can send data into Segment. */ public struct SourceMetadataV1: Codable, JSONEncodable, Hashable { + public enum Status: String, Codable, CaseIterable { + case deprecated = "DEPRECATED" + case privateBeta = "PRIVATE_BETA" + case privateBuilding = "PRIVATE_BUILDING" + case privateSubmitted = "PRIVATE_SUBMITTED" + case _public = "PUBLIC" + case publicBeta = "PUBLIC_BETA" + case unavailable = "UNAVAILABLE" + } /** The id for this Source metadata in the Segment catalog. Config API note: analogous to `name`. */ public var id: String /** The user-friendly name of this Source. Config API note: equal to `displayName`. */ @@ -28,8 +37,12 @@ public struct SourceMetadataV1: Codable, JSONEncodable, Hashable { public var categories: [String] /** True if this is a Cloud Event Source. */ public var isCloudEventSource: Bool + /** Support status of the Source. */ + public var status: Status + /** Partner Owned flag. */ + public var partnerOwned: Bool? - public init(id: String, name: String, slug: String, description: String, logos: Logos1, options: [IntegrationOptionBeta], categories: [String], isCloudEventSource: Bool) { + public init(id: String, name: String, slug: String, description: String, logos: Logos1, options: [IntegrationOptionBeta], categories: [String], isCloudEventSource: Bool, status: Status, partnerOwned: Bool? = nil) { self.id = id self.name = name self.slug = slug @@ -38,6 +51,8 @@ public struct SourceMetadataV1: Codable, JSONEncodable, Hashable { self.options = options self.categories = categories self.isCloudEventSource = isCloudEventSource + self.status = status + self.partnerOwned = partnerOwned } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -49,6 +64,8 @@ public struct SourceMetadataV1: Codable, JSONEncodable, Hashable { case options case categories case isCloudEventSource + case status + case partnerOwned } // Encodable protocol methods @@ -63,6 +80,8 @@ public struct SourceMetadataV1: Codable, JSONEncodable, Hashable { try container.encode(options, forKey: .options) try container.encode(categories, forKey: .categories) try container.encode(isCloudEventSource, forKey: .isCloudEventSource) + try container.encode(status, forKey: .status) + try container.encodeIfPresent(partnerOwned, forKey: .partnerOwned) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/SourceV1.swift b/PublicApi/Classes/OpenAPIs/Models/SourceV1.swift index 32bdb26a..c934fbc5 100644 --- a/PublicApi/Classes/OpenAPIs/Models/SourceV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/SourceV1.swift @@ -19,7 +19,7 @@ public struct SourceV1: Codable, JSONEncodable, Hashable { public var slug: String /** The name of the Source. Config API note: equal to `displayName`. */ public var name: String? - public var metadata: Metadata1 + public var metadata: Metadata3 /** The id of the Workspace that owns the Source. Config API note: equal to `parent`. */ public var workspaceId: String /** Enable to receive data from the Source. */ @@ -31,7 +31,7 @@ public struct SourceV1: Codable, JSONEncodable, Hashable { /** A list of labels applied to the Source. */ public var labels: [LabelV1] - public init(id: String, slug: String, name: String? = nil, metadata: Metadata1, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { + public init(id: String, slug: String, name: String? = nil, metadata: Metadata3, workspaceId: String, enabled: Bool, writeKeys: [String], settings: JSON? = nil, labels: [LabelV1]) { self.id = id self.slug = slug self.name = name diff --git a/PublicApi/Classes/OpenAPIs/Models/SpaceWarehouseSchemaOverride.swift b/PublicApi/Classes/OpenAPIs/Models/SpaceWarehouseSchemaOverride.swift new file mode 100644 index 00000000..2ea9e1b6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/SpaceWarehouseSchemaOverride.swift @@ -0,0 +1,44 @@ +// +// SpaceWarehouseSchemaOverride.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Overrides the enabled or disabled state of the specified collection and / or properties within the schema. */ +public struct SpaceWarehouseSchemaOverride: Codable, JSONEncodable, Hashable { + + /** The collection within the Source. */ + public var collection: String + /** Represents the overridden enabled state for the listed collection and / or properties. */ + public var enabled: Bool + /** A map that contains the properties within the collection to which the Warehouse should sync. */ + public var property: String? + + public init(collection: String, enabled: Bool, property: String? = nil) { + self.collection = collection + self.enabled = enabled + self.property = property + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case collection + case enabled + case property + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(collection, forKey: .collection) + try container.encode(enabled, forKey: .enabled) + try container.encodeIfPresent(property, forKey: .property) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/SpaceWarehouseSelectiveSyncItemAlpha.swift b/PublicApi/Classes/OpenAPIs/Models/SpaceWarehouseSelectiveSyncItemAlpha.swift new file mode 100644 index 00000000..7cee4bd4 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/SpaceWarehouseSelectiveSyncItemAlpha.swift @@ -0,0 +1,49 @@ +// +// SpaceWarehouseSelectiveSyncItemAlpha.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Represents an entry in the Space Warehouse Selective Sync schema for a Warehouse and Space pair. */ +public struct SpaceWarehouseSelectiveSyncItemAlpha: Codable, JSONEncodable, Hashable { + + /** The collection within the Source. */ + public var collection: String + /** The id of the Warehouse this sync belongs to. */ + public var warehouseId: String + /** The Enabled flag ok telling whether the Collection is enabled or not. */ + public var enabled: Bool + /** A map that contains the properties within the collection to which the Warehouse should sync. */ + public var properties: [String: AnyCodable] + + public init(collection: String, warehouseId: String, enabled: Bool, properties: [String: AnyCodable]) { + self.collection = collection + self.warehouseId = warehouseId + self.enabled = enabled + self.properties = properties + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case collection + case warehouseId + case enabled + case properties + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(collection, forKey: .collection) + try container.encode(warehouseId, forKey: .warehouseId) + try container.encode(enabled, forKey: .enabled) + try container.encode(properties, forKey: .properties) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/SpecificDaysConfig.swift b/PublicApi/Classes/OpenAPIs/Models/SpecificDaysConfig.swift new file mode 100644 index 00000000..db398633 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/SpecificDaysConfig.swift @@ -0,0 +1,44 @@ +// +// SpecificDaysConfig.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Configures a schedule for specific days and times. */ +public struct SpecificDaysConfig: Codable, JSONEncodable, Hashable { + + /** Days of week for schedule (0=Sunday, 6=Saturday). */ + public var days: [Double] + /** Hours of day for schedule (0-23). */ + public var hours: [Double] + /** TZ database time zone identifier; for example, America/New_York. */ + public var timezone: String + + public init(days: [Double], hours: [Double], timezone: String) { + self.days = days + self.hours = hours + self.timezone = timezone + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case days + case hours + case timezone + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(days, forKey: .days) + try container.encode(hours, forKey: .hours) + try container.encode(timezone, forKey: .timezone) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Subscription.swift b/PublicApi/Classes/OpenAPIs/Models/Subscription.swift index c74ed942..31952c1d 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Subscription.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Subscription.swift @@ -29,8 +29,11 @@ public struct Subscription: Codable, JSONEncodable, Hashable { public var settings: JSON? /** FQL string that describes what events should trigger a Destination action. */ public var trigger: String + /** The unique identifier for the linked ReverseETLModel, if this part of a Reverse ETL connection. */ + public var modelId: String? + public var reverseETLSchedule: ReverseETLSchedule? - public init(id: String, name: String, actionId: String, actionSlug: String, destinationId: String, enabled: Bool, settings: JSON?, trigger: String) { + public init(id: String, name: String, actionId: String, actionSlug: String, destinationId: String, enabled: Bool, settings: JSON?, trigger: String, modelId: String? = nil, reverseETLSchedule: ReverseETLSchedule? = nil) { self.id = id self.name = name self.actionId = actionId @@ -39,6 +42,8 @@ public struct Subscription: Codable, JSONEncodable, Hashable { self.enabled = enabled self.settings = settings self.trigger = trigger + self.modelId = modelId + self.reverseETLSchedule = reverseETLSchedule } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -50,6 +55,8 @@ public struct Subscription: Codable, JSONEncodable, Hashable { case enabled case settings case trigger + case modelId + case reverseETLSchedule } // Encodable protocol methods @@ -64,6 +71,8 @@ public struct Subscription: Codable, JSONEncodable, Hashable { try container.encode(enabled, forKey: .enabled) try container.encode(settings, forKey: .settings) try container.encode(trigger, forKey: .trigger) + try container.encodeIfPresent(modelId, forKey: .modelId) + try container.encodeIfPresent(reverseETLSchedule, forKey: .reverseETLSchedule) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/SupportedPlatforms.swift b/PublicApi/Classes/OpenAPIs/Models/SupportedPlatforms.swift index 5176b3d4..3ff9b1b9 100644 --- a/PublicApi/Classes/OpenAPIs/Models/SupportedPlatforms.swift +++ b/PublicApi/Classes/OpenAPIs/Models/SupportedPlatforms.swift @@ -19,17 +19,29 @@ public struct SupportedPlatforms: Codable, JSONEncodable, Hashable { public var server: Bool? /** Whether this Destination supports mobile events. */ public var mobile: Bool? - - public init(browser: Bool? = nil, server: Bool? = nil, mobile: Bool? = nil) { + /** Whether this Destination supports Warehouse events. */ + public var warehouse: Bool? + /** Whether this Destination supports cloud app object events. */ + public var cloudAppObject: Bool? + /** Whether this Destination supports linked audiences. */ + public var linkedAudiences: Bool? + + public init(browser: Bool? = nil, server: Bool? = nil, mobile: Bool? = nil, warehouse: Bool? = nil, cloudAppObject: Bool? = nil, linkedAudiences: Bool? = nil) { self.browser = browser self.server = server self.mobile = mobile + self.warehouse = warehouse + self.cloudAppObject = cloudAppObject + self.linkedAudiences = linkedAudiences } public enum CodingKeys: String, CodingKey, CaseIterable { case browser case server case mobile + case warehouse + case cloudAppObject + case linkedAudiences } // Encodable protocol methods @@ -39,6 +51,9 @@ public struct SupportedPlatforms: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(browser, forKey: .browser) try container.encodeIfPresent(server, forKey: .server) try container.encodeIfPresent(mobile, forKey: .mobile) + try container.encodeIfPresent(warehouse, forKey: .warehouse) + try container.encodeIfPresent(cloudAppObject, forKey: .cloudAppObject) + try container.encodeIfPresent(linkedAudiences, forKey: .linkedAudiences) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/SyncExtractPhase.swift b/PublicApi/Classes/OpenAPIs/Models/SyncExtractPhase.swift new file mode 100644 index 00000000..94f2dc44 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/SyncExtractPhase.swift @@ -0,0 +1,64 @@ +// +// SyncExtractPhase.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Object representing the extract phase + details. */ +public struct SyncExtractPhase: Codable, JSONEncodable, Hashable { + + /** Counts the subset of records with status=new, which indicates records that were created/inserted/added. */ + public var addedCount: String + /** Counts the subset of records with status=updated, which indicates records that were modified/updated. */ + public var updatedCount: String + /** Counts the subset of records with status=deleted, which indicates records that were deleted/removed. */ + public var deletedCount: String + /** Counts the total number of records/rows handled by extract, across all statuses. */ + public var extractCount: String + /** Error code indicates a fatal sync error code, if applicable. */ + public var errorCode: String + /** Time that the extract phase started. */ + public var startedAt: String + /** Time that the extract phase finished. */ + public var finishedAt: String + + public init(addedCount: String, updatedCount: String, deletedCount: String, extractCount: String, errorCode: String, startedAt: String, finishedAt: String) { + self.addedCount = addedCount + self.updatedCount = updatedCount + self.deletedCount = deletedCount + self.extractCount = extractCount + self.errorCode = errorCode + self.startedAt = startedAt + self.finishedAt = finishedAt + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case addedCount + case updatedCount + case deletedCount + case extractCount + case errorCode + case startedAt + case finishedAt + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(addedCount, forKey: .addedCount) + try container.encode(updatedCount, forKey: .updatedCount) + try container.encode(deletedCount, forKey: .deletedCount) + try container.encode(extractCount, forKey: .extractCount) + try container.encode(errorCode, forKey: .errorCode) + try container.encode(startedAt, forKey: .startedAt) + try container.encode(finishedAt, forKey: .finishedAt) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/SyncLoadPhase.swift b/PublicApi/Classes/OpenAPIs/Models/SyncLoadPhase.swift new file mode 100644 index 00000000..3f52ae26 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/SyncLoadPhase.swift @@ -0,0 +1,54 @@ +// +// SyncLoadPhase.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Object representing the load phase + details. */ +public struct SyncLoadPhase: Codable, JSONEncodable, Hashable { + + /** Counts the subset of records successfully delivered to the downstream Destination. */ + public var deliverSuccessCount: String + /** Counts the subset of records status that failed to be delivered by either receiving a permanent error (for example, 400 Bad Request) or by exhausting all retries for temporary errors (for example, 429 Too Many Requests). */ + public var deliverFailureCount: String + /** Error code indicates a fatal sync error code, if applicable. */ + public var errorCode: String + /** Time that the load phase started. */ + public var startedAt: String + /** Time that the load phase finished. */ + public var finishedAt: String + + public init(deliverSuccessCount: String, deliverFailureCount: String, errorCode: String, startedAt: String, finishedAt: String) { + self.deliverSuccessCount = deliverSuccessCount + self.deliverFailureCount = deliverFailureCount + self.errorCode = errorCode + self.startedAt = startedAt + self.finishedAt = finishedAt + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case deliverSuccessCount + case deliverFailureCount + case errorCode + case startedAt + case finishedAt + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(deliverSuccessCount, forKey: .deliverSuccessCount) + try container.encode(deliverFailureCount, forKey: .deliverFailureCount) + try container.encode(errorCode, forKey: .errorCode) + try container.encode(startedAt, forKey: .startedAt) + try container.encode(finishedAt, forKey: .finishedAt) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/TrackingPlan.swift b/PublicApi/Classes/OpenAPIs/Models/TrackingPlan.swift index e6dcb2f4..3348241f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/TrackingPlan.swift +++ b/PublicApi/Classes/OpenAPIs/Models/TrackingPlan.swift @@ -14,6 +14,7 @@ import AnyCodable public struct TrackingPlan: Codable, JSONEncodable, Hashable { public enum ModelType: String, Codable, CaseIterable { + case engage = "ENGAGE" case live = "LIVE" case propertyLibrary = "PROPERTY_LIBRARY" case ruleLibrary = "RULE_LIBRARY" diff --git a/PublicApi/Classes/OpenAPIs/Models/TrackingPlan1.swift b/PublicApi/Classes/OpenAPIs/Models/TrackingPlan1.swift index 41706337..2c425d54 100644 --- a/PublicApi/Classes/OpenAPIs/Models/TrackingPlan1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/TrackingPlan1.swift @@ -14,6 +14,7 @@ import AnyCodable public struct TrackingPlan1: Codable, JSONEncodable, Hashable { public enum ModelType: String, Codable, CaseIterable { + case engage = "ENGAGE" case live = "LIVE" case propertyLibrary = "PROPERTY_LIBRARY" case ruleLibrary = "RULE_LIBRARY" diff --git a/PublicApi/Classes/OpenAPIs/Models/TrackingPlanV1.swift b/PublicApi/Classes/OpenAPIs/Models/TrackingPlanV1.swift index 961418dd..3a9d16d7 100644 --- a/PublicApi/Classes/OpenAPIs/Models/TrackingPlanV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/TrackingPlanV1.swift @@ -14,6 +14,7 @@ import AnyCodable public struct TrackingPlanV1: Codable, JSONEncodable, Hashable { public enum ModelType: String, Codable, CaseIterable { + case engage = "ENGAGE" case live = "LIVE" case propertyLibrary = "PROPERTY_LIBRARY" case ruleLibrary = "RULE_LIBRARY" diff --git a/PublicApi/Classes/OpenAPIs/Models/TraitDefinition.swift b/PublicApi/Classes/OpenAPIs/Models/TraitDefinition.swift new file mode 100644 index 00000000..607cd009 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/TraitDefinition.swift @@ -0,0 +1,42 @@ +// +// TraitDefinition.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct TraitDefinition: Codable, JSONEncodable, Hashable { + + public enum ModelType: String, Codable, CaseIterable { + case accounts = "ACCOUNTS" + case users = "USERS" + } + /** The underlying data type being aggregated for this computed trait. Possible values: users, accounts. */ + public var type: ModelType + /** The query language string defining the computed trait aggregation criteria. For guidance on using the query language, see the [Segment documentation site](https://segment.com/docs/api/public-api/query-language). */ + public var query: String + + public init(type: ModelType, query: String) { + self.type = type + self.query = query + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case query + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + try container.encode(query, forKey: .query) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/TraitOptions.swift b/PublicApi/Classes/OpenAPIs/Models/TraitOptions.swift new file mode 100644 index 00000000..f5f1e660 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/TraitOptions.swift @@ -0,0 +1,43 @@ +// +// TraitOptions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct TraitOptions: Codable, JSONEncodable, Hashable { + + /** Determines whether data prior to the computed trait being created is included when determining the computed trait value. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true. */ + public var includeHistoricalData: Bool? + /** Determines whether anonymous users should be included when determining the computed trait value. */ + public var includeAnonymousUsers: Bool? + /** If specified, the value of this field indicates the number of days, specified from the date the audience was created, that event data will be included from when determining audience membership. If unspecified, defer to the value of `includeHistoricalData` to determine whether historical data is either entirely included or entirely excluded when determining audience membership. */ + public var backfillDurationDays: Double? + + public init(includeHistoricalData: Bool? = nil, includeAnonymousUsers: Bool? = nil, backfillDurationDays: Double? = nil) { + self.includeHistoricalData = includeHistoricalData + self.includeAnonymousUsers = includeAnonymousUsers + self.backfillDurationDays = backfillDurationDays + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case includeHistoricalData + case includeAnonymousUsers + case backfillDurationDays + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(includeHistoricalData, forKey: .includeHistoricalData) + try container.encodeIfPresent(includeAnonymousUsers, forKey: .includeAnonymousUsers) + try container.encodeIfPresent(backfillDurationDays, forKey: .backfillDurationDays) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Transformation.swift b/PublicApi/Classes/OpenAPIs/Models/Transformation.swift index 328f2773..b088fafe 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Transformation.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Transformation.swift @@ -23,7 +23,7 @@ public struct Transformation: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation is enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? diff --git a/PublicApi/Classes/OpenAPIs/Models/Transformation1.swift b/PublicApi/Classes/OpenAPIs/Models/Transformation1.swift index d0a20036..0e4a04f1 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Transformation1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Transformation1.swift @@ -23,7 +23,7 @@ public struct Transformation1: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation is enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? diff --git a/PublicApi/Classes/OpenAPIs/Models/Transformation2.swift b/PublicApi/Classes/OpenAPIs/Models/Transformation2.swift index 0866f099..6f797ee9 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Transformation2.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Transformation2.swift @@ -23,7 +23,7 @@ public struct Transformation2: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation is enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? diff --git a/PublicApi/Classes/OpenAPIs/Models/Transformation3.swift b/PublicApi/Classes/OpenAPIs/Models/Transformation3.swift index b190a139..4c878bcf 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Transformation3.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Transformation3.swift @@ -23,25 +23,36 @@ public struct Transformation3: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation is enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String + /** Optional boolean value if the Transformation should drop the event entirely when the if statement matches, ignores all other transforms. */ + public var drop: Bool? /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? /** Optional array for renaming properties collected by your events. */ public var propertyRenames: [PropertyRenameV1]? /** Optional array for transforming properties and values collected by your events. Limited to 10 properties. */ public var propertyValueTransformations: [PropertyValueTransformationV1]? + /** Optional array for defining new properties in FQL. Limited to 1 property right now. */ + public var fqlDefinedProperties: [FQLDefinedPropertyV1]? + /** Optional array for allowing properties from your events. */ + public var allowProperties: [String]? + public var hashPropertiesConfiguration: HashPropertiesConfiguration? - public init(id: String, name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil) { + public init(id: String, name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, drop: Bool? = nil, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil, fqlDefinedProperties: [FQLDefinedPropertyV1]? = nil, allowProperties: [String]? = nil, hashPropertiesConfiguration: HashPropertiesConfiguration? = nil) { self.id = id self.name = name self.sourceId = sourceId self.destinationMetadataId = destinationMetadataId self.enabled = enabled self._if = _if + self.drop = drop self.newEventName = newEventName self.propertyRenames = propertyRenames self.propertyValueTransformations = propertyValueTransformations + self.fqlDefinedProperties = fqlDefinedProperties + self.allowProperties = allowProperties + self.hashPropertiesConfiguration = hashPropertiesConfiguration } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -51,9 +62,13 @@ public struct Transformation3: Codable, JSONEncodable, Hashable { case destinationMetadataId case enabled case _if = "if" + case drop case newEventName case propertyRenames case propertyValueTransformations + case fqlDefinedProperties + case allowProperties + case hashPropertiesConfiguration } // Encodable protocol methods @@ -66,9 +81,13 @@ public struct Transformation3: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(destinationMetadataId, forKey: .destinationMetadataId) try container.encode(enabled, forKey: .enabled) try container.encode(_if, forKey: ._if) + try container.encodeIfPresent(drop, forKey: .drop) try container.encodeIfPresent(newEventName, forKey: .newEventName) try container.encodeIfPresent(propertyRenames, forKey: .propertyRenames) try container.encodeIfPresent(propertyValueTransformations, forKey: .propertyValueTransformations) + try container.encodeIfPresent(fqlDefinedProperties, forKey: .fqlDefinedProperties) + try container.encodeIfPresent(allowProperties, forKey: .allowProperties) + try container.encodeIfPresent(hashPropertiesConfiguration, forKey: .hashPropertiesConfiguration) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/Transformation4.swift b/PublicApi/Classes/OpenAPIs/Models/Transformation4.swift index 2d8b89b6..0a11b238 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Transformation4.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Transformation4.swift @@ -23,25 +23,36 @@ public struct Transformation4: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation is enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String + /** Optional boolean value if the Transformation should drop the event entirely when the if statement matches, ignores all other transforms. */ + public var drop: Bool? /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? /** Optional array for renaming properties collected by your events. */ public var propertyRenames: [PropertyRenameV1]? /** Optional array for transforming properties and values collected by your events. Limited to 10 properties. */ public var propertyValueTransformations: [PropertyValueTransformationV1]? + /** Optional array for defining new properties in FQL. Limited to 1 property right now. */ + public var fqlDefinedProperties: [FQLDefinedPropertyV1]? + /** Optional array for allowing properties from your events. */ + public var allowProperties: [String]? + public var hashPropertiesConfiguration: HashPropertiesConfiguration? - public init(id: String, name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil) { + public init(id: String, name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, drop: Bool? = nil, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil, fqlDefinedProperties: [FQLDefinedPropertyV1]? = nil, allowProperties: [String]? = nil, hashPropertiesConfiguration: HashPropertiesConfiguration? = nil) { self.id = id self.name = name self.sourceId = sourceId self.destinationMetadataId = destinationMetadataId self.enabled = enabled self._if = _if + self.drop = drop self.newEventName = newEventName self.propertyRenames = propertyRenames self.propertyValueTransformations = propertyValueTransformations + self.fqlDefinedProperties = fqlDefinedProperties + self.allowProperties = allowProperties + self.hashPropertiesConfiguration = hashPropertiesConfiguration } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -51,9 +62,13 @@ public struct Transformation4: Codable, JSONEncodable, Hashable { case destinationMetadataId case enabled case _if = "if" + case drop case newEventName case propertyRenames case propertyValueTransformations + case fqlDefinedProperties + case allowProperties + case hashPropertiesConfiguration } // Encodable protocol methods @@ -66,9 +81,13 @@ public struct Transformation4: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(destinationMetadataId, forKey: .destinationMetadataId) try container.encode(enabled, forKey: .enabled) try container.encode(_if, forKey: ._if) + try container.encodeIfPresent(drop, forKey: .drop) try container.encodeIfPresent(newEventName, forKey: .newEventName) try container.encodeIfPresent(propertyRenames, forKey: .propertyRenames) try container.encodeIfPresent(propertyValueTransformations, forKey: .propertyValueTransformations) + try container.encodeIfPresent(fqlDefinedProperties, forKey: .fqlDefinedProperties) + try container.encodeIfPresent(allowProperties, forKey: .allowProperties) + try container.encodeIfPresent(hashPropertiesConfiguration, forKey: .hashPropertiesConfiguration) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/Transformation5.swift b/PublicApi/Classes/OpenAPIs/Models/Transformation5.swift index 336f0179..b7e5062f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/Transformation5.swift +++ b/PublicApi/Classes/OpenAPIs/Models/Transformation5.swift @@ -23,25 +23,36 @@ public struct Transformation5: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation is enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String + /** Optional boolean value if the Transformation should drop the event entirely when the if statement matches, ignores all other transforms. */ + public var drop: Bool? /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? /** Optional array for renaming properties collected by your events. */ public var propertyRenames: [PropertyRenameV1]? /** Optional array for transforming properties and values collected by your events. Limited to 10 properties. */ public var propertyValueTransformations: [PropertyValueTransformationV1]? + /** Optional array for defining new properties in FQL. Limited to 1 property right now. */ + public var fqlDefinedProperties: [FQLDefinedPropertyV1]? + /** Optional array for allowing properties from your events. */ + public var allowProperties: [String]? + public var hashPropertiesConfiguration: HashPropertiesConfiguration? - public init(id: String, name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil) { + public init(id: String, name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, drop: Bool? = nil, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil, fqlDefinedProperties: [FQLDefinedPropertyV1]? = nil, allowProperties: [String]? = nil, hashPropertiesConfiguration: HashPropertiesConfiguration? = nil) { self.id = id self.name = name self.sourceId = sourceId self.destinationMetadataId = destinationMetadataId self.enabled = enabled self._if = _if + self.drop = drop self.newEventName = newEventName self.propertyRenames = propertyRenames self.propertyValueTransformations = propertyValueTransformations + self.fqlDefinedProperties = fqlDefinedProperties + self.allowProperties = allowProperties + self.hashPropertiesConfiguration = hashPropertiesConfiguration } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -51,9 +62,13 @@ public struct Transformation5: Codable, JSONEncodable, Hashable { case destinationMetadataId case enabled case _if = "if" + case drop case newEventName case propertyRenames case propertyValueTransformations + case fqlDefinedProperties + case allowProperties + case hashPropertiesConfiguration } // Encodable protocol methods @@ -66,9 +81,13 @@ public struct Transformation5: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(destinationMetadataId, forKey: .destinationMetadataId) try container.encode(enabled, forKey: .enabled) try container.encode(_if, forKey: ._if) + try container.encodeIfPresent(drop, forKey: .drop) try container.encodeIfPresent(newEventName, forKey: .newEventName) try container.encodeIfPresent(propertyRenames, forKey: .propertyRenames) try container.encodeIfPresent(propertyValueTransformations, forKey: .propertyValueTransformations) + try container.encodeIfPresent(fqlDefinedProperties, forKey: .fqlDefinedProperties) + try container.encodeIfPresent(allowProperties, forKey: .allowProperties) + try container.encodeIfPresent(hashPropertiesConfiguration, forKey: .hashPropertiesConfiguration) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/TransformationBeta.swift b/PublicApi/Classes/OpenAPIs/Models/TransformationBeta.swift index 94de22cb..0cc50b5a 100644 --- a/PublicApi/Classes/OpenAPIs/Models/TransformationBeta.swift +++ b/PublicApi/Classes/OpenAPIs/Models/TransformationBeta.swift @@ -23,7 +23,7 @@ public struct TransformationBeta: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation is enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? diff --git a/PublicApi/Classes/OpenAPIs/Models/TransformationV1.swift b/PublicApi/Classes/OpenAPIs/Models/TransformationV1.swift index 782ff4b0..a525890b 100644 --- a/PublicApi/Classes/OpenAPIs/Models/TransformationV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/TransformationV1.swift @@ -23,25 +23,36 @@ public struct TransformationV1: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation is enabled. */ public var enabled: Bool - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String + /** Optional boolean value if the Transformation should drop the event entirely when the if statement matches, ignores all other transforms. */ + public var drop: Bool? /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? /** Optional array for renaming properties collected by your events. */ public var propertyRenames: [PropertyRenameV1]? /** Optional array for transforming properties and values collected by your events. Limited to 10 properties. */ public var propertyValueTransformations: [PropertyValueTransformationV1]? + /** Optional array for defining new properties in FQL. Limited to 1 property right now. */ + public var fqlDefinedProperties: [FQLDefinedPropertyV1]? + /** Optional array for allowing properties from your events. */ + public var allowProperties: [String]? + public var hashPropertiesConfiguration: HashPropertiesConfiguration? - public init(id: String, name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil) { + public init(id: String, name: String, sourceId: String, destinationMetadataId: String? = nil, enabled: Bool, _if: String, drop: Bool? = nil, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil, fqlDefinedProperties: [FQLDefinedPropertyV1]? = nil, allowProperties: [String]? = nil, hashPropertiesConfiguration: HashPropertiesConfiguration? = nil) { self.id = id self.name = name self.sourceId = sourceId self.destinationMetadataId = destinationMetadataId self.enabled = enabled self._if = _if + self.drop = drop self.newEventName = newEventName self.propertyRenames = propertyRenames self.propertyValueTransformations = propertyValueTransformations + self.fqlDefinedProperties = fqlDefinedProperties + self.allowProperties = allowProperties + self.hashPropertiesConfiguration = hashPropertiesConfiguration } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -51,9 +62,13 @@ public struct TransformationV1: Codable, JSONEncodable, Hashable { case destinationMetadataId case enabled case _if = "if" + case drop case newEventName case propertyRenames case propertyValueTransformations + case fqlDefinedProperties + case allowProperties + case hashPropertiesConfiguration } // Encodable protocol methods @@ -66,9 +81,13 @@ public struct TransformationV1: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(destinationMetadataId, forKey: .destinationMetadataId) try container.encode(enabled, forKey: .enabled) try container.encode(_if, forKey: ._if) + try container.encodeIfPresent(drop, forKey: .drop) try container.encodeIfPresent(newEventName, forKey: .newEventName) try container.encodeIfPresent(propertyRenames, forKey: .propertyRenames) try container.encodeIfPresent(propertyValueTransformations, forKey: .propertyValueTransformations) + try container.encodeIfPresent(fqlDefinedProperties, forKey: .fqlDefinedProperties) + try container.encodeIfPresent(allowProperties, forKey: .allowProperties) + try container.encodeIfPresent(hashPropertiesConfiguration, forKey: .hashPropertiesConfiguration) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateActivationForAudience200Response.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateActivationForAudience200Response.swift new file mode 100644 index 00000000..13f77f3f --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateActivationForAudience200Response.swift @@ -0,0 +1,32 @@ +// +// UpdateActivationForAudience200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateActivationForAudience200Response: Codable, JSONEncodable, Hashable { + + public var data: UpdateActivationForAudienceOutput? + + public init(data: UpdateActivationForAudienceOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateActivationForAudienceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateActivationForAudienceAlphaInput.swift new file mode 100644 index 00000000..4ca4bcf4 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateActivationForAudienceAlphaInput.swift @@ -0,0 +1,52 @@ +// +// UpdateActivationForAudienceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to update an activation. */ +public struct UpdateActivationForAudienceAlphaInput: Codable, JSONEncodable, Hashable { + + /** Determines whether an activation is enabled. */ + public var enabled: Bool? + /** Activation name. */ + public var activationName: String? + public var personalization: Personalization? + public var destinationMapping: DestinationMapping? + /** Whether to perform a resync after creation of the activation. */ + public var performResync: Bool? + + public init(enabled: Bool? = nil, activationName: String? = nil, personalization: Personalization? = nil, destinationMapping: DestinationMapping? = nil, performResync: Bool? = nil) { + self.enabled = enabled + self.activationName = activationName + self.personalization = personalization + self.destinationMapping = destinationMapping + self.performResync = performResync + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enabled + case activationName + case personalization + case destinationMapping + case performResync + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(activationName, forKey: .activationName) + try container.encodeIfPresent(personalization, forKey: .personalization) + try container.encodeIfPresent(destinationMapping, forKey: .destinationMapping) + try container.encodeIfPresent(performResync, forKey: .performResync) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateActivationForAudienceOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateActivationForAudienceOutput.swift new file mode 100644 index 00000000..d4bd5298 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateActivationForAudienceOutput.swift @@ -0,0 +1,33 @@ +// +// UpdateActivationForAudienceOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for updating an activation for audience. */ +public struct UpdateActivationForAudienceOutput: Codable, JSONEncodable, Hashable { + + public var activation: Activation + + public init(activation: Activation) { + self.activation = activation + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case activation + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(activation, forKey: .activation) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpace200Response.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpace200Response.swift new file mode 100644 index 00000000..cd28a3fe --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpace200Response.swift @@ -0,0 +1,32 @@ +// +// UpdateAudienceForSpace200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateAudienceForSpace200Response: Codable, JSONEncodable, Hashable { + + public var data: UpdateAudienceForSpaceBetaOutput? + + public init(data: UpdateAudienceForSpaceBetaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpace200Response1.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpace200Response1.swift new file mode 100644 index 00000000..3a6e5ca7 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpace200Response1.swift @@ -0,0 +1,32 @@ +// +// UpdateAudienceForSpace200Response1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateAudienceForSpace200Response1: Codable, JSONEncodable, Hashable { + + public var data: UpdateAudienceForSpaceAlphaOutput? + + public init(data: UpdateAudienceForSpaceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceAlphaInput.swift new file mode 100644 index 00000000..67effd1b --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceAlphaInput.swift @@ -0,0 +1,48 @@ +// +// UpdateAudienceForSpaceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to update an audience. */ +public struct UpdateAudienceForSpaceAlphaInput: Codable, JSONEncodable, Hashable { + + /** Enabled/disabled status for the audience. */ + public var enabled: Bool? + /** The name of the computation. */ + public var name: String? + /** The description of the computation. */ + public var description: String? + public var definition: Definition1? + + public init(enabled: Bool? = nil, name: String? = nil, description: String? = nil, definition: Definition1? = nil) { + self.enabled = enabled + self.name = name + self.description = description + self.definition = definition + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enabled + case name + case description + case definition + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(definition, forKey: .definition) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceAlphaOutput.swift new file mode 100644 index 00000000..ea6c65ff --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// UpdateAudienceForSpaceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Audience output for update. */ +public struct UpdateAudienceForSpaceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var audience: Audience + + public init(audience: Audience) { + self.audience = audience + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audience + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audience, forKey: .audience) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceBetaInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceBetaInput.swift new file mode 100644 index 00000000..cfc058d9 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceBetaInput.swift @@ -0,0 +1,52 @@ +// +// UpdateAudienceForSpaceBetaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to update an audience. */ +public struct UpdateAudienceForSpaceBetaInput: Codable, JSONEncodable, Hashable { + + /** Enabled/disabled status for the audience. */ + public var enabled: Bool? + /** The name of the computation. */ + public var name: String? + /** The description of the computation. */ + public var description: String? + public var definition: Definition3? + public var options: Options? + + public init(enabled: Bool? = nil, name: String? = nil, description: String? = nil, definition: Definition3? = nil, options: Options? = nil) { + self.enabled = enabled + self.name = name + self.description = description + self.definition = definition + self.options = options + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enabled + case name + case description + case definition + case options + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(definition, forKey: .definition) + try container.encodeIfPresent(options, forKey: .options) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceBetaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceBetaOutput.swift new file mode 100644 index 00000000..3c02c491 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceForSpaceBetaOutput.swift @@ -0,0 +1,33 @@ +// +// UpdateAudienceForSpaceBetaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Audience output for update. */ +public struct UpdateAudienceForSpaceBetaOutput: Codable, JSONEncodable, Hashable { + + public var audience: Audience + + public init(audience: Audience) { + self.audience = audience + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audience + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audience, forKey: .audience) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/GenerateUploadURLForEdgeFunctions200Response.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceScheduleForAudience200Response.swift similarity index 68% rename from PublicApi/Classes/OpenAPIs/Models/GenerateUploadURLForEdgeFunctions200Response.swift rename to PublicApi/Classes/OpenAPIs/Models/UpdateAudienceScheduleForAudience200Response.swift index eb0681f6..0e6e09c0 100644 --- a/PublicApi/Classes/OpenAPIs/Models/GenerateUploadURLForEdgeFunctions200Response.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceScheduleForAudience200Response.swift @@ -1,5 +1,5 @@ // -// GenerateUploadURLForEdgeFunctions200Response.swift +// UpdateAudienceScheduleForAudience200Response.swift // // Generated by openapi-generator // https://openapi-generator.tech @@ -10,11 +10,11 @@ import Foundation import AnyCodable #endif -public struct GenerateUploadURLForEdgeFunctions200Response: Codable, JSONEncodable, Hashable { +public struct UpdateAudienceScheduleForAudience200Response: Codable, JSONEncodable, Hashable { - public var data: GenerateUploadURLForEdgeFunctionsAlphaOutput? + public var data: UpdateAudienceScheduleForAudienceAlphaOutput? - public init(data: GenerateUploadURLForEdgeFunctionsAlphaOutput? = nil) { + public init(data: UpdateAudienceScheduleForAudienceAlphaOutput? = nil) { self.data = data } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceScheduleForAudienceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceScheduleForAudienceAlphaInput.swift new file mode 100644 index 00000000..8f59e8e4 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceScheduleForAudienceAlphaInput.swift @@ -0,0 +1,42 @@ +// +// UpdateAudienceScheduleForAudienceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input for updating a schedule on an audience. */ +public struct UpdateAudienceScheduleForAudienceAlphaInput: Codable, JSONEncodable, Hashable { + + public enum Strategy: String, Codable, CaseIterable { + case periodic = "PERIODIC" + case specificDays = "SPECIFIC_DAYS" + } + /** Strategy of the audience schedule (periodic or specific days). */ + public var strategy: Strategy + public var config: Config? + + public init(strategy: Strategy, config: Config?) { + self.strategy = strategy + self.config = config + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case strategy + case config + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(strategy, forKey: .strategy) + try container.encode(config, forKey: .config) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceScheduleForAudienceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceScheduleForAudienceAlphaOutput.swift new file mode 100644 index 00000000..5d477b9a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateAudienceScheduleForAudienceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// UpdateAudienceScheduleForAudienceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output of updating a schedule for an audience. */ +public struct UpdateAudienceScheduleForAudienceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var audienceSchedule: AudienceSchedule1 + + public init(audienceSchedule: AudienceSchedule1) { + self.audienceSchedule = audienceSchedule + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case audienceSchedule + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(audienceSchedule, forKey: .audienceSchedule) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateComputedTraitForSpace200Response.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateComputedTraitForSpace200Response.swift new file mode 100644 index 00000000..c35aa2ba --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateComputedTraitForSpace200Response.swift @@ -0,0 +1,32 @@ +// +// UpdateComputedTraitForSpace200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateComputedTraitForSpace200Response: Codable, JSONEncodable, Hashable { + + public var data: UpdateComputedTraitForSpaceAlphaOutput? + + public init(data: UpdateComputedTraitForSpaceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateComputedTraitForSpaceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateComputedTraitForSpaceAlphaInput.swift new file mode 100644 index 00000000..a541412f --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateComputedTraitForSpaceAlphaInput.swift @@ -0,0 +1,48 @@ +// +// UpdateComputedTraitForSpaceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input to update a computed trait. */ +public struct UpdateComputedTraitForSpaceAlphaInput: Codable, JSONEncodable, Hashable { + + /** Enabled/disabled status for the computed trait. */ + public var enabled: Bool? + /** The name of the computation. */ + public var name: String? + /** The description of the computation. */ + public var description: String? + public var definition: Definition8? + + public init(enabled: Bool? = nil, name: String? = nil, description: String? = nil, definition: Definition8? = nil) { + self.enabled = enabled + self.name = name + self.description = description + self.definition = definition + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enabled + case name + case description + case definition + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(definition, forKey: .definition) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateComputedTraitForSpaceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateComputedTraitForSpaceAlphaOutput.swift new file mode 100644 index 00000000..a32c447a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateComputedTraitForSpaceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// UpdateComputedTraitForSpaceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Computed Trait output for get and update. */ +public struct UpdateComputedTraitForSpaceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var computedTrait: ComputedTrait + + public init(computedTrait: ComputedTrait) { + self.computedTrait = computedTrait + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case computedTrait + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(computedTrait, forKey: .computedTrait) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateDestinationV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateDestinationV1Output.swift index 22bdbe4e..92e24a38 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpdateDestinationV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateDestinationV1Output.swift @@ -13,9 +13,9 @@ import AnyCodable /** Returns the updated Destination. */ public struct UpdateDestinationV1Output: Codable, JSONEncodable, Hashable { - public var destination: Destination1 + public var destination: Destination2 - public init(destination: Destination1) { + public init(destination: Destination2) { self.destination = destination } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateFilterById200Response.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateFilterById200Response.swift new file mode 100644 index 00000000..c989a489 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateFilterById200Response.swift @@ -0,0 +1,32 @@ +// +// UpdateFilterById200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateFilterById200Response: Codable, JSONEncodable, Hashable { + + public var data: UpdateFilterByIdOutput? + + public init(data: UpdateFilterByIdOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateFilterByIdInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateFilterByIdInput.swift new file mode 100644 index 00000000..1587e0b5 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateFilterByIdInput.swift @@ -0,0 +1,59 @@ +// +// UpdateFilterByIdInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Input for UpdateFilterById. */ +public struct UpdateFilterByIdInput: Codable, JSONEncodable, Hashable { + + /** The Integration id of the resource. */ + public var integrationId: String + /** Whether the filter is enabled. */ + public var enabled: Bool? + /** The name of the filter. */ + public var name: String? + /** The description of the filter. */ + public var description: String? + /** The \"if\" statement for a filter. */ + public var _if: String? + /** Whether the event is dropped. */ + public var drop: Bool? + + public init(integrationId: String, enabled: Bool? = nil, name: String? = nil, description: String? = nil, _if: String? = nil, drop: Bool? = nil) { + self.integrationId = integrationId + self.enabled = enabled + self.name = name + self.description = description + self._if = _if + self.drop = drop + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case integrationId + case enabled + case name + case description + case _if = "if" + case drop + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(integrationId, forKey: .integrationId) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(_if, forKey: ._if) + try container.encodeIfPresent(drop, forKey: .drop) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateFilterByIdOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateFilterByIdOutput.swift new file mode 100644 index 00000000..b46aa13e --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateFilterByIdOutput.swift @@ -0,0 +1,33 @@ +// +// UpdateFilterByIdOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Output for UpdateFilterById. */ +public struct UpdateFilterByIdOutput: Codable, JSONEncodable, Hashable { + + public var filter: Filter4 + + public init(filter: Filter4) { + self.filter = filter + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case filter + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(filter, forKey: .filter) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateGroupSubscriptionStatusResponse.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateGroupSubscriptionStatusResponse.swift new file mode 100644 index 00000000..58b518ae --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateGroupSubscriptionStatusResponse.swift @@ -0,0 +1,48 @@ +// +// UpdateGroupSubscriptionStatusResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateGroupSubscriptionStatusResponse: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case didNotSubscribe = "DID_NOT_SUBSCRIBE" + case subscribed = "SUBSCRIBED" + case unsubscribed = "UNSUBSCRIBED" + } + /** Name of the group. */ + public var name: String + /** The user subscribed, unsubscribed, or on initial status. */ + public var status: Status + /** The group id. */ + public var id: String + + public init(name: String, status: Status, id: String) { + self.name = name + self.status = status + self.id = id + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case status + case id + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encode(status, forKey: .status) + try container.encode(id, forKey: .id) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateInsertFunctionInstance200Response.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateInsertFunctionInstance200Response.swift new file mode 100644 index 00000000..3cddb962 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateInsertFunctionInstance200Response.swift @@ -0,0 +1,32 @@ +// +// UpdateInsertFunctionInstance200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateInsertFunctionInstance200Response: Codable, JSONEncodable, Hashable { + + public var data: UpdateInsertFunctionInstanceAlphaOutput? + + public init(data: UpdateInsertFunctionInstanceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateInsertFunctionInstanceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateInsertFunctionInstanceAlphaInput.swift new file mode 100644 index 00000000..e1efd3e1 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateInsertFunctionInstanceAlphaInput.swift @@ -0,0 +1,44 @@ +// +// UpdateInsertFunctionInstanceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Updates an insert Function instance. */ +public struct UpdateInsertFunctionInstanceAlphaInput: Codable, JSONEncodable, Hashable { + + /** Whether this insert Function instance should be enabled for the Destination. */ + public var enabled: Bool? + /** Defines the display name of the insert Function instance. */ + public var name: String? + /** An object that contains settings for this insert Function instance based on the settings present in the insert Function class. */ + public var settings: [String: AnyCodable] + + public init(enabled: Bool? = nil, name: String? = nil, settings: [String: AnyCodable]) { + self.enabled = enabled + self.name = name + self.settings = settings + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enabled + case name + case settings + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(name, forKey: .name) + try container.encode(settings, forKey: .settings) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateInsertFunctionInstanceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateInsertFunctionInstanceAlphaOutput.swift new file mode 100644 index 00000000..cc85373f --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateInsertFunctionInstanceAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// UpdateInsertFunctionInstanceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns the updated insert Function instance. */ +public struct UpdateInsertFunctionInstanceAlphaOutput: Codable, JSONEncodable, Hashable { + + public var insertFunctionInstance: InsertFunctionInstance1 + + public init(insertFunctionInstance: InsertFunctionInstance1) { + self.insertFunctionInstance = insertFunctionInstance + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case insertFunctionInstance + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(insertFunctionInstance, forKey: .insertFunctionInstance) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateProfilesWarehouseForSpaceWarehouse200Response.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateProfilesWarehouseForSpaceWarehouse200Response.swift new file mode 100644 index 00000000..05df2d6f --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateProfilesWarehouseForSpaceWarehouse200Response.swift @@ -0,0 +1,32 @@ +// +// UpdateProfilesWarehouseForSpaceWarehouse200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateProfilesWarehouseForSpaceWarehouse200Response: Codable, JSONEncodable, Hashable { + + public var data: UpdateProfilesWarehouseForSpaceWarehouseAlphaOutput? + + public init(data: UpdateProfilesWarehouseForSpaceWarehouseAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateProfilesWarehouseForSpaceWarehouseAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateProfilesWarehouseForSpaceWarehouseAlphaInput.swift new file mode 100644 index 00000000..5026a4f6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateProfilesWarehouseForSpaceWarehouseAlphaInput.swift @@ -0,0 +1,49 @@ +// +// UpdateProfilesWarehouseForSpaceWarehouseAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Updates a Profiles Warehouse based on a set of parameters. */ +public struct UpdateProfilesWarehouseForSpaceWarehouseAlphaInput: Codable, JSONEncodable, Hashable { + + /** An optional human-readable name for this Warehouse. */ + public var name: String? + /** Enable to allow this Warehouse to receive data. Defaults to true. */ + public var enabled: Bool? + /** A key-value object that contains instance-specific settings for a Warehouse. Different kinds of Warehouses require different settings. The required and optional settings for a Warehouse are described in the `options` object of the associated Warehouse metadata. You can find the full list of Warehouse metadata and related settings information in the `/catalog/warehouses` endpoint. */ + public var settings: JSON? + /** The custom schema name that Segment uses on the Warehouse side. The space slug value is default otherwise. */ + public var schemaName: String? + + public init(name: String? = nil, enabled: Bool? = nil, settings: JSON?, schemaName: String? = nil) { + self.name = name + self.enabled = enabled + self.settings = settings + self.schemaName = schemaName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case enabled + case settings + case schemaName + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encode(settings, forKey: .settings) + try container.encodeIfPresent(schemaName, forKey: .schemaName) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateProfilesWarehouseForSpaceWarehouseAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateProfilesWarehouseForSpaceWarehouseAlphaOutput.swift new file mode 100644 index 00000000..16368fbf --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateProfilesWarehouseForSpaceWarehouseAlphaOutput.swift @@ -0,0 +1,33 @@ +// +// UpdateProfilesWarehouseForSpaceWarehouseAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns the updated Warehouse. */ +public struct UpdateProfilesWarehouseForSpaceWarehouseAlphaOutput: Codable, JSONEncodable, Hashable { + + public var profilesWarehouse: ProfilesWarehouse1 + + public init(profilesWarehouse: ProfilesWarehouse1) { + self.profilesWarehouse = profilesWarehouse + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case profilesWarehouse + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(profilesWarehouse, forKey: .profilesWarehouse) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateReverseEtlModel200Response.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateReverseEtlModel200Response.swift new file mode 100644 index 00000000..98f6e4c0 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateReverseEtlModel200Response.swift @@ -0,0 +1,32 @@ +// +// UpdateReverseEtlModel200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateReverseEtlModel200Response: Codable, JSONEncodable, Hashable { + + public var data: UpdateReverseEtlModelOutput? + + public init(data: UpdateReverseEtlModelOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateReverseEtlModelInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateReverseEtlModelInput.swift new file mode 100644 index 00000000..b60e8b55 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateReverseEtlModelInput.swift @@ -0,0 +1,54 @@ +// +// UpdateReverseEtlModelInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines how to update an existing Model. */ +public struct UpdateReverseEtlModelInput: Codable, JSONEncodable, Hashable { + + /** A short, human-readable description of the Model. */ + public var name: String? + /** A longer, more descriptive explanation of the Model. */ + public var description: String? + /** Indicates whether the Model should have syncs enabled. When disabled, no syncs will be triggered, regardless of the enabled status of the attached destinations/subscriptions. */ + public var enabled: Bool? + /** The SQL query that will be executed to extract data from the connected Source. */ + public var query: String? + /** Indicates the column named in `query` that should be used to uniquely identify the extracted records. */ + public var queryIdentifierColumn: String? + + public init(name: String? = nil, description: String? = nil, enabled: Bool? = nil, query: String? = nil, queryIdentifierColumn: String? = nil) { + self.name = name + self.description = description + self.enabled = enabled + self.query = query + self.queryIdentifierColumn = queryIdentifierColumn + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case description + case enabled + case query + case queryIdentifierColumn + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(enabled, forKey: .enabled) + try container.encodeIfPresent(query, forKey: .query) + try container.encodeIfPresent(queryIdentifierColumn, forKey: .queryIdentifierColumn) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateReverseEtlModelOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateReverseEtlModelOutput.swift new file mode 100644 index 00000000..0a61f7aa --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateReverseEtlModelOutput.swift @@ -0,0 +1,33 @@ +// +// UpdateReverseEtlModelOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Defines the results of updating a Model. */ +public struct UpdateReverseEtlModelOutput: Codable, JSONEncodable, Hashable { + + public var reverseEtlModel: ReverseEtlModel + + public init(reverseEtlModel: ReverseEtlModel) { + self.reverseEtlModel = reverseEtlModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case reverseEtlModel + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(reverseEtlModel, forKey: .reverseEtlModel) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateRulesInTrackingPlanV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateRulesInTrackingPlanV1Input.swift index e8f09a51..d5e6f652 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpdateRulesInTrackingPlanV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateRulesInTrackingPlanV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct UpdateRulesInTrackingPlanV1Input: Codable, JSONEncodable, Hashable { /** Rules to update or insert. */ - public var rules: [UpsertRuleV1]? + public var rules: [UpsertRuleV1] - public init(rules: [UpsertRuleV1]? = nil) { + public init(rules: [UpsertRuleV1]) { self.rules = rules } @@ -28,7 +28,7 @@ public struct UpdateRulesInTrackingPlanV1Input: Codable, JSONEncodable, Hashable public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(rules, forKey: .rules) + try container.encode(rules, forKey: .rules) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseAndSpace200Response.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseAndSpace200Response.swift new file mode 100644 index 00000000..07e12c0a --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseAndSpace200Response.swift @@ -0,0 +1,32 @@ +// +// UpdateSelectiveSyncForWarehouseAndSpace200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UpdateSelectiveSyncForWarehouseAndSpace200Response: Codable, JSONEncodable, Hashable { + + public var data: UpdateSelectiveSyncForWarehouseAndSpaceAlphaOutput? + + public init(data: UpdateSelectiveSyncForWarehouseAndSpaceAlphaOutput? = nil) { + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseAndSpaceAlphaInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseAndSpaceAlphaInput.swift new file mode 100644 index 00000000..e6c32434 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseAndSpaceAlphaInput.swift @@ -0,0 +1,39 @@ +// +// UpdateSelectiveSyncForWarehouseAndSpaceAlphaInput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Updates the schema for a Space Warehouse connection. */ +public struct UpdateSelectiveSyncForWarehouseAndSpaceAlphaInput: Codable, JSONEncodable, Hashable { + + /** A list of sync Schema overrides to apply to this Space Warehouse. Note: Selective Sync is not supported if the enableEventTables flag is false. */ + public var syncOverrides: [SpaceWarehouseSchemaOverride]? + /** A flag to enable or disable all event Tables. This field is optional. */ + public var enableEventTables: Bool? + + public init(syncOverrides: [SpaceWarehouseSchemaOverride]? = nil, enableEventTables: Bool? = nil) { + self.syncOverrides = syncOverrides + self.enableEventTables = enableEventTables + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case syncOverrides + case enableEventTables + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(syncOverrides, forKey: .syncOverrides) + try container.encodeIfPresent(enableEventTables, forKey: .enableEventTables) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseAndSpaceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseAndSpaceAlphaOutput.swift new file mode 100644 index 00000000..a1542bb6 --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseAndSpaceAlphaOutput.swift @@ -0,0 +1,38 @@ +// +// UpdateSelectiveSyncForWarehouseAndSpaceAlphaOutput.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Results from a SelectiveSync patch to a Space Warehouse connection. */ +public struct UpdateSelectiveSyncForWarehouseAndSpaceAlphaOutput: Codable, JSONEncodable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case unchanged = "UNCHANGED" + case updated = "UPDATED" + } + /** Status of the update operation. */ + public var status: Status + + public init(status: Status) { + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(status, forKey: .status) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseV1Input.swift index 8ee4a700..387cc530 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateSelectiveSyncForWarehouseV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct UpdateSelectiveSyncForWarehouseV1Input: Codable, JSONEncodable, Hashable { /** A list of sync schema overrides to apply to this Warehouse. */ - public var syncOverrides: [WarehouseSyncOverrideV1]? + public var syncOverrides: [WarehouseSyncOverrideV1] - public init(syncOverrides: [WarehouseSyncOverrideV1]? = nil) { + public init(syncOverrides: [WarehouseSyncOverrideV1]) { self.syncOverrides = syncOverrides } @@ -28,7 +28,7 @@ public struct UpdateSelectiveSyncForWarehouseV1Input: Codable, JSONEncodable, Ha public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(syncOverrides, forKey: .syncOverrides) + try container.encode(syncOverrides, forKey: .syncOverrides) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateSourceAlphaOutput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateSourceAlphaOutput.swift index 82c225f1..e8a28393 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpdateSourceAlphaOutput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateSourceAlphaOutput.swift @@ -13,9 +13,9 @@ import AnyCodable /** Returns the updated Source. */ public struct UpdateSourceAlphaOutput: Codable, JSONEncodable, Hashable { - public var source: Source3 + public var source: Source4 - public init(source: Source3) { + public init(source: Source4) { self.source = source } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateSourceV1Output.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateSourceV1Output.swift index d62ed062..53c9954e 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpdateSourceV1Output.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateSourceV1Output.swift @@ -13,9 +13,9 @@ import AnyCodable /** Returns the updated Source. */ public struct UpdateSourceV1Output: Codable, JSONEncodable, Hashable { - public var source: Source6 + public var source: Source7 - public init(source: Source6) { + public init(source: Source7) { self.source = source } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateTransformationBetaInput.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateTransformationBetaInput.swift index afae511e..6e6c6805 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpdateTransformationBetaInput.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateTransformationBetaInput.swift @@ -23,7 +23,7 @@ public struct UpdateTransformationBetaInput: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation should be enabled. */ public var enabled: Bool? - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String? /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateTransformationV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateTransformationV1Input.swift index 3e6967f5..5673ca7f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpdateTransformationV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateTransformationV1Input.swift @@ -21,24 +21,35 @@ public struct UpdateTransformationV1Input: Codable, JSONEncodable, Hashable { public var destinationMetadataId: String? /** If the Transformation should be enabled. */ public var enabled: Bool? - /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ + /** If statement ([FQL](https://segment.com/docs/config-api/fql/)) to match events. For standard event matchers, use the following: Track -\\> \"event='\\'\" Identify -\\> \"type='identify'\" Group -\\> \"type='group'\" */ public var _if: String? + /** Optional boolean value if the Transformation should drop the event entirely when the if statement matches, ignores all other transforms. */ + public var drop: Bool? /** Optional new event name for renaming events. Works only for 'track' event type. */ public var newEventName: String? /** Optional array for renaming properties collected by your events. */ public var propertyRenames: [PropertyRenameV1]? /** Optional array for transforming properties and values collected by your events. Limited to 10 properties. */ public var propertyValueTransformations: [PropertyValueTransformationV1]? + /** Optional array for updating properties defined in [FQL](https://segment.com/docs/config-api/fql/). Currently limited to 1 property. */ + public var fqlDefinedProperties: [FQLDefinedPropertyV1]? + /** Optional array for allowing properties from your events. */ + public var allowProperties: [String]? + public var hashPropertiesConfiguration: HashPropertiesConfiguration? - public init(name: String? = nil, sourceId: String? = nil, destinationMetadataId: String? = nil, enabled: Bool? = nil, _if: String? = nil, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil) { + public init(name: String? = nil, sourceId: String? = nil, destinationMetadataId: String? = nil, enabled: Bool? = nil, _if: String? = nil, drop: Bool? = nil, newEventName: String? = nil, propertyRenames: [PropertyRenameV1]? = nil, propertyValueTransformations: [PropertyValueTransformationV1]? = nil, fqlDefinedProperties: [FQLDefinedPropertyV1]? = nil, allowProperties: [String]? = nil, hashPropertiesConfiguration: HashPropertiesConfiguration? = nil) { self.name = name self.sourceId = sourceId self.destinationMetadataId = destinationMetadataId self.enabled = enabled self._if = _if + self.drop = drop self.newEventName = newEventName self.propertyRenames = propertyRenames self.propertyValueTransformations = propertyValueTransformations + self.fqlDefinedProperties = fqlDefinedProperties + self.allowProperties = allowProperties + self.hashPropertiesConfiguration = hashPropertiesConfiguration } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -47,9 +58,13 @@ public struct UpdateTransformationV1Input: Codable, JSONEncodable, Hashable { case destinationMetadataId case enabled case _if = "if" + case drop case newEventName case propertyRenames case propertyValueTransformations + case fqlDefinedProperties + case allowProperties + case hashPropertiesConfiguration } // Encodable protocol methods @@ -61,9 +76,13 @@ public struct UpdateTransformationV1Input: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(destinationMetadataId, forKey: .destinationMetadataId) try container.encodeIfPresent(enabled, forKey: .enabled) try container.encodeIfPresent(_if, forKey: ._if) + try container.encodeIfPresent(drop, forKey: .drop) try container.encodeIfPresent(newEventName, forKey: .newEventName) try container.encodeIfPresent(propertyRenames, forKey: .propertyRenames) try container.encodeIfPresent(propertyValueTransformations, forKey: .propertyValueTransformations) + try container.encodeIfPresent(fqlDefinedProperties, forKey: .fqlDefinedProperties) + try container.encodeIfPresent(allowProperties, forKey: .allowProperties) + try container.encodeIfPresent(hashPropertiesConfiguration, forKey: .hashPropertiesConfiguration) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateUserGroupV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateUserGroupV1Input.swift index 651d7b46..d9b2a271 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpdateUserGroupV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateUserGroupV1Input.swift @@ -14,9 +14,9 @@ import AnyCodable public struct UpdateUserGroupV1Input: Codable, JSONEncodable, Hashable { /** The intended value to rename the user group to. */ - public var name: String? + public var name: String - public init(name: String? = nil) { + public init(name: String) { self.name = name } @@ -28,7 +28,7 @@ public struct UpdateUserGroupV1Input: Codable, JSONEncodable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) + try container.encode(name, forKey: .name) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpdateWarehouseV1Input.swift b/PublicApi/Classes/OpenAPIs/Models/UpdateWarehouseV1Input.swift index 3dfab29a..0b1b2032 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpdateWarehouseV1Input.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpdateWarehouseV1Input.swift @@ -20,7 +20,7 @@ public struct UpdateWarehouseV1Input: Codable, JSONEncodable, Hashable { /** A key-value object that contains instance-specific settings for a Warehouse. Different kinds of Warehouses require different settings. The required and optional settings for a Warehouse are described in the `options` object of the associated Warehouse metadata. You can find the full list of Warehouse metadata and related settings information in the `/catalog/warehouses` endpoint. */ public var settings: JSON? - public init(name: String? = nil, enabled: Bool? = nil, settings: JSON? = nil) { + public init(name: String? = nil, enabled: Bool? = nil, settings: JSON?) { self.name = name self.enabled = enabled self.settings = settings @@ -38,7 +38,7 @@ public struct UpdateWarehouseV1Input: Codable, JSONEncodable, Hashable { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent(name, forKey: .name) try container.encodeIfPresent(enabled, forKey: .enabled) - try container.encodeIfPresent(settings, forKey: .settings) + try container.encode(settings, forKey: .settings) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/UpsertRuleV1.swift b/PublicApi/Classes/OpenAPIs/Models/UpsertRuleV1.swift index e796642f..11302308 100644 --- a/PublicApi/Classes/OpenAPIs/Models/UpsertRuleV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/UpsertRuleV1.swift @@ -30,22 +30,13 @@ public struct UpsertRuleV1: Codable, JSONEncodable, Hashable { public var jsonSchema: AnyCodable? /** Version of this rule. */ public var version: Double - /** The timestamp of this rule's creation. */ - public var createdAt: String? - /** The timestamp of this rule's last change. */ - public var updatedAt: String? - /** The timestamp of this rule's deprecation. */ - public var deprecatedAt: String? - public init(newKey: String? = nil, type: ModelType, key: String? = nil, jsonSchema: AnyCodable?, version: Double, createdAt: String? = nil, updatedAt: String? = nil, deprecatedAt: String? = nil) { + public init(newKey: String? = nil, type: ModelType, key: String? = nil, jsonSchema: AnyCodable?, version: Double) { self.newKey = newKey self.type = type self.key = key self.jsonSchema = jsonSchema self.version = version - self.createdAt = createdAt - self.updatedAt = updatedAt - self.deprecatedAt = deprecatedAt } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -54,9 +45,6 @@ public struct UpsertRuleV1: Codable, JSONEncodable, Hashable { case key case jsonSchema case version - case createdAt - case updatedAt - case deprecatedAt } // Encodable protocol methods @@ -68,9 +56,6 @@ public struct UpsertRuleV1: Codable, JSONEncodable, Hashable { try container.encodeIfPresent(key, forKey: .key) try container.encode(jsonSchema, forKey: .jsonSchema) try container.encode(version, forKey: .version) - try container.encodeIfPresent(createdAt, forKey: .createdAt) - try container.encodeIfPresent(updatedAt, forKey: .updatedAt) - try container.encodeIfPresent(deprecatedAt, forKey: .deprecatedAt) } } diff --git a/PublicApi/Classes/OpenAPIs/Models/Version.swift b/PublicApi/Classes/OpenAPIs/Models/Version.swift new file mode 100644 index 00000000..506050be --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Version.swift @@ -0,0 +1,64 @@ +// +// Version.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Functions version. */ +public struct Version: Codable, JSONEncodable, Hashable { + + /** An identifier for this version. */ + public var id: String + /** Author of this version. */ + public var author: String? + /** Source code of this version. */ + public var code: String + /** The deployed status of this version. */ + public var isDeployed: Bool? + /** The time of this Version's creation. */ + public var createdAt: String? + /** The time of this Version's latest update. */ + public var updatedAt: String? + /** The time of this Version's last deployment. */ + public var deployedAt: String? + + public init(id: String, author: String? = nil, code: String, isDeployed: Bool? = nil, createdAt: String? = nil, updatedAt: String? = nil, deployedAt: String? = nil) { + self.id = id + self.author = author + self.code = code + self.isDeployed = isDeployed + self.createdAt = createdAt + self.updatedAt = updatedAt + self.deployedAt = deployedAt + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case author + case code + case isDeployed + case createdAt + case updatedAt + case deployedAt + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(author, forKey: .author) + try container.encode(code, forKey: .code) + try container.encodeIfPresent(isDeployed, forKey: .isDeployed) + try container.encodeIfPresent(createdAt, forKey: .createdAt) + try container.encodeIfPresent(updatedAt, forKey: .updatedAt) + try container.encodeIfPresent(deployedAt, forKey: .deployedAt) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/Version1.swift b/PublicApi/Classes/OpenAPIs/Models/Version1.swift new file mode 100644 index 00000000..2374f11c --- /dev/null +++ b/PublicApi/Classes/OpenAPIs/Models/Version1.swift @@ -0,0 +1,64 @@ +// +// Version1.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Restored version. */ +public struct Version1: Codable, JSONEncodable, Hashable { + + /** An identifier for this version. */ + public var id: String + /** Author of this version. */ + public var author: String? + /** Source code of this version. */ + public var code: String + /** The deployed status of this version. */ + public var isDeployed: Bool? + /** The time of this Version's creation. */ + public var createdAt: String? + /** The time of this Version's latest update. */ + public var updatedAt: String? + /** The time of this Version's last deployment. */ + public var deployedAt: String? + + public init(id: String, author: String? = nil, code: String, isDeployed: Bool? = nil, createdAt: String? = nil, updatedAt: String? = nil, deployedAt: String? = nil) { + self.id = id + self.author = author + self.code = code + self.isDeployed = isDeployed + self.createdAt = createdAt + self.updatedAt = updatedAt + self.deployedAt = deployedAt + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case author + case code + case isDeployed + case createdAt + case updatedAt + case deployedAt + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(author, forKey: .author) + try container.encode(code, forKey: .code) + try container.encodeIfPresent(isDeployed, forKey: .isDeployed) + try container.encodeIfPresent(createdAt, forKey: .createdAt) + try container.encodeIfPresent(updatedAt, forKey: .updatedAt) + try container.encodeIfPresent(deployedAt, forKey: .deployedAt) + } +} + diff --git a/PublicApi/Classes/OpenAPIs/Models/WarehouseSelectiveSyncItemV1.swift b/PublicApi/Classes/OpenAPIs/Models/WarehouseSelectiveSyncItemV1.swift index d77064fe..a8318e2f 100644 --- a/PublicApi/Classes/OpenAPIs/Models/WarehouseSelectiveSyncItemV1.swift +++ b/PublicApi/Classes/OpenAPIs/Models/WarehouseSelectiveSyncItemV1.swift @@ -19,13 +19,16 @@ public struct WarehouseSelectiveSyncItemV1: Codable, JSONEncodable, Hashable { public var collection: String /** The id of the Warehouse this sync belongs to. */ public var warehouseId: String + /** Whether this Selective Sync item is enabled. */ + public var enabled: Bool /** A map that contains the properties within the collection to which the Warehouse should sync. */ public var properties: [String: AnyCodable] - public init(sourceId: String, collection: String, warehouseId: String, properties: [String: AnyCodable]) { + public init(sourceId: String, collection: String, warehouseId: String, enabled: Bool, properties: [String: AnyCodable]) { self.sourceId = sourceId self.collection = collection self.warehouseId = warehouseId + self.enabled = enabled self.properties = properties } @@ -33,6 +36,7 @@ public struct WarehouseSelectiveSyncItemV1: Codable, JSONEncodable, Hashable { case sourceId case collection case warehouseId + case enabled case properties } @@ -43,6 +47,7 @@ public struct WarehouseSelectiveSyncItemV1: Codable, JSONEncodable, Hashable { try container.encode(sourceId, forKey: .sourceId) try container.encode(collection, forKey: .collection) try container.encode(warehouseId, forKey: .warehouseId) + try container.encode(enabled, forKey: .enabled) try container.encode(properties, forKey: .properties) } } diff --git a/README.md b/README.md index 7b4db3da..486d2a9e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Segment Public API Swift SDK -> :warning: **Note**: This SDK is currently released as [Public Beta](https://segment.com/legal/first-access-beta-preview/). Its use in critical systems is discouraged, but [feedback is welcome](#contributing). +:warning: This SDK is currently released as [Public Beta](https://segment.com/legal/first-access-beta-preview/). Its use in critical systems is discouraged, but [feedback is welcome](#contributing). ## Overview @@ -10,7 +10,7 @@ All endpoints in the API follow REST conventions and use standard HTTP methods. See the next sections for more information on how to use the Segment Public API Swift SDK. -Latest API and SDK version: 33.0.4 +Latest API and SDK version: 62.0.6 ## Installation diff --git a/Tests/PublicApiTests/SmokeTest.swift b/Tests/PublicApiTests/SmokeTest.swift index d0335f20..95ab8ccb 100644 --- a/Tests/PublicApiTests/SmokeTest.swift +++ b/Tests/PublicApiTests/SmokeTest.swift @@ -35,6 +35,8 @@ class SmokeTests: XCTestCase { "alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u" }, "options": [], + "partnerOwned": false, + "status": "PUBLIC", "isCloudEventSource": false }, "settings": {}, @@ -44,27 +46,27 @@ class SmokeTests: XCTestCase { } """)) } - + return HttpResponse.notFound } try! server.start(getPort()) - + let port = try! server.port() PublicApiAPI.basePath = "http://localhost:" + String(port) - - + + let expectation = self.expectation(description: "Calling Public API") - + SourcesAPI.createSource(createSourceV1Input: CreateSourceV1Input(slug: "ios", enabled: true, metadataId: "UBrsG9RVzw"), completion: { data, error in XCTAssertNil(error) XCTAssertEqual(data!.data!.source.id, "qQEHquLrjRDN9j1ByrChyn") expectation.fulfill() }) - + waitForExpectations(timeout: 5, handler: nil) server.stop() } - + func testGetSource() { let server = HttpServer() server["/sources/qQEHquLrjRDN9j1ByrChyn"] = { request in @@ -90,6 +92,8 @@ class SmokeTests: XCTestCase { "alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u" }, "options": [], + "partnerOwned": false, + "status": "PUBLIC", "isCloudEventSource": false }, "settings": {}, @@ -99,27 +103,27 @@ class SmokeTests: XCTestCase { } """)) } - + return HttpResponse.notFound } try! server.start(getPort()) - + let port = try! server.port() PublicApiAPI.basePath = "http://localhost:" + String(port) - - + + let expectation = self.expectation(description: "Calling Public API") - + SourcesAPI.getSource(sourceId: "qQEHquLrjRDN9j1ByrChyn", completion: { data, error in XCTAssertNil(error) XCTAssertEqual(data!.data!.source.id, "qQEHquLrjRDN9j1ByrChyn") expectation.fulfill() }) - + waitForExpectations(timeout: 5, handler: nil) server.stop() } - + func testListSources() { let server = HttpServer() server["/sources"] = { request in @@ -146,6 +150,8 @@ class SmokeTests: XCTestCase { "alt": "https://cdn.filepicker.io/api/file/qWgSP5cpS7eeW2voq13u" }, "options": [], + "partnerOwned": false, + "status": "PUBLIC", "isCloudEventSource": false }, "settings": {}, @@ -170,6 +176,8 @@ class SmokeTests: XCTestCase { "mark": "https://cdn.filepicker.io/api/file/kBpmEoSSaakidAvoFmzd" }, "options": [], + "partnerOwned": false, + "status": "PUBLIC", "isCloudEventSource": false }, "settings": {}, @@ -181,27 +189,27 @@ class SmokeTests: XCTestCase { } """)) } - + return HttpResponse.notFound } try! server.start(getPort()) - + let port = try! server.port() PublicApiAPI.basePath = "http://localhost:" + String(port) - - + + let expectation = self.expectation(description: "Calling Public API") - + SourcesAPI.listSources(pagination: PaginationInput(count: 2), completion: { data, error in XCTAssertNil(error) XCTAssertEqual(data!.data!.sources.count, 2) expectation.fulfill() }) - + waitForExpectations(timeout: 5, handler: nil) server.stop() } - + func testUpdateSource() { let server = HttpServer() server["/sources/piTVHEYNrRgBMM1uQGCPbK"] = { request in @@ -228,6 +236,8 @@ class SmokeTests: XCTestCase { "mark": "https://cdn.filepicker.io/api/file/kBpmEoSSaakidAvoFmzd" }, "options": [], + "partnerOwned": false, + "status": "PUBLIC", "isCloudEventSource": false }, "settings": {}, @@ -237,27 +247,27 @@ class SmokeTests: XCTestCase { } """)) } - + return HttpResponse.notFound } try! server.start(getPort()) - + let port = try! server.port() PublicApiAPI.basePath = "http://localhost:" + String(port) - - + + let expectation = self.expectation(description: "Calling Public API") - + SourcesAPI.updateSource(sourceId: "piTVHEYNrRgBMM1uQGCPbK", updateSourceV1Input: UpdateSourceV1Input(name: "My updated source", enabled: false, slug: "my-new-slug"), completion: { data, error in XCTAssertNil(error) XCTAssertEqual(data!.data!.source.id, "piTVHEYNrRgBMM1uQGCPbK") expectation.fulfill() }) - + waitForExpectations(timeout: 5, handler: nil) server.stop() } - + func testDeleteSource() { let server = HttpServer() server["/sources/piTVHEYNrRgBMM1uQGCPbK"] = { request in @@ -266,23 +276,23 @@ class SmokeTests: XCTestCase { { "data": { "status": "SUCCESS" } } """)) } - + return HttpResponse.notFound } try! server.start(getPort()) - + let port = try! server.port() PublicApiAPI.basePath = "http://localhost:" + String(port) - - + + let expectation = self.expectation(description: "Calling Public API") - + SourcesAPI.deleteSource(sourceId: "piTVHEYNrRgBMM1uQGCPbK", completion: { data, error in XCTAssertNil(error) XCTAssertEqual(data!.data!.status, DeleteSourceV1Output.Status.success) expectation.fulfill() }) - + waitForExpectations(timeout: 5, handler: nil) server.stop() } diff --git a/project.yml b/project.yml index 7313ef64..bfdd6904 100644 --- a/project.yml +++ b/project.yml @@ -7,7 +7,7 @@ targets: sources: [PublicApi] info: path: ./Info.plist - version: 33.0.4 + version: 62.0.6 settings: APPLICATION_EXTENSION_API_ONLY: true scheme: {}