cognitiveservices

package
v11.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package cognitiveservices implements the Azure ARM Cognitiveservices service API version 2017-04-18.

Cognitive Services Management Client

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Cognitiveservices
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type Account

type Account struct {
	autorest.Response  `json:"-"`
	Etag               *string `json:"etag,omitempty"`
	ID                 *string `json:"id,omitempty"`
	Kind               *string `json:"kind,omitempty"`
	Location           *string `json:"location,omitempty"`
	Name               *string `json:"name,omitempty"`
	*AccountProperties `json:"properties,omitempty"`
	Sku                *Sku                `json:"sku,omitempty"`
	Tags               *map[string]*string `json:"tags,omitempty"`
	Type               *string             `json:"type,omitempty"`
}

Account is cognitive Services Account is an Azure resource representing the provisioned account, its type, location and SKU.

type AccountCreateParameters

type AccountCreateParameters struct {
	Sku        *Sku                    `json:"sku,omitempty"`
	Kind       Kind                    `json:"kind,omitempty"`
	Location   *string                 `json:"location,omitempty"`
	Tags       *map[string]*string     `json:"tags,omitempty"`
	Properties *map[string]interface{} `json:"properties,omitempty"`
}

AccountCreateParameters is the parameters to provide for the account.

type AccountEnumerateSkusResult

type AccountEnumerateSkusResult struct {
	autorest.Response `json:"-"`
	Value             *[]ResourceAndSku `json:"value,omitempty"`
}

AccountEnumerateSkusResult is the list of cognitive services accounts operation response.

type AccountKeys

type AccountKeys struct {
	autorest.Response `json:"-"`
	Key1              *string `json:"key1,omitempty"`
	Key2              *string `json:"key2,omitempty"`
}

AccountKeys is the access keys for the cognitive services account.

type AccountListResult

type AccountListResult struct {
	autorest.Response `json:"-"`
	NextLink          *string    `json:"nextLink,omitempty"`
	Value             *[]Account `json:"value,omitempty"`
}

AccountListResult is the list of cognitive services accounts operation response.

func (AccountListResult) AccountListResultPreparer

func (client AccountListResult) AccountListResultPreparer() (*http.Request, error)

AccountListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.

type AccountProperties

type AccountProperties struct {
	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
	Endpoint          *string           `json:"endpoint,omitempty"`
	InternalID        *string           `json:"internalId,omitempty"`
}

AccountProperties is properties of Cognitive Services account.

type AccountUpdateParameters

type AccountUpdateParameters struct {
	Sku  *Sku                `json:"sku,omitempty"`
	Tags *map[string]*string `json:"tags,omitempty"`
}

AccountUpdateParameters is the parameters to provide for the account.

type AccountsClient

type AccountsClient struct {
	ManagementClient
}

AccountsClient is the cognitive Services Management Client

func NewAccountsClient

func NewAccountsClient(subscriptionID string) AccountsClient

NewAccountsClient creates an instance of the AccountsClient client.

func NewAccountsClientWithBaseURI

func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient

NewAccountsClientWithBaseURI creates an instance of the AccountsClient client.

func (AccountsClient) Create

func (client AccountsClient) Create(resourceGroupName string, accountName string, parameters AccountCreateParameters) (result Account, err error)

Create create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing.

resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of Cognitive Services account. parameters is the parameters to provide for the created account.

func (AccountsClient) CreatePreparer

func (client AccountsClient) CreatePreparer(resourceGroupName string, accountName string, parameters AccountCreateParameters) (*http.Request, error)

CreatePreparer prepares the Create request.

func (AccountsClient) CreateResponder

func (client AccountsClient) CreateResponder(resp *http.Response) (result Account, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (AccountsClient) CreateSender

func (client AccountsClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) Delete

func (client AccountsClient) Delete(resourceGroupName string, accountName string) (result autorest.Response, err error)

Delete deletes a Cognitive Services account from the resource group.

resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of Cognitive Services account.

func (AccountsClient) DeletePreparer

func (client AccountsClient) DeletePreparer(resourceGroupName string, accountName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (AccountsClient) DeleteResponder

func (client AccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (AccountsClient) DeleteSender

func (client AccountsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) GetProperties

func (client AccountsClient) GetProperties(resourceGroupName string, accountName string) (result Account, err error)

GetProperties returns a Cognitive Services account specified by the parameters.

resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of Cognitive Services account.

func (AccountsClient) GetPropertiesPreparer

func (client AccountsClient) GetPropertiesPreparer(resourceGroupName string, accountName string) (*http.Request, error)

GetPropertiesPreparer prepares the GetProperties request.

func (AccountsClient) GetPropertiesResponder

func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result Account, err error)

GetPropertiesResponder handles the response to the GetProperties request. The method always closes the http.Response Body.

func (AccountsClient) GetPropertiesSender

func (client AccountsClient) GetPropertiesSender(req *http.Request) (*http.Response, error)

GetPropertiesSender sends the GetProperties request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) List

func (client AccountsClient) List() (result AccountListResult, err error)

List returns all the resources of a particular type belonging to a subscription.

func (AccountsClient) ListByResourceGroup

func (client AccountsClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error)

ListByResourceGroup returns all the resources of a particular type belonging to a resource group

resourceGroupName is the name of the resource group within the user's subscription.

func (AccountsClient) ListByResourceGroupComplete

func (client AccountsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Account, <-chan error)

ListByResourceGroupComplete gets all elements from the list without paging.

func (AccountsClient) ListByResourceGroupNextResults

func (client AccountsClient) ListByResourceGroupNextResults(lastResults AccountListResult) (result AccountListResult, err error)

ListByResourceGroupNextResults retrieves the next set of results, if any.

func (AccountsClient) ListByResourceGroupPreparer

func (client AccountsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error)

ListByResourceGroupPreparer prepares the ListByResourceGroup request.

func (AccountsClient) ListByResourceGroupResponder

func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result AccountListResult, err error)

ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.

func (AccountsClient) ListByResourceGroupSender

func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)

ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) ListComplete

func (client AccountsClient) ListComplete(cancel <-chan struct{}) (<-chan Account, <-chan error)

ListComplete gets all elements from the list without paging.

func (AccountsClient) ListKeys

func (client AccountsClient) ListKeys(resourceGroupName string, accountName string) (result AccountKeys, err error)

ListKeys lists the account keys for the specified Cognitive Services account.

resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of Cognitive Services account.

func (AccountsClient) ListKeysPreparer

func (client AccountsClient) ListKeysPreparer(resourceGroupName string, accountName string) (*http.Request, error)

ListKeysPreparer prepares the ListKeys request.

func (AccountsClient) ListKeysResponder

func (client AccountsClient) ListKeysResponder(resp *http.Response) (result AccountKeys, err error)

ListKeysResponder handles the response to the ListKeys request. The method always closes the http.Response Body.

func (AccountsClient) ListKeysSender

func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error)

ListKeysSender sends the ListKeys request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) ListNextResults

func (client AccountsClient) ListNextResults(lastResults AccountListResult) (result AccountListResult, err error)

ListNextResults retrieves the next set of results, if any.

func (AccountsClient) ListPreparer

func (client AccountsClient) ListPreparer() (*http.Request, error)

ListPreparer prepares the List request.

func (AccountsClient) ListResponder

func (client AccountsClient) ListResponder(resp *http.Response) (result AccountListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (AccountsClient) ListSender

func (client AccountsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) ListSkus

func (client AccountsClient) ListSkus(resourceGroupName string, accountName string) (result AccountEnumerateSkusResult, err error)

ListSkus list available SKUs for the requested Cognitive Services account

resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of Cognitive Services account.

func (AccountsClient) ListSkusPreparer

func (client AccountsClient) ListSkusPreparer(resourceGroupName string, accountName string) (*http.Request, error)

ListSkusPreparer prepares the ListSkus request.

func (AccountsClient) ListSkusResponder

func (client AccountsClient) ListSkusResponder(resp *http.Response) (result AccountEnumerateSkusResult, err error)

ListSkusResponder handles the response to the ListSkus request. The method always closes the http.Response Body.

func (AccountsClient) ListSkusSender

func (client AccountsClient) ListSkusSender(req *http.Request) (*http.Response, error)

ListSkusSender sends the ListSkus request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) RegenerateKey

func (client AccountsClient) RegenerateKey(resourceGroupName string, accountName string, parameters RegenerateKeyParameters) (result AccountKeys, err error)

RegenerateKey regenerates the specified account key for the specified Cognitive Services account.

resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of Cognitive Services account. parameters is regenerate key parameters.

func (AccountsClient) RegenerateKeyPreparer

func (client AccountsClient) RegenerateKeyPreparer(resourceGroupName string, accountName string, parameters RegenerateKeyParameters) (*http.Request, error)

RegenerateKeyPreparer prepares the RegenerateKey request.

func (AccountsClient) RegenerateKeyResponder

func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result AccountKeys, err error)

RegenerateKeyResponder handles the response to the RegenerateKey request. The method always closes the http.Response Body.

func (AccountsClient) RegenerateKeySender

func (client AccountsClient) RegenerateKeySender(req *http.Request) (*http.Response, error)

RegenerateKeySender sends the RegenerateKey request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) Update

func (client AccountsClient) Update(resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error)

Update updates a Cognitive Services account

resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of Cognitive Services account. parameters is the parameters to provide for the created account.

func (AccountsClient) UpdatePreparer

func (client AccountsClient) UpdatePreparer(resourceGroupName string, accountName string, parameters AccountUpdateParameters) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (AccountsClient) UpdateResponder

func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (AccountsClient) UpdateSender

func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type CheckSkuAvailabilityClient

type CheckSkuAvailabilityClient struct {
	ManagementClient
}

CheckSkuAvailabilityClient is the cognitive Services Management Client

func NewCheckSkuAvailabilityClient

func NewCheckSkuAvailabilityClient(subscriptionID string) CheckSkuAvailabilityClient

NewCheckSkuAvailabilityClient creates an instance of the CheckSkuAvailabilityClient client.

func NewCheckSkuAvailabilityClientWithBaseURI

func NewCheckSkuAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) CheckSkuAvailabilityClient

NewCheckSkuAvailabilityClientWithBaseURI creates an instance of the CheckSkuAvailabilityClient client.

func (CheckSkuAvailabilityClient) List

List check available SKUs.

location is resource location. parameters is check SKU Availablity POST body.

func (CheckSkuAvailabilityClient) ListPreparer

func (client CheckSkuAvailabilityClient) ListPreparer(location string, parameters CheckSkuAvailabilityParameter) (*http.Request, error)

ListPreparer prepares the List request.

func (CheckSkuAvailabilityClient) ListResponder

func (client CheckSkuAvailabilityClient) ListResponder(resp *http.Response) (result CheckSkuAvailabilityResultList, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (CheckSkuAvailabilityClient) ListSender

func (client CheckSkuAvailabilityClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type CheckSkuAvailabilityParameter

type CheckSkuAvailabilityParameter struct {
	Skus *[]SkuName `json:"skus,omitempty"`
	Kind Kind       `json:"kind,omitempty"`
	Type *string    `json:"type,omitempty"`
}

CheckSkuAvailabilityParameter is check SKU availability parameter.

type CheckSkuAvailabilityResult

type CheckSkuAvailabilityResult struct {
	Kind         Kind    `json:"kind,omitempty"`
	Type         *string `json:"type,omitempty"`
	SkuName      SkuName `json:"skuName,omitempty"`
	SkuAvailable *bool   `json:"skuAvailable,omitempty"`
	Reason       *string `json:"reason,omitempty"`
	Message      *string `json:"message,omitempty"`
}

CheckSkuAvailabilityResult is check SKU availability result.

type CheckSkuAvailabilityResultList

type CheckSkuAvailabilityResultList struct {
	autorest.Response `json:"-"`
	Value             *[]CheckSkuAvailabilityResult `json:"value,omitempty"`
}

CheckSkuAvailabilityResultList is check SKU availability result list.

type Error

type Error struct {
	Error *ErrorBody `json:"error,omitempty"`
}

Error is cognitive Services error object.

type ErrorBody

type ErrorBody struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

ErrorBody is cognitive Services error body.

type KeyName

type KeyName string

KeyName enumerates the values for key name.

const (
	// Key1 specifies the key 1 state for key name.
	Key1 KeyName = "Key1"
	// Key2 specifies the key 2 state for key name.
	Key2 KeyName = "Key2"
)

type Kind

type Kind string

Kind enumerates the values for kind.

const (
	// Academic specifies the academic state for kind.
	Academic Kind = "Academic"
	// BingAutosuggest specifies the bing autosuggest state for kind.
	BingAutosuggest Kind = "Bing.Autosuggest"
	// BingSearch specifies the bing search state for kind.
	BingSearch Kind = "Bing.Search"
	// BingSpeech specifies the bing speech state for kind.
	BingSpeech Kind = "Bing.Speech"
	// BingSpellCheck specifies the bing spell check state for kind.
	BingSpellCheck Kind = "Bing.SpellCheck"
	// ComputerVision specifies the computer vision state for kind.
	ComputerVision Kind = "ComputerVision"
	// ContentModerator specifies the content moderator state for kind.
	ContentModerator Kind = "ContentModerator"
	// CustomSpeech specifies the custom speech state for kind.
	CustomSpeech Kind = "CustomSpeech"
	// Emotion specifies the emotion state for kind.
	Emotion Kind = "Emotion"
	// Face specifies the face state for kind.
	Face Kind = "Face"
	// LUIS specifies the luis state for kind.
	LUIS Kind = "LUIS"
	// Recommendations specifies the recommendations state for kind.
	Recommendations Kind = "Recommendations"
	// SpeakerRecognition specifies the speaker recognition state for kind.
	SpeakerRecognition Kind = "SpeakerRecognition"
	// Speech specifies the speech state for kind.
	Speech Kind = "Speech"
	// SpeechTranslation specifies the speech translation state for kind.
	SpeechTranslation Kind = "SpeechTranslation"
	// TextAnalytics specifies the text analytics state for kind.
	TextAnalytics Kind = "TextAnalytics"
	// TextTranslation specifies the text translation state for kind.
	TextTranslation Kind = "TextTranslation"
	// WebLM specifies the web lm state for kind.
	WebLM Kind = "WebLM"
)

type ManagementClient

type ManagementClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

ManagementClient is the base client for Cognitiveservices.

func New

func New(subscriptionID string) ManagementClient

New creates an instance of the ManagementClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient

NewWithBaseURI creates an instance of the ManagementClient client.

type OperationDisplayInfo

type OperationDisplayInfo struct {
	Description *string `json:"description,omitempty"`
	Operation   *string `json:"operation,omitempty"`
	Provider    *string `json:"provider,omitempty"`
	Resource    *string `json:"resource,omitempty"`
}

OperationDisplayInfo is the operation supported by Cognitive Services.

type OperationEntity

type OperationEntity struct {
	Name       *string                 `json:"name,omitempty"`
	Display    *OperationDisplayInfo   `json:"display,omitempty"`
	Origin     *string                 `json:"origin,omitempty"`
	Properties *map[string]interface{} `json:"properties,omitempty"`
}

OperationEntity is the operation supported by Cognitive Services.

type OperationEntityListResult

type OperationEntityListResult struct {
	autorest.Response `json:"-"`
	NextLink          *string            `json:"nextLink,omitempty"`
	Value             *[]OperationEntity `json:"value,omitempty"`
}

OperationEntityListResult is the list of cognitive services accounts operation response.

func (OperationEntityListResult) OperationEntityListResultPreparer

func (client OperationEntityListResult) OperationEntityListResultPreparer() (*http.Request, error)

OperationEntityListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.

type OperationsClient

type OperationsClient struct {
	ManagementClient
}

OperationsClient is the cognitive Services Management Client

func NewOperationsClient

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List

func (client OperationsClient) List() (result OperationEntityListResult, err error)

List lists all the available Cognitive Services account operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan OperationEntity, <-chan error)

ListComplete gets all elements from the list without paging.

func (OperationsClient) ListNextResults

func (client OperationsClient) ListNextResults(lastResults OperationEntityListResult) (result OperationEntityListResult, err error)

ListNextResults retrieves the next set of results, if any.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer() (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationEntityListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ProvisioningState

type ProvisioningState string

ProvisioningState enumerates the values for provisioning state.

const (
	// Creating specifies the creating state for provisioning state.
	Creating ProvisioningState = "Creating"
	// Failed specifies the failed state for provisioning state.
	Failed ProvisioningState = "Failed"
	// ResolvingDNS specifies the resolving dns state for provisioning state.
	ResolvingDNS ProvisioningState = "ResolvingDNS"
	// Succeeded specifies the succeeded state for provisioning state.
	Succeeded ProvisioningState = "Succeeded"
)

type RegenerateKeyParameters

type RegenerateKeyParameters struct {
	KeyName KeyName `json:"keyName,omitempty"`
}

RegenerateKeyParameters is regenerate key parameters.

type ResourceAndSku

type ResourceAndSku struct {
	ResourceType *string `json:"resourceType,omitempty"`
	Sku          *Sku    `json:"sku,omitempty"`
}

ResourceAndSku is cognitive Services resource type and SKU.

type Sku

type Sku struct {
	Name SkuName `json:"name,omitempty"`
	Tier SkuTier `json:"tier,omitempty"`
}

Sku is the SKU of the cognitive services account.

type SkuName

type SkuName string

SkuName enumerates the values for sku name.

const (
	// F0 specifies the f0 state for sku name.
	F0 SkuName = "F0"
	// P0 specifies the p0 state for sku name.
	P0 SkuName = "P0"
	// P1 specifies the p1 state for sku name.
	P1 SkuName = "P1"
	// P2 specifies the p2 state for sku name.
	P2 SkuName = "P2"
	// S0 specifies the s0 state for sku name.
	S0 SkuName = "S0"
	// S1 specifies the s1 state for sku name.
	S1 SkuName = "S1"
	// S2 specifies the s2 state for sku name.
	S2 SkuName = "S2"
	// S3 specifies the s3 state for sku name.
	S3 SkuName = "S3"
	// S4 specifies the s4 state for sku name.
	S4 SkuName = "S4"
	// S5 specifies the s5 state for sku name.
	S5 SkuName = "S5"
	// S6 specifies the s6 state for sku name.
	S6 SkuName = "S6"
)

type SkuTier

type SkuTier string

SkuTier enumerates the values for sku tier.

const (
	// Free specifies the free state for sku tier.
	Free SkuTier = "Free"
	// Premium specifies the premium state for sku tier.
	Premium SkuTier = "Premium"
	// Standard specifies the standard state for sku tier.
	Standard SkuTier = "Standard"
)

Jump to

Keyboard shortcuts

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