agreements

package
v0.20240131.1131852 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements Documentation

The agreements SDK allows for interaction with the Azure Resource Manager Service marketplaceordering (API Version 2015-06-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/marketplaceordering/2015-06-01/agreements"

Client Initialization

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

Example Usage: AgreementsClient.MarketplaceAgreementsCancel

ctx := context.TODO()
id := agreements.NewPlanID("12345678-1234-9876-4563-123456789012", "publisherIdValue", "offerIdValue", "planIdValue")

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

Example Usage: AgreementsClient.MarketplaceAgreementsCreate

ctx := context.TODO()
id := agreements.NewOfferPlanID("12345678-1234-9876-4563-123456789012", "publisherIdValue", "offerIdValue", "planIdValue")

payload := agreements.AgreementTerms{
	// ...
}


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

Example Usage: AgreementsClient.MarketplaceAgreementsGet

ctx := context.TODO()
id := agreements.NewOfferPlanID("12345678-1234-9876-4563-123456789012", "publisherIdValue", "offerIdValue", "planIdValue")

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

Example Usage: AgreementsClient.MarketplaceAgreementsGetAgreement

ctx := context.TODO()
id := agreements.NewPlanID("12345678-1234-9876-4563-123456789012", "publisherIdValue", "offerIdValue", "planIdValue")

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

Example Usage: AgreementsClient.MarketplaceAgreementsList

ctx := context.TODO()
id := agreements.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: AgreementsClient.MarketplaceAgreementsSign

ctx := context.TODO()
id := agreements.NewPlanID("12345678-1234-9876-4563-123456789012", "publisherIdValue", "offerIdValue", "planIdValue")

read, err := client.MarketplaceAgreementsSign(ctx, id)
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 PossibleValuesForState

func PossibleValuesForState() []string

func ValidateOfferPlanID

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

ValidateOfferPlanID checks that 'input' can be parsed as a Offer Plan ID

func ValidatePlanID

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

ValidatePlanID checks that 'input' can be parsed as a Plan ID

Types

type AgreementProperties

type AgreementProperties struct {
	Accepted          *bool   `json:"accepted,omitempty"`
	LicenseTextLink   *string `json:"licenseTextLink,omitempty"`
	Plan              *string `json:"plan,omitempty"`
	PrivacyPolicyLink *string `json:"privacyPolicyLink,omitempty"`
	Product           *string `json:"product,omitempty"`
	Publisher         *string `json:"publisher,omitempty"`
	RetrieveDatetime  *string `json:"retrieveDatetime,omitempty"`
	Signature         *string `json:"signature,omitempty"`
}

func (*AgreementProperties) GetRetrieveDatetimeAsTime

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

func (*AgreementProperties) SetRetrieveDatetimeAsTime

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

type AgreementTerms

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

type AgreementTermsList

type AgreementTermsList struct {
	Value *[]OldAgreementTerms `json:"value,omitempty"`
}

type AgreementsClient

type AgreementsClient struct {
	Client *resourcemanager.Client
}

func NewAgreementsClientWithBaseURI

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

func (AgreementsClient) MarketplaceAgreementsCancel

func (c AgreementsClient) MarketplaceAgreementsCancel(ctx context.Context, id PlanId) (result MarketplaceAgreementsCancelOperationResponse, err error)

MarketplaceAgreementsCancel ...

func (AgreementsClient) MarketplaceAgreementsCreate

func (c AgreementsClient) MarketplaceAgreementsCreate(ctx context.Context, id OfferPlanId, input AgreementTerms) (result MarketplaceAgreementsCreateOperationResponse, err error)

MarketplaceAgreementsCreate ...

func (AgreementsClient) MarketplaceAgreementsGet

func (c AgreementsClient) MarketplaceAgreementsGet(ctx context.Context, id OfferPlanId) (result MarketplaceAgreementsGetOperationResponse, err error)

MarketplaceAgreementsGet ...

func (AgreementsClient) MarketplaceAgreementsGetAgreement

func (c AgreementsClient) MarketplaceAgreementsGetAgreement(ctx context.Context, id PlanId) (result MarketplaceAgreementsGetAgreementOperationResponse, err error)

MarketplaceAgreementsGetAgreement ...

func (AgreementsClient) MarketplaceAgreementsList

MarketplaceAgreementsList ...

func (AgreementsClient) MarketplaceAgreementsSign

func (c AgreementsClient) MarketplaceAgreementsSign(ctx context.Context, id PlanId) (result MarketplaceAgreementsSignOperationResponse, err error)

MarketplaceAgreementsSign ...

type MarketplaceAgreementsCancelOperationResponse

type MarketplaceAgreementsCancelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OldAgreementTerms
}

type MarketplaceAgreementsCreateOperationResponse

type MarketplaceAgreementsCreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AgreementTerms
}

type MarketplaceAgreementsGetAgreementOperationResponse

type MarketplaceAgreementsGetAgreementOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OldAgreementTerms
}

type MarketplaceAgreementsGetOperationResponse

type MarketplaceAgreementsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AgreementTerms
}

type MarketplaceAgreementsListOperationResponse

type MarketplaceAgreementsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AgreementTermsList
}

type MarketplaceAgreementsSignOperationResponse

type MarketplaceAgreementsSignOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OldAgreementTerms
}

type OfferPlanId

type OfferPlanId struct {
	SubscriptionId string
	PublisherId    string
	OfferId        string
	PlanId         string
}

OfferPlanId is a struct representing the Resource ID for a Offer Plan

func NewOfferPlanID

func NewOfferPlanID(subscriptionId string, publisherId string, offerId string, planId string) OfferPlanId

NewOfferPlanID returns a new OfferPlanId struct

func ParseOfferPlanID

func ParseOfferPlanID(input string) (*OfferPlanId, error)

ParseOfferPlanID parses 'input' into a OfferPlanId

func ParseOfferPlanIDInsensitively

func ParseOfferPlanIDInsensitively(input string) (*OfferPlanId, error)

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

func (*OfferPlanId) FromParseResult

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

func (OfferPlanId) ID

func (id OfferPlanId) ID() string

ID returns the formatted Offer Plan ID

func (OfferPlanId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Offer Plan ID

func (OfferPlanId) String

func (id OfferPlanId) String() string

String returns a human-readable description of this Offer Plan ID

type OldAgreementProperties

type OldAgreementProperties struct {
	CancelDate *string `json:"cancelDate,omitempty"`
	Id         *string `json:"id,omitempty"`
	Offer      *string `json:"offer,omitempty"`
	Publisher  *string `json:"publisher,omitempty"`
	SignDate   *string `json:"signDate,omitempty"`
	State      *State  `json:"state,omitempty"`
}

func (*OldAgreementProperties) GetCancelDateAsTime

func (o *OldAgreementProperties) GetCancelDateAsTime() (*time.Time, error)

func (*OldAgreementProperties) GetSignDateAsTime

func (o *OldAgreementProperties) GetSignDateAsTime() (*time.Time, error)

func (*OldAgreementProperties) SetCancelDateAsTime

func (o *OldAgreementProperties) SetCancelDateAsTime(input time.Time)

func (*OldAgreementProperties) SetSignDateAsTime

func (o *OldAgreementProperties) SetSignDateAsTime(input time.Time)

type OldAgreementTerms

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

type PlanId

type PlanId struct {
	SubscriptionId string
	PublisherId    string
	OfferId        string
	PlanId         string
}

PlanId is a struct representing the Resource ID for a Plan

func NewPlanID

func NewPlanID(subscriptionId string, publisherId string, offerId string, planId string) PlanId

NewPlanID returns a new PlanId struct

func ParsePlanID

func ParsePlanID(input string) (*PlanId, error)

ParsePlanID parses 'input' into a PlanId

func ParsePlanIDInsensitively

func ParsePlanIDInsensitively(input string) (*PlanId, error)

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

func (*PlanId) FromParseResult

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

func (PlanId) ID

func (id PlanId) ID() string

ID returns the formatted Plan ID

func (PlanId) Segments

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

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

func (PlanId) String

func (id PlanId) String() string

String returns a human-readable description of this Plan ID

type State

type State string
const (
	StateActive   State = "Active"
	StateCanceled State = "Canceled"
)

func (*State) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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