billing

package
v58.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package billing implements the Azure ARM Billing service API version 2017-04-24-preview.

Billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Billing
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

BaseClient is the base client for Billing.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type DownloadURL

type DownloadURL struct {
	// ExpiryTime - READ-ONLY; The time in UTC at which this download URL will expire.
	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
	// URL - READ-ONLY; The URL to the PDF file.
	URL *string `json:"url,omitempty"`
}

DownloadURL a secure URL that can be used to download a PDF invoice until the URL expires.

func (DownloadURL) MarshalJSON

func (du DownloadURL) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for DownloadURL.

type ErrorDetails

type ErrorDetails struct {
	// Code - READ-ONLY; Error code.
	Code *string `json:"code,omitempty"`
	// Message - READ-ONLY; Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
	// Target - READ-ONLY; The target of the particular error.
	Target *string `json:"target,omitempty"`
}

ErrorDetails the details of the error.

func (ErrorDetails) MarshalJSON

func (ed ErrorDetails) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ErrorDetails.

type ErrorResponse

type ErrorResponse struct {
	// Error - The details of the error.
	Error *ErrorDetails `json:"error,omitempty"`
}

ErrorResponse error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

type Invoice

type Invoice struct {
	autorest.Response  `json:"-"`
	*InvoiceProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
}

Invoice an invoice resource can be used download a PDF version of an invoice.

func (Invoice) MarshalJSON

func (i Invoice) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Invoice.

func (*Invoice) UnmarshalJSON

func (i *Invoice) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Invoice struct.

type InvoiceProperties

type InvoiceProperties struct {
	// DownloadURL - A secure link to download the PDF version of an invoice. The link will cease to work after its expiry time is reached.
	DownloadURL *DownloadURL `json:"downloadUrl,omitempty"`
	// InvoicePeriodStartDate - READ-ONLY; The start of the date range covered by the invoice.
	InvoicePeriodStartDate *date.Date `json:"invoicePeriodStartDate,omitempty"`
	// InvoicePeriodEndDate - READ-ONLY; The end of the date range covered by the invoice.
	InvoicePeriodEndDate *date.Date `json:"invoicePeriodEndDate,omitempty"`
	// BillingPeriodIds - READ-ONLY; Array of billing period ids that the invoice is attributed to.
	BillingPeriodIds *[]string `json:"billingPeriodIds,omitempty"`
}

InvoiceProperties the properties of the invoice.

func (InvoiceProperties) MarshalJSON

func (IP InvoiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for InvoiceProperties.

type InvoicesClient

type InvoicesClient struct {
	BaseClient
}

InvoicesClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.

func NewInvoicesClient

func NewInvoicesClient(subscriptionID string) InvoicesClient

NewInvoicesClient creates an instance of the InvoicesClient client.

func NewInvoicesClientWithBaseURI

func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient

NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (InvoicesClient) Get

func (client InvoicesClient) Get(ctx context.Context, invoiceName string) (result Invoice, err error)

Get gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically. Parameters: invoiceName - the name of an invoice resource.

func (InvoicesClient) GetLatest

func (client InvoicesClient) GetLatest(ctx context.Context) (result Invoice, err error)

GetLatest gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically.

func (InvoicesClient) GetLatestPreparer

func (client InvoicesClient) GetLatestPreparer(ctx context.Context) (*http.Request, error)

GetLatestPreparer prepares the GetLatest request.

func (InvoicesClient) GetLatestResponder

func (client InvoicesClient) GetLatestResponder(resp *http.Response) (result Invoice, err error)

GetLatestResponder handles the response to the GetLatest request. The method always closes the http.Response Body.

func (InvoicesClient) GetLatestSender

func (client InvoicesClient) GetLatestSender(req *http.Request) (*http.Response, error)

GetLatestSender sends the GetLatest request. The method will close the http.Response Body if it receives an error.

func (InvoicesClient) GetPreparer

func (client InvoicesClient) GetPreparer(ctx context.Context, invoiceName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (InvoicesClient) GetResponder

func (client InvoicesClient) GetResponder(resp *http.Response) (result Invoice, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (InvoicesClient) GetSender

func (client InvoicesClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (InvoicesClient) List

func (client InvoicesClient) List(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result InvoicesListResultPage, err error)

List lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. Parameters: expand - may be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. filter - may be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the most recent N invoices.

func (InvoicesClient) ListComplete

func (client InvoicesClient) ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result InvoicesListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (InvoicesClient) ListPreparer

func (client InvoicesClient) ListPreparer(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (InvoicesClient) ListResponder

func (client InvoicesClient) ListResponder(resp *http.Response) (result InvoicesListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (InvoicesClient) ListSender

func (client InvoicesClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type InvoicesListResult

type InvoicesListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of invoices.
	Value *[]Invoice `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

InvoicesListResult result of listing invoices. It contains a list of available invoices in reverse chronological order.

func (InvoicesListResult) IsEmpty

func (ilr InvoicesListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (InvoicesListResult) MarshalJSON

func (ilr InvoicesListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for InvoicesListResult.

type InvoicesListResultIterator

type InvoicesListResultIterator struct {
	// contains filtered or unexported fields
}

InvoicesListResultIterator provides access to a complete listing of Invoice values.

func NewInvoicesListResultIterator

func NewInvoicesListResultIterator(page InvoicesListResultPage) InvoicesListResultIterator

Creates a new instance of the InvoicesListResultIterator type.

func (*InvoicesListResultIterator) Next

func (iter *InvoicesListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*InvoicesListResultIterator) NextWithContext

func (iter *InvoicesListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (InvoicesListResultIterator) NotDone

func (iter InvoicesListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (InvoicesListResultIterator) Response

Response returns the raw server response from the last page request.

func (InvoicesListResultIterator) Value

func (iter InvoicesListResultIterator) Value() Invoice

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type InvoicesListResultPage

type InvoicesListResultPage struct {
	// contains filtered or unexported fields
}

InvoicesListResultPage contains a page of Invoice values.

func NewInvoicesListResultPage

func NewInvoicesListResultPage(cur InvoicesListResult, getNextPage func(context.Context, InvoicesListResult) (InvoicesListResult, error)) InvoicesListResultPage

Creates a new instance of the InvoicesListResultPage type.

func (*InvoicesListResultPage) Next

func (page *InvoicesListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*InvoicesListResultPage) NextWithContext

func (page *InvoicesListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (InvoicesListResultPage) NotDone

func (page InvoicesListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (InvoicesListResultPage) Response

Response returns the raw server response from the last page request.

func (InvoicesListResultPage) Values

func (page InvoicesListResultPage) Values() []Invoice

Values returns the slice of values for the current page or nil if there are no values.

type Operation

type Operation struct {
	// Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}.
	Name *string `json:"name,omitempty"`
	// Display - The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation a Billing REST API operation.

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Operation.

type OperationDisplay

type OperationDisplay struct {
	// Provider - READ-ONLY; Service provider: Microsoft.Billing.
	Provider *string `json:"provider,omitempty"`
	// Resource - READ-ONLY; Resource on which the operation is performed: Invoice, etc.
	Resource *string `json:"resource,omitempty"`
	// Operation - READ-ONLY; Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`
}

OperationDisplay the object that represents the operation.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for OperationDisplay.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; List of billing operations supported by the Microsoft.Billing resource provider.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult result listing billing operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) IsEmpty

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (OperationListResult) MarshalJSON

func (olr OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for OperationListResult.

type OperationListResultIterator

type OperationListResultIterator struct {
	// contains filtered or unexported fields
}

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next

func (iter *OperationListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultIterator) NextWithContext

func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (OperationListResultIterator) NotDone

func (iter OperationListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (OperationListResultIterator) Response

Response returns the raw server response from the last page request.

func (OperationListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type OperationListResultPage

type OperationListResultPage struct {
	// contains filtered or unexported fields
}

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage

func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next

func (page *OperationListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultPage) NextWithContext

func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (OperationListResultPage) NotDone

func (page OperationListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (OperationListResultPage) Response

Response returns the raw server response from the last page request.

func (OperationListResultPage) Values

func (page OperationListResultPage) Values() []Operation

Values returns the slice of values for the current page or nil if there are no values.

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.

func NewOperationsClient

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (OperationsClient) List

func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available billing REST API operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Period

type Period struct {
	autorest.Response `json:"-"`
	*PeriodProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
}

Period a billing period resource.

func (Period) MarshalJSON

func (p Period) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Period.

func (*Period) UnmarshalJSON

func (p *Period) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Period struct.

type PeriodProperties

type PeriodProperties struct {
	// BillingPeriodStartDate - READ-ONLY; The start of the date range covered by the billing period.
	BillingPeriodStartDate *date.Date `json:"billingPeriodStartDate,omitempty"`
	// BillingPeriodEndDate - READ-ONLY; The end of the date range covered by the billing period.
	BillingPeriodEndDate *date.Date `json:"billingPeriodEndDate,omitempty"`
	// InvoiceIds - READ-ONLY; Array of invoice ids that associated with.
	InvoiceIds *[]string `json:"invoiceIds,omitempty"`
}

PeriodProperties the properties of the billing period.

func (PeriodProperties) MarshalJSON

func (pp PeriodProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for PeriodProperties.

type PeriodsClient

type PeriodsClient struct {
	BaseClient
}

PeriodsClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.

func NewPeriodsClient

func NewPeriodsClient(subscriptionID string) PeriodsClient

NewPeriodsClient creates an instance of the PeriodsClient client.

func NewPeriodsClientWithBaseURI

func NewPeriodsClientWithBaseURI(baseURI string, subscriptionID string) PeriodsClient

NewPeriodsClientWithBaseURI creates an instance of the PeriodsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (PeriodsClient) Get

func (client PeriodsClient) Get(ctx context.Context, billingPeriodName string) (result Period, err error)

Get gets a named billing period. Parameters: billingPeriodName - the name of a BillingPeriod resource.

func (PeriodsClient) GetPreparer

func (client PeriodsClient) GetPreparer(ctx context.Context, billingPeriodName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (PeriodsClient) GetResponder

func (client PeriodsClient) GetResponder(resp *http.Response) (result Period, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (PeriodsClient) GetSender

func (client PeriodsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (PeriodsClient) List

func (client PeriodsClient) List(ctx context.Context, filter string, skiptoken string, top *int32) (result PeriodsListResultPage, err error)

List lists the available billing periods for a subscription in reverse chronological order. Parameters: filter - may be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the most recent N billing periods.

func (PeriodsClient) ListComplete

func (client PeriodsClient) ListComplete(ctx context.Context, filter string, skiptoken string, top *int32) (result PeriodsListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (PeriodsClient) ListPreparer

func (client PeriodsClient) ListPreparer(ctx context.Context, filter string, skiptoken string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (PeriodsClient) ListResponder

func (client PeriodsClient) ListResponder(resp *http.Response) (result PeriodsListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (PeriodsClient) ListSender

func (client PeriodsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type PeriodsListResult

type PeriodsListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of billing periods.
	Value *[]Period `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

PeriodsListResult result of listing billing periods. It contains a list of available billing periods in reverse chronological order.

func (PeriodsListResult) IsEmpty

func (plr PeriodsListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (PeriodsListResult) MarshalJSON

func (plr PeriodsListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for PeriodsListResult.

type PeriodsListResultIterator

type PeriodsListResultIterator struct {
	// contains filtered or unexported fields
}

PeriodsListResultIterator provides access to a complete listing of Period values.

func NewPeriodsListResultIterator

func NewPeriodsListResultIterator(page PeriodsListResultPage) PeriodsListResultIterator

Creates a new instance of the PeriodsListResultIterator type.

func (*PeriodsListResultIterator) Next

func (iter *PeriodsListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*PeriodsListResultIterator) NextWithContext

func (iter *PeriodsListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (PeriodsListResultIterator) NotDone

func (iter PeriodsListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (PeriodsListResultIterator) Response

Response returns the raw server response from the last page request.

func (PeriodsListResultIterator) Value

func (iter PeriodsListResultIterator) Value() Period

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type PeriodsListResultPage

type PeriodsListResultPage struct {
	// contains filtered or unexported fields
}

PeriodsListResultPage contains a page of Period values.

func NewPeriodsListResultPage

func NewPeriodsListResultPage(cur PeriodsListResult, getNextPage func(context.Context, PeriodsListResult) (PeriodsListResult, error)) PeriodsListResultPage

Creates a new instance of the PeriodsListResultPage type.

func (*PeriodsListResultPage) Next

func (page *PeriodsListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*PeriodsListResultPage) NextWithContext

func (page *PeriodsListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (PeriodsListResultPage) NotDone

func (page PeriodsListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (PeriodsListResultPage) Response

func (page PeriodsListResultPage) Response() PeriodsListResult

Response returns the raw server response from the last page request.

func (PeriodsListResultPage) Values

func (page PeriodsListResultPage) Values() []Period

Values returns the slice of values for the current page or nil if there are no values.

type Resource

type Resource struct {
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
}

Resource the Resource model definition.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Resource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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