recipienttransfers

package
v0.20240731.1170959 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/recipienttransfers Documentation

The recipienttransfers SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2019-10-01-preview).

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/billing/2019-10-01-preview/recipienttransfers"

Client Initialization

client := recipienttransfers.NewRecipientTransfersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RecipientTransfersClient.Accept

ctx := context.TODO()
id := recipienttransfers.NewTransferID("transferValue")

payload := recipienttransfers.AcceptTransferRequest{
	// ...
}


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

Example Usage: RecipientTransfersClient.Decline

ctx := context.TODO()
id := recipienttransfers.NewTransferID("transferValue")

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

Example Usage: RecipientTransfersClient.Get

ctx := context.TODO()
id := recipienttransfers.NewTransferID("transferValue")

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: RecipientTransfersClient.List

ctx := context.TODO()


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

Example Usage: RecipientTransfersClient.Validate

ctx := context.TODO()
id := recipienttransfers.NewTransferID("transferValue")

payload := recipienttransfers.AcceptTransferRequest{
	// ...
}


read, err := client.Validate(ctx, id, payload)
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 PossibleValuesForEligibleProductType

func PossibleValuesForEligibleProductType() []string

func PossibleValuesForProductTransferStatus

func PossibleValuesForProductTransferStatus() []string

func PossibleValuesForProductType

func PossibleValuesForProductType() []string

func PossibleValuesForTransferStatus

func PossibleValuesForTransferStatus() []string

func ValidateTransferID

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

ValidateTransferID checks that 'input' can be parsed as a Transfer ID

Types

type AcceptOperationResponse

type AcceptOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RecipientTransferDetails
}

type AcceptTransferProperties

type AcceptTransferProperties struct {
	ProductDetails *[]ProductDetails `json:"productDetails,omitempty"`
}

type AcceptTransferRequest

type AcceptTransferRequest struct {
	Properties *AcceptTransferProperties `json:"properties,omitempty"`
}

type DeclineOperationResponse

type DeclineOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RecipientTransferDetails
}

type DetailedTransferStatus

type DetailedTransferStatus struct {
	ErrorDetails   *Error                 `json:"errorDetails,omitempty"`
	ProductId      *string                `json:"productId,omitempty"`
	ProductType    *ProductType           `json:"productType,omitempty"`
	TransferStatus *ProductTransferStatus `json:"transferStatus,omitempty"`
}

type EligibleProductType

type EligibleProductType string
const (
	EligibleProductTypeAzureReservation          EligibleProductType = "AzureReservation"
	EligibleProductTypeDevTestAzureSubscription  EligibleProductType = "DevTestAzureSubscription"
	EligibleProductTypeStandardAzureSubscription EligibleProductType = "StandardAzureSubscription"
)

func (*EligibleProductType) UnmarshalJSON

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

type Error

type Error struct {
	ErrorCode    *string `json:"errorCode,omitempty"`
	ErrorMessage *string `json:"errorMessage,omitempty"`
}

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []RecipientTransferDetails
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]RecipientTransferDetails
}

type ProductDetails

type ProductDetails struct {
	ProductId   *string      `json:"productId,omitempty"`
	ProductType *ProductType `json:"productType,omitempty"`
}

type ProductTransferStatus

type ProductTransferStatus string
const (
	ProductTransferStatusCompleted  ProductTransferStatus = "Completed"
	ProductTransferStatusFailed     ProductTransferStatus = "Failed"
	ProductTransferStatusInProgress ProductTransferStatus = "InProgress"
	ProductTransferStatusNotStarted ProductTransferStatus = "NotStarted"
)

func (*ProductTransferStatus) UnmarshalJSON

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

type ProductType

type ProductType string
const (
	ProductTypeAzureReservation  ProductType = "AzureReservation"
	ProductTypeAzureSubscription ProductType = "AzureSubscription"
)

func (*ProductType) UnmarshalJSON

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

type RecipientTransferDetails

type RecipientTransferDetails struct {
	Properties *RecipientTransferProperties `json:"properties,omitempty"`
}

type RecipientTransferDetailsOperationPredicate

type RecipientTransferDetailsOperationPredicate struct {
}

func (RecipientTransferDetailsOperationPredicate) Matches

type RecipientTransferProperties

type RecipientTransferProperties struct {
	AllowedProductType     *[]EligibleProductType    `json:"allowedProductType,omitempty"`
	CanceledBy             *string                   `json:"canceledBy,omitempty"`
	CreationTime           *string                   `json:"creationTime,omitempty"`
	DetailedTransferStatus *[]DetailedTransferStatus `json:"detailedTransferStatus,omitempty"`
	ExpirationTime         *string                   `json:"expirationTime,omitempty"`
	InitiatorCustomerType  *string                   `json:"initiatorCustomerType,omitempty"`
	InitiatorEmailId       *string                   `json:"initiatorEmailId,omitempty"`
	LastModifiedTime       *string                   `json:"lastModifiedTime,omitempty"`
	RecipientEmailId       *string                   `json:"recipientEmailId,omitempty"`
	ResellerId             *string                   `json:"resellerId,omitempty"`
	ResellerName           *string                   `json:"resellerName,omitempty"`
	TransferStatus         *TransferStatus           `json:"transferStatus,omitempty"`
}

func (*RecipientTransferProperties) GetCreationTimeAsTime

func (o *RecipientTransferProperties) GetCreationTimeAsTime() (*time.Time, error)

func (*RecipientTransferProperties) GetExpirationTimeAsTime

func (o *RecipientTransferProperties) GetExpirationTimeAsTime() (*time.Time, error)

func (*RecipientTransferProperties) GetLastModifiedTimeAsTime

func (o *RecipientTransferProperties) GetLastModifiedTimeAsTime() (*time.Time, error)

func (*RecipientTransferProperties) SetCreationTimeAsTime

func (o *RecipientTransferProperties) SetCreationTimeAsTime(input time.Time)

func (*RecipientTransferProperties) SetExpirationTimeAsTime

func (o *RecipientTransferProperties) SetExpirationTimeAsTime(input time.Time)

func (*RecipientTransferProperties) SetLastModifiedTimeAsTime

func (o *RecipientTransferProperties) SetLastModifiedTimeAsTime(input time.Time)

type RecipientTransfersClient

type RecipientTransfersClient struct {
	Client *resourcemanager.Client
}

func NewRecipientTransfersClientWithBaseURI

func NewRecipientTransfersClientWithBaseURI(sdkApi sdkEnv.Api) (*RecipientTransfersClient, error)

func (RecipientTransfersClient) Accept

Accept ...

func (RecipientTransfersClient) Decline

Decline ...

func (RecipientTransfersClient) Get

Get ...

func (RecipientTransfersClient) List

List ...

func (RecipientTransfersClient) ListComplete

ListComplete retrieves all the results into a single object

func (RecipientTransfersClient) ListCompleteMatchingPredicate

func (c RecipientTransfersClient) ListCompleteMatchingPredicate(ctx context.Context, predicate RecipientTransferDetailsOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (RecipientTransfersClient) Validate

Validate ...

type TransferId

type TransferId struct {
	TransferName string
}

TransferId is a struct representing the Resource ID for a Transfer

func NewTransferID

func NewTransferID(transferName string) TransferId

NewTransferID returns a new TransferId struct

func ParseTransferID

func ParseTransferID(input string) (*TransferId, error)

ParseTransferID parses 'input' into a TransferId

func ParseTransferIDInsensitively

func ParseTransferIDInsensitively(input string) (*TransferId, error)

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

func (*TransferId) FromParseResult

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

func (TransferId) ID

func (id TransferId) ID() string

ID returns the formatted Transfer ID

func (TransferId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Transfer ID

func (TransferId) String

func (id TransferId) String() string

String returns a human-readable description of this Transfer ID

type TransferStatus

type TransferStatus string
const (
	TransferStatusCanceled            TransferStatus = "Canceled"
	TransferStatusCompleted           TransferStatus = "Completed"
	TransferStatusCompletedWithErrors TransferStatus = "CompletedWithErrors"
	TransferStatusDeclined            TransferStatus = "Declined"
	TransferStatusFailed              TransferStatus = "Failed"
	TransferStatusInProgress          TransferStatus = "InProgress"
	TransferStatusPending             TransferStatus = "Pending"
)

func (*TransferStatus) UnmarshalJSON

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

type ValidateOperationResponse

type ValidateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ValidateTransferListResponse
}

type ValidateTransferListResponse

type ValidateTransferListResponse struct {
	Value *[]ValidateTransferResponse `json:"value,omitempty"`
}

type ValidateTransferResponse

type ValidateTransferResponse struct {
	Properties *ValidateTransferResponseProperties `json:"properties,omitempty"`
}

type ValidateTransferResponseProperties

type ValidateTransferResponseProperties struct {
	ProductId *string                       `json:"productId,omitempty"`
	Results   *[]ValidationResultProperties `json:"results,omitempty"`
	Status    *string                       `json:"status,omitempty"`
}

type ValidationResultProperties

type ValidationResultProperties struct {
	Code    *string `json:"code,omitempty"`
	Level   *string `json:"level,omitempty"`
	Message *string `json:"message,omitempty"`
}

Jump to

Keyboard shortcuts

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