Documentation
¶
Overview ¶
Package abm provides a Go client for the Apple Business Manager API.
Index ¶
- Constants
- func NewAssertion(ctx context.Context, clientID, keyID, privateKey string) (string, error)
- func NewTokenSource(ctx context.Context, httpClient *http.Client, ...) (oauth2.TokenSource, error)
- func PageIterator[T any](ctx context.Context, client *http.Client, decoder PageDecoderFunc[T], ...) iter.Seq2[T, error]
- type APIError
- type AppleCareCoverage
- type AppleCareCoverageAttributes
- type AppleCareCoveragePaymentType
- type AppleCareCoverageResponse
- type AppleCareCoverageStatus
- type Client
- func (c *Client) CreateOrgDeviceActivity(ctx context.Context, request OrgDeviceActivityCreateRequest) (*OrgDeviceActivityResponse, error)
- func (c *Client) FetchOrgDevicePartNumbers(ctx context.Context) ([]string, error)
- func (c *Client) GetMDMServerDeviceLinkages(ctx context.Context, mdmServerID string, ...) (*MDMServerDevicesLinkagesResponse, error)
- func (c *Client) GetMDMServers(ctx context.Context, options *GetMDMServersOptions) (*MDMServersResponse, error)
- func (c *Client) GetOrgDevice(ctx context.Context, orgDeviceID string, options *GetOrgDeviceOptions) (*OrgDeviceResponse, error)
- func (c *Client) GetOrgDeviceActivity(ctx context.Context, orgDeviceActivityID string, ...) (*OrgDeviceActivityResponse, error)
- func (c *Client) GetOrgDeviceAppleCareCoverage(ctx context.Context, orgDeviceID string, ...) (*AppleCareCoverageResponse, error)
- func (c *Client) GetOrgDeviceAssignedServer(ctx context.Context, orgDeviceID string, ...) (*MDMServerResponse, error)
- func (c *Client) GetOrgDeviceAssignedServerLinkage(ctx context.Context, orgDeviceID string) (*OrgDeviceAssignedServerLinkageResponse, error)
- func (c *Client) GetOrgDevices(ctx context.Context, options *GetOrgDevicesOptions) (*OrgDevicesResponse, error)
- type DocumentLinks
- type ErrorLinks
- type ErrorLinksAssociated
- type ErrorLinksAssociatedMeta
- type ErrorResponse
- type ErrorResponseError
- type ErrorSource
- type GetMDMServerDeviceLinkagesOptions
- type GetMDMServersOptions
- type GetOrgDeviceActivityOptions
- type GetOrgDeviceAppleCareCoverageOptions
- type GetOrgDeviceAssignedServerOptions
- type GetOrgDeviceOptions
- type GetOrgDevicesOptions
- type JSONPointer
- type MDMServer
- type MDMServerAttributes
- type MDMServerDevicesLinkageData
- type MDMServerDevicesLinkagesResponse
- type MDMServerRelationships
- type MDMServerRelationshipsDevices
- type MDMServerRelationshipsDevicesData
- type MDMServerResponse
- type MDMServersResponse
- type OrgDevice
- type OrgDeviceActivity
- type OrgDeviceActivityAttributes
- type OrgDeviceActivityCreateRequest
- type OrgDeviceActivityCreateRequestData
- type OrgDeviceActivityCreateRequestDataAttributes
- type OrgDeviceActivityCreateRequestDataRelationships
- type OrgDeviceActivityCreateRequestDataRelationshipsDevices
- type OrgDeviceActivityCreateRequestDataRelationshipsDevicesData
- type OrgDeviceActivityCreateRequestDataRelationshipsMDMServer
- type OrgDeviceActivityCreateRequestDataRelationshipsMDMServerData
- type OrgDeviceActivityResponse
- type OrgDeviceActivityType
- type OrgDeviceAssignedServerLinkageData
- type OrgDeviceAssignedServerLinkageResponse
- type OrgDeviceAttributes
- type OrgDeviceAttributesProductFamily
- type OrgDeviceAttributesPurchaseSourceType
- type OrgDeviceAttributesStatus
- type OrgDeviceRelationships
- type OrgDeviceRelationshipsAppleCareCoverage
- type OrgDeviceRelationshipsAssignedServer
- type OrgDeviceResponse
- type OrgDevicesResponse
- type PageDecoderFunc
- type PagedDocumentLinks
- type PagingInformation
- type PagingInformationPaging
- type Parameter
- type RelationshipLinks
- type ResourceLinks
Constants ¶
const ( // Audience is the Apple Business Manager OAuth2 audience. Audience = "https://account.apple.com/auth/oauth2/v2/token" // TokenURL is the Apple Business Manager OAuth2 token URL. TokenURL = "https://account.apple.com/auth/oauth2/token" // ClientAssertionURI is the client assertion type for JWT bearer. ClientAssertionURI = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" // ScopeBusinessAPI is the Apple Business Manager Business API scope. ScopeBusinessAPI = "business.api" )
const (
// DefaultAPIBaseURL is the default Apple Business Manager API base URL.
DefaultAPIBaseURL = "https://api-business.apple.com/"
)
Variables ¶
This section is empty.
Functions ¶
func NewAssertion ¶
NewAssertion creates a signed client assertion for Apple Business Manager (ABM).
func NewTokenSource ¶
func NewTokenSource(ctx context.Context, httpClient *http.Client, clientID, clientAssertion, scope string) (oauth2.TokenSource, error)
NewTokenSource returns a token source for Apple Business Manager using a JWT client assertion.
Types ¶
type APIError ¶
type APIError struct {
StatusCode int
Status string
Response ErrorResponse
Body string
}
APIError contains API-level error details returned from Apple Business Manager.
type AppleCareCoverage ¶
type AppleCareCoverage struct {
Attributes *AppleCareCoverageAttributes `json:"attributes,omitzero"`
ID string `json:"id"`
Type string `json:"type"`
}
AppleCareCoverage contains AppleCare coverage data.
type AppleCareCoverageAttributes ¶
type AppleCareCoverageAttributes struct {
AgreementNumber string `json:"agreementNumber,omitzero"`
ContractCancelDateTime time.Time `json:"contractCancelDateTime,omitzero"`
Description string `json:"description,omitzero"`
EndDateTime time.Time `json:"endDateTime,omitzero"`
IsCanceled bool `json:"isCanceled,omitzero"`
IsRenewable bool `json:"isRenewable,omitzero"`
PaymentType AppleCareCoveragePaymentType `json:"paymentType,omitzero"`
StartDateTime time.Time `json:"startDateTime,omitzero"`
Status AppleCareCoverageStatus `json:"status,omitzero"`
}
AppleCareCoverageAttributes contains AppleCare coverage attributes.
type AppleCareCoveragePaymentType ¶
type AppleCareCoveragePaymentType string
AppleCareCoveragePaymentType is the payment type of an AppleCare coverage plan.
const ( AppleCareCoveragePaymentTypeABESubscription AppleCareCoveragePaymentType = "ABE_SUBSCRIPTION" AppleCareCoveragePaymentTypePaidUpFront AppleCareCoveragePaymentType = "PAID_UP_FRONT" AppleCareCoveragePaymentTypeSubscription AppleCareCoveragePaymentType = "SUBSCRIPTION" AppleCareCoveragePaymentTypeNone AppleCareCoveragePaymentType = "NONE" )
type AppleCareCoverageResponse ¶
type AppleCareCoverageResponse struct {
Data []AppleCareCoverage `json:"data"`
Links PagedDocumentLinks `json:"links"`
Meta *PagingInformation `json:"meta,omitzero"`
}
AppleCareCoverageResponse contains AppleCare coverage resources for a device.
type AppleCareCoverageStatus ¶
type AppleCareCoverageStatus string
AppleCareCoverageStatus is the status of an AppleCare coverage plan.
const ( AppleCareCoverageStatusActive AppleCareCoverageStatus = "ACTIVE" AppleCareCoverageStatusInactive AppleCareCoverageStatus = "INACTIVE" )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an Apple Business Manager (ABM) API client. The embedded HTTP client is already wrapped with an OAuth2 transport and must not be shared with other callers after construction.
func NewClientWithBaseURL ¶
func NewClientWithBaseURL(httpClient *http.Client, tokenSource oauth2.TokenSource, baseURL string) (*Client, error)
NewClientWithBaseURL returns an authenticated ABM client using the provided API base URL.
func (*Client) CreateOrgDeviceActivity ¶
func (c *Client) CreateOrgDeviceActivity(ctx context.Context, request OrgDeviceActivityCreateRequest) (*OrgDeviceActivityResponse, error)
CreateOrgDeviceActivity creates an org-device activity that assigns or unassigns devices.
func (*Client) FetchOrgDevicePartNumbers ¶
FetchOrgDevicePartNumbers returns all org-device part numbers for the organization, automatically following pagination until all pages are consumed.
func (*Client) GetMDMServerDeviceLinkages ¶
func (c *Client) GetMDMServerDeviceLinkages(ctx context.Context, mdmServerID string, options *GetMDMServerDeviceLinkagesOptions) (*MDMServerDevicesLinkagesResponse, error)
GetMDMServerDeviceLinkages gets all org-device serial IDs linked to a device management service.
func (*Client) GetMDMServers ¶
func (c *Client) GetMDMServers(ctx context.Context, options *GetMDMServersOptions) (*MDMServersResponse, error)
GetMDMServers gets a list of device management services.
func (*Client) GetOrgDevice ¶
func (c *Client) GetOrgDevice(ctx context.Context, orgDeviceID string, options *GetOrgDeviceOptions) (*OrgDeviceResponse, error)
GetOrgDevice gets information for a single organization device.
func (*Client) GetOrgDeviceActivity ¶
func (c *Client) GetOrgDeviceActivity(ctx context.Context, orgDeviceActivityID string, options *GetOrgDeviceActivityOptions) (*OrgDeviceActivityResponse, error)
GetOrgDeviceActivity gets organization device activity information.
func (*Client) GetOrgDeviceAppleCareCoverage ¶
func (c *Client) GetOrgDeviceAppleCareCoverage(ctx context.Context, orgDeviceID string, options *GetOrgDeviceAppleCareCoverageOptions) (*AppleCareCoverageResponse, error)
GetOrgDeviceAppleCareCoverage gets AppleCare coverage information for a single organization device.
func (*Client) GetOrgDeviceAssignedServer ¶
func (c *Client) GetOrgDeviceAssignedServer(ctx context.Context, orgDeviceID string, options *GetOrgDeviceAssignedServerOptions) (*MDMServerResponse, error)
GetOrgDeviceAssignedServer gets assigned device-management service information for a device.
func (*Client) GetOrgDeviceAssignedServerLinkage ¶
func (c *Client) GetOrgDeviceAssignedServerLinkage(ctx context.Context, orgDeviceID string) (*OrgDeviceAssignedServerLinkageResponse, error)
GetOrgDeviceAssignedServerLinkage gets assigned device-management service ID linkage for a device.
func (*Client) GetOrgDevices ¶
func (c *Client) GetOrgDevices(ctx context.Context, options *GetOrgDevicesOptions) (*OrgDevicesResponse, error)
GetOrgDevices gets a list of organization devices.
type DocumentLinks ¶
type DocumentLinks struct {
Self string `json:"self"`
}
DocumentLinks contains links related to the current document.
type ErrorLinks ¶
type ErrorLinks struct {
About string `json:"about,omitzero"`
Associated any `json:"associated,omitzero"`
}
ErrorLinks contains links related to an error object.
type ErrorLinksAssociated ¶
type ErrorLinksAssociated struct {
Href string `json:"href,omitzero"`
Meta *ErrorLinksAssociatedMeta `json:"meta,omitzero"`
}
ErrorLinksAssociated contains structured associated error-link details.
type ErrorLinksAssociatedMeta ¶
type ErrorLinksAssociatedMeta struct {
Source string `json:"source,omitzero"`
}
ErrorLinksAssociatedMeta contains metadata for associated error links.
type ErrorResponse ¶
type ErrorResponse struct {
Errors []ErrorResponseError `json:"errors,omitempty"`
}
ErrorResponse contains ABM API errors.
type ErrorResponseError ¶
type ErrorResponseError struct {
Code string `json:"code"`
Detail string `json:"detail"`
ID string `json:"id,omitzero"`
Links *ErrorLinks `json:"links,omitzero"`
Meta map[string]any `json:"meta,omitempty"`
Source *ErrorSource `json:"source,omitzero"`
Status string `json:"status"`
Title string `json:"title"`
}
ErrorResponseError contains one ABM API error object.
type ErrorSource ¶
type ErrorSource struct {
Pointer string `json:"pointer,omitzero"`
Parameter string `json:"parameter,omitzero"`
}
ErrorSource describes JSON Pointer or parameter source context for an error.
type GetMDMServerDeviceLinkagesOptions ¶
type GetMDMServerDeviceLinkagesOptions struct {
Limit int
}
GetMDMServerDeviceLinkagesOptions contains optional query parameters for Client.GetMDMServerDeviceLinkages.
type GetMDMServersOptions ¶
GetMDMServersOptions contains optional query parameters for Client.GetMDMServers.
type GetOrgDeviceActivityOptions ¶
type GetOrgDeviceActivityOptions struct {
Fields []string
}
GetOrgDeviceActivityOptions contains optional query parameters for Client.GetOrgDeviceActivity.
type GetOrgDeviceAppleCareCoverageOptions ¶
GetOrgDeviceAppleCareCoverageOptions contains optional query parameters for GetOrgDeviceAppleCareCoverage.
type GetOrgDeviceAssignedServerOptions ¶
type GetOrgDeviceAssignedServerOptions struct {
Fields []string
}
GetOrgDeviceAssignedServerOptions contains optional query parameters for Client.GetOrgDeviceAssignedServer.
type GetOrgDeviceOptions ¶
type GetOrgDeviceOptions struct {
Fields []string
}
GetOrgDeviceOptions contains optional query parameters for GetOrgDevice.
type GetOrgDevicesOptions ¶
GetOrgDevicesOptions contains optional query parameters for GetOrgDevices.
type JSONPointer ¶
type JSONPointer struct {
Pointer string `json:"pointer"`
}
JSONPointer contains a JSON Pointer source.
type MDMServer ¶
type MDMServer struct {
Attributes *MDMServerAttributes `json:"attributes,omitzero"`
ID string `json:"id"`
Relationships *MDMServerRelationships `json:"relationships,omitzero"`
Type string `json:"type"`
}
MDMServer is a device management service resource.
type MDMServerAttributes ¶
type MDMServerAttributes struct {
CreatedDateTime time.Time `json:"createdDateTime,omitzero"`
ServerName string `json:"serverName,omitzero"`
ServerType string `json:"serverType,omitzero"`
UpdatedDateTime time.Time `json:"updatedDateTime,omitzero"`
}
MDMServerAttributes are fields describing an MDM server.
type MDMServerDevicesLinkageData ¶
MDMServerDevicesLinkageData contains an org-device linkage entry.
type MDMServerDevicesLinkagesResponse ¶
type MDMServerDevicesLinkagesResponse struct {
Data []MDMServerDevicesLinkageData `json:"data"`
Links PagedDocumentLinks `json:"links"`
Meta *PagingInformation `json:"meta,omitzero"`
}
MDMServerDevicesLinkagesResponse contains org-device linkages for a specific MDM server.
type MDMServerRelationships ¶
type MDMServerRelationships struct {
Devices *MDMServerRelationshipsDevices `json:"devices,omitzero"`
}
MDMServerRelationships contains relationship resources for an MDM server.
type MDMServerRelationshipsDevices ¶
type MDMServerRelationshipsDevices struct {
Data []MDMServerRelationshipsDevicesData `json:"data,omitempty"`
Links *RelationshipLinks `json:"links,omitzero"`
Meta *PagingInformation `json:"meta,omitzero"`
}
MDMServerRelationshipsDevices represents the devices relationship in an MDM server.
type MDMServerRelationshipsDevicesData ¶
MDMServerRelationshipsDevicesData is an org-device linkage in an MDM-server relationship.
type MDMServerResponse ¶
type MDMServerResponse struct {
Data MDMServer `json:"data"`
Included []OrgDevice `json:"included,omitempty"`
Links DocumentLinks `json:"links"`
}
MDMServerResponse contains a single MDM server resource.
type MDMServersResponse ¶
type MDMServersResponse struct {
Data []MDMServer `json:"data"`
Included []OrgDevice `json:"included,omitempty"`
Links PagedDocumentLinks `json:"links"`
Meta *PagingInformation `json:"meta,omitzero"`
}
MDMServersResponse contains a list of MDM server resources.
type OrgDevice ¶
type OrgDevice struct {
Attributes *OrgDeviceAttributes `json:"attributes,omitzero"`
ID string `json:"id"`
Links *ResourceLinks `json:"links,omitzero"`
Relationships *OrgDeviceRelationships `json:"relationships,omitzero"`
Type string `json:"type"`
}
OrgDevice represents an organization device resource.
type OrgDeviceActivity ¶
type OrgDeviceActivity struct {
Attributes *OrgDeviceActivityAttributes `json:"attributes,omitzero"`
ID string `json:"id"`
Links *ResourceLinks `json:"links,omitzero"`
Type string `json:"type"`
}
OrgDeviceActivity is an activity resource for assigning or unassigning devices.
type OrgDeviceActivityAttributes ¶
type OrgDeviceActivityAttributes struct {
CompletedDateTime time.Time `json:"completedDateTime,omitzero"`
CreatedDateTime time.Time `json:"createdDateTime,omitzero"`
DownloadURL string `json:"downloadUrl,omitzero"`
Status string `json:"status,omitzero"`
SubStatus string `json:"subStatus,omitzero"`
}
OrgDeviceActivityAttributes are fields describing an org-device activity.
type OrgDeviceActivityCreateRequest ¶
type OrgDeviceActivityCreateRequest struct {
Data OrgDeviceActivityCreateRequestData `json:"data"`
}
OrgDeviceActivityCreateRequest is the request payload for creating org-device activities.
type OrgDeviceActivityCreateRequestData ¶
type OrgDeviceActivityCreateRequestData struct {
Attributes OrgDeviceActivityCreateRequestDataAttributes `json:"attributes"`
Relationships OrgDeviceActivityCreateRequestDataRelationships `json:"relationships"`
Type string `json:"type"`
}
OrgDeviceActivityCreateRequestData is the data section of activity creation requests.
type OrgDeviceActivityCreateRequestDataAttributes ¶
type OrgDeviceActivityCreateRequestDataAttributes struct {
ActivityType OrgDeviceActivityType `json:"activityType"`
}
OrgDeviceActivityCreateRequestDataAttributes are activity creation attributes.
type OrgDeviceActivityCreateRequestDataRelationships ¶
type OrgDeviceActivityCreateRequestDataRelationships struct {
Devices OrgDeviceActivityCreateRequestDataRelationshipsDevices `json:"devices"`
MDMServer OrgDeviceActivityCreateRequestDataRelationshipsMDMServer `json:"mdmServer"`
}
OrgDeviceActivityCreateRequestDataRelationships are activity creation relationships.
type OrgDeviceActivityCreateRequestDataRelationshipsDevices ¶
type OrgDeviceActivityCreateRequestDataRelationshipsDevices struct {
Data []OrgDeviceActivityCreateRequestDataRelationshipsDevicesData `json:"data"`
}
OrgDeviceActivityCreateRequestDataRelationshipsDevices links devices in activity creation.
type OrgDeviceActivityCreateRequestDataRelationshipsDevicesData ¶
type OrgDeviceActivityCreateRequestDataRelationshipsDevicesData struct {
ID string `json:"id"`
Type string `json:"type"`
}
OrgDeviceActivityCreateRequestDataRelationshipsDevicesData is a device linkage used in activity creation.
type OrgDeviceActivityCreateRequestDataRelationshipsMDMServer ¶
type OrgDeviceActivityCreateRequestDataRelationshipsMDMServer struct {
Data OrgDeviceActivityCreateRequestDataRelationshipsMDMServerData `json:"data"`
}
OrgDeviceActivityCreateRequestDataRelationshipsMDMServer links an MDM server in activity creation.
type OrgDeviceActivityCreateRequestDataRelationshipsMDMServerData ¶
type OrgDeviceActivityCreateRequestDataRelationshipsMDMServerData struct {
ID string `json:"id"`
Type string `json:"type"`
}
OrgDeviceActivityCreateRequestDataRelationshipsMDMServerData is an MDM-server linkage used in activity creation.
type OrgDeviceActivityResponse ¶
type OrgDeviceActivityResponse struct {
Data OrgDeviceActivity `json:"data"`
Links DocumentLinks `json:"links"`
}
OrgDeviceActivityResponse contains a single org-device activity resource.
type OrgDeviceActivityType ¶
type OrgDeviceActivityType string
OrgDeviceActivityType is the type of an org-device activity.
const ( OrgDeviceActivityTypeAssignDevices OrgDeviceActivityType = "ASSIGN_DEVICES" OrgDeviceActivityTypeUnassignDevices OrgDeviceActivityType = "UNASSIGN_DEVICES" )
type OrgDeviceAssignedServerLinkageData ¶
OrgDeviceAssignedServerLinkageData is the assigned server linkage object.
type OrgDeviceAssignedServerLinkageResponse ¶
type OrgDeviceAssignedServerLinkageResponse struct {
Data OrgDeviceAssignedServerLinkageData `json:"data"`
Links DocumentLinks `json:"links"`
}
OrgDeviceAssignedServerLinkageResponse contains the assigned server linkage for a device.
type OrgDeviceAttributes ¶
type OrgDeviceAttributes struct {
AddedToOrgDateTime time.Time `json:"addedToOrgDateTime,omitzero"`
ReleasedFromOrgDateTime time.Time `json:"releasedFromOrgDateTime,omitzero"`
Color string `json:"color,omitzero"`
DeviceCapacity string `json:"deviceCapacity,omitzero"`
DeviceModel string `json:"deviceModel,omitzero"`
EID string `json:"eid,omitzero"`
IMEI []string `json:"imei,omitempty"`
MEID []string `json:"meid,omitempty"`
WifiMacAddress []string `json:"wifiMacAddress,omitempty"`
BluetoothMacAddress []string `json:"bluetoothMacAddress,omitempty"`
EthernetMacAddress []string `json:"ethernetMacAddress,omitempty"`
OrderDateTime time.Time `json:"orderDateTime,omitzero"`
OrderNumber string `json:"orderNumber,omitzero"`
PartNumber string `json:"partNumber,omitzero"`
ProductFamily OrgDeviceAttributesProductFamily `json:"productFamily,omitzero"`
ProductType string `json:"productType,omitzero"`
PurchaseSourceType OrgDeviceAttributesPurchaseSourceType `json:"purchaseSourceType,omitzero"`
PurchaseSourceID string `json:"purchaseSourceId,omitzero"`
SerialNumber string `json:"serialNumber,omitzero"`
Status OrgDeviceAttributesStatus `json:"status,omitzero"`
UpdatedDateTime time.Time `json:"updatedDateTime,omitzero"`
}
OrgDeviceAttributes contains attributes for an organization device resource.
type OrgDeviceAttributesProductFamily ¶
type OrgDeviceAttributesProductFamily string
OrgDeviceAttributesProductFamily is the product family of an organization device.
const ( ProductFamilyIPhone OrgDeviceAttributesProductFamily = "iPhone" ProductFamilyIPad OrgDeviceAttributesProductFamily = "iPad" ProductFamilyMac OrgDeviceAttributesProductFamily = "Mac" ProductFamilyAppleTV OrgDeviceAttributesProductFamily = "AppleTV" ProductFamilyWatch OrgDeviceAttributesProductFamily = "Watch" ProductFamilyVision OrgDeviceAttributesProductFamily = "Vision" )
type OrgDeviceAttributesPurchaseSourceType ¶
type OrgDeviceAttributesPurchaseSourceType string
OrgDeviceAttributesPurchaseSourceType is the purchase source type of an organization device.
const ( PurchaseSourceTypeApple OrgDeviceAttributesPurchaseSourceType = "APPLE" PurchaseSourceTypeReseller OrgDeviceAttributesPurchaseSourceType = "RESELLER" PurchaseSourceTypeManuallyAdded OrgDeviceAttributesPurchaseSourceType = "MANUALLY_ADDED" )
type OrgDeviceAttributesStatus ¶
type OrgDeviceAttributesStatus string
OrgDeviceAttributesStatus is the assignment status of an organization device.
const ( StatusAssigned OrgDeviceAttributesStatus = "ASSIGNED" StatusUnAssigned OrgDeviceAttributesStatus = "UNASSIGNED" )
type OrgDeviceRelationships ¶
type OrgDeviceRelationships struct {
AssignedServer *OrgDeviceRelationshipsAssignedServer `json:"assignedServer,omitzero"`
AppleCareCoverage *OrgDeviceRelationshipsAppleCareCoverage `json:"appleCareCoverage,omitzero"`
}
OrgDeviceRelationships contains links to relationship resources for an org device.
type OrgDeviceRelationshipsAppleCareCoverage ¶
type OrgDeviceRelationshipsAppleCareCoverage struct {
Links *RelationshipLinks `json:"links,omitzero"`
}
OrgDeviceRelationshipsAppleCareCoverage describes apple-care relationship links.
type OrgDeviceRelationshipsAssignedServer ¶
type OrgDeviceRelationshipsAssignedServer struct {
Links *RelationshipLinks `json:"links,omitzero"`
}
OrgDeviceRelationshipsAssignedServer describes assigned-server relationship links.
type OrgDeviceResponse ¶
type OrgDeviceResponse struct {
Data OrgDevice `json:"data"`
Links DocumentLinks `json:"links"`
}
OrgDeviceResponse contains a single organization device resource.
type OrgDevicesResponse ¶
type OrgDevicesResponse struct {
Data []OrgDevice `json:"data"`
Links PagedDocumentLinks `json:"links"`
Meta *PagingInformation `json:"meta,omitzero"`
}
OrgDevicesResponse contains a list of organization device resources.
type PageDecoderFunc ¶
PageDecoderFunc is a function that decodes a paginated API response payload into type T and returns the next link.
type PagedDocumentLinks ¶
type PagedDocumentLinks struct {
First string `json:"first,omitzero"`
Next string `json:"next,omitzero"`
Self string `json:"self"`
}
PagedDocumentLinks contains navigation links for paginated responses.
type PagingInformation ¶
type PagingInformation struct {
Paging PagingInformationPaging `json:"paging"`
}
PagingInformation contains pagination metadata.
type PagingInformationPaging ¶
type PagingInformationPaging struct {
Limit int `json:"limit"`
NextCursor string `json:"nextCursor,omitzero"`
Total int `json:"total,omitzero"`
}
PagingInformationPaging contains pagination state values.
type Parameter ¶
type Parameter struct {
Parameter string `json:"parameter"`
}
Parameter contains an HTTP parameter source.
type RelationshipLinks ¶
type RelationshipLinks struct {
Include string `json:"include,omitzero"`
Related string `json:"related,omitzero"`
Self string `json:"self,omitzero"`
}
RelationshipLinks contains links for a relationship block.
type ResourceLinks ¶
type ResourceLinks struct {
Self string `json:"self,omitzero"`
}
ResourceLinks contains self-links for a requested resource.