products

package
v0.20240731.1212841 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: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/products Documentation

The products SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2020-05-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/2020-05-01/products"

Client Initialization

client := products.NewProductsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProductsClient.Get

ctx := context.TODO()
id := products.NewProductID("billingAccountValue", "productValue")

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: ProductsClient.ListByBillingAccount

ctx := context.TODO()
id := products.NewBillingAccountID("billingAccountValue")

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

Example Usage: ProductsClient.ListByBillingProfile

ctx := context.TODO()
id := products.NewBillingProfileID("billingAccountValue", "billingProfileValue")

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

Example Usage: ProductsClient.ListByCustomer

ctx := context.TODO()
id := products.NewCustomerID("billingAccountValue", "customerValue")

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

Example Usage: ProductsClient.ListByInvoiceSection

ctx := context.TODO()
id := products.NewInvoiceSectionID("billingAccountValue", "billingProfileValue", "invoiceSectionValue")

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

Example Usage: ProductsClient.Move

ctx := context.TODO()
id := products.NewProductID("billingAccountValue", "productValue")

payload := products.TransferProductRequestProperties{
	// ...
}


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

Example Usage: ProductsClient.Update

ctx := context.TODO()
id := products.NewProductID("billingAccountValue", "productValue")

payload := products.Product{
	// ...
}


read, err := client.Update(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 PossibleValuesForAutoRenew

func PossibleValuesForAutoRenew() []string

func PossibleValuesForBillingFrequency

func PossibleValuesForBillingFrequency() []string

func PossibleValuesForProductStatusType

func PossibleValuesForProductStatusType() []string

func ValidateBillingAccountID

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

ValidateBillingAccountID checks that 'input' can be parsed as a Billing Account ID

func ValidateBillingProfileID

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

ValidateBillingProfileID checks that 'input' can be parsed as a Billing Profile ID

func ValidateCustomerID

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

ValidateCustomerID checks that 'input' can be parsed as a Customer ID

func ValidateInvoiceSectionID

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

ValidateInvoiceSectionID checks that 'input' can be parsed as a Invoice Section ID

func ValidateProductID

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

ValidateProductID checks that 'input' can be parsed as a Product ID

Types

type Amount

type Amount struct {
	Currency *string  `json:"currency,omitempty"`
	Value    *float64 `json:"value,omitempty"`
}

type AutoRenew

type AutoRenew string
const (
	AutoRenewOff AutoRenew = "Off"
	AutoRenewOn  AutoRenew = "On"
)

func (*AutoRenew) UnmarshalJSON

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

type BillingAccountId

type BillingAccountId struct {
	BillingAccountName string
}

BillingAccountId is a struct representing the Resource ID for a Billing Account

func NewBillingAccountID

func NewBillingAccountID(billingAccountName string) BillingAccountId

NewBillingAccountID returns a new BillingAccountId struct

func ParseBillingAccountID

func ParseBillingAccountID(input string) (*BillingAccountId, error)

ParseBillingAccountID parses 'input' into a BillingAccountId

func ParseBillingAccountIDInsensitively

func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error)

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

func (*BillingAccountId) FromParseResult

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

func (BillingAccountId) ID

func (id BillingAccountId) ID() string

ID returns the formatted Billing Account ID

func (BillingAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Billing Account ID

func (BillingAccountId) String

func (id BillingAccountId) String() string

String returns a human-readable description of this Billing Account ID

type BillingFrequency

type BillingFrequency string
const (
	BillingFrequencyMonthly    BillingFrequency = "Monthly"
	BillingFrequencyOneTime    BillingFrequency = "OneTime"
	BillingFrequencyUsageBased BillingFrequency = "UsageBased"
)

func (*BillingFrequency) UnmarshalJSON

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

type BillingProfileId

type BillingProfileId struct {
	BillingAccountName string
	BillingProfileName string
}

BillingProfileId is a struct representing the Resource ID for a Billing Profile

func NewBillingProfileID

func NewBillingProfileID(billingAccountName string, billingProfileName string) BillingProfileId

NewBillingProfileID returns a new BillingProfileId struct

func ParseBillingProfileID

func ParseBillingProfileID(input string) (*BillingProfileId, error)

ParseBillingProfileID parses 'input' into a BillingProfileId

func ParseBillingProfileIDInsensitively

func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error)

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

func (*BillingProfileId) FromParseResult

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

func (BillingProfileId) ID

func (id BillingProfileId) ID() string

ID returns the formatted Billing Profile ID

func (BillingProfileId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Billing Profile ID

func (BillingProfileId) String

func (id BillingProfileId) String() string

String returns a human-readable description of this Billing Profile ID

type CustomerId

type CustomerId struct {
	BillingAccountName string
	CustomerName       string
}

CustomerId is a struct representing the Resource ID for a Customer

func NewCustomerID

func NewCustomerID(billingAccountName string, customerName string) CustomerId

NewCustomerID returns a new CustomerId struct

func ParseCustomerID

func ParseCustomerID(input string) (*CustomerId, error)

ParseCustomerID parses 'input' into a CustomerId

func ParseCustomerIDInsensitively

func ParseCustomerIDInsensitively(input string) (*CustomerId, error)

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

func (*CustomerId) FromParseResult

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

func (CustomerId) ID

func (id CustomerId) ID() string

ID returns the formatted Customer ID

func (CustomerId) Segments

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

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

func (CustomerId) String

func (id CustomerId) String() string

String returns a human-readable description of this Customer ID

type GetOperationResponse

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

type InvoiceSectionId

type InvoiceSectionId struct {
	BillingAccountName string
	BillingProfileName string
	InvoiceSectionName string
}

InvoiceSectionId is a struct representing the Resource ID for a Invoice Section

func NewInvoiceSectionID

func NewInvoiceSectionID(billingAccountName string, billingProfileName string, invoiceSectionName string) InvoiceSectionId

NewInvoiceSectionID returns a new InvoiceSectionId struct

func ParseInvoiceSectionID

func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error)

ParseInvoiceSectionID parses 'input' into a InvoiceSectionId

func ParseInvoiceSectionIDInsensitively

func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error)

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

func (*InvoiceSectionId) FromParseResult

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

func (InvoiceSectionId) ID

func (id InvoiceSectionId) ID() string

ID returns the formatted Invoice Section ID

func (InvoiceSectionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Invoice Section ID

func (InvoiceSectionId) String

func (id InvoiceSectionId) String() string

String returns a human-readable description of this Invoice Section ID

type ListByBillingAccountCompleteResult

type ListByBillingAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Product
}

type ListByBillingAccountCustomPager added in v0.20240628.1153531

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

type ListByBillingAccountOperationOptions

type ListByBillingAccountOperationOptions struct {
	Filter *string
}

func DefaultListByBillingAccountOperationOptions

func DefaultListByBillingAccountOperationOptions() ListByBillingAccountOperationOptions

func (ListByBillingAccountOperationOptions) ToHeaders

func (ListByBillingAccountOperationOptions) ToOData

func (ListByBillingAccountOperationOptions) ToQuery

type ListByBillingAccountOperationResponse

type ListByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Product
}

type ListByBillingProfileCompleteResult

type ListByBillingProfileCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Product
}

type ListByBillingProfileCustomPager added in v0.20240628.1153531

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

type ListByBillingProfileOperationOptions

type ListByBillingProfileOperationOptions struct {
	Filter *string
}

func DefaultListByBillingProfileOperationOptions

func DefaultListByBillingProfileOperationOptions() ListByBillingProfileOperationOptions

func (ListByBillingProfileOperationOptions) ToHeaders

func (ListByBillingProfileOperationOptions) ToOData

func (ListByBillingProfileOperationOptions) ToQuery

type ListByBillingProfileOperationResponse

type ListByBillingProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Product
}

type ListByCustomerCompleteResult

type ListByCustomerCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Product
}

type ListByCustomerCustomPager added in v0.20240628.1153531

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

type ListByCustomerOperationResponse

type ListByCustomerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Product
}

type ListByInvoiceSectionCompleteResult

type ListByInvoiceSectionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Product
}

type ListByInvoiceSectionCustomPager added in v0.20240628.1153531

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

type ListByInvoiceSectionOperationOptions

type ListByInvoiceSectionOperationOptions struct {
	Filter *string
}

func DefaultListByInvoiceSectionOperationOptions

func DefaultListByInvoiceSectionOperationOptions() ListByInvoiceSectionOperationOptions

func (ListByInvoiceSectionOperationOptions) ToHeaders

func (ListByInvoiceSectionOperationOptions) ToOData

func (ListByInvoiceSectionOperationOptions) ToQuery

type ListByInvoiceSectionOperationResponse

type ListByInvoiceSectionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Product
}

type MoveOperationResponse

type MoveOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Product
}

type Product

type Product struct {
	Id         *string            `json:"id,omitempty"`
	Name       *string            `json:"name,omitempty"`
	Properties *ProductProperties `json:"properties,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

type ProductId

type ProductId struct {
	BillingAccountName string
	ProductName        string
}

ProductId is a struct representing the Resource ID for a Product

func NewProductID

func NewProductID(billingAccountName string, productName string) ProductId

NewProductID returns a new ProductId struct

func ParseProductID

func ParseProductID(input string) (*ProductId, error)

ParseProductID parses 'input' into a ProductId

func ParseProductIDInsensitively

func ParseProductIDInsensitively(input string) (*ProductId, error)

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

func (*ProductId) FromParseResult

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

func (ProductId) ID

func (id ProductId) ID() string

ID returns the formatted Product ID

func (ProductId) Segments

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

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

func (ProductId) String

func (id ProductId) String() string

String returns a human-readable description of this Product ID

type ProductOperationPredicate

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

func (ProductOperationPredicate) Matches

func (p ProductOperationPredicate) Matches(input Product) bool

type ProductProperties

type ProductProperties struct {
	AutoRenew                 *AutoRenew         `json:"autoRenew,omitempty"`
	AvailabilityId            *string            `json:"availabilityId,omitempty"`
	BillingFrequency          *BillingFrequency  `json:"billingFrequency,omitempty"`
	BillingProfileDisplayName *string            `json:"billingProfileDisplayName,omitempty"`
	BillingProfileId          *string            `json:"billingProfileId,omitempty"`
	CustomerDisplayName       *string            `json:"customerDisplayName,omitempty"`
	CustomerId                *string            `json:"customerId,omitempty"`
	DisplayName               *string            `json:"displayName,omitempty"`
	EndDate                   *string            `json:"endDate,omitempty"`
	InvoiceSectionDisplayName *string            `json:"invoiceSectionDisplayName,omitempty"`
	InvoiceSectionId          *string            `json:"invoiceSectionId,omitempty"`
	LastCharge                *Amount            `json:"lastCharge,omitempty"`
	LastChargeDate            *string            `json:"lastChargeDate,omitempty"`
	ProductType               *string            `json:"productType,omitempty"`
	ProductTypeId             *string            `json:"productTypeId,omitempty"`
	PurchaseDate              *string            `json:"purchaseDate,omitempty"`
	Quantity                  *float64           `json:"quantity,omitempty"`
	Reseller                  *Reseller          `json:"reseller,omitempty"`
	SkuDescription            *string            `json:"skuDescription,omitempty"`
	SkuId                     *string            `json:"skuId,omitempty"`
	Status                    *ProductStatusType `json:"status,omitempty"`
	TenantId                  *string            `json:"tenantId,omitempty"`
}

func (*ProductProperties) GetEndDateAsTime

func (o *ProductProperties) GetEndDateAsTime() (*time.Time, error)

func (*ProductProperties) GetLastChargeDateAsTime

func (o *ProductProperties) GetLastChargeDateAsTime() (*time.Time, error)

func (*ProductProperties) GetPurchaseDateAsTime

func (o *ProductProperties) GetPurchaseDateAsTime() (*time.Time, error)

func (*ProductProperties) SetEndDateAsTime

func (o *ProductProperties) SetEndDateAsTime(input time.Time)

func (*ProductProperties) SetLastChargeDateAsTime

func (o *ProductProperties) SetLastChargeDateAsTime(input time.Time)

func (*ProductProperties) SetPurchaseDateAsTime

func (o *ProductProperties) SetPurchaseDateAsTime(input time.Time)

type ProductStatusType

type ProductStatusType string
const (
	ProductStatusTypeActive    ProductStatusType = "Active"
	ProductStatusTypeAutoRenew ProductStatusType = "AutoRenew"
	ProductStatusTypeCancelled ProductStatusType = "Cancelled"
	ProductStatusTypeDisabled  ProductStatusType = "Disabled"
	ProductStatusTypeExpired   ProductStatusType = "Expired"
	ProductStatusTypeExpiring  ProductStatusType = "Expiring"
	ProductStatusTypeInactive  ProductStatusType = "Inactive"
	ProductStatusTypePastDue   ProductStatusType = "PastDue"
)

func (*ProductStatusType) UnmarshalJSON

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

type ProductsClient

type ProductsClient struct {
	Client *resourcemanager.Client
}

func NewProductsClientWithBaseURI

func NewProductsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductsClient, error)

func (ProductsClient) Get

func (c ProductsClient) Get(ctx context.Context, id ProductId) (result GetOperationResponse, err error)

Get ...

func (ProductsClient) ListByBillingAccount

ListByBillingAccount ...

func (ProductsClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all the results into a single object

func (ProductsClient) ListByBillingAccountCompleteMatchingPredicate

func (c ProductsClient) ListByBillingAccountCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, options ListByBillingAccountOperationOptions, predicate ProductOperationPredicate) (result ListByBillingAccountCompleteResult, err error)

ListByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProductsClient) ListByBillingProfile

ListByBillingProfile ...

func (ProductsClient) ListByBillingProfileComplete

ListByBillingProfileComplete retrieves all the results into a single object

func (ProductsClient) ListByBillingProfileCompleteMatchingPredicate

func (c ProductsClient) ListByBillingProfileCompleteMatchingPredicate(ctx context.Context, id BillingProfileId, options ListByBillingProfileOperationOptions, predicate ProductOperationPredicate) (result ListByBillingProfileCompleteResult, err error)

ListByBillingProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProductsClient) ListByCustomer

func (c ProductsClient) ListByCustomer(ctx context.Context, id CustomerId) (result ListByCustomerOperationResponse, err error)

ListByCustomer ...

func (ProductsClient) ListByCustomerComplete

func (c ProductsClient) ListByCustomerComplete(ctx context.Context, id CustomerId) (ListByCustomerCompleteResult, error)

ListByCustomerComplete retrieves all the results into a single object

func (ProductsClient) ListByCustomerCompleteMatchingPredicate

func (c ProductsClient) ListByCustomerCompleteMatchingPredicate(ctx context.Context, id CustomerId, predicate ProductOperationPredicate) (result ListByCustomerCompleteResult, err error)

ListByCustomerCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProductsClient) ListByInvoiceSection

ListByInvoiceSection ...

func (ProductsClient) ListByInvoiceSectionComplete

ListByInvoiceSectionComplete retrieves all the results into a single object

func (ProductsClient) ListByInvoiceSectionCompleteMatchingPredicate

func (c ProductsClient) ListByInvoiceSectionCompleteMatchingPredicate(ctx context.Context, id InvoiceSectionId, options ListByInvoiceSectionOperationOptions, predicate ProductOperationPredicate) (result ListByInvoiceSectionCompleteResult, err error)

ListByInvoiceSectionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProductsClient) Move

Move ...

func (ProductsClient) Update

func (c ProductsClient) Update(ctx context.Context, id ProductId, input Product) (result UpdateOperationResponse, err error)

Update ...

type Reseller

type Reseller struct {
	Description *string `json:"description,omitempty"`
	ResellerId  *string `json:"resellerId,omitempty"`
}

type TransferProductRequestProperties

type TransferProductRequestProperties struct {
	DestinationInvoiceSectionId *string `json:"destinationInvoiceSectionId,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Product
}

Jump to

Keyboard shortcuts

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