ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.531.4

This commit is contained in:
speakeasybot
2025-04-15 00:10:22 +00:00
parent 1be9c77a05
commit f1b7dcb619
2010 changed files with 41994 additions and 36602 deletions

View File

@@ -29,7 +29,7 @@ module PlexRubySDK
end
sig { params(timeout_ms: T.nilable(Integer)).returns(::PlexRubySDK::Operations::GetServerActivitiesResponse) }
sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetServerActivitiesResponse) }
def get_server_activities(timeout_ms = nil)
# get_server_activities - Get Server Activities
# Get Server Activities
@@ -55,10 +55,11 @@ module PlexRubySDK
)
error = T.let(nil, T.nilable(StandardError))
r = T.let(nil, T.nilable(Faraday::Response))
http_response = T.let(nil, T.nilable(Faraday::Response))
begin
r = connection.get(url) do |req|
http_response = connection.get(url) do |req|
req.headers.merge!(headers)
req.options.timeout = timeout unless timeout.nil?
Utils.configure_request_security(req, security)
@@ -73,67 +74,101 @@ module PlexRubySDK
rescue StandardError => e
error = e
ensure
if r.nil? || Utils.error_status?(r.status)
r = @sdk_configuration.hooks.after_error(
if http_response.nil? || Utils.error_status?(http_response.status)
http_response = @sdk_configuration.hooks.after_error(
error: error,
hook_ctx: SDKHooks::AfterErrorHookContext.new(
hook_ctx: hook_ctx
),
response: r
response: http_response
)
else
r = @sdk_configuration.hooks.after_success(
http_response = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: r
response: http_response
)
end
if r.nil?
if http_response.nil?
raise error if !error.nil?
raise 'no response'
end
end
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
if Utils.match_status_code(http_response.status, ['200'])
if Utils.match_content_type(content_type, 'application/json')
http_response = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: http_response
)
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Operations::GetServerActivitiesResponseBody)
response = Models::Operations::GetServerActivitiesResponse.new(
status_code: http_response.status,
content_type: content_type,
raw_response: http_response,
object: obj
)
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
return response
else
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
end
elsif Utils.match_status_code(http_response.status, ['400'])
if Utils.match_content_type(content_type, 'application/json')
http_response = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: http_response
)
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::GetServerActivitiesBadRequest)
obj.raw_response = http_response
throw obj
else
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
end
elsif Utils.match_status_code(http_response.status, ['401'])
if Utils.match_content_type(content_type, 'application/json')
http_response = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: http_response
)
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::GetServerActivitiesUnauthorized)
obj.raw_response = http_response
throw obj
else
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
end
elsif Utils.match_status_code(http_response.status, ['4XX'])
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
elsif Utils.match_status_code(http_response.status, ['5XX'])
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
else
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
res = ::PlexRubySDK::Operations::GetServerActivitiesResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::PlexRubySDK::Operations::GetServerActivitiesResponseBody)
res.object = out
end
elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::PlexRubySDK::Operations::GetServerActivitiesBadRequest)
res.bad_request = out
end
elsif r.status == 401
if Utils.match_content_type(content_type, 'application/json')
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::PlexRubySDK::Operations::GetServerActivitiesUnauthorized)
res.unauthorized = out
end
end
res
end
sig { params(activity_uuid: ::String, timeout_ms: T.nilable(Integer)).returns(::PlexRubySDK::Operations::CancelServerActivitiesResponse) }
sig { params(activity_uuid: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CancelServerActivitiesResponse) }
def cancel_server_activities(activity_uuid, timeout_ms = nil)
# cancel_server_activities - Cancel Server Activities
# Cancel Server Activities
request = ::PlexRubySDK::Operations::CancelServerActivitiesRequest.new(
request = Models::Operations::CancelServerActivitiesRequest.new(
activity_uuid: activity_uuid
)
url, params = @sdk_configuration.get_server_details
base_url = Utils.template_url(url, params)
url = Utils.generate_url(
::PlexRubySDK::Operations::CancelServerActivitiesRequest,
Models::Operations::CancelServerActivitiesRequest,
base_url,
'/activities/{activityUUID}',
request
@@ -157,10 +192,11 @@ module PlexRubySDK
)
error = T.let(nil, T.nilable(StandardError))
r = T.let(nil, T.nilable(Faraday::Response))
http_response = T.let(nil, T.nilable(Faraday::Response))
begin
r = connection.delete(url) do |req|
http_response = connection.delete(url) do |req|
req.headers.merge!(headers)
req.options.timeout = timeout unless timeout.nil?
Utils.configure_request_security(req, security)
@@ -175,48 +211,78 @@ module PlexRubySDK
rescue StandardError => e
error = e
ensure
if r.nil? || Utils.error_status?(r.status)
r = @sdk_configuration.hooks.after_error(
if http_response.nil? || Utils.error_status?(http_response.status)
http_response = @sdk_configuration.hooks.after_error(
error: error,
hook_ctx: SDKHooks::AfterErrorHookContext.new(
hook_ctx: hook_ctx
),
response: r
response: http_response
)
else
r = @sdk_configuration.hooks.after_success(
http_response = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: r
response: http_response
)
end
if r.nil?
if http_response.nil?
raise error if !error.nil?
raise 'no response'
end
end
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
res = ::PlexRubySDK::Operations::CancelServerActivitiesResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
elsif r.status == 400
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
if Utils.match_status_code(http_response.status, ['200'])
http_response = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: http_response
)
return Models::Operations::CancelServerActivitiesResponse.new(
status_code: http_response.status,
content_type: content_type,
raw_response: http_response
)
elsif Utils.match_status_code(http_response.status, ['400'])
if Utils.match_content_type(content_type, 'application/json')
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::PlexRubySDK::Operations::CancelServerActivitiesBadRequest)
res.bad_request = out
http_response = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: http_response
)
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::CancelServerActivitiesBadRequest)
obj.raw_response = http_response
throw obj
else
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
end
elsif r.status == 401
elsif Utils.match_status_code(http_response.status, ['401'])
if Utils.match_content_type(content_type, 'application/json')
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::PlexRubySDK::Operations::CancelServerActivitiesUnauthorized)
res.unauthorized = out
http_response = @sdk_configuration.hooks.after_success(
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
hook_ctx: hook_ctx
),
response: http_response
)
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::CancelServerActivitiesUnauthorized)
obj.raw_response = http_response
throw obj
else
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
end
elsif Utils.match_status_code(http_response.status, ['4XX'])
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
elsif Utils.match_status_code(http_response.status, ['5XX'])
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
else
raise ::PlexRubySDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
end
res
end
end
end