orders

package
v0.20240125.1115017 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/orders Documentation

The orders SDK allows for interaction with the Azure Resource Manager Service databoxedge (API Version 2023-12-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/orders"

Client Initialization

client := orders.NewOrdersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: OrdersClient.CreateOrUpdate

ctx := context.TODO()
id := orders.NewDataBoxEdgeDeviceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue")

payload := orders.Order{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: OrdersClient.Delete

ctx := context.TODO()
id := orders.NewDataBoxEdgeDeviceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: OrdersClient.Get

ctx := context.TODO()
id := orders.NewDataBoxEdgeDeviceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: OrdersClient.ListByDataBoxEdgeDevice

ctx := context.TODO()
id := orders.NewDataBoxEdgeDeviceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue")

// alternatively `client.ListByDataBoxEdgeDevice(ctx, id)` can be used to do batched pagination
items, err := client.ListByDataBoxEdgeDeviceComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: OrdersClient.ListDCAccessCode

ctx := context.TODO()
id := orders.NewDataBoxEdgeDeviceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue")

read, err := client.ListDCAccessCode(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForOrderState

func PossibleValuesForOrderState() []string

func PossibleValuesForShipmentType

func PossibleValuesForShipmentType() []string

func ValidateDataBoxEdgeDeviceID

func ValidateDataBoxEdgeDeviceID(input interface{}, key string) (warnings []string, errors []error)

ValidateDataBoxEdgeDeviceID checks that 'input' can be parsed as a Data Box Edge Device ID

Types

type Address

type Address struct {
	AddressLine1 *string `json:"addressLine1,omitempty"`
	AddressLine2 *string `json:"addressLine2,omitempty"`
	AddressLine3 *string `json:"addressLine3,omitempty"`
	City         *string `json:"city,omitempty"`
	Country      string  `json:"country"`
	PostalCode   *string `json:"postalCode,omitempty"`
	State        *string `json:"state,omitempty"`
}

type ContactDetails

type ContactDetails struct {
	CompanyName   string   `json:"companyName"`
	ContactPerson string   `json:"contactPerson"`
	EmailList     []string `json:"emailList"`
	Phone         string   `json:"phone"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Order
}

type DCAccessCode

type DCAccessCode struct {
	Properties *DCAccessCodeProperties `json:"properties,omitempty"`
}

type DCAccessCodeProperties

type DCAccessCodeProperties struct {
	AuthCode *string `json:"authCode,omitempty"`
}

type DataBoxEdgeDeviceId

type DataBoxEdgeDeviceId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
}

DataBoxEdgeDeviceId is a struct representing the Resource ID for a Data Box Edge Device

func NewDataBoxEdgeDeviceID

func NewDataBoxEdgeDeviceID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string) DataBoxEdgeDeviceId

NewDataBoxEdgeDeviceID returns a new DataBoxEdgeDeviceId struct

func ParseDataBoxEdgeDeviceID

func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error)

ParseDataBoxEdgeDeviceID parses 'input' into a DataBoxEdgeDeviceId

func ParseDataBoxEdgeDeviceIDInsensitively

func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, error)

ParseDataBoxEdgeDeviceIDInsensitively parses 'input' case-insensitively into a DataBoxEdgeDeviceId note: this method should only be used for API response data and not user input

func (*DataBoxEdgeDeviceId) FromParseResult

func (id *DataBoxEdgeDeviceId) FromParseResult(input resourceids.ParseResult) error

func (DataBoxEdgeDeviceId) ID

func (id DataBoxEdgeDeviceId) ID() string

ID returns the formatted Data Box Edge Device ID

func (DataBoxEdgeDeviceId) Segments

func (id DataBoxEdgeDeviceId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Data Box Edge Device ID

func (DataBoxEdgeDeviceId) String

func (id DataBoxEdgeDeviceId) String() string

String returns a human-readable description of this Data Box Edge Device ID

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Order
}

type ListByDataBoxEdgeDeviceCompleteResult

type ListByDataBoxEdgeDeviceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Order
}

type ListByDataBoxEdgeDeviceOperationResponse

type ListByDataBoxEdgeDeviceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Order
}

type ListDCAccessCodeOperationResponse

type ListDCAccessCodeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DCAccessCode
}

type Order

type Order struct {
	Id         *string                `json:"id,omitempty"`
	Kind       *string                `json:"kind,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *OrderProperties       `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type OrderOperationPredicate

type OrderOperationPredicate struct {
	Id   *string
	Kind *string
	Name *string
	Type *string
}

func (OrderOperationPredicate) Matches

func (p OrderOperationPredicate) Matches(input Order) bool

type OrderProperties

type OrderProperties struct {
	ContactInformation   ContactDetails  `json:"contactInformation"`
	CurrentStatus        *OrderStatus    `json:"currentStatus,omitempty"`
	DeliveryTrackingInfo *[]TrackingInfo `json:"deliveryTrackingInfo,omitempty"`
	OrderHistory         *[]OrderStatus  `json:"orderHistory,omitempty"`
	OrderId              *string         `json:"orderId,omitempty"`
	ReturnTrackingInfo   *[]TrackingInfo `json:"returnTrackingInfo,omitempty"`
	SerialNumber         *string         `json:"serialNumber,omitempty"`
	ShipmentType         *ShipmentType   `json:"shipmentType,omitempty"`
	ShippingAddress      *Address        `json:"shippingAddress,omitempty"`
}

type OrderState

type OrderState string
const (
	OrderStateArriving               OrderState = "Arriving"
	OrderStateAwaitingDrop           OrderState = "AwaitingDrop"
	OrderStateAwaitingFulfillment    OrderState = "AwaitingFulfillment"
	OrderStateAwaitingPickup         OrderState = "AwaitingPickup"
	OrderStateAwaitingPreparation    OrderState = "AwaitingPreparation"
	OrderStateAwaitingReturnShipment OrderState = "AwaitingReturnShipment"
	OrderStateAwaitingShipment       OrderState = "AwaitingShipment"
	OrderStateCollectedAtMicrosoft   OrderState = "CollectedAtMicrosoft"
	OrderStateDeclined               OrderState = "Declined"
	OrderStateDelivered              OrderState = "Delivered"
	OrderStateLostDevice             OrderState = "LostDevice"
	OrderStatePickupCompleted        OrderState = "PickupCompleted"
	OrderStateReplacementRequested   OrderState = "ReplacementRequested"
	OrderStateReturnInitiated        OrderState = "ReturnInitiated"
	OrderStateShipped                OrderState = "Shipped"
	OrderStateShippedBack            OrderState = "ShippedBack"
	OrderStateUntracked              OrderState = "Untracked"
)

func (*OrderState) UnmarshalJSON

func (s *OrderState) UnmarshalJSON(bytes []byte) error

type OrderStatus

type OrderStatus struct {
	AdditionalOrderDetails *map[string]string `json:"additionalOrderDetails,omitempty"`
	Comments               *string            `json:"comments,omitempty"`
	Status                 OrderState         `json:"status"`
	TrackingInformation    *TrackingInfo      `json:"trackingInformation,omitempty"`
	UpdateDateTime         *string            `json:"updateDateTime,omitempty"`
}

func (*OrderStatus) GetUpdateDateTimeAsTime

func (o *OrderStatus) GetUpdateDateTimeAsTime() (*time.Time, error)

func (*OrderStatus) SetUpdateDateTimeAsTime

func (o *OrderStatus) SetUpdateDateTimeAsTime(input time.Time)

type OrdersClient

type OrdersClient struct {
	Client *resourcemanager.Client
}

func NewOrdersClientWithBaseURI

func NewOrdersClientWithBaseURI(sdkApi sdkEnv.Api) (*OrdersClient, error)

func (OrdersClient) CreateOrUpdate

func (c OrdersClient) CreateOrUpdate(ctx context.Context, id DataBoxEdgeDeviceId, input Order) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (OrdersClient) CreateOrUpdateThenPoll

func (c OrdersClient) CreateOrUpdateThenPoll(ctx context.Context, id DataBoxEdgeDeviceId, input Order) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (OrdersClient) Delete

Delete ...

func (OrdersClient) DeleteThenPoll

func (c OrdersClient) DeleteThenPoll(ctx context.Context, id DataBoxEdgeDeviceId) error

DeleteThenPoll performs Delete then polls until it's completed

func (OrdersClient) Get

Get ...

func (OrdersClient) ListByDataBoxEdgeDevice

func (c OrdersClient) ListByDataBoxEdgeDevice(ctx context.Context, id DataBoxEdgeDeviceId) (result ListByDataBoxEdgeDeviceOperationResponse, err error)

ListByDataBoxEdgeDevice ...

func (OrdersClient) ListByDataBoxEdgeDeviceComplete

func (c OrdersClient) ListByDataBoxEdgeDeviceComplete(ctx context.Context, id DataBoxEdgeDeviceId) (ListByDataBoxEdgeDeviceCompleteResult, error)

ListByDataBoxEdgeDeviceComplete retrieves all the results into a single object

func (OrdersClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate

func (c OrdersClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate(ctx context.Context, id DataBoxEdgeDeviceId, predicate OrderOperationPredicate) (result ListByDataBoxEdgeDeviceCompleteResult, err error)

ListByDataBoxEdgeDeviceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (OrdersClient) ListDCAccessCode

func (c OrdersClient) ListDCAccessCode(ctx context.Context, id DataBoxEdgeDeviceId) (result ListDCAccessCodeOperationResponse, err error)

ListDCAccessCode ...

type ShipmentType

type ShipmentType string
const (
	ShipmentTypeNotApplicable     ShipmentType = "NotApplicable"
	ShipmentTypeSelfPickup        ShipmentType = "SelfPickup"
	ShipmentTypeShippedToCustomer ShipmentType = "ShippedToCustomer"
)

func (*ShipmentType) UnmarshalJSON

func (s *ShipmentType) UnmarshalJSON(bytes []byte) error

type TrackingInfo

type TrackingInfo struct {
	CarrierName  *string `json:"carrierName,omitempty"`
	SerialNumber *string `json:"serialNumber,omitempty"`
	TrackingId   *string `json:"trackingId,omitempty"`
	TrackingUrl  *string `json:"trackingUrl,omitempty"`
}

Jump to

Keyboard shortcuts

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