ServiceOptions
open class ServiceOptions : ObjectBase
Options for interaction with a data service.
-
Default initializer.
Declaration
Swift
override public init()
-
Characters that must be avoided in the path component of URLs (e.g. in OData key predicates or function parameters), even when percent-encoded. This mey be the case with certain client or server environments which limit the characters permitted in paths (usually due to security concerns). When this option is set, other options (e.g.
supportsAlias
,supportsBatch
) may be required to enable such characters to be passed in another way.Declaration
Swift
@inline(__always) public final var avoidInPaths: String? { get set }
-
Should all entity operations (
createEntity
,updateEntity
,deleteEntity
) be done inside aRequestBatch
? Defaults tofalse
. This is particularly useful if the backend service might otherwise log URLs containing sensitive information.See also
RequestOptions.useBatch
, if only some entity operations should be batched.Declaration
Swift
@inline(__always) public final var batchEntityOperations: Bool { get set }
-
Should all
executeMethod
calls be done inside aRequestBatch
? Defaults tofalse
. This is particularly useful if the backend service might otherwise log URLs containing sensitive information.See also
RequestOptions.useBatch
, if only some method executions should be batched.Declaration
Swift
@inline(__always) public final var batchExecuteMethods: Bool { get set }
-
Should all
executeQuery
calls be done inside aRequestBatch
? Defaults tofalse
. This is particularly useful if the backend service might otherwise log URLs containing sensitive information.See also
RequestOptions.useBatch
, if only some query executions should be batched.Declaration
Swift
@inline(__always) public final var batchExecuteQueries: Bool { get set }
-
Should all entity link operations (
createLink
,updateLink
,deleteLink
) be done inside aRequestBatch
? Defaults tofalse
. This is particularly useful if the backend service might otherwise log URLs containing sensitive information.See also
RequestOptions.useBatch
, if only some link operations should be batched.Declaration
Swift
@inline(__always) public final var batchLinkOperations: Bool { get set }
-
Should all stream operations (
createMedia
,uploadMedia
,uploadStream
,downloadMedia
,downloadStream
,deleteStream
) be done inside aRequestBatch
? Defaults tofalse
. This is particularly useful if the backend service might otherwise log URLs containing sensitive information.See also
RequestOptions.useBatch
, if only some stream operations should be batched.Declaration
Swift
@inline(__always) public final var batchStreamOperations: Bool { get set }
-
Should loaded service metadata be cached in a local file? If
metadataFile
is non-null, then the cache file name will bemetadataFile
with “.cache” appended. IfmetadataFile
isnil
, then the cache file name will be the service name with “.csdl.cache” appended.See also
DataService.loadMetadata
.Declaration
Swift
@inline(__always) public final var cacheMetadata: Bool { get set }
-
Check data queries before sending them to the server. Defaults to
true
.See also
DataQuery.check
.Declaration
Swift
@inline(__always) public final var checkQueries: Bool { get set }
-
Check query results after receiving them from the server. Defaults to
true
.See also
QueryResult.check
.Declaration
Swift
@inline(__always) public final var checkResults: Bool { get set }
-
Check version header in OData responses. Defaults to
true
.Declaration
Swift
@inline(__always) public final var checkVersion: Bool { get set }
-
Globally unique client identifier for the client, used to provide a default value for the “Client-Instance-ID” HTTP header.
See also
Universally unique identifier.Declaration
Swift
@inline(__always) public final var clientInstanceID: String? { get set }
-
Do createEntity calls return resulting entity state in response payload? Defaults to
true
.Declaration
Swift
@inline(__always) public final var createReturnsContent: Bool { get set }
-
CSDL fetcher which can resolve CSDL references when loading metadata. This overrides a data service’s default mechanism to load metadata over HTTP.
Declaration
Swift
@inline(__always) public final var csdlFetcher: CSDLFetcher? { get set }
-
CSDL options for parsing.
See also
CsdlOption
.Declaration
Swift
@inline(__always) public final var csdlOptions: Int { get set }
-
Format to be used for data interchange (ATOM or JSON). Defaults to JSON.
See also
DataFormat
.Declaration
Swift
@inline(__always) public final var dataFormat: Int { get set }
-
Version to be used for data interchange. If non-zero, this overrides any version specified in the service metadata.
See also
DataVersion
.Declaration
Swift
@inline(__always) public final var dataVersion: Int { get set }
-
Is this service only to be used with a local database? By default, a service can be used both online (remote service) and offline (local database).
Declaration
Swift
@inline(__always) public final var databaseOnly: Bool { get set }
-
Should
DataService.updateEntity
calls usingEntityValue.withDeepUpdate
automatically use delta payload format? Defaults to `false’.See also
EntityValue.deepUpdateDelta
, which can be used to enable individual requests to use delta payload format.Declaration
Swift
@inline(__always) public final var deepUpdateDelta: Bool { get set }
-
If the backend system returns an ETag header when querying for an entity (or an “etag” annotation when querying for multiple entities), should deletes of the entity send the ETag value with an If-Match header? Defaults to
true
.Declaration
Swift
@inline(__always) public final var deleteWithEntityTag: Bool { get set }
-
Optional wrapper field for entity list responses. Useful for OpenAPI interoperability.
Declaration
Swift
@inline(__always) public final var entityListWrapper: String? { get set }
-
Optional wrapper field for single entity responses. Useful for OpenAPI interoperability.
Declaration
Swift
@inline(__always) public final var entityValueWrapper: String? { get set }
-
If set to true and the server returns no value for a collection-typed property of an entity then parser will return an empty collection and validation will not fail. Note: this property is only considered if checkResults is set to true and the property to be queried is selected or expanded in the query. Defaults to
false
.Declaration
Swift
@inline(__always) public final var fixMissingEmptyLists: Bool { get set }
-
If set to true and the server returns no value for a non collection-typed property of an entity then parser will return a null value and validation will not fail. Note: this property is only considered if checkResults is set to true and the property to be queried is selected or expanded in the query. Defaults to
false
.Declaration
Swift
@inline(__always) public final var fixMissingNullValues: Bool { get set }
-
Should format parameter IEEE754Compatible enabled? Defaults to
false
.Declaration
Swift
@inline(__always) public final var ieee754Compatible: Bool { get set }
-
Extra child elements for parsing main CSDL schema.
Declaration
Swift
@inline(__always) public final var includeElements: XmlElementList { get set }
-
Supplementary edmx:Reference elements. Defaults to an empty list.
Declaration
Swift
@inline(__always) public final var includeReferences: XmlElementList { get set }
-
Pre-parsed CSDL schemas, which may be referenced by the service metadata.
Declaration
Swift
@inline(__always) public final var includeSchemas: DataSchemaList { get set }
-
Should keys in URL paths be formatted using the “key as segment” convention? Useful for OpenAPI interoperability.
Declaration
Swift
@inline(__always) public final var keyAsSegment: Bool { get set }
-
Defaults to
204
(HTTP No Content), forcing an implicitloadEntity
call to be issued beforecreateEntity
returns, if the create response status from the server is >=204
. If this property has a value of200
(HTTP OK) then an implicitloadEntity
call will always be issued beforecreateEntity
returns, to retrieve the post-create entity state. If this property has a value of0
then an implicitloadEntity
call will never be issued.Declaration
Swift
@inline(__always) public final var loadIfCreateStatus: Int { get set }
-
Defaults to
204
(HTTP No Content), forcing an implicitloadEntity
call to be issued beforeupdateEntity
returns, if the update response status from the server is >=204
. If this property has a value of200
(HTTP OK) then an implicitloadEntity
call will always be issued beforeupdateEntity
returns, to retrieve the post-update entity state. If this property has a value of0
then an implicitloadEntity
call will never be issued.Declaration
Swift
@inline(__always) public final var loadIfUpdateStatus: Int { get set }
-
Should data service error messages be logged? Defaults to
true
.Declaration
Swift
@inline(__always) public final var logErrors: Bool { get set }
-
Should data service warning messages be logged? Defaults to
true
.Declaration
Swift
@inline(__always) public final var logWarnings: Bool { get set }
-
Name of local file containing OData CSDL service metadata for the data service. If this is
nil
, then metadata will be fetched from the remote service.Declaration
Swift
@inline(__always) public final var metadataFile: String? { get set }
-
Text of the service metadata, provider by the caller so it does not need to be loaded.
Declaration
Swift
@inline(__always) public final var metadataText: String? { get set }
-
Alternate location of OData CSDL service metadata. Can be an absolute URL, or a relative URL (relative to the service root URL). Use this if the preferred service metadata document appears at a URL other than that formed by appending “$metadata” to the service root URL.
Declaration
Swift
@inline(__always) public final var metadataURL: String? { get set }
-
Should
createMedia
andcreateRelatedMedia
calls automatically execute PATCH after POST to ensure that as well as media content being created, the media entity’s property values are set.Declaration
Swift
@inline(__always) public final var patchAfterCreateMedia: Bool { get set }
-
HTTP method used by
DataService.updateEntity
whenRequestOptions.updateMode
ismerge
(the default update mode). A null default value allowsDataService.updateEntity
to determine the appropriate HTTP method for the OData version. Non-standard servers might require the use of patch method “PUT” for updates with merge semantics.Declaration
Swift
@inline(__always) public final var patchMethod: String? { get set }
-
Response type accepted by
DataService.pingServer
. Defaults to “application/json,application/xml,application/atomsvc+xml”.Declaration
Swift
@inline(__always) public final var pingAccept: String { get set }
-
HTTP method used by
DataService.pingServer
. Defaults to “GET”.Declaration
Swift
@inline(__always) public final var pingMethod: String { get set }
-
Resource path used by
DataService.pingServer
. Defaults to “/” (the service document).Declaration
Swift
@inline(__always) public final var pingResource: String { get set }
-
Custom file name for storage of client registration information. If not specified, then “~/ClientRegistration/serviceName.json” will be used.
See also
OnlineOdataProvider.registerClient
,OnlineOdataProvider.serviceName
.Declaration
Swift
@inline(__always) public final var registrationFile: String? { get set }
-
Client ID which can be set to a unique client instance ID to support Repeatable Request Cleanup.
See also
Repeatability-Client-ID,OnlineODataProvider.deleteRepeatableRequest
,OnlineODataProvider.deleteRepeatableRequests
.Declaration
Swift
@inline(__always) public final var repeatabilityClientID: GuidValue? { get set }
-
Does the service require a security token for change requests? Defaults to “X-CSRF-Token”. A token is obtained, implicitly if needed, by a call to
DataService.pingServer
.Declaration
Swift
@inline(__always) public final var requiresToken: String? { get set }
-
Does the service always require type metadata in client-sent complex/entity values. Defaults to
false
.Declaration
Swift
@inline(__always) public final var requiresType: Bool { get set }
-
Should the client send Repeatable Requests in accordance with the original (2013) specification? Defaults to
true
.Declaration
Swift
@inline(__always) public final var sendOriginalRepeatability: Bool { get set }
-
Should the client send Repeatable Requests in accordance with the standard (2020) specification? Defaults to
true
.Declaration
Swift
@inline(__always) public final var sendStandardRepeatability: Bool { get set }
-
Does the service support parameter aliases? Defaults to
true
.Declaration
Swift
@inline(__always) public final var supportsAlias: Bool { get set }
-
Does the service support OData batch requests? Defaults to
true
.See also
DataService.processBatch
Declaration
Swift
@inline(__always) public final var supportsBatch: Bool { get set }
-
Does the service support repeatability deletion within a batch request? Defaults to
true
.See also
supportsRepeatability
.Declaration
Swift
@inline(__always) public final var supportsBatchForRepeatabilityDeletion: Bool { get set }
-
Does the service support bind operations. Defaults to
true
.See also
EntityValue.bindEntity
.Declaration
Swift
@inline(__always) public final var supportsBind: Bool { get set }
-
Does the service support
DELETE $RepeatableRequestsWithClientID/<Repeatability-Client-ID>
for Repeatable Requests? Defaults totrue
if the service metadata'a EntityContainer is annotated with"Org.OData.Repeatability.V1.DeleteWithClientIDSupported
.See also
supportsRepeatability
.Declaration
Swift
@inline(__always) public final var supportsDeleteWithClientID: Bool { get set }
-
Does the service support
DELETE $RepeatableRequestWithRequestID/<Repeatability-Request-ID>
for Repeatable Requests? Defaults totrue
if the service metadata'a EntityContainer is annotated with"Org.OData.Repeatability.V1.DeleteWithRequestIDSupported
.See also
supportsRepeatability
.Declaration
Swift
@inline(__always) public final var supportsDeleteWithRequestID: Bool { get set }
-
Does the service support server-side change tracking (e.g. with delta links)? Defaults to
true
.Declaration
Swift
@inline(__always) public final var supportsDelta: Bool { get set }
-
Does the service support link operations. Defaults to
true
.See also
DataService.createLink
,DataService.updateLink
,DataService.deleteLink
.Declaration
Swift
@inline(__always) public final var supportsLink: Bool { get set }
-
Does the service support the following of next-links using the $skiptoken system query option. Defaults to
true
.Declaration
Swift
@inline(__always) public final var supportsNext: Bool { get set }
-
Does the service support OData PATCH requests (or MERGE for OData versions < 3.0). Defaults to
true
.Declaration
Swift
@inline(__always) public final var supportsPatch: Bool { get set }
-
Does the service support Repeatable Requests? Defaults to
true
.See also
sendOriginalRepeatability
,sendStandardRepeatability
. If both aretrue
, then both kinds of repeatability headers will be sent.Declaration
Swift
@inline(__always) public final var supportsRepeatability: Bool { get set }
-
Does the service support unbind operations (unbind navigation property from an existing entity in delete)? Defaults to
true
.See also
EntityValue.unbindEntity
.Declaration
Swift
@inline(__always) public final var supportsUnbind: Bool { get set }
-
Do updateEntity calls return resulting entity state in response payload? Defaults to
true
.Declaration
Swift
@inline(__always) public final var updateReturnsContent: Bool { get set }
-
If the backend system returns an ETag header when querying for an entity (or an “etag” annotation when querying for multiple entities), should updates of the entity send the ETag value with an If-Match header? Defaults to
true
.Declaration
Swift
@inline(__always) public final var updateWithEntityTag: Bool { get set }