Skip to content

Commit

Permalink
fix(hand edit): keep model in CategoriesOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-arn committed Jan 17, 2020
1 parent 4e32293 commit b0ceeb5
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* (C) Copyright IBM Corp. 2017, 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -33,28 +33,39 @@ public struct CategoriesOptions: Codable, Equatable {
*/
public var limit: Int?

/**
Enter a [custom
model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic=natural-language-understanding-customizing)
ID to override the standard categories model.
*/
public var model: String?

// Map each property name to the key that shall be used for encoding/decoding.
private enum CodingKeys: String, CodingKey {
case explanation = "explanation"
case limit = "limit"
case model = "model"
}

/**
Initialize a `CategoriesOptions` with member variables.
- parameter explanation: Set this to `true` to return explanations for each categorization. **This is available
only for English categories.**.
- parameter limit: Maximum number of categories to return.
- parameter model: Enter a [custom
model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic=natural-language-understanding-customizing)
ID to override the standard categories model.
- returns: An initialized `CategoriesOptions`.
*/
public init(
explanation: Bool? = nil,
limit: Int? = nil
limit: Int? = nil,
model: String? = nil
)
{
self.explanation = explanation
self.limit = limit
self.model = model
}

}

0 comments on commit b0ceeb5

Please sign in to comment.