Class: Cadenya::Types::ToolSetAdapter_OpenAPI_UploadId
- Inherits:
-
Object
- Object
- Cadenya::Types::ToolSetAdapter_OpenAPI_UploadId
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#exclude_tools ⇒ Object
readonly
Returns the value of attribute exclude_tools.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#include_tools ⇒ Object
readonly
Returns the value of attribute include_tools.
-
#server_name ⇒ Object
readonly
Returns the value of attribute server_name.
-
#tool_approvals ⇒ Object
readonly
Returns the value of attribute tool_approvals.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#upload_id ⇒ Object
readonly
Returns the value of attribute upload_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type: nil, upload_id: nil, headers: nil, include_tools: nil, exclude_tools: nil, tool_approvals: nil, base_url: nil, server_name: nil) ⇒ ToolSetAdapter_OpenAPI_UploadId
constructor
A new instance of ToolSetAdapter_OpenAPI_UploadId.
- #to_h ⇒ Object
Constructor Details
#initialize(type: nil, upload_id: nil, headers: nil, include_tools: nil, exclude_tools: nil, tool_approvals: nil, base_url: nil, server_name: nil) ⇒ ToolSetAdapter_OpenAPI_UploadId
Returns a new instance of ToolSetAdapter_OpenAPI_UploadId.
8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 |
# File 'lib/cadenya/types.rb', line 8256 def initialize(type: nil, upload_id: nil, headers: nil, include_tools: nil, exclude_tools: nil, tool_approvals: nil, base_url: nil, server_name: nil) @type = type @upload_id = upload_id @headers = headers @include_tools = include_tools @exclude_tools = exclude_tools @tool_approvals = tool_approvals @base_url = base_url @server_name = server_name end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
8254 8255 8256 |
# File 'lib/cadenya/types.rb', line 8254 def base_url @base_url end |
#exclude_tools ⇒ Object (readonly)
Returns the value of attribute exclude_tools.
8254 8255 8256 |
# File 'lib/cadenya/types.rb', line 8254 def exclude_tools @exclude_tools end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
8254 8255 8256 |
# File 'lib/cadenya/types.rb', line 8254 def headers @headers end |
#include_tools ⇒ Object (readonly)
Returns the value of attribute include_tools.
8254 8255 8256 |
# File 'lib/cadenya/types.rb', line 8254 def include_tools @include_tools end |
#server_name ⇒ Object (readonly)
Returns the value of attribute server_name.
8254 8255 8256 |
# File 'lib/cadenya/types.rb', line 8254 def server_name @server_name end |
#tool_approvals ⇒ Object (readonly)
Returns the value of attribute tool_approvals.
8254 8255 8256 |
# File 'lib/cadenya/types.rb', line 8254 def tool_approvals @tool_approvals end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8254 8255 8256 |
# File 'lib/cadenya/types.rb', line 8254 def type @type end |
#upload_id ⇒ Object (readonly)
Returns the value of attribute upload_id.
8254 8255 8256 |
# File 'lib/cadenya/types.rb', line 8254 def upload_id @upload_id end |
Class Method Details
.from_json(data) ⇒ Object
8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 |
# File 'lib/cadenya/types.rb', line 8267 def self.from_json(data) new( type: data["type"], upload_id: data["uploadId"], headers: data["headers"], include_tools: data["includeTools"].nil? ? nil : Types::ToolSetAdapter_ToolFilter.from_json(data["includeTools"]), exclude_tools: data["excludeTools"].nil? ? nil : Types::ToolSetAdapter_ToolFilter.from_json(data["excludeTools"]), tool_approvals: data["toolApprovals"].nil? ? nil : Types.decode_ToolSetAdapter_ApprovalRequirementFilter(data["toolApprovals"]), base_url: data["baseUrl"], server_name: data["serverName"], ) end |
Instance Method Details
#to_h ⇒ Object
8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 |
# File 'lib/cadenya/types.rb', line 8280 def to_h { type: Util.plain(@type), upload_id: Util.plain(@upload_id), headers: Util.plain(@headers), include_tools: Util.plain(@include_tools), exclude_tools: Util.plain(@exclude_tools), tool_approvals: Util.plain(@tool_approvals), base_url: Util.plain(@base_url), server_name: Util.plain(@server_name), }.reject { |_k, v| v.nil? } end |