agreement

package
v0.20241029.1112340 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

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

The agreement SDK allows for interaction with Azure Resource Manager 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/agreement"

Client Initialization

client := agreement.NewAgreementClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AgreementClient.Get

ctx := context.TODO()
id := agreement.NewAgreementID("billingAccountName", "agreementName")

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

ctx := context.TODO()
id := agreement.NewBillingAccountID("billingAccountName")

// alternatively `client.ListByBillingAccount(ctx, id, agreement.DefaultListByBillingAccountOperationOptions())` can be used to do batched pagination
items, err := client.ListByBillingAccountComplete(ctx, id, agreement.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"
	AcceptanceModeImplicit      AcceptanceMode = "Implicit"
	AcceptanceModeOffline       AcceptanceMode = "Offline"
	AcceptanceModeOther         AcceptanceMode = "Other"
	AcceptanceModePhysicalSign  AcceptanceMode = "PhysicalSign"
)

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"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type AgreementClient

type AgreementClient struct {
	Client *resourcemanager.Client
}

func NewAgreementClientWithBaseURI

func NewAgreementClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementClient, error)

func (AgreementClient) Get

Get ...

func (AgreementClient) ListByBillingAccount

ListByBillingAccount ...

func (AgreementClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all the results into a single object

func (AgreementClient) ListByBillingAccountCompleteMatchingPredicate

func (c AgreementClient) 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 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

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

func (AgreementOperationPredicate) Matches

func (p AgreementOperationPredicate) Matches(input Agreement) bool

type AgreementProperties

type AgreementProperties struct {
	AcceptanceMode         *AcceptanceMode       `json:"acceptanceMode,omitempty"`
	AgreementLink          *string               `json:"agreementLink,omitempty"`
	BillingProfileInfo     *[]BillingProfileInfo `json:"billingProfileInfo,omitempty"`
	Category               *Category             `json:"category,omitempty"`
	DisplayName            *string               `json:"displayName,omitempty"`
	EffectiveDate          *string               `json:"effectiveDate,omitempty"`
	ExpirationDate         *string               `json:"expirationDate,omitempty"`
	LeadBillingAccountName *string               `json:"leadBillingAccountName,omitempty"`
	Participants           *[]Participant        `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 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 BillingProfileInfo

type BillingProfileInfo struct {
	BillingAccountId                     *string `json:"billingAccountId,omitempty"`
	BillingProfileDisplayName            *string `json:"billingProfileDisplayName,omitempty"`
	BillingProfileId                     *string `json:"billingProfileId,omitempty"`
	BillingProfileSystemId               *string `json:"billingProfileSystemId,omitempty"`
	IndirectRelationshipOrganizationName *string `json:"indirectRelationshipOrganizationName,omitempty"`
}

type Category

type Category string
const (
	CategoryAffiliatePurchaseTerms         Category = "AffiliatePurchaseTerms"
	CategoryIndirectForGovernmentAgreement Category = "IndirectForGovernmentAgreement"
	CategoryMicrosoftCustomerAgreement     Category = "MicrosoftCustomerAgreement"
	CategoryMicrosoftPartnerAgreement      Category = "MicrosoftPartnerAgreement"
	CategoryOther                          Category = "Other"
	CategoryUKCloudComputeFramework        Category = "UKCloudComputeFramework"
)

func (*Category) UnmarshalJSON

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

type GetOperationResponse

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

type ListByBillingAccountCompleteResult

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

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 {
	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 Participant

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

func (*Participant) GetStatusDateAsTime

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

func (*Participant) SetStatusDateAsTime

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

Jump to

Keyboard shortcuts

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