=begin
#Daytona

#Daytona AI platform API Docs

The version of the OpenAPI document: 1.0
Contact: support@daytona.com
Generated by: https://openapi-generator.tech
Generator version: 7.21.0

=end

require 'cgi'

module DaytonaApiClient
  class OrganizationsApi
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end
    # Accept organization invitation
    # @param invitation_id [String] Invitation ID
    # @param [Hash] opts the optional parameters
    # @return [OrganizationInvitation]
    def accept_organization_invitation(invitation_id, opts = {})
      data, _status_code, _headers = accept_organization_invitation_with_http_info(invitation_id, opts)
      data
    end

    # Accept organization invitation
    # @param invitation_id [String] Invitation ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(OrganizationInvitation, Integer, Hash)>] OrganizationInvitation data, response status code and response headers
    def accept_organization_invitation_with_http_info(invitation_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.accept_organization_invitation ...'
      end
      # verify the required parameter 'invitation_id' is set
      if @api_client.config.client_side_validation && invitation_id.nil?
        fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.accept_organization_invitation"
      end
      # resource path
      local_var_path = '/organizations/invitations/{invitationId}/accept'.sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'OrganizationInvitation'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.accept_organization_invitation",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#accept_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Cancel organization invitation
    # @param organization_id [String] Organization ID
    # @param invitation_id [String] Invitation ID
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def cancel_organization_invitation(organization_id, invitation_id, opts = {})
      cancel_organization_invitation_with_http_info(organization_id, invitation_id, opts)
      nil
    end

    # Cancel organization invitation
    # @param organization_id [String] Organization ID
    # @param invitation_id [String] Invitation ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def cancel_organization_invitation_with_http_info(organization_id, invitation_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.cancel_organization_invitation ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.cancel_organization_invitation"
      end
      # verify the required parameter 'invitation_id' is set
      if @api_client.config.client_side_validation && invitation_id.nil?
        fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.cancel_organization_invitation"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/invitations/{invitationId}/cancel'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.cancel_organization_invitation",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#cancel_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create organization
    # @param create_organization [CreateOrganization] 
    # @param [Hash] opts the optional parameters
    # @return [Organization]
    def create_organization(create_organization, opts = {})
      data, _status_code, _headers = create_organization_with_http_info(create_organization, opts)
      data
    end

    # Create organization
    # @param create_organization [CreateOrganization] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
    def create_organization_with_http_info(create_organization, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization ...'
      end
      # verify the required parameter 'create_organization' is set
      if @api_client.config.client_side_validation && create_organization.nil?
        fail ArgumentError, "Missing the required parameter 'create_organization' when calling OrganizationsApi.create_organization"
      end
      # resource path
      local_var_path = '/organizations'

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization)

      # return_type
      return_type = opts[:debug_return_type] || 'Organization'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.create_organization",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#create_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create organization invitation
    # @param organization_id [String] Organization ID
    # @param create_organization_invitation [CreateOrganizationInvitation] 
    # @param [Hash] opts the optional parameters
    # @return [OrganizationInvitation]
    def create_organization_invitation(organization_id, create_organization_invitation, opts = {})
      data, _status_code, _headers = create_organization_invitation_with_http_info(organization_id, create_organization_invitation, opts)
      data
    end

    # Create organization invitation
    # @param organization_id [String] Organization ID
    # @param create_organization_invitation [CreateOrganizationInvitation] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(OrganizationInvitation, Integer, Hash)>] OrganizationInvitation data, response status code and response headers
    def create_organization_invitation_with_http_info(organization_id, create_organization_invitation, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization_invitation ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.create_organization_invitation"
      end
      # verify the required parameter 'create_organization_invitation' is set
      if @api_client.config.client_side_validation && create_organization_invitation.nil?
        fail ArgumentError, "Missing the required parameter 'create_organization_invitation' when calling OrganizationsApi.create_organization_invitation"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/invitations'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_invitation)

      # return_type
      return_type = opts[:debug_return_type] || 'OrganizationInvitation'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.create_organization_invitation",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#create_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create organization role
    # @param organization_id [String] Organization ID
    # @param create_organization_role [CreateOrganizationRole] 
    # @param [Hash] opts the optional parameters
    # @return [OrganizationRole]
    def create_organization_role(organization_id, create_organization_role, opts = {})
      data, _status_code, _headers = create_organization_role_with_http_info(organization_id, create_organization_role, opts)
      data
    end

    # Create organization role
    # @param organization_id [String] Organization ID
    # @param create_organization_role [CreateOrganizationRole] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(OrganizationRole, Integer, Hash)>] OrganizationRole data, response status code and response headers
    def create_organization_role_with_http_info(organization_id, create_organization_role, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization_role ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.create_organization_role"
      end
      # verify the required parameter 'create_organization_role' is set
      if @api_client.config.client_side_validation && create_organization_role.nil?
        fail ArgumentError, "Missing the required parameter 'create_organization_role' when calling OrganizationsApi.create_organization_role"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/roles'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_role)

      # return_type
      return_type = opts[:debug_return_type] || 'OrganizationRole'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.create_organization_role",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#create_organization_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create a new region
    # @param create_region [CreateRegion] 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [CreateRegionResponse]
    def create_region(create_region, opts = {})
      data, _status_code, _headers = create_region_with_http_info(create_region, opts)
      data
    end

    # Create a new region
    # @param create_region [CreateRegion] 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Array<(CreateRegionResponse, Integer, Hash)>] CreateRegionResponse data, response status code and response headers
    def create_region_with_http_info(create_region, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_region ...'
      end
      # verify the required parameter 'create_region' is set
      if @api_client.config.client_side_validation && create_region.nil?
        fail ArgumentError, "Missing the required parameter 'create_region' when calling OrganizationsApi.create_region"
      end
      # resource path
      local_var_path = '/regions'

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end
      header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(create_region)

      # return_type
      return_type = opts[:debug_return_type] || 'CreateRegionResponse'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.create_region",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#create_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Decline organization invitation
    # @param invitation_id [String] Invitation ID
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def decline_organization_invitation(invitation_id, opts = {})
      decline_organization_invitation_with_http_info(invitation_id, opts)
      nil
    end

    # Decline organization invitation
    # @param invitation_id [String] Invitation ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def decline_organization_invitation_with_http_info(invitation_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.decline_organization_invitation ...'
      end
      # verify the required parameter 'invitation_id' is set
      if @api_client.config.client_side_validation && invitation_id.nil?
        fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.decline_organization_invitation"
      end
      # resource path
      local_var_path = '/organizations/invitations/{invitationId}/decline'.sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.decline_organization_invitation",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#decline_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete organization
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_organization(organization_id, opts = {})
      delete_organization_with_http_info(organization_id, opts)
      nil
    end

    # Delete organization
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def delete_organization_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.delete_organization",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete organization member
    # @param organization_id [String] Organization ID
    # @param user_id [String] User ID
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_organization_member(organization_id, user_id, opts = {})
      delete_organization_member_with_http_info(organization_id, user_id, opts)
      nil
    end

    # Delete organization member
    # @param organization_id [String] Organization ID
    # @param user_id [String] User ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def delete_organization_member_with_http_info(organization_id, user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_member ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization_member"
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.delete_organization_member"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/users/{userId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.delete_organization_member",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete organization OpenTelemetry configuration
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_organization_otel_config(organization_id, opts = {})
      delete_organization_otel_config_with_http_info(organization_id, opts)
      nil
    end

    # Delete organization OpenTelemetry configuration
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def delete_organization_otel_config_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_otel_config ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization_otel_config"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/otel-config'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.delete_organization_otel_config",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_otel_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete organization role
    # @param organization_id [String] Organization ID
    # @param role_id [String] Role ID
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_organization_role(organization_id, role_id, opts = {})
      delete_organization_role_with_http_info(organization_id, role_id, opts)
      nil
    end

    # Delete organization role
    # @param organization_id [String] Organization ID
    # @param role_id [String] Role ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def delete_organization_role_with_http_info(organization_id, role_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_role ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization_role"
      end
      # verify the required parameter 'role_id' is set
      if @api_client.config.client_side_validation && role_id.nil?
        fail ArgumentError, "Missing the required parameter 'role_id' when calling OrganizationsApi.delete_organization_role"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/roles/{roleId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.delete_organization_role",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete a region
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [nil]
    def delete_region(id, opts = {})
      delete_region_with_http_info(id, opts)
      nil
    end

    # Delete a region
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def delete_region_with_http_info(id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_region ...'
      end
      # verify the required parameter 'id' is set
      if @api_client.config.client_side_validation && id.nil?
        fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.delete_region"
      end
      # resource path
      local_var_path = '/regions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.delete_region",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#delete_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get organization by ID
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Organization]
    def get_organization(organization_id, opts = {})
      data, _status_code, _headers = get_organization_with_http_info(organization_id, opts)
      data
    end

    # Get organization by ID
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
    def get_organization_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Organization'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.get_organization",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#get_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get count of organization invitations for authenticated user
    # @param [Hash] opts the optional parameters
    # @return [Float]
    def get_organization_invitations_count_for_authenticated_user(opts = {})
      data, _status_code, _headers = get_organization_invitations_count_for_authenticated_user_with_http_info(opts)
      data
    end

    # Get count of organization invitations for authenticated user
    # @param [Hash] opts the optional parameters
    # @return [Array<(Float, Integer, Hash)>] Float data, response status code and response headers
    def get_organization_invitations_count_for_authenticated_user_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_invitations_count_for_authenticated_user ...'
      end
      # resource path
      local_var_path = '/organizations/invitations/count'

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Float'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.get_organization_invitations_count_for_authenticated_user",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_invitations_count_for_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get organization OTEL config by organization ID
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [OtelConfig]
    def get_organization_otel_config(organization_id, opts = {})
      data, _status_code, _headers = get_organization_otel_config_with_http_info(organization_id, opts)
      data
    end

    # Get organization OTEL config by organization ID
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(OtelConfig, Integer, Hash)>] OtelConfig data, response status code and response headers
    def get_organization_otel_config_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_otel_config ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization_otel_config"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/otel-config'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'OtelConfig'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.get_organization_otel_config",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_otel_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get organization OTEL config by sandbox auth token
    # @param auth_token [String] Sandbox Auth Token
    # @param [Hash] opts the optional parameters
    # @return [OtelConfig]
    def get_organization_otel_config_by_sandbox_auth_token(auth_token, opts = {})
      data, _status_code, _headers = get_organization_otel_config_by_sandbox_auth_token_with_http_info(auth_token, opts)
      data
    end

    # Get organization OTEL config by sandbox auth token
    # @param auth_token [String] Sandbox Auth Token
    # @param [Hash] opts the optional parameters
    # @return [Array<(OtelConfig, Integer, Hash)>] OtelConfig data, response status code and response headers
    def get_organization_otel_config_by_sandbox_auth_token_with_http_info(auth_token, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_otel_config_by_sandbox_auth_token ...'
      end
      # verify the required parameter 'auth_token' is set
      if @api_client.config.client_side_validation && auth_token.nil?
        fail ArgumentError, "Missing the required parameter 'auth_token' when calling OrganizationsApi.get_organization_otel_config_by_sandbox_auth_token"
      end
      # resource path
      local_var_path = '/organizations/otel-config/by-sandbox-auth-token/{authToken}'.sub('{' + 'authToken' + '}', CGI.escape(auth_token.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'OtelConfig'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.get_organization_otel_config_by_sandbox_auth_token",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_otel_config_by_sandbox_auth_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get organization current usage overview
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [OrganizationUsageOverview]
    def get_organization_usage_overview(organization_id, opts = {})
      data, _status_code, _headers = get_organization_usage_overview_with_http_info(organization_id, opts)
      data
    end

    # Get organization current usage overview
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(OrganizationUsageOverview, Integer, Hash)>] OrganizationUsageOverview data, response status code and response headers
    def get_organization_usage_overview_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_usage_overview ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization_usage_overview"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/usage'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'OrganizationUsageOverview'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.get_organization_usage_overview",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_usage_overview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get region by ID
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Region]
    def get_region_by_id(id, opts = {})
      data, _status_code, _headers = get_region_by_id_with_http_info(id, opts)
      data
    end

    # Get region by ID
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Array<(Region, Integer, Hash)>] Region data, response status code and response headers
    def get_region_by_id_with_http_info(id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_region_by_id ...'
      end
      # verify the required parameter 'id' is set
      if @api_client.config.client_side_validation && id.nil?
        fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.get_region_by_id"
      end
      # resource path
      local_var_path = '/regions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Region'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.get_region_by_id",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#get_region_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Leave organization
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def leave_organization(organization_id, opts = {})
      leave_organization_with_http_info(organization_id, opts)
      nil
    end

    # Leave organization
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def leave_organization_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.leave_organization ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.leave_organization"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/leave'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.leave_organization",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#leave_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List all available regions for the organization
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Array<Region>]
    def list_available_regions(opts = {})
      data, _status_code, _headers = list_available_regions_with_http_info(opts)
      data
    end

    # List all available regions for the organization
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Array<(Array<Region>, Integer, Hash)>] Array<Region> data, response status code and response headers
    def list_available_regions_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_available_regions ...'
      end
      # resource path
      local_var_path = '/regions'

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<Region>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.list_available_regions",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#list_available_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List pending organization invitations
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<OrganizationInvitation>]
    def list_organization_invitations(organization_id, opts = {})
      data, _status_code, _headers = list_organization_invitations_with_http_info(organization_id, opts)
      data
    end

    # List pending organization invitations
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<OrganizationInvitation>, Integer, Hash)>] Array<OrganizationInvitation> data, response status code and response headers
    def list_organization_invitations_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_invitations ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_organization_invitations"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/invitations'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<OrganizationInvitation>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.list_organization_invitations",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List organization invitations for authenticated user
    # @param [Hash] opts the optional parameters
    # @return [Array<OrganizationInvitation>]
    def list_organization_invitations_for_authenticated_user(opts = {})
      data, _status_code, _headers = list_organization_invitations_for_authenticated_user_with_http_info(opts)
      data
    end

    # List organization invitations for authenticated user
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<OrganizationInvitation>, Integer, Hash)>] Array<OrganizationInvitation> data, response status code and response headers
    def list_organization_invitations_for_authenticated_user_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_invitations_for_authenticated_user ...'
      end
      # resource path
      local_var_path = '/organizations/invitations'

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<OrganizationInvitation>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.list_organization_invitations_for_authenticated_user",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_invitations_for_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List organization members
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<OrganizationUser>]
    def list_organization_members(organization_id, opts = {})
      data, _status_code, _headers = list_organization_members_with_http_info(organization_id, opts)
      data
    end

    # List organization members
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<OrganizationUser>, Integer, Hash)>] Array<OrganizationUser> data, response status code and response headers
    def list_organization_members_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_members ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_organization_members"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/users'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<OrganizationUser>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.list_organization_members",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List organization roles
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<OrganizationRole>]
    def list_organization_roles(organization_id, opts = {})
      data, _status_code, _headers = list_organization_roles_with_http_info(organization_id, opts)
      data
    end

    # List organization roles
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<OrganizationRole>, Integer, Hash)>] Array<OrganizationRole> data, response status code and response headers
    def list_organization_roles_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_roles ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_organization_roles"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/roles'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<OrganizationRole>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.list_organization_roles",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List organizations
    # @param [Hash] opts the optional parameters
    # @return [Array<Organization>]
    def list_organizations(opts = {})
      data, _status_code, _headers = list_organizations_with_http_info(opts)
      data
    end

    # List organizations
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<Organization>, Integer, Hash)>] Array<Organization> data, response status code and response headers
    def list_organizations_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organizations ...'
      end
      # resource path
      local_var_path = '/organizations'

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<Organization>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.list_organizations",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Regenerate proxy API key for a region
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [RegenerateApiKeyResponse]
    def regenerate_proxy_api_key(id, opts = {})
      data, _status_code, _headers = regenerate_proxy_api_key_with_http_info(id, opts)
      data
    end

    # Regenerate proxy API key for a region
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Array<(RegenerateApiKeyResponse, Integer, Hash)>] RegenerateApiKeyResponse data, response status code and response headers
    def regenerate_proxy_api_key_with_http_info(id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.regenerate_proxy_api_key ...'
      end
      # verify the required parameter 'id' is set
      if @api_client.config.client_side_validation && id.nil?
        fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.regenerate_proxy_api_key"
      end
      # resource path
      local_var_path = '/regions/{id}/regenerate-proxy-api-key'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'RegenerateApiKeyResponse'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.regenerate_proxy_api_key",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#regenerate_proxy_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Regenerate snapshot manager credentials for a region
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [SnapshotManagerCredentials]
    def regenerate_snapshot_manager_credentials(id, opts = {})
      data, _status_code, _headers = regenerate_snapshot_manager_credentials_with_http_info(id, opts)
      data
    end

    # Regenerate snapshot manager credentials for a region
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Array<(SnapshotManagerCredentials, Integer, Hash)>] SnapshotManagerCredentials data, response status code and response headers
    def regenerate_snapshot_manager_credentials_with_http_info(id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.regenerate_snapshot_manager_credentials ...'
      end
      # verify the required parameter 'id' is set
      if @api_client.config.client_side_validation && id.nil?
        fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.regenerate_snapshot_manager_credentials"
      end
      # resource path
      local_var_path = '/regions/{id}/regenerate-snapshot-manager-credentials'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'SnapshotManagerCredentials'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.regenerate_snapshot_manager_credentials",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#regenerate_snapshot_manager_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Regenerate SSH gateway API key for a region
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [RegenerateApiKeyResponse]
    def regenerate_ssh_gateway_api_key(id, opts = {})
      data, _status_code, _headers = regenerate_ssh_gateway_api_key_with_http_info(id, opts)
      data
    end

    # Regenerate SSH gateway API key for a region
    # @param id [String] Region ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Array<(RegenerateApiKeyResponse, Integer, Hash)>] RegenerateApiKeyResponse data, response status code and response headers
    def regenerate_ssh_gateway_api_key_with_http_info(id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.regenerate_ssh_gateway_api_key ...'
      end
      # verify the required parameter 'id' is set
      if @api_client.config.client_side_validation && id.nil?
        fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.regenerate_ssh_gateway_api_key"
      end
      # resource path
      local_var_path = '/regions/{id}/regenerate-ssh-gateway-api-key'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'RegenerateApiKeyResponse'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.regenerate_ssh_gateway_api_key",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#regenerate_ssh_gateway_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Set default region for organization
    # @param organization_id [String] Organization ID
    # @param update_organization_default_region [UpdateOrganizationDefaultRegion] 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def set_organization_default_region(organization_id, update_organization_default_region, opts = {})
      set_organization_default_region_with_http_info(organization_id, update_organization_default_region, opts)
      nil
    end

    # Set default region for organization
    # @param organization_id [String] Organization ID
    # @param update_organization_default_region [UpdateOrganizationDefaultRegion] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def set_organization_default_region_with_http_info(organization_id, update_organization_default_region, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.set_organization_default_region ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.set_organization_default_region"
      end
      # verify the required parameter 'update_organization_default_region' is set
      if @api_client.config.client_side_validation && update_organization_default_region.nil?
        fail ArgumentError, "Missing the required parameter 'update_organization_default_region' when calling OrganizationsApi.set_organization_default_region"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/default-region'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_default_region)

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.set_organization_default_region",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#set_organization_default_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Suspend organization
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @option opts [OrganizationSuspension] :organization_suspension 
    # @return [nil]
    def suspend_organization(organization_id, opts = {})
      suspend_organization_with_http_info(organization_id, opts)
      nil
    end

    # Suspend organization
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @option opts [OrganizationSuspension] :organization_suspension 
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def suspend_organization_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.suspend_organization ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.suspend_organization"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/suspend'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'organization_suspension'])

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.suspend_organization",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#suspend_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Unsuspend organization
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def unsuspend_organization(organization_id, opts = {})
      unsuspend_organization_with_http_info(organization_id, opts)
      nil
    end

    # Unsuspend organization
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def unsuspend_organization_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.unsuspend_organization ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.unsuspend_organization"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/unsuspend'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.unsuspend_organization",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#unsuspend_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update access for organization member
    # @param organization_id [String] Organization ID
    # @param user_id [String] User ID
    # @param update_organization_member_access [UpdateOrganizationMemberAccess] 
    # @param [Hash] opts the optional parameters
    # @return [OrganizationUser]
    def update_access_for_organization_member(organization_id, user_id, update_organization_member_access, opts = {})
      data, _status_code, _headers = update_access_for_organization_member_with_http_info(organization_id, user_id, update_organization_member_access, opts)
      data
    end

    # Update access for organization member
    # @param organization_id [String] Organization ID
    # @param user_id [String] User ID
    # @param update_organization_member_access [UpdateOrganizationMemberAccess] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(OrganizationUser, Integer, Hash)>] OrganizationUser data, response status code and response headers
    def update_access_for_organization_member_with_http_info(organization_id, user_id, update_organization_member_access, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_access_for_organization_member ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_access_for_organization_member"
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.update_access_for_organization_member"
      end
      # verify the required parameter 'update_organization_member_access' is set
      if @api_client.config.client_side_validation && update_organization_member_access.nil?
        fail ArgumentError, "Missing the required parameter 'update_organization_member_access' when calling OrganizationsApi.update_access_for_organization_member"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/users/{userId}/access'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_member_access)

      # return_type
      return_type = opts[:debug_return_type] || 'OrganizationUser'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.update_access_for_organization_member",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#update_access_for_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update experimental configuration
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @option opts [Hash<String, Object>] :request_body Experimental configuration as a JSON object. Set to null to clear the configuration.
    # @return [nil]
    def update_experimental_config(organization_id, opts = {})
      update_experimental_config_with_http_info(organization_id, opts)
      nil
    end

    # Update experimental configuration
    # @param organization_id [String] Organization ID
    # @param [Hash] opts the optional parameters
    # @option opts [Hash<String, Object>] :request_body Experimental configuration as a JSON object. Set to null to clear the configuration.
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def update_experimental_config_with_http_info(organization_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_experimental_config ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_experimental_config"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/experimental-config'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.update_experimental_config",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#update_experimental_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update organization invitation
    # @param organization_id [String] Organization ID
    # @param invitation_id [String] Invitation ID
    # @param update_organization_invitation [UpdateOrganizationInvitation] 
    # @param [Hash] opts the optional parameters
    # @return [OrganizationInvitation]
    def update_organization_invitation(organization_id, invitation_id, update_organization_invitation, opts = {})
      data, _status_code, _headers = update_organization_invitation_with_http_info(organization_id, invitation_id, update_organization_invitation, opts)
      data
    end

    # Update organization invitation
    # @param organization_id [String] Organization ID
    # @param invitation_id [String] Invitation ID
    # @param update_organization_invitation [UpdateOrganizationInvitation] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(OrganizationInvitation, Integer, Hash)>] OrganizationInvitation data, response status code and response headers
    def update_organization_invitation_with_http_info(organization_id, invitation_id, update_organization_invitation, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_invitation ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_invitation"
      end
      # verify the required parameter 'invitation_id' is set
      if @api_client.config.client_side_validation && invitation_id.nil?
        fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.update_organization_invitation"
      end
      # verify the required parameter 'update_organization_invitation' is set
      if @api_client.config.client_side_validation && update_organization_invitation.nil?
        fail ArgumentError, "Missing the required parameter 'update_organization_invitation' when calling OrganizationsApi.update_organization_invitation"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/invitations/{invitationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_invitation)

      # return_type
      return_type = opts[:debug_return_type] || 'OrganizationInvitation'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.update_organization_invitation",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update organization OpenTelemetry configuration
    # @param organization_id [String] Organization ID
    # @param otel_config [OtelConfig] 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def update_organization_otel_config(organization_id, otel_config, opts = {})
      update_organization_otel_config_with_http_info(organization_id, otel_config, opts)
      nil
    end

    # Update organization OpenTelemetry configuration
    # @param organization_id [String] Organization ID
    # @param otel_config [OtelConfig] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def update_organization_otel_config_with_http_info(organization_id, otel_config, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_otel_config ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_otel_config"
      end
      # verify the required parameter 'otel_config' is set
      if @api_client.config.client_side_validation && otel_config.nil?
        fail ArgumentError, "Missing the required parameter 'otel_config' when calling OrganizationsApi.update_organization_otel_config"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/otel-config'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(otel_config)

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.update_organization_otel_config",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_otel_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update organization quota
    # @param organization_id [String] Organization ID
    # @param update_organization_quota [UpdateOrganizationQuota] 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def update_organization_quota(organization_id, update_organization_quota, opts = {})
      update_organization_quota_with_http_info(organization_id, update_organization_quota, opts)
      nil
    end

    # Update organization quota
    # @param organization_id [String] Organization ID
    # @param update_organization_quota [UpdateOrganizationQuota] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def update_organization_quota_with_http_info(organization_id, update_organization_quota, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_quota ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_quota"
      end
      # verify the required parameter 'update_organization_quota' is set
      if @api_client.config.client_side_validation && update_organization_quota.nil?
        fail ArgumentError, "Missing the required parameter 'update_organization_quota' when calling OrganizationsApi.update_organization_quota"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/quota'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_quota)

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.update_organization_quota",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update organization region quota
    # @param organization_id [String] Organization ID
    # @param region_id [String] ID of the region where the updated quota will be applied
    # @param update_organization_region_quota [UpdateOrganizationRegionQuota] 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def update_organization_region_quota(organization_id, region_id, update_organization_region_quota, opts = {})
      update_organization_region_quota_with_http_info(organization_id, region_id, update_organization_region_quota, opts)
      nil
    end

    # Update organization region quota
    # @param organization_id [String] Organization ID
    # @param region_id [String] ID of the region where the updated quota will be applied
    # @param update_organization_region_quota [UpdateOrganizationRegionQuota] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def update_organization_region_quota_with_http_info(organization_id, region_id, update_organization_region_quota, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_region_quota ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_region_quota"
      end
      # verify the required parameter 'region_id' is set
      if @api_client.config.client_side_validation && region_id.nil?
        fail ArgumentError, "Missing the required parameter 'region_id' when calling OrganizationsApi.update_organization_region_quota"
      end
      # verify the required parameter 'update_organization_region_quota' is set
      if @api_client.config.client_side_validation && update_organization_region_quota.nil?
        fail ArgumentError, "Missing the required parameter 'update_organization_region_quota' when calling OrganizationsApi.update_organization_region_quota"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/quota/{regionId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_region_quota)

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.update_organization_region_quota",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_region_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update organization role
    # @param organization_id [String] Organization ID
    # @param role_id [String] Role ID
    # @param update_organization_role [UpdateOrganizationRole] 
    # @param [Hash] opts the optional parameters
    # @return [OrganizationRole]
    def update_organization_role(organization_id, role_id, update_organization_role, opts = {})
      data, _status_code, _headers = update_organization_role_with_http_info(organization_id, role_id, update_organization_role, opts)
      data
    end

    # Update organization role
    # @param organization_id [String] Organization ID
    # @param role_id [String] Role ID
    # @param update_organization_role [UpdateOrganizationRole] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(OrganizationRole, Integer, Hash)>] OrganizationRole data, response status code and response headers
    def update_organization_role_with_http_info(organization_id, role_id, update_organization_role, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_role ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_role"
      end
      # verify the required parameter 'role_id' is set
      if @api_client.config.client_side_validation && role_id.nil?
        fail ArgumentError, "Missing the required parameter 'role_id' when calling OrganizationsApi.update_organization_role"
      end
      # verify the required parameter 'update_organization_role' is set
      if @api_client.config.client_side_validation && update_organization_role.nil?
        fail ArgumentError, "Missing the required parameter 'update_organization_role' when calling OrganizationsApi.update_organization_role"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/roles/{roleId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_role)

      # return_type
      return_type = opts[:debug_return_type] || 'OrganizationRole'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.update_organization_role",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update region configuration
    # @param id [String] Region ID
    # @param update_region [UpdateRegion] 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [nil]
    def update_region(id, update_region, opts = {})
      update_region_with_http_info(id, update_region, opts)
      nil
    end

    # Update region configuration
    # @param id [String] Region ID
    # @param update_region [UpdateRegion] 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def update_region_with_http_info(id, update_region, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_region ...'
      end
      # verify the required parameter 'id' is set
      if @api_client.config.client_side_validation && id.nil?
        fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.update_region"
      end
      # verify the required parameter 'update_region' is set
      if @api_client.config.client_side_validation && update_region.nil?
        fail ArgumentError, "Missing the required parameter 'update_region' when calling OrganizationsApi.update_region"
      end
      # resource path
      local_var_path = '/regions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end
      header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(update_region)

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.update_region",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#update_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update sandbox default limited network egress
    # @param organization_id [String] Organization ID
    # @param organization_sandbox_default_limited_network_egress [OrganizationSandboxDefaultLimitedNetworkEgress] 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def update_sandbox_default_limited_network_egress(organization_id, organization_sandbox_default_limited_network_egress, opts = {})
      update_sandbox_default_limited_network_egress_with_http_info(organization_id, organization_sandbox_default_limited_network_egress, opts)
      nil
    end

    # Update sandbox default limited network egress
    # @param organization_id [String] Organization ID
    # @param organization_sandbox_default_limited_network_egress [OrganizationSandboxDefaultLimitedNetworkEgress] 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def update_sandbox_default_limited_network_egress_with_http_info(organization_id, organization_sandbox_default_limited_network_egress, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_sandbox_default_limited_network_egress ...'
      end
      # verify the required parameter 'organization_id' is set
      if @api_client.config.client_side_validation && organization_id.nil?
        fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_sandbox_default_limited_network_egress"
      end
      # verify the required parameter 'organization_sandbox_default_limited_network_egress' is set
      if @api_client.config.client_side_validation && organization_sandbox_default_limited_network_egress.nil?
        fail ArgumentError, "Missing the required parameter 'organization_sandbox_default_limited_network_egress' when calling OrganizationsApi.update_sandbox_default_limited_network_egress"
      end
      # resource path
      local_var_path = '/organizations/{organizationId}/sandbox-default-limited-network-egress'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Content-Type'
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_sandbox_default_limited_network_egress)

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']

      new_options = opts.merge(
        :operation => :"OrganizationsApi.update_sandbox_default_limited_network_egress",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: OrganizationsApi#update_sandbox_default_limited_network_egress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
