machineep

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkUpsertMachinesEndpoint

type BulkUpsertMachinesEndpoint struct{}

Creates or updates multiple machines for the account, matched by name or serial number (case-insensitive), then writes asynchronously — 202 with a job to poll.

func (*BulkUpsertMachinesEndpoint) Materialize

type BulkUpsertMachinesRequest

type BulkUpsertMachinesRequest struct {
	// Machines to create or update, matched by name or serial number (case-insensitive)
	// within the account.
	Machines []UpsertMachineInput `json:"machines" validate:"required,min=1,max=1000,dive"`
}

BulkUpsertMachinesRequest is the request to bulk upsert machines.

func (*BulkUpsertMachinesRequest) SchemaExample

func (*BulkUpsertMachinesRequest) SchemaExample() any

type CreateMachineEndpoint

type CreateMachineEndpoint struct{}

Creates a machine and assigns it to a department.

Returns a conflict error if another machine in your account already uses the same name, and a not-found error if the department does not belong to your account. The department cannot be changed once the machine exists.

func (*CreateMachineEndpoint) Materialize

type CreateMachineRequest

type CreateMachineRequest struct {
	// Display name of the machine.
	//
	// Must be unique within your account; maximum 255 characters.
	Name string `json:"name" validate:"required,max=255"`
	// Serial number of the machine.
	//
	// Maximum 255 characters.
	SerialNumber string `json:"serial_number" validate:"required,max=255"`
	// Free-form notes about the machine.
	Notes field.Optional[string] `json:"notes,omitzero"`
	// ID of the department this machine belongs to.
	//
	// Must reference a department in your account.
	DepartmentID string `json:"department_id" validate:"required"`
}

Request to create a machine.

func (*CreateMachineRequest) SchemaExample

func (*CreateMachineRequest) SchemaExample() any

type DeleteMachineEndpoint

type DeleteMachineEndpoint struct{}

Deletes a machine.

Deletion is permanent, and repeating the call reports that the machine has already been deleted. Downtime events and schedule lines already logged against the machine are kept rather than removed with it.

func (*DeleteMachineEndpoint) Materialize

type DeleteMachineRequest

type DeleteMachineRequest struct {
	// ID of the machine to delete.
	MachineID string `path:"id" validate:"required"`
}

Request to delete a machine.

type ExportMachinesEndpoint

type ExportMachinesEndpoint struct{}

Starts an export of every matching machine and returns the job that tracks it.

func (*ExportMachinesEndpoint) Materialize

type ExportMachinesRequest

type ExportMachinesRequest struct {
	// Free-text search term matched against machine names.
	Query *string `json:"q"`
}

Filters which machines land in the exported file.

func (*ExportMachinesRequest) SchemaExample

func (*ExportMachinesRequest) SchemaExample() any

type ListMachinesEndpoint

type ListMachinesEndpoint struct{}

Returns a paginated list of machines in your account, most recently created first.

The search term matches the machine name.

type ListMachinesRequest

type ListMachinesRequest struct {
	apiresource.PaginationRequest
}

Request to list machines.

type MachineSvcConfig

type MachineSvcConfig struct {
	// CoreClient (required) is the core-service fulfillment gRPC client.
	CoreClient pb.CoreFulfillmentServiceClient
}

type RetrieveMachineEndpoint

type RetrieveMachineEndpoint struct{}

Returns a machine by ID.

func (*RetrieveMachineEndpoint) Materialize

type RetrieveMachineRequest

type RetrieveMachineRequest struct {
	// ID of the machine to retrieve.
	MachineID string `path:"id" validate:"required"`
}

Request to get a machine.

type UpdateMachineEndpoint

type UpdateMachineEndpoint struct{}

Partially updates a machine.

Only the fields provided in the request are changed. Returns a conflict error if the new name is already in use by another machine in your account. A machine cannot be moved to a different department.

func (*UpdateMachineEndpoint) Materialize

type UpdateMachineRequest

type UpdateMachineRequest struct {
	// ID of the machine to update.
	MachineID string `path:"id" validate:"required"`
	// Display name of the machine.
	//
	// Must be unique within your account; maximum 255 characters.
	Name field.Optional[string] `json:"name,omitzero" validate:"omitempty,max=255"`
	// Serial number of the machine.
	//
	// Maximum 255 characters.
	SerialNumber field.Optional[string] `json:"serial_number,omitzero" validate:"omitempty,max=255"`
	// Free-form notes about the machine.
	Notes field.Optional[string] `json:"notes,omitzero"`
}

Request to partially update a machine.

func (*UpdateMachineRequest) SchemaExample

func (*UpdateMachineRequest) SchemaExample() any

type UpsertMachineInput

type UpsertMachineInput struct {
	// Display name of the machine. Rows match existing machines by name or serial number
	// (case-insensitive); a row whose name and serial match two different machines fails.
	Name string `json:"name" validate:"required,max=255"`
	// Serial number of the machine. Also used for matching — see `name`.
	SerialNumber string `json:"serial_number" validate:"required,max=255"`
	// Free-form notes about the machine. Preserved when omitted on update.
	Notes field.Optional[string] `json:"notes,omitzero"`
	// Department this machine belongs to, referenced by `id` or `name`. Create-only.
	Department apirequest.ObjectIdentifier `json:"department" validate:"required"`
}

UpsertMachineInput is the input for a single machine in a bulk upsert operation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL