11import Foundation
22
3- /// The AI Agent to be used for ask.
3+ /// The AI agent to be used to ask questions .
44public class AiStudioAgentAskResponse : Codable , RawJSONReadable {
55 private enum CodingKeys : String , CodingKey {
66 case accessState = " access_state "
77 case description
88 case type
99 case customInstructions = " custom_instructions "
10+ case suggestedQuestions = " suggested_questions "
1011 case longText = " long_text "
1112 case basicText = " basic_text "
13+ case basicImage = " basic_image "
14+ case spreadsheet
1215 case longTextMulti = " long_text_multi "
1316 case basicTextMulti = " basic_text_multi "
17+ case basicImageMulti = " basic_image_multi "
1418 }
1519
1620 /// Internal backing store for rawData. Used to store raw dictionary data associated with the instance.
@@ -25,43 +29,60 @@ public class AiStudioAgentAskResponse: Codable, RawJSONReadable {
2529 /// The state of the AI Agent capability. Possible values are: `enabled` and `disabled`.
2630 public let accessState : String
2731
28- /// The description of the AI Agent .
32+ /// The description of the AI agent .
2933 public let description : String
3034
31- /// The type of AI agent used to handle queries .
35+ /// The type of AI agent used to ask questions .
3236 public let type : AiStudioAgentAskResponseTypeField
3337
34- /// Custom instructions for the agent.
38+ /// Custom instructions for the AI agent.
3539 @CodableTriState public private( set) var customInstructions : String ?
3640
41+ /// Suggested questions for the AI agent. If null, suggested question will be generated. If empty, no suggested questions will be displayed.
42+ public let suggestedQuestions : [ String ] ?
43+
3744 public let longText : AiStudioAgentLongTextToolResponse ?
3845
3946 public let basicText : AiStudioAgentBasicTextToolResponse ?
4047
48+ public let basicImage : AiStudioAgentBasicTextToolResponse ?
49+
50+ public let spreadsheet : AiStudioAgentSpreadsheetToolResponse ?
51+
4152 public let longTextMulti : AiStudioAgentLongTextToolResponse ?
4253
4354 public let basicTextMulti : AiStudioAgentBasicTextToolResponse ?
4455
56+ public let basicImageMulti : AiStudioAgentBasicTextToolResponse ?
57+
4558 /// Initializer for a AiStudioAgentAskResponse.
4659 ///
4760 /// - Parameters:
4861 /// - accessState: The state of the AI Agent capability. Possible values are: `enabled` and `disabled`.
49- /// - description: The description of the AI Agent.
50- /// - type: The type of AI agent used to handle queries.
51- /// - customInstructions: Custom instructions for the agent.
62+ /// - description: The description of the AI agent.
63+ /// - type: The type of AI agent used to ask questions.
64+ /// - customInstructions: Custom instructions for the AI agent.
65+ /// - suggestedQuestions: Suggested questions for the AI agent. If null, suggested question will be generated. If empty, no suggested questions will be displayed.
5266 /// - longText:
5367 /// - basicText:
68+ /// - basicImage:
69+ /// - spreadsheet:
5470 /// - longTextMulti:
5571 /// - basicTextMulti:
56- public init ( accessState: String , description: String , type: AiStudioAgentAskResponseTypeField = AiStudioAgentAskResponseTypeField . aiAgentAsk, customInstructions: TriStateField < String > = nil , longText: AiStudioAgentLongTextToolResponse ? = nil , basicText: AiStudioAgentBasicTextToolResponse ? = nil , longTextMulti: AiStudioAgentLongTextToolResponse ? = nil , basicTextMulti: AiStudioAgentBasicTextToolResponse ? = nil ) {
72+ /// - basicImageMulti:
73+ public init ( accessState: String , description: String , type: AiStudioAgentAskResponseTypeField = AiStudioAgentAskResponseTypeField . aiAgentAsk, customInstructions: TriStateField < String > = nil , suggestedQuestions: [ String ] ? = nil , longText: AiStudioAgentLongTextToolResponse ? = nil , basicText: AiStudioAgentBasicTextToolResponse ? = nil , basicImage: AiStudioAgentBasicTextToolResponse ? = nil , spreadsheet: AiStudioAgentSpreadsheetToolResponse ? = nil , longTextMulti: AiStudioAgentLongTextToolResponse ? = nil , basicTextMulti: AiStudioAgentBasicTextToolResponse ? = nil , basicImageMulti: AiStudioAgentBasicTextToolResponse ? = nil ) {
5774 self . accessState = accessState
5875 self . description = description
5976 self . type = type
6077 self . _customInstructions = CodableTriState ( state: customInstructions)
78+ self . suggestedQuestions = suggestedQuestions
6179 self . longText = longText
6280 self . basicText = basicText
81+ self . basicImage = basicImage
82+ self . spreadsheet = spreadsheet
6383 self . longTextMulti = longTextMulti
6484 self . basicTextMulti = basicTextMulti
85+ self . basicImageMulti = basicImageMulti
6586 }
6687
6788 required public init ( from decoder: Decoder ) throws {
@@ -70,10 +91,14 @@ public class AiStudioAgentAskResponse: Codable, RawJSONReadable {
7091 description = try container. decode ( String . self, forKey: . description)
7192 type = try container. decode ( AiStudioAgentAskResponseTypeField . self, forKey: . type)
7293 customInstructions = try container. decodeIfPresent ( String . self, forKey: . customInstructions)
94+ suggestedQuestions = try container. decodeIfPresent ( [ String ] . self, forKey: . suggestedQuestions)
7395 longText = try container. decodeIfPresent ( AiStudioAgentLongTextToolResponse . self, forKey: . longText)
7496 basicText = try container. decodeIfPresent ( AiStudioAgentBasicTextToolResponse . self, forKey: . basicText)
97+ basicImage = try container. decodeIfPresent ( AiStudioAgentBasicTextToolResponse . self, forKey: . basicImage)
98+ spreadsheet = try container. decodeIfPresent ( AiStudioAgentSpreadsheetToolResponse . self, forKey: . spreadsheet)
7599 longTextMulti = try container. decodeIfPresent ( AiStudioAgentLongTextToolResponse . self, forKey: . longTextMulti)
76100 basicTextMulti = try container. decodeIfPresent ( AiStudioAgentBasicTextToolResponse . self, forKey: . basicTextMulti)
101+ basicImageMulti = try container. decodeIfPresent ( AiStudioAgentBasicTextToolResponse . self, forKey: . basicImageMulti)
77102 }
78103
79104 public func encode( to encoder: Encoder ) throws {
@@ -82,10 +107,14 @@ public class AiStudioAgentAskResponse: Codable, RawJSONReadable {
82107 try container. encode ( description, forKey: . description)
83108 try container. encode ( type, forKey: . type)
84109 try container. encode ( field: _customInstructions. state, forKey: . customInstructions)
110+ try container. encodeIfPresent ( suggestedQuestions, forKey: . suggestedQuestions)
85111 try container. encodeIfPresent ( longText, forKey: . longText)
86112 try container. encodeIfPresent ( basicText, forKey: . basicText)
113+ try container. encodeIfPresent ( basicImage, forKey: . basicImage)
114+ try container. encodeIfPresent ( spreadsheet, forKey: . spreadsheet)
87115 try container. encodeIfPresent ( longTextMulti, forKey: . longTextMulti)
88116 try container. encodeIfPresent ( basicTextMulti, forKey: . basicTextMulti)
117+ try container. encodeIfPresent ( basicImageMulti, forKey: . basicImageMulti)
89118 }
90119
91120 /// Sets the raw JSON data.
0 commit comments