Class: Cadenya::Types::ToolSetAdapter_OpenAPI_Url
- Inherits:
-
Object
- Object
- Cadenya::Types::ToolSetAdapter_OpenAPI_Url
- 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.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type: nil, url: nil, headers: nil, include_tools: nil, exclude_tools: nil, tool_approvals: nil, base_url: nil, server_name: nil) ⇒ ToolSetAdapter_OpenAPI_Url
constructor
A new instance of ToolSetAdapter_OpenAPI_Url.
- #to_h ⇒ Object
Constructor Details
#initialize(type: nil, url: nil, headers: nil, include_tools: nil, exclude_tools: nil, tool_approvals: nil, base_url: nil, server_name: nil) ⇒ ToolSetAdapter_OpenAPI_Url
Returns a new instance of ToolSetAdapter_OpenAPI_Url.
8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 |
# File 'lib/cadenya/types.rb', line 8215 def initialize(type: nil, url: nil, headers: nil, include_tools: nil, exclude_tools: nil, tool_approvals: nil, base_url: nil, server_name: nil) @type = type @url = url @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.
8213 8214 8215 |
# File 'lib/cadenya/types.rb', line 8213 def base_url @base_url end |
#exclude_tools ⇒ Object (readonly)
Returns the value of attribute exclude_tools.
8213 8214 8215 |
# File 'lib/cadenya/types.rb', line 8213 def exclude_tools @exclude_tools end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
8213 8214 8215 |
# File 'lib/cadenya/types.rb', line 8213 def headers @headers end |
#include_tools ⇒ Object (readonly)
Returns the value of attribute include_tools.
8213 8214 8215 |
# File 'lib/cadenya/types.rb', line 8213 def include_tools @include_tools end |
#server_name ⇒ Object (readonly)
Returns the value of attribute server_name.
8213 8214 8215 |
# File 'lib/cadenya/types.rb', line 8213 def server_name @server_name end |
#tool_approvals ⇒ Object (readonly)
Returns the value of attribute tool_approvals.
8213 8214 8215 |
# File 'lib/cadenya/types.rb', line 8213 def tool_approvals @tool_approvals end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8213 8214 8215 |
# File 'lib/cadenya/types.rb', line 8213 def type @type end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
8213 8214 8215 |
# File 'lib/cadenya/types.rb', line 8213 def url @url end |
Class Method Details
.from_json(data) ⇒ Object
8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 |
# File 'lib/cadenya/types.rb', line 8226 def self.from_json(data) new( type: data["type"], url: data["url"], 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
8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 |
# File 'lib/cadenya/types.rb', line 8239 def to_h { type: Util.plain(@type), url: Util.plain(@url), 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 |