openaiintegration

package
v0.20240625.1123713 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/openaiintegration Documentation

The openaiintegration SDK allows for interaction with the Azure Resource Manager Service elastic (API Version 2024-03-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/elastic/2024-03-01/openaiintegration"

Client Initialization

client := openaiintegration.NewOpenAIIntegrationClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: OpenAIIntegrationClient.OpenAICreateOrUpdate

ctx := context.TODO()
id := openaiintegration.NewOpenAIIntegrationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "openAIIntegrationValue")

payload := openaiintegration.OpenAIIntegrationRPModel{
	// ...
}


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

Example Usage: OpenAIIntegrationClient.OpenAIDelete

ctx := context.TODO()
id := openaiintegration.NewOpenAIIntegrationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "openAIIntegrationValue")

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

Example Usage: OpenAIIntegrationClient.OpenAIGet

ctx := context.TODO()
id := openaiintegration.NewOpenAIIntegrationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "openAIIntegrationValue")

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

Example Usage: OpenAIIntegrationClient.OpenAIGetStatus

ctx := context.TODO()
id := openaiintegration.NewOpenAIIntegrationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "openAIIntegrationValue")

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

Example Usage: OpenAIIntegrationClient.OpenAIList

ctx := context.TODO()
id := openaiintegration.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

// alternatively `client.OpenAIList(ctx, id)` can be used to do batched pagination
items, err := client.OpenAIListComplete(ctx, id)
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 ValidateMonitorID

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

ValidateMonitorID checks that 'input' can be parsed as a Monitor ID

func ValidateOpenAIIntegrationID

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

ValidateOpenAIIntegrationID checks that 'input' can be parsed as a Open A I Integration ID

Types

type MonitorId

type MonitorId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
}

MonitorId is a struct representing the Resource ID for a Monitor

func NewMonitorID

func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId

NewMonitorID returns a new MonitorId struct

func ParseMonitorID

func ParseMonitorID(input string) (*MonitorId, error)

ParseMonitorID parses 'input' into a MonitorId

func ParseMonitorIDInsensitively

func ParseMonitorIDInsensitively(input string) (*MonitorId, error)

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

func (*MonitorId) FromParseResult

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

func (MonitorId) ID

func (id MonitorId) ID() string

ID returns the formatted Monitor ID

func (MonitorId) Segments

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

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

func (MonitorId) String

func (id MonitorId) String() string

String returns a human-readable description of this Monitor ID

type OpenAICreateOrUpdateOperationResponse

type OpenAICreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OpenAIIntegrationRPModel
}

type OpenAIDeleteOperationResponse

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

type OpenAIGetOperationResponse

type OpenAIGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OpenAIIntegrationRPModel
}

type OpenAIGetStatusOperationResponse

type OpenAIGetStatusOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OpenAIIntegrationStatusResponse
}

type OpenAIIntegrationClient

type OpenAIIntegrationClient struct {
	Client *resourcemanager.Client
}

func NewOpenAIIntegrationClientWithBaseURI

func NewOpenAIIntegrationClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenAIIntegrationClient, error)

func (OpenAIIntegrationClient) OpenAICreateOrUpdate

OpenAICreateOrUpdate ...

func (OpenAIIntegrationClient) OpenAIDelete

OpenAIDelete ...

func (OpenAIIntegrationClient) OpenAIGet

OpenAIGet ...

func (OpenAIIntegrationClient) OpenAIGetStatus

OpenAIGetStatus ...

func (OpenAIIntegrationClient) OpenAIList

OpenAIList ...

func (OpenAIIntegrationClient) OpenAIListComplete

OpenAIListComplete retrieves all the results into a single object

func (OpenAIIntegrationClient) OpenAIListCompleteMatchingPredicate

func (c OpenAIIntegrationClient) OpenAIListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate OpenAIIntegrationRPModelOperationPredicate) (result OpenAIListCompleteResult, err error)

OpenAIListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type OpenAIIntegrationId

type OpenAIIntegrationId struct {
	SubscriptionId        string
	ResourceGroupName     string
	MonitorName           string
	OpenAIIntegrationName string
}

OpenAIIntegrationId is a struct representing the Resource ID for a Open A I Integration

func NewOpenAIIntegrationID

func NewOpenAIIntegrationID(subscriptionId string, resourceGroupName string, monitorName string, openAIIntegrationName string) OpenAIIntegrationId

NewOpenAIIntegrationID returns a new OpenAIIntegrationId struct

func ParseOpenAIIntegrationID

func ParseOpenAIIntegrationID(input string) (*OpenAIIntegrationId, error)

ParseOpenAIIntegrationID parses 'input' into a OpenAIIntegrationId

func ParseOpenAIIntegrationIDInsensitively

func ParseOpenAIIntegrationIDInsensitively(input string) (*OpenAIIntegrationId, error)

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

func (*OpenAIIntegrationId) FromParseResult

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

func (OpenAIIntegrationId) ID

func (id OpenAIIntegrationId) ID() string

ID returns the formatted Open A I Integration ID

func (OpenAIIntegrationId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Open A I Integration ID

func (OpenAIIntegrationId) String

func (id OpenAIIntegrationId) String() string

String returns a human-readable description of this Open A I Integration ID

type OpenAIIntegrationProperties

type OpenAIIntegrationProperties struct {
	Key                    *string `json:"key,omitempty"`
	LastRefreshAt          *string `json:"lastRefreshAt,omitempty"`
	OpenAIResourceEndpoint *string `json:"openAIResourceEndpoint,omitempty"`
	OpenAIResourceId       *string `json:"openAIResourceId,omitempty"`
}

func (*OpenAIIntegrationProperties) GetLastRefreshAtAsTime

func (o *OpenAIIntegrationProperties) GetLastRefreshAtAsTime() (*time.Time, error)

func (*OpenAIIntegrationProperties) SetLastRefreshAtAsTime

func (o *OpenAIIntegrationProperties) SetLastRefreshAtAsTime(input time.Time)

type OpenAIIntegrationRPModel

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

type OpenAIIntegrationRPModelOperationPredicate

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

func (OpenAIIntegrationRPModelOperationPredicate) Matches

type OpenAIIntegrationStatusResponse

type OpenAIIntegrationStatusResponse struct {
	Properties *OpenAIIntegrationStatusResponseProperties `json:"properties,omitempty"`
}

type OpenAIIntegrationStatusResponseProperties

type OpenAIIntegrationStatusResponseProperties struct {
	Status *string `json:"status,omitempty"`
}

type OpenAIListCompleteResult

type OpenAIListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []OpenAIIntegrationRPModel
}

type OpenAIListOperationResponse

type OpenAIListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]OpenAIIntegrationRPModel
}

Jump to

Keyboard shortcuts

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