# MacModels (/docs/go-sdk/mac-models)

> For AI agents: the complete documentation index is at https://www.daytona.com/llms.txt.

## MacModels [#macmodels]

```go
type MacModels struct {
	// contains filtered or unexported fields
}
```

MacModels reads the Mac model registry and advisory capacity and prices.
Obtain this concurrency-safe service from Client.MacModels.

#### MacModels.Catalog [#macmodelscatalog]

```go
func (s *MacModels) Catalog(ctx context.Context, opts *MacCatalogOptions) (*MacCatalog, error)
```

Catalog returns advisory free Macs and prices per model and region.
Nil options include all regions. Availability can change before a purchase;
a nil Price means pricing is unavailable. Invalid UTF-8 returns ErrBadRequest.

**Example**:

```go
client, err := daytona.New()
if err != nil {
	log.Print(err)
	return
}
defer func() {
	if closeErr := client.Close(); closeErr != nil {
		log.Print(closeErr)
	}
}()
catalog, err := client.MacModels().Catalog(context.Background(), nil)
if err != nil {
	log.Print(err)
	return
}
for _, region := range catalog.Regions {
	for _, entry := range region.Models {
		fmt.Println(region.ID, entry.Model.ID, entry.Available)
		if entry.Price != nil {
			fmt.Println(entry.Price.PeriodCents, entry.Price.Currency, entry.Price.Period)
		}
	}
}
```

#### MacModels.List [#macmodelslist]

```go
func (s *MacModels) List(ctx context.Context) ([]MacModel, error)
```

List returns every registered Mac model, ordered by ID. This registry is not
paginated. Malformed response fields return ErrBadRequest.

**Example**:

```go
client, err := daytona.New()
if err != nil {
	log.Print(err)
	return
}
defer func() {
	if closeErr := client.Close(); closeErr != nil {
		log.Print(closeErr)
	}
}()
models, err := client.MacModels().List(context.Background())
if err != nil {
	log.Print(err)
	return
}
for _, model := range models {
	fmt.Println(model.ID, model.Cores, model.MemoryMiB)
}
```

## MacCatalog [#maccatalog]

```go
type MacCatalog struct {
	// Regions contains matching regions.
	Regions []MacCatalogRegion
}
```

MacCatalog describes Mac availability and prices by region.

## MacCatalogModel [#maccatalogmodel]

```go
type MacCatalogModel struct {
	// Model describes the physical Mac and sandbox defaults.
	Model MacModel
	// Available is advisory; another purchase can consume this capacity.
	Available int64
	// Price is nil when pricing is unavailable.
	Price *MacPrice
}
```

MacCatalogModel combines a registered model, availability and optional price.

## MacCatalogOptions [#maccatalogoptions]

```go
type MacCatalogOptions struct {
	// Region filters the catalog; empty includes every region.
	Region string
}
```

MacCatalogOptions selects the optional catalog region filter.

## MacCatalogRegion [#maccatalogregion]

```go
type MacCatalogRegion struct {
	// ID is the region identifier.
	ID string
	// DefaultModel is the region's default model slug.
	DefaultModel string
	// Models contains model availability and prices.
	Models []MacCatalogModel
}
```

MacCatalogRegion describes the models offered in one region.

## MacModel [#macmodel]

```go
type MacModel struct {
	// ID is the model slug accepted by Reservations.Create.
	ID string
	// Name is the display name.
	Name string
	// Cores counts physical CPU cores.
	Cores int64
	// MemoryMiB is physical memory in MiB.
	MemoryMiB int64
	// DiskMiB is physical SSD capacity in MiB.
	DiskMiB int64
	// SandboxDiskMiB is disk room available to sandboxes in MiB.
	SandboxDiskMiB int64
	// MaxSandboxes is the maximum concurrent sandbox count.
	MaxSandboxes int64
	// DefaultSize is nil when no default sandbox size is available.
	DefaultSize *MacResources
}
```

MacModel is a registered Mac model and its default sandbox size.

## MacPrice [#macprice]

```go
type MacPrice struct {
	// CentsPerHour is the hourly price in currency cents.
	CentsPerHour float64
	// PeriodCents is the price of one complete period in currency cents.
	PeriodCents int64
	// Period is the billing-period duration.
	Period time.Duration
	// Currency is the price's currency code.
	Currency string
}
```

MacPrice is the price of reserving one Mac for one billing period.

## MacResources [#macresources]

```go
type MacResources struct {
	// Cores counts physical CPU cores.
	Cores int64
	// MemoryMiB is memory in MiB.
	MemoryMiB int64
	// DiskMiB is sandbox disk capacity or usage in MiB.
	DiskMiB int64
}
```

MacResources describes physical capacity or usage in CPU cores and MiB.
