prediction

package
v0.20231122.1165504 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/prediction Documentation

The prediction SDK allows for interaction with the Azure Resource Manager Service advisor (API Version 2023-01-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/advisor/2023-01-01/prediction"

Client Initialization

client := prediction.NewPredictionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PredictionClient.Predict

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

payload := prediction.PredictionRequest{
	// ...
}


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

func PossibleValuesForCategory() []string

func PossibleValuesForImpact

func PossibleValuesForImpact() []string

func PossibleValuesForPredictionType

func PossibleValuesForPredictionType() []string

Types

type Category

type Category string
const (
	CategoryCost                  Category = "Cost"
	CategoryHighAvailability      Category = "HighAvailability"
	CategoryOperationalExcellence Category = "OperationalExcellence"
	CategoryPerformance           Category = "Performance"
	CategorySecurity              Category = "Security"
)

func (*Category) UnmarshalJSON added in v0.20230731.1080956

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

type Impact

type Impact string
const (
	ImpactHigh   Impact = "High"
	ImpactLow    Impact = "Low"
	ImpactMedium Impact = "Medium"
)

func (*Impact) UnmarshalJSON added in v0.20230731.1080956

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

type PredictOperationResponse

type PredictOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PredictionResponse
}

type PredictionClient

type PredictionClient struct {
	Client *resourcemanager.Client
}

func NewPredictionClientWithBaseURI

func NewPredictionClientWithBaseURI(sdkApi sdkEnv.Api) (*PredictionClient, error)

func (PredictionClient) Predict

Predict ...

type PredictionRequest

type PredictionRequest struct {
	Properties *PredictionRequestProperties `json:"properties,omitempty"`
}

type PredictionRequestProperties

type PredictionRequestProperties struct {
	ExtendedProperties *interface{}    `json:"extendedProperties,omitempty"`
	PredictionType     *PredictionType `json:"predictionType,omitempty"`
}

type PredictionResponse

type PredictionResponse struct {
	Properties *PredictionResponseProperties `json:"properties,omitempty"`
}

type PredictionResponseProperties

type PredictionResponseProperties struct {
	Category           *Category         `json:"category,omitempty"`
	ExtendedProperties *interface{}      `json:"extendedProperties,omitempty"`
	Impact             *Impact           `json:"impact,omitempty"`
	ImpactedField      *string           `json:"impactedField,omitempty"`
	LastUpdated        *string           `json:"lastUpdated,omitempty"`
	PredictionType     *PredictionType   `json:"predictionType,omitempty"`
	ShortDescription   *ShortDescription `json:"shortDescription,omitempty"`
}

func (*PredictionResponseProperties) GetLastUpdatedAsTime

func (o *PredictionResponseProperties) GetLastUpdatedAsTime() (*time.Time, error)

func (*PredictionResponseProperties) SetLastUpdatedAsTime

func (o *PredictionResponseProperties) SetLastUpdatedAsTime(input time.Time)

type PredictionType

type PredictionType string
const (
	PredictionTypePredictiveRightsizing PredictionType = "PredictiveRightsizing"
)

func (*PredictionType) UnmarshalJSON added in v0.20230731.1080956

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

type ShortDescription

type ShortDescription struct {
	Problem  *string `json:"problem,omitempty"`
	Solution *string `json:"solution,omitempty"`
}

Jump to

Keyboard shortcuts

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