modelversion

package
v0.20231114.1102450 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2022-10-01/modelversion Documentation

The modelversion SDK allows for interaction with the Azure Resource Manager Service machinelearningservices (API Version 2022-10-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/machinelearningservices/2022-10-01/modelversion"

Client Initialization

client := modelversion.NewModelVersionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ModelVersionClient.CreateOrUpdate

ctx := context.TODO()
id := modelversion.NewModelVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "modelValue", "versionValue")

payload := modelversion.ModelVersionResource{
	// ...
}


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

Example Usage: ModelVersionClient.Delete

ctx := context.TODO()
id := modelversion.NewModelVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "modelValue", "versionValue")

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

Example Usage: ModelVersionClient.Get

ctx := context.TODO()
id := modelversion.NewModelVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "modelValue", "versionValue")

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: ModelVersionClient.List

ctx := context.TODO()
id := modelversion.NewModelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "modelValue")

// alternatively `client.List(ctx, id, modelversion.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, modelversion.DefaultListOperationOptions())
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 PossibleValuesForListViewType

func PossibleValuesForListViewType() []string

func ValidateModelID

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

ValidateModelID checks that 'input' can be parsed as a Model ID

func ValidateModelVersionID

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

ValidateModelVersionID checks that 'input' can be parsed as a Model Version ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ModelVersionResource
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type FlavorData

type FlavorData struct {
	Data *map[string]string `json:"data,omitempty"`
}

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []ModelVersionResource
}

type ListOperationOptions

type ListOperationOptions struct {
	Description  *string
	Feed         *string
	ListViewType *ListViewType
	Offset       *int64
	OrderBy      *string
	Properties   *string
	Skip         *string
	Tags         *string
	Top          *int64
	Version      *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230713.1092427

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

func (ListOperationOptions) ToOData added in v0.20230713.1092427

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

func (ListOperationOptions) ToQuery added in v0.20230713.1092427

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ModelVersionResource
}

type ListViewType

type ListViewType string
const (
	ListViewTypeActiveOnly   ListViewType = "ActiveOnly"
	ListViewTypeAll          ListViewType = "All"
	ListViewTypeArchivedOnly ListViewType = "ArchivedOnly"
)

func (*ListViewType) UnmarshalJSON added in v0.20230713.1092427

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

type ModelId

type ModelId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	ModelName         string
}

ModelId is a struct representing the Resource ID for a Model

func NewModelID

func NewModelID(subscriptionId string, resourceGroupName string, workspaceName string, modelName string) ModelId

NewModelID returns a new ModelId struct

func ParseModelID

func ParseModelID(input string) (*ModelId, error)

ParseModelID parses 'input' into a ModelId

func ParseModelIDInsensitively

func ParseModelIDInsensitively(input string) (*ModelId, error)

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

func (ModelId) ID

func (id ModelId) ID() string

ID returns the formatted Model ID

func (ModelId) Segments

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

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

func (ModelId) String

func (id ModelId) String() string

String returns a human-readable description of this Model ID

type ModelVersion

type ModelVersion struct {
	Description *string                `json:"description,omitempty"`
	Flavors     *map[string]FlavorData `json:"flavors,omitempty"`
	IsAnonymous *bool                  `json:"isAnonymous,omitempty"`
	IsArchived  *bool                  `json:"isArchived,omitempty"`
	JobName     *string                `json:"jobName,omitempty"`
	ModelType   *string                `json:"modelType,omitempty"`
	ModelUri    *string                `json:"modelUri,omitempty"`
	Properties  *map[string]string     `json:"properties,omitempty"`
	Tags        *map[string]string     `json:"tags,omitempty"`
}

type ModelVersionClient

type ModelVersionClient struct {
	Client *resourcemanager.Client
}

func NewModelVersionClientWithBaseURI

func NewModelVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ModelVersionClient, error)

func (ModelVersionClient) CreateOrUpdate

CreateOrUpdate ...

func (ModelVersionClient) Delete

Delete ...

func (ModelVersionClient) Get

Get ...

func (ModelVersionClient) List

List ...

func (ModelVersionClient) ListComplete

ListComplete retrieves all the results into a single object

func (ModelVersionClient) ListCompleteMatchingPredicate

func (c ModelVersionClient) ListCompleteMatchingPredicate(ctx context.Context, id ModelId, options ListOperationOptions, predicate ModelVersionResourceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ModelVersionId

type ModelVersionId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	ModelName         string
	VersionName       string
}

ModelVersionId is a struct representing the Resource ID for a Model Version

func NewModelVersionID

func NewModelVersionID(subscriptionId string, resourceGroupName string, workspaceName string, modelName string, versionName string) ModelVersionId

NewModelVersionID returns a new ModelVersionId struct

func ParseModelVersionID

func ParseModelVersionID(input string) (*ModelVersionId, error)

ParseModelVersionID parses 'input' into a ModelVersionId

func ParseModelVersionIDInsensitively

func ParseModelVersionIDInsensitively(input string) (*ModelVersionId, error)

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

func (ModelVersionId) ID

func (id ModelVersionId) ID() string

ID returns the formatted Model Version ID

func (ModelVersionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Model Version ID

func (ModelVersionId) String

func (id ModelVersionId) String() string

String returns a human-readable description of this Model Version ID

type ModelVersionResource

type ModelVersionResource struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties ModelVersion           `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ModelVersionResourceOperationPredicate

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

func (ModelVersionResourceOperationPredicate) Matches

Jump to

Keyboard shortcuts

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