Update vendored dependencies

This includes github.com/kurin/blazer 0.2.0, which resolves #1291
This commit is contained in:
Alexander Neumann 2017-10-01 10:13:39 +02:00
parent ba23d24dd1
commit 61cb1cc6f8
1044 changed files with 203022 additions and 97709 deletions

View file

@ -1,12 +1,9 @@
// Package webservices implements the Azure ARM Webservices service API version
// 2017-01-01.
// Package webservices implements the Azure ARM Webservices service API version 2017-01-01.
//
// These APIs allow end users to operate on Azure Machine Learning Web Services
// resources. They support the following operations:<ul><li>Create or update a
// web service</li><li>Get a web service</li><li>Patch a web
// service</li><li>Delete a web service</li><li>Get All Web Services in a
// Resource Group </li><li>Get All Web Services in a Subscription</li><li>Get
// Web Services Keys</li></ul>
// These APIs allow end users to operate on Azure Machine Learning Web Services resources. They support the following
// operations:<ul><li>Create or update a web service</li><li>Get a web service</li><li>Patch a web
// service</li><li>Delete a web service</li><li>Get All Web Services in a Resource Group </li><li>Get All Web Services
// in a Subscription</li><li>Get Web Services Keys</li></ul>
package webservices
// Copyright (c) Microsoft and contributors. All rights reserved.
@ -23,9 +20,8 @@ package webservices
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"

View file

@ -14,9 +14,8 @@ package webservices
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@ -25,12 +24,10 @@ import (
"net/http"
)
// GroupClient is the these APIs allow end users to operate on Azure Machine
// Learning Web Services resources. They support the following
// operations:<ul><li>Create or update a web service</li><li>Get a web
// service</li><li>Patch a web service</li><li>Delete a web service</li><li>Get
// All Web Services in a Resource Group </li><li>Get All Web Services in a
// Subscription</li><li>Get Web Services Keys</li></ul>
// GroupClient is the these APIs allow end users to operate on Azure Machine Learning Web Services resources. They
// support the following operations:<ul><li>Create or update a web service</li><li>Get a web service</li><li>Patch a
// web service</li><li>Delete a web service</li><li>Get All Web Services in a Resource Group </li><li>Get All Web
// Services in a Subscription</li><li>Get Web Services Keys</li></ul>
type GroupClient struct {
ManagementClient
}
@ -45,18 +42,14 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien
return GroupClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or update a web service. This call will overwrite an
// existing web service. Note that there is no warning or confirmation. This is
// a nonrecoverable operation. If your intent is to create a new web service,
// call the Get operation first to verify that it does not exist. This method
// may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
// CreateOrUpdate create or update a web service. This call will overwrite an existing web service. Note that there is
// no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call
// the Get operation first to verify that it does not exist. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
//
// resourceGroupName is name of the resource group in which the web service is
// located. webServiceName is the name of the web service.
// createOrUpdatePayload is the payload that is used to create or update the
// web service.
// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of
// the web service. createOrUpdatePayload is the payload that is used to create or update the web service.
func (client GroupClient) CreateOrUpdate(resourceGroupName string, webServiceName string, createOrUpdatePayload WebService, cancel <-chan struct{}) (<-chan WebService, <-chan error) {
resultChan := make(chan WebService, 1)
errChan := make(chan error, 1)
@ -94,8 +87,10 @@ func (client GroupClient) CreateOrUpdate(resourceGroupName string, webServiceNam
var err error
var result WebService
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@ -164,18 +159,15 @@ func (client GroupClient) CreateOrUpdateResponder(resp *http.Response) (result W
return
}
// CreateRegionalProperties creates an encrypted credentials parameter blob for
// the specified region. To get the web service from a region other than the
// region in which it has been created, you must first call Create Regional Web
// Services Properties to create a copy of the encrypted credential parameter
// blob in that region. You only need to do this before the first time that you
// get the web service in the new region. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
// CreateRegionalProperties creates an encrypted credentials parameter blob for the specified region. To get the web
// service from a region other than the region in which it has been created, you must first call Create Regional Web
// Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do
// this before the first time that you get the web service in the new region. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is name of the resource group in which the web service is
// located. webServiceName is the name of the web service. region is the region
// for which encrypted credential parameters are created.
// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of
// the web service. region is the region for which encrypted credential parameters are created.
func (client GroupClient) CreateRegionalProperties(resourceGroupName string, webServiceName string, region string, cancel <-chan struct{}) (<-chan AsyncOperationStatus, <-chan error) {
resultChan := make(chan AsyncOperationStatus, 1)
errChan := make(chan error, 1)
@ -183,8 +175,10 @@ func (client GroupClient) CreateRegionalProperties(resourceGroupName string, web
var err error
var result AsyncOperationStatus
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@ -252,14 +246,11 @@ func (client GroupClient) CreateRegionalPropertiesResponder(resp *http.Response)
return
}
// Get gets the Web Service Definition as specified by a subscription, resource
// group, and name. Note that the storage credentials and web service keys are
// not returned by this call. To get the web service access keys, call List
// Keys.
// Get gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage
// credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys.
//
// resourceGroupName is name of the resource group in which the web service is
// located. webServiceName is the name of the web service. region is the region
// for which encrypted credential parameters are valid.
// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of
// the web service. region is the region for which encrypted credential parameters are valid.
func (client GroupClient) Get(resourceGroupName string, webServiceName string, region string) (result WebService, err error) {
req, err := client.GetPreparer(resourceGroupName, webServiceName, region)
if err != nil {
@ -327,8 +318,8 @@ func (client GroupClient) GetResponder(resp *http.Response) (result WebService,
// ListByResourceGroup gets the web services in the specified resource group.
//
// resourceGroupName is name of the resource group in which the web service is
// located. skiptoken is continuation token for pagination.
// resourceGroupName is name of the resource group in which the web service is located. skiptoken is continuation token
// for pagination.
func (client GroupClient) ListByResourceGroup(resourceGroupName string, skiptoken string) (result PaginatedWebServicesList, err error) {
req, err := client.ListByResourceGroupPreparer(resourceGroupName, skiptoken)
if err != nil {
@ -417,6 +408,51 @@ func (client GroupClient) ListByResourceGroupNextResults(lastResults PaginatedWe
return
}
// ListByResourceGroupComplete gets all elements from the list without paging.
func (client GroupClient) ListByResourceGroupComplete(resourceGroupName string, skiptoken string, cancel <-chan struct{}) (<-chan WebService, <-chan error) {
resultChan := make(chan WebService)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListByResourceGroup(resourceGroupName, skiptoken)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListByResourceGroupNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// ListBySubscriptionID gets the web services in the specified subscription.
//
// skiptoken is continuation token for pagination.
@ -507,10 +543,55 @@ func (client GroupClient) ListBySubscriptionIDNextResults(lastResults PaginatedW
return
}
// ListBySubscriptionIDComplete gets all elements from the list without paging.
func (client GroupClient) ListBySubscriptionIDComplete(skiptoken string, cancel <-chan struct{}) (<-chan WebService, <-chan error) {
resultChan := make(chan WebService)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListBySubscriptionID(skiptoken)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListBySubscriptionIDNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// ListKeys gets the access keys for the specified web service.
//
// resourceGroupName is name of the resource group in which the web service is
// located. webServiceName is the name of the web service.
// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of
// the web service.
func (client GroupClient) ListKeys(resourceGroupName string, webServiceName string) (result Keys, err error) {
req, err := client.ListKeysPreparer(resourceGroupName, webServiceName)
if err != nil {
@ -573,15 +654,13 @@ func (client GroupClient) ListKeysResponder(resp *http.Response) (result Keys, e
return
}
// Patch modifies an existing web service resource. The PATCH API call is an
// asynchronous operation. To determine whether it has completed successfully,
// you must perform a Get operation. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
// Patch modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine
// whether it has completed successfully, you must perform a Get operation. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is name of the resource group in which the web service is
// located. webServiceName is the name of the web service. patchPayload is the
// payload to use to patch the web service.
// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of
// the web service. patchPayload is the payload to use to patch the web service.
func (client GroupClient) Patch(resourceGroupName string, webServiceName string, patchPayload WebService, cancel <-chan struct{}) (<-chan WebService, <-chan error) {
resultChan := make(chan WebService, 1)
errChan := make(chan error, 1)
@ -589,8 +668,10 @@ func (client GroupClient) Patch(resourceGroupName string, webServiceName string,
var err error
var result WebService
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@ -659,13 +740,11 @@ func (client GroupClient) PatchResponder(resp *http.Response) (result WebService
return
}
// Remove deletes the specified web service. This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument.
// The channel will be used to cancel polling and any outstanding HTTP
// requests.
// Remove deletes the specified web service. This method may poll for completion. Polling can be canceled by passing
// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is name of the resource group in which the web service is
// located. webServiceName is the name of the web service.
// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of
// the web service.
func (client GroupClient) Remove(resourceGroupName string, webServiceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@ -673,8 +752,10 @@ func (client GroupClient) Remove(resourceGroupName string, webServiceName string
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()

View file

@ -14,11 +14,12 @@ package webservices
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"encoding/json"
"errors"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
@ -31,8 +32,7 @@ type AssetType string
const (
// AssetTypeModule specifies the asset type module state for asset type.
AssetTypeModule AssetType = "Module"
// AssetTypeResource specifies the asset type resource state for asset
// type.
// AssetTypeResource specifies the asset type resource state for asset type.
AssetTypeResource AssetType = "Resource"
)
@ -114,50 +114,45 @@ const (
type OutputPortType string
const (
// OutputPortTypeDataset specifies the output port type dataset state for
// output port type.
// OutputPortTypeDataset specifies the output port type dataset state for output port type.
OutputPortTypeDataset OutputPortType = "Dataset"
)
// PackageType enumerates the values for package type.
type PackageType string
const (
// PackageTypeGraph specifies the package type graph state for package type.
PackageTypeGraph PackageType = "Graph"
)
// ParameterType enumerates the values for parameter type.
type ParameterType string
const (
// ParameterTypeBoolean specifies the parameter type boolean state for
// parameter type.
// ParameterTypeBoolean specifies the parameter type boolean state for parameter type.
ParameterTypeBoolean ParameterType = "Boolean"
// ParameterTypeColumnPicker specifies the parameter type column picker
// state for parameter type.
// ParameterTypeColumnPicker specifies the parameter type column picker state for parameter type.
ParameterTypeColumnPicker ParameterType = "ColumnPicker"
// ParameterTypeCredential specifies the parameter type credential state
// for parameter type.
// ParameterTypeCredential specifies the parameter type credential state for parameter type.
ParameterTypeCredential ParameterType = "Credential"
// ParameterTypeDataGatewayName specifies the parameter type data gateway
// name state for parameter type.
// ParameterTypeDataGatewayName specifies the parameter type data gateway name state for parameter type.
ParameterTypeDataGatewayName ParameterType = "DataGatewayName"
// ParameterTypeDouble specifies the parameter type double state for
// parameter type.
// ParameterTypeDouble specifies the parameter type double state for parameter type.
ParameterTypeDouble ParameterType = "Double"
// ParameterTypeEnumerated specifies the parameter type enumerated state
// for parameter type.
// ParameterTypeEnumerated specifies the parameter type enumerated state for parameter type.
ParameterTypeEnumerated ParameterType = "Enumerated"
// ParameterTypeFloat specifies the parameter type float state for
// parameter type.
// ParameterTypeFloat specifies the parameter type float state for parameter type.
ParameterTypeFloat ParameterType = "Float"
// ParameterTypeInt specifies the parameter type int state for parameter
// type.
// ParameterTypeInt specifies the parameter type int state for parameter type.
ParameterTypeInt ParameterType = "Int"
// ParameterTypeMode specifies the parameter type mode state for parameter
// type.
// ParameterTypeMode specifies the parameter type mode state for parameter type.
ParameterTypeMode ParameterType = "Mode"
// ParameterTypeParameterRange specifies the parameter type parameter range
// state for parameter type.
// ParameterTypeParameterRange specifies the parameter type parameter range state for parameter type.
ParameterTypeParameterRange ParameterType = "ParameterRange"
// ParameterTypeScript specifies the parameter type script state for
// parameter type.
// ParameterTypeScript specifies the parameter type script state for parameter type.
ParameterTypeScript ParameterType = "Script"
// ParameterTypeString specifies the parameter type string state for
// parameter type.
// ParameterTypeString specifies the parameter type string state for parameter type.
ParameterTypeString ParameterType = "String"
)
@ -213,9 +208,8 @@ type BlobLocation struct {
Credentials *string `json:"credentials,omitempty"`
}
// ColumnSpecification is swagger 2.0 schema for a column within the data table
// representing a web service input or output. See Swagger specification:
// http://swagger.io/specification/
// ColumnSpecification is swagger 2.0 schema for a column within the data table representing a web service input or
// output. See Swagger specification: http://swagger.io/specification/
type ColumnSpecification struct {
Type ColumnType `json:"type,omitempty"`
Format ColumnFormat `json:"format,omitempty"`
@ -224,14 +218,12 @@ type ColumnSpecification struct {
XMsIsordered *bool `json:"x-ms-isordered,omitempty"`
}
// CommitmentPlan is information about the machine learning commitment plan
// associated with the web service.
// CommitmentPlan is information about the machine learning commitment plan associated with the web service.
type CommitmentPlan struct {
ID *string `json:"id,omitempty"`
}
// DiagnosticsConfiguration is diagnostics settings for an Azure ML web
// service.
// DiagnosticsConfiguration is diagnostics settings for an Azure ML web service.
type DiagnosticsConfiguration struct {
Level DiagnosticsLevel `json:"level,omitempty"`
Expiry *date.Time `json:"expiry,omitempty"`
@ -251,9 +243,8 @@ type GraphEdge struct {
TargetPortID *string `json:"targetPortId,omitempty"`
}
// GraphNode is specifies a node in the web service graph. The node can either
// be an input, output or asset node, so only one of the corresponding id
// properties is populated at any given time.
// GraphNode is specifies a node in the web service graph. The node can either be an input, output or asset node, so
// only one of the corresponding id properties is populated at any given time.
type GraphNode struct {
AssetID *string `json:"assetId,omitempty"`
InputID *string `json:"inputId,omitempty"`
@ -261,8 +252,7 @@ type GraphNode struct {
Parameters *map[string]*Parameter `json:"parameters,omitempty"`
}
// GraphPackage is defines the graph of modules making up the machine learning
// solution.
// GraphPackage is defines the graph of modules making up the machine learning solution.
type GraphPackage struct {
Nodes *map[string]*GraphNode `json:"nodes,omitempty"`
Edges *[]GraphEdge `json:"edges,omitempty"`
@ -276,8 +266,7 @@ type GraphParameter struct {
Links *[]GraphParameterLink `json:"links,omitempty"`
}
// GraphParameterLink is association link for a graph global parameter to a
// node in the graph.
// GraphParameterLink is association link for a graph global parameter to a node in the graph.
type GraphParameterLink struct {
NodeID *string `json:"nodeId,omitempty"`
ParameterKey *string `json:"parameterKey,omitempty"`
@ -295,8 +284,8 @@ type Keys struct {
Secondary *string `json:"secondary,omitempty"`
}
// MachineLearningWorkspace is information about the machine learning workspace
// containing the experiment that is source for the web service.
// MachineLearningWorkspace is information about the machine learning workspace containing the experiment that is
// source for the web service.
type MachineLearningWorkspace struct {
ID *string `json:"id,omitempty"`
}
@ -344,30 +333,44 @@ type Parameter struct {
CertificateThumbprint *string `json:"certificateThumbprint,omitempty"`
}
// Properties is the set of properties specific to the Azure ML web service
// resource.
type Properties struct {
Title *string `json:"title,omitempty"`
Description *string `json:"description,omitempty"`
CreatedOn *date.Time `json:"createdOn,omitempty"`
ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
Keys *Keys `json:"keys,omitempty"`
ReadOnly *bool `json:"readOnly,omitempty"`
SwaggerLocation *string `json:"swaggerLocation,omitempty"`
ExposeSampleData *bool `json:"exposeSampleData,omitempty"`
RealtimeConfiguration *RealtimeConfiguration `json:"realtimeConfiguration,omitempty"`
Diagnostics *DiagnosticsConfiguration `json:"diagnostics,omitempty"`
StorageAccount *StorageAccount `json:"storageAccount,omitempty"`
MachineLearningWorkspace *MachineLearningWorkspace `json:"machineLearningWorkspace,omitempty"`
CommitmentPlan *CommitmentPlan `json:"commitmentPlan,omitempty"`
Input *ServiceInputOutputSpecification `json:"input,omitempty"`
Output *ServiceInputOutputSpecification `json:"output,omitempty"`
ExampleRequest *ExampleRequest `json:"exampleRequest,omitempty"`
Assets *map[string]*AssetItem `json:"assets,omitempty"`
Parameters *map[string]*Parameter `json:"parameters,omitempty"`
PayloadsInBlobStorage *bool `json:"payloadsInBlobStorage,omitempty"`
PayloadsLocation *BlobLocation `json:"payloadsLocation,omitempty"`
// Properties is the set of properties specific to the Azure ML web service resource.
type Properties interface {
AsPropertiesForGraph() (*PropertiesForGraph, bool)
}
func unmarshalProperties(body []byte) (Properties, error) {
var m map[string]interface{}
err := json.Unmarshal(body, &m)
if err != nil {
return nil, err
}
switch m["packageType"] {
case string(PackageTypeGraph):
var pfg PropertiesForGraph
err := json.Unmarshal(body, &pfg)
return pfg, err
default:
return nil, errors.New("Unsupported type")
}
}
func unmarshalPropertiesArray(body []byte) ([]Properties, error) {
var rawMessages []*json.RawMessage
err := json.Unmarshal(body, &rawMessages)
if err != nil {
return nil, err
}
pArray := make([]Properties, len(rawMessages))
for index, rawMessage := range rawMessages {
p, err := unmarshalProperties(*rawMessage)
if err != nil {
return nil, err
}
pArray[index] = p
}
return pArray, nil
}
// PropertiesForGraph is properties specific to a Graph based web service.
@ -393,11 +396,27 @@ type PropertiesForGraph struct {
Parameters *map[string]*Parameter `json:"parameters,omitempty"`
PayloadsInBlobStorage *bool `json:"payloadsInBlobStorage,omitempty"`
PayloadsLocation *BlobLocation `json:"payloadsLocation,omitempty"`
PackageType PackageType `json:"packageType,omitempty"`
Package *GraphPackage `json:"package,omitempty"`
}
// RealtimeConfiguration is holds the available configuration options for an
// Azure ML web service endpoint.
// MarshalJSON is the custom marshaler for PropertiesForGraph.
func (pfg PropertiesForGraph) MarshalJSON() ([]byte, error) {
pfg.PackageType = PackageTypeGraph
type Alias PropertiesForGraph
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(pfg),
})
}
// AsPropertiesForGraph is the Properties implementation for PropertiesForGraph.
func (pfg PropertiesForGraph) AsPropertiesForGraph() (*PropertiesForGraph, bool) {
return &pfg, true
}
// RealtimeConfiguration is holds the available configuration options for an Azure ML web service endpoint.
type RealtimeConfiguration struct {
MaxConcurrentCalls *int32 `json:"maxConcurrentCalls,omitempty"`
}
@ -411,9 +430,8 @@ type Resource struct {
Tags *map[string]*string `json:"tags,omitempty"`
}
// ServiceInputOutputSpecification is the swagger 2.0 schema describing the
// service's inputs or outputs. See Swagger specification:
// http://swagger.io/specification/
// ServiceInputOutputSpecification is the swagger 2.0 schema describing the service's inputs or outputs. See Swagger
// specification: http://swagger.io/specification/
type ServiceInputOutputSpecification struct {
Title *string `json:"title,omitempty"`
Description *string `json:"description,omitempty"`
@ -427,8 +445,8 @@ type StorageAccount struct {
Key *string `json:"key,omitempty"`
}
// TableSpecification is the swagger 2.0 schema describing a single service
// input or output. See Swagger specification: http://swagger.io/specification/
// TableSpecification is the swagger 2.0 schema describing a single service input or output. See Swagger specification:
// http://swagger.io/specification/
type TableSpecification struct {
Title *string `json:"title,omitempty"`
Description *string `json:"description,omitempty"`
@ -445,5 +463,76 @@ type WebService struct {
Location *string `json:"location,omitempty"`
Type *string `json:"type,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
Properties *Properties `json:"properties,omitempty"`
Properties Properties `json:"properties,omitempty"`
}
// UnmarshalJSON is the custom unmarshaler for WebService struct.
func (ws *WebService) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
var v *json.RawMessage
v = m["properties"]
if v != nil {
properties, err := unmarshalProperties(*m["properties"])
if err != nil {
return err
}
ws.Properties = properties
}
v = m["id"]
if v != nil {
var ID string
err = json.Unmarshal(*m["id"], &ID)
if err != nil {
return err
}
ws.ID = &ID
}
v = m["name"]
if v != nil {
var name string
err = json.Unmarshal(*m["name"], &name)
if err != nil {
return err
}
ws.Name = &name
}
v = m["location"]
if v != nil {
var location string
err = json.Unmarshal(*m["location"], &location)
if err != nil {
return err
}
ws.Location = &location
}
v = m["type"]
if v != nil {
var typeVar string
err = json.Unmarshal(*m["type"], &typeVar)
if err != nil {
return err
}
ws.Type = &typeVar
}
v = m["tags"]
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*m["tags"], &tags)
if err != nil {
return err
}
ws.Tags = &tags
}
return nil
}

View file

@ -14,15 +14,15 @@ package webservices
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.3.1-beta arm-webservices/2017-01-01"
return "Azure-SDK-For-Go/v11.0.0-beta arm-webservices/2017-01-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.3.1-beta"
return "v11.0.0-beta"
}