// Code generated by Fern. DO NOT EDIT.

package scim

import (
    core "pentagi/pkg/observability/langfuse/api/core"
    internal "pentagi/pkg/observability/langfuse/api/internal"
    context "context"
    option "pentagi/pkg/observability/langfuse/api/option"
    api "pentagi/pkg/observability/langfuse/api"
)


type Client struct {
    WithRawResponse *RawClient

    options *core.RequestOptions
    baseURL string
    caller *internal.Caller
}

func NewClient(options *core.RequestOptions) *Client {
    return &Client{
        WithRawResponse: NewRawClient(options),
        options: options,
        baseURL: options.BaseURL,
        caller: internal.NewCaller(
            &internal.CallerParams{
                Client: options.HTTPClient,
                MaxAttempts: options.MaxAttempts,
            },
        ),
    }
}

// Get SCIM Service Provider Configuration (requires organization-scoped API key)
func (c *Client) Getserviceproviderconfig(
    ctx context.Context,
    opts ...option.RequestOption,
) (*api.ServiceProviderConfig, error){
    response, err := c.WithRawResponse.Getserviceproviderconfig(
        ctx,
        opts...,
    )
    if err != nil {
        return nil, err
    }
    return response.Body, nil
}

// Get SCIM Resource Types (requires organization-scoped API key)
func (c *Client) Getresourcetypes(
    ctx context.Context,
    opts ...option.RequestOption,
) (*api.ResourceTypesResponse, error){
    response, err := c.WithRawResponse.Getresourcetypes(
        ctx,
        opts...,
    )
    if err != nil {
        return nil, err
    }
    return response.Body, nil
}

// Get SCIM Schemas (requires organization-scoped API key)
func (c *Client) Getschemas(
    ctx context.Context,
    opts ...option.RequestOption,
) (*api.SchemasResponse, error){
    response, err := c.WithRawResponse.Getschemas(
        ctx,
        opts...,
    )
    if err != nil {
        return nil, err
    }
    return response.Body, nil
}

// List users in the organization (requires organization-scoped API key)
func (c *Client) Listusers(
    ctx context.Context,
    request *api.SCIMListUsersRequest,
    opts ...option.RequestOption,
) (*api.SCIMUsersListResponse, error){
    response, err := c.WithRawResponse.Listusers(
        ctx,
        request,
        opts...,
    )
    if err != nil {
        return nil, err
    }
    return response.Body, nil
}

// Create a new user in the organization (requires organization-scoped API key)
func (c *Client) Createuser(
    ctx context.Context,
    request *api.SCIMCreateUserRequest,
    opts ...option.RequestOption,
) (*api.SCIMUser, error){
    response, err := c.WithRawResponse.Createuser(
        ctx,
        request,
        opts...,
    )
    if err != nil {
        return nil, err
    }
    return response.Body, nil
}

// Get a specific user by ID (requires organization-scoped API key)
func (c *Client) Getuser(
    ctx context.Context,
    request *api.SCIMGetUserRequest,
    opts ...option.RequestOption,
) (*api.SCIMUser, error){
    response, err := c.WithRawResponse.Getuser(
        ctx,
        request,
        opts...,
    )
    if err != nil {
        return nil, err
    }
    return response.Body, nil
}

// Remove a user from the organization (requires organization-scoped API key). Note that this only removes the user from the organization but does not delete the user entity itself.
func (c *Client) Deleteuser(
    ctx context.Context,
    request *api.SCIMDeleteUserRequest,
    opts ...option.RequestOption,
) (*api.EmptyResponse, error){
    response, err := c.WithRawResponse.Deleteuser(
        ctx,
        request,
        opts...,
    )
    if err != nil {
        return nil, err
    }
    return response.Body, nil
}

