# Schedules

## Overview

### Available Operations

* [List](#list) - List Schedules
* [Create](#create) - Create Schedule
* [Delete](#delete) - Delete Schedule
* [GetByID](#getbyid) - Get Schedule by ID
* [Update](#update) - Update Schedule
* [PauseResume](#pauseresume) - Pause/Resume Schedule
* [ChangeTimezone](#changetimezone) - Change Timezone
* [Clone](#clone) - Clone Schedule
* [GetIcalLink](#geticallink) - Get Schedule ICal Link
* [RefreshIcalLink](#refreshicallink) - Refresh Schedule ICal Link
* [CreateIcalLink](#createicallink) - Create Schedule ICal Link
* [CreateScheduleOverride](#createscheduleoverride) - Create Schedule Override
* [DeleteRotation](#deleterotation) - Delete Rotation

## List

List Schedules

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.List(ctx, operations.SchedulesListSchedulesRequest{
        TeamID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        for {
            // handle items

            res, err = res.Next()

            if err != nil {
                // handle error
            }

            if res == nil {
                break
            }
        }
    }
}
```

### Parameters

| Parameter | Type                                                                                                        | Required             | Description                                |
| --------- | ----------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------ |
| `ctx`     | [context.Context](https://pkg.go.dev/context#Context)                                                       | :heavy\_check\_mark: | The context to use for the request.        |
| `request` | [operations.SchedulesListSchedulesRequest](/go-sdk/docs/models/operations/scheduleslistschedulesrequest.md) | :heavy\_check\_mark: | The request object to use for the request. |
| `opts`    | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                            | :heavy\_minus\_sign: | The options for this request.              |

### Response

[**\*operations.SchedulesListSchedulesResponse**](/go-sdk/docs/models/operations/scheduleslistschedulesresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## Create

Create Schedule

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/components"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.Create(ctx, components.V4CreateScheduleRequest{
        Name: "<value>",
        Description: "fumigate pfft kooky whoa but lighthearted popularity",
        TeamID: "<id>",
        OwnerID: "<id>",
        OwnerType: components.V4CreateScheduleRequestOwnerTypeUser,
        TimeZone: "Pacific/Easter",
        Tags: []components.V4Tag{
            components.V4Tag{
                Key: "<key>",
                Value: "<value>",
                Color: "pink",
            },
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter | Type                                                                                            | Required             | Description                                |
| --------- | ----------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------ |
| `ctx`     | [context.Context](https://pkg.go.dev/context#Context)                                           | :heavy\_check\_mark: | The context to use for the request.        |
| `request` | [components.V4CreateScheduleRequest](/go-sdk/docs/models/components/v4createschedulerequest.md) | :heavy\_check\_mark: | The request object to use for the request. |
| `opts`    | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                | :heavy\_minus\_sign: | The options for this request.              |

### Response

[**\*operations.SchedulesCreateScheduleResponse**](/go-sdk/docs/models/operations/schedulescreatescheduleresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## Delete

Delete Schedule

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.Delete(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.Body != nil {
        // handle response
    }
}
```

### Parameters

| Parameter    | Type                                                             | Required             | Description                         |
| ------------ | ---------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`        | [context.Context](https://pkg.go.dev/context#Context)            | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `opts`       | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.SchedulesDeleteScheduleResponse**](/go-sdk/docs/models/operations/schedulesdeletescheduleresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## GetByID

Get Schedule by ID

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.GetByID(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter    | Type                                                             | Required             | Description                         |
| ------------ | ---------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`        | [context.Context](https://pkg.go.dev/context#Context)            | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `opts`       | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.SchedulesGetScheduleByIDResponse**](/go-sdk/docs/models/operations/schedulesgetschedulebyidresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## Update

Update Schedule

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/components"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.Update(ctx, "<id>", components.V4UpdateScheduleRequest{
        Name: "<value>",
        Description: "smoothly festival unruly alert now far provided absentmindedly",
        OwnerID: "<id>",
        OwnerType: components.V4UpdateScheduleRequestOwnerTypeSquad,
        Tags: []components.V4Tag{},
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter                 | Type                                                                                            | Required             | Description                         |
| ------------------------- | ----------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`                     | [context.Context](https://pkg.go.dev/context#Context)                                           | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID`              | `string`                                                                                        | :heavy\_check\_mark: | N/A                                 |
| `v4UpdateScheduleRequest` | [components.V4UpdateScheduleRequest](/go-sdk/docs/models/components/v4updateschedulerequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                    | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.SchedulesUpdateScheduleResponse**](/go-sdk/docs/models/operations/schedulesupdatescheduleresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## PauseResume

Pause/Resume Schedule

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.PauseResume(ctx, "<id>", operations.SchedulesPauseresumeScheduleRequestBody{})
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter     | Type                                                                                                                            | Required             | Description                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`         | [context.Context](https://pkg.go.dev/context#Context)                                                                           | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID`  | `string`                                                                                                                        | :heavy\_check\_mark: | N/A                                 |
| `requestBody` | [operations.SchedulesPauseresumeScheduleRequestBody](/go-sdk/docs/models/operations/schedulespauseresumeschedulerequestbody.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`        | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                                | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.SchedulesPauseresumeScheduleResponse**](/go-sdk/docs/models/operations/schedulespauseresumescheduleresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## ChangeTimezone

Change Timezone

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.ChangeTimezone(ctx, "<id>", operations.SchedulesChangeTimezoneRequestBody{})
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter     | Type                                                                                                                  | Required             | Description                         |
| ------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`         | [context.Context](https://pkg.go.dev/context#Context)                                                                 | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID`  | `string`                                                                                                              | :heavy\_check\_mark: | N/A                                 |
| `requestBody` | [operations.SchedulesChangeTimezoneRequestBody](/go-sdk/docs/models/operations/scheduleschangetimezonerequestbody.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`        | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                      | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.SchedulesChangeTimezoneResponse**](/go-sdk/docs/models/operations/scheduleschangetimezoneresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## Clone

Clone Schedule

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.Clone(ctx, "<id>", operations.SchedulesCloneScheduleRequestBody{})
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter     | Type                                                                                                                | Required             | Description                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`         | [context.Context](https://pkg.go.dev/context#Context)                                                               | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID`  | `string`                                                                                                            | :heavy\_check\_mark: | N/A                                 |
| `requestBody` | [operations.SchedulesCloneScheduleRequestBody](/go-sdk/docs/models/operations/schedulescloneschedulerequestbody.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`        | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                    | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.SchedulesCloneScheduleResponse**](/go-sdk/docs/models/operations/schedulesclonescheduleresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## GetIcalLink

Get Schedule ICal Link

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.GetIcalLink(ctx, "<id>", false)
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter    | Type                                                             | Required             | Description                         |
| ------------ | ---------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`        | [context.Context](https://pkg.go.dev/context#Context)            | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `myOnCall`   | `bool`                                                           | :heavy\_check\_mark: | N/A                                 |
| `opts`       | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ExportGetScheduleIcalLinkResponse**](/go-sdk/docs/models/operations/exportgetscheduleicallinkresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## RefreshIcalLink

Refresh Schedule ICal Link

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.RefreshIcalLink(ctx, "<id>", true, operations.ExportRefreshScheduleIcalLinkRequestBody{})
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter     | Type                                                                                                                              | Required             | Description                         |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`         | [context.Context](https://pkg.go.dev/context#Context)                                                                             | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID`  | `string`                                                                                                                          | :heavy\_check\_mark: | N/A                                 |
| `myOnCall`    | `bool`                                                                                                                            | :heavy\_check\_mark: | N/A                                 |
| `requestBody` | [operations.ExportRefreshScheduleIcalLinkRequestBody](/go-sdk/docs/models/operations/exportrefreshscheduleicallinkrequestbody.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`        | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                                  | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ExportRefreshScheduleIcalLinkResponse**](/go-sdk/docs/models/operations/exportrefreshscheduleicallinkresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## CreateIcalLink

Create Schedule ICal Link

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.CreateIcalLink(ctx, "<id>", true, operations.ExportCreateScheduleIcalLinkRequestBody{})
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter     | Type                                                                                                                            | Required             | Description                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`         | [context.Context](https://pkg.go.dev/context#Context)                                                                           | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID`  | `string`                                                                                                                        | :heavy\_check\_mark: | N/A                                 |
| `myOnCall`    | `bool`                                                                                                                          | :heavy\_check\_mark: | N/A                                 |
| `requestBody` | [operations.ExportCreateScheduleIcalLinkRequestBody](/go-sdk/docs/models/operations/exportcreatescheduleicallinkrequestbody.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`        | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                                | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ExportCreateScheduleIcalLinkResponse**](/go-sdk/docs/models/operations/exportcreatescheduleicallinkresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## CreateScheduleOverride

Create Schedule Override

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/components"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.CreateScheduleOverride(ctx, "<id>", components.V4CreateScheduleOverrideRequest{
        StartTime: "<value>",
        EndTime: "<value>",
        Reason: "<value>",
        OverriddenParticipant: components.V4OverrideParticipantGroup{
            Group: []components.V4Participant{
                components.V4Participant{
                    ID: "<id>",
                    Type: "<value>",
                },
            },
        },
        OverrideWith: components.V4OverrideParticipantGroup{
            Group: []components.V4Participant{
                components.V4Participant{
                    ID: "<id>",
                    Type: "<value>",
                },
            },
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter                         | Type                                                                                                            | Required             | Description                         |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`                             | [context.Context](https://pkg.go.dev/context#Context)                                                           | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID`                      | `string`                                                                                                        | :heavy\_check\_mark: | N/A                                 |
| `v4CreateScheduleOverrideRequest` | [components.V4CreateScheduleOverrideRequest](/go-sdk/docs/models/components/v4createscheduleoverriderequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                            | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.OverridesCreateScheduleOverrideResponse**](/go-sdk/docs/models/operations/overridescreatescheduleoverrideresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |

## DeleteRotation

Delete Rotation

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Schedules.DeleteRotation(ctx, "<id>", "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.Body != nil {
        // handle response
    }
}
```

### Parameters

| Parameter    | Type                                                             | Required             | Description                         |
| ------------ | ---------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`        | [context.Context](https://pkg.go.dev/context#Context)            | :heavy\_check\_mark: | The context to use for the request. |
| `scheduleID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `rotationID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `opts`       | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.RotationsDeleteRotationResponse**](/go-sdk/docs/models/operations/rotationsdeleterotationresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/sdks/schedules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
