recipienttransfers

package
v0.20240628.1082451 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/recipienttransfers Documentation

The recipienttransfers SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2024-04-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/billing/2024-04-01/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 PossibleValuesForInitiatorCustomerType

func PossibleValuesForInitiatorCustomerType() []string

func PossibleValuesForProductTransferStatus

func PossibleValuesForProductTransferStatus() []string

func PossibleValuesForProductType

func PossibleValuesForProductType() []string

func PossibleValuesForSupportedAccountType

func PossibleValuesForSupportedAccountType() []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   *TransferError         `json:"errorDetails,omitempty"`
	ProductId      *string                `json:"productId,omitempty"`
	ProductName    *string                `json:"productName,omitempty"`
	ProductType    *ProductType           `json:"productType,omitempty"`
	SkuDescription *string                `json:"skuDescription,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 GetOperationResponse

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

type InitiatorCustomerType

type InitiatorCustomerType string
const (
	InitiatorCustomerTypeEA      InitiatorCustomerType = "EA"
	InitiatorCustomerTypePartner InitiatorCustomerType = "Partner"
)

func (*InitiatorCustomerType) UnmarshalJSON

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

type ListCompleteResult

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

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"
	ProductTypeDepartment        ProductType = "Department"
	ProductTypeSAAS              ProductType = "SAAS"
	ProductTypeSavingsPlan       ProductType = "SavingsPlan"
)

func (*ProductType) UnmarshalJSON

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

type RecipientTransferDetails

type RecipientTransferDetails struct {
	Id         *string                      `json:"id,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *RecipientTransferProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData       `json:"systemData,omitempty"`
	Tags       *map[string]string           `json:"tags,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type RecipientTransferDetailsOperationPredicate

type RecipientTransferDetailsOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (RecipientTransferDetailsOperationPredicate) Matches

type RecipientTransferProperties

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

func (*RecipientTransferProperties) GetExpirationTimeAsTime

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

func (*RecipientTransferProperties) SetExpirationTimeAsTime

func (o *RecipientTransferProperties) SetExpirationTimeAsTime(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 SupportedAccountType

type SupportedAccountType string
const (
	SupportedAccountTypeEnterprise SupportedAccountType = "Enterprise"
	SupportedAccountTypeIndividual SupportedAccountType = "Individual"
	SupportedAccountTypeNone       SupportedAccountType = "None"
	SupportedAccountTypePartner    SupportedAccountType = "Partner"
)

func (*SupportedAccountType) UnmarshalJSON

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

type TransferError

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

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"
	TransferStatusExpired             TransferStatus = "Expired"
	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