Class: Cadenya::Types::ToolSetAdapter_OpenAPI_UploadId

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_urlObject (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_toolsObject (readonly)

Returns the value of attribute exclude_tools.



8254
8255
8256
# File 'lib/cadenya/types.rb', line 8254

def exclude_tools
  @exclude_tools
end

#headersObject (readonly)

Returns the value of attribute headers.



8254
8255
8256
# File 'lib/cadenya/types.rb', line 8254

def headers
  @headers
end

#include_toolsObject (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_nameObject (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_approvalsObject (readonly)

Returns the value of attribute tool_approvals.



8254
8255
8256
# File 'lib/cadenya/types.rb', line 8254

def tool_approvals
  @tool_approvals
end

#typeObject (readonly)

Returns the value of attribute type.



8254
8255
8256
# File 'lib/cadenya/types.rb', line 8254

def type
  @type
end

#upload_idObject (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_hObject



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