agreements

package
v0.20240507.1095453 Latest Latest
Warning

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

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

README

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

The agreements 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/agreements"

Client Initialization

client := agreements.NewAgreementsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AgreementsClient.Get

ctx := context.TODO()
id := agreements.NewAgreementID("billingAccountValue", "agreementValue")

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

Example Usage: AgreementsClient.ListByBillingAccount

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAcceptanceMode

func PossibleValuesForAcceptanceMode() []string

func PossibleValuesForCategory

func PossibleValuesForCategory() []string

func ValidateAgreementID

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

ValidateAgreementID checks that 'input' can be parsed as a Agreement ID

func ValidateBillingAccountID

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

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

Types

type AcceptanceMode

type AcceptanceMode string
const (
	AcceptanceModeClickToAccept AcceptanceMode = "ClickToAccept"
	AcceptanceModeESignEmbedded AcceptanceMode = "ESignEmbedded"
	AcceptanceModeESignOffline  AcceptanceMode = "ESignOffline"
)

func (*AcceptanceMode) UnmarshalJSON

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

type Agreement

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

type AgreementId

type AgreementId struct {
	BillingAccountName string
	AgreementName      string
}

AgreementId is a struct representing the Resource ID for a Agreement

func NewAgreementID

func NewAgreementID(billingAccountName string, agreementName string) AgreementId

NewAgreementID returns a new AgreementId struct

func ParseAgreementID

func ParseAgreementID(input string) (*AgreementId, error)

ParseAgreementID parses 'input' into a AgreementId

func ParseAgreementIDInsensitively

func ParseAgreementIDInsensitively(input string) (*AgreementId, error)

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

func (*AgreementId) FromParseResult

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

func (AgreementId) ID

func (id AgreementId) ID() string

ID returns the formatted Agreement ID

func (AgreementId) Segments

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

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

func (AgreementId) String

func (id AgreementId) String() string

String returns a human-readable description of this Agreement ID

type AgreementOperationPredicate added in v0.20240226.1173038

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

func (AgreementOperationPredicate) Matches added in v0.20240226.1173038

func (p AgreementOperationPredicate) Matches(input Agreement) bool

type AgreementProperties

type AgreementProperties struct {
	AcceptanceMode *AcceptanceMode `json:"acceptanceMode,omitempty"`
	AgreementLink  *string         `json:"agreementLink,omitempty"`
	Category       *Category       `json:"category,omitempty"`
	EffectiveDate  *string         `json:"effectiveDate,omitempty"`
	ExpirationDate *string         `json:"expirationDate,omitempty"`
	Participants   *[]Participants `json:"participants,omitempty"`
	Status         *string         `json:"status,omitempty"`
}

func (*AgreementProperties) GetEffectiveDateAsTime

func (o *AgreementProperties) GetEffectiveDateAsTime() (*time.Time, error)

func (*AgreementProperties) GetExpirationDateAsTime

func (o *AgreementProperties) GetExpirationDateAsTime() (*time.Time, error)

func (*AgreementProperties) SetEffectiveDateAsTime

func (o *AgreementProperties) SetEffectiveDateAsTime(input time.Time)

func (*AgreementProperties) SetExpirationDateAsTime

func (o *AgreementProperties) SetExpirationDateAsTime(input time.Time)

type AgreementsClient

type AgreementsClient struct {
	Client *resourcemanager.Client
}

func NewAgreementsClientWithBaseURI

func NewAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementsClient, error)

func (AgreementsClient) Get

Get ...

func (AgreementsClient) ListByBillingAccount

ListByBillingAccount ...

func (AgreementsClient) ListByBillingAccountComplete added in v0.20240226.1173038

ListByBillingAccountComplete retrieves all the results into a single object

func (AgreementsClient) ListByBillingAccountCompleteMatchingPredicate added in v0.20240226.1173038

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

ListByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

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 Category

type Category string
const (
	CategoryAffiliatePurchaseTerms     Category = "AffiliatePurchaseTerms"
	CategoryMicrosoftCustomerAgreement Category = "MicrosoftCustomerAgreement"
	CategoryOther                      Category = "Other"
)

func (*Category) UnmarshalJSON

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

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListByBillingAccountCompleteResult added in v0.20240226.1173038

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

type ListByBillingAccountOperationOptions

type ListByBillingAccountOperationOptions struct {
	Expand *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        *[]Agreement
}

type Participants

type Participants struct {
	Email      *string `json:"email,omitempty"`
	Status     *string `json:"status,omitempty"`
	StatusDate *string `json:"statusDate,omitempty"`
}

func (*Participants) GetStatusDateAsTime

func (o *Participants) GetStatusDateAsTime() (*time.Time, error)

func (*Participants) SetStatusDateAsTime

func (o *Participants) SetStatusDateAsTime(input time.Time)

Jump to

Keyboard shortcuts

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