Keeping generated files out of repository, added ignore (#1371)

This commit is contained in:
Garrett Serack 2016-08-23 14:50:52 -07:00 коммит произвёл GitHub
Родитель 90108c5854
Коммит cdbf125192
103 изменённых файлов: 3 добавлений и 32319 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -198,3 +198,6 @@ src/generator/AutoRest.Go.Tests/bin/*
src/generator/AutoRest.Go.Tests/src/github.com/*
src/generator/AutoRest.Go.Tests/src/test/vendor/*
src/generator/AutoRest.Go.Tests/src/test/generated/*
src/generator/AutoRest.Go.Tests/src/tests/generated/*
src/generator/AutoRest.Go.Tests/src/tests/vendor/*
src/generator/AutoRest.Go.Tests/src/tests/glide.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,47 +0,0 @@
// Package arraygroup implements the Azure ARM Arraygroup service API version
// 1.0.0.
//
// Test Infrastructure for AutoRest Swagger BAT
package arraygroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Arraygroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Arraygroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Arraygroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,118 +0,0 @@
package arraygroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/date"
"github.com/satori/uuid"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// ListBase64Url is
type ListBase64Url struct {
autorest.Response `json:"-"`
Value *[]string `json:"value,omitempty"`
}
// ListBool is
type ListBool struct {
autorest.Response `json:"-"`
Value *[]bool `json:"value,omitempty"`
}
// ListByteArray is
type ListByteArray struct {
autorest.Response `json:"-"`
Value *[][]byte `json:"value,omitempty"`
}
// ListDate is
type ListDate struct {
autorest.Response `json:"-"`
Value *[]date.Date `json:"value,omitempty"`
}
// ListFloat64 is
type ListFloat64 struct {
autorest.Response `json:"-"`
Value *[]float64 `json:"value,omitempty"`
}
// ListInt32 is
type ListInt32 struct {
autorest.Response `json:"-"`
Value *[]int32 `json:"value,omitempty"`
}
// ListInt64 is
type ListInt64 struct {
autorest.Response `json:"-"`
Value *[]int64 `json:"value,omitempty"`
}
// ListListString is
type ListListString struct {
autorest.Response `json:"-"`
Value *[][]string `json:"value,omitempty"`
}
// ListProduct is
type ListProduct struct {
autorest.Response `json:"-"`
Value *[]Product `json:"value,omitempty"`
}
// ListSetString is
type ListSetString struct {
autorest.Response `json:"-"`
Value *[]map[string]string `json:"value,omitempty"`
}
// ListString is
type ListString struct {
autorest.Response `json:"-"`
Value *[]string `json:"value,omitempty"`
}
// ListTime is
type ListTime struct {
autorest.Response `json:"-"`
Value *[]date.Time `json:"value,omitempty"`
}
// ListTimeRFC1123 is
type ListTimeRFC1123 struct {
autorest.Response `json:"-"`
Value *[]date.TimeRFC1123 `json:"value,omitempty"`
}
// ListTimeSpan is
type ListTimeSpan struct {
autorest.Response `json:"-"`
Value *[]string `json:"value,omitempty"`
}
// ListUUID is
type ListUUID struct {
autorest.Response `json:"-"`
Value *[]uuid.UUID `json:"value,omitempty"`
}
// Product is
type Product struct {
Integer *int32 `json:"integer,omitempty"`
String *string `json:"string,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package arraygroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "arraygroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,329 +0,0 @@
package booleangroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// BoolGroupClient is the test Infrastructure for AutoRest
type BoolGroupClient struct {
ManagementClient
}
// NewBoolGroupClient creates an instance of the BoolGroupClient client.
func NewBoolGroupClient() BoolGroupClient {
return NewBoolGroupClientWithBaseURI(DefaultBaseURI, )
}
// NewBoolGroupClientWithBaseURI creates an instance of the BoolGroupClient
// client.
func NewBoolGroupClientWithBaseURI(baseURI string, ) BoolGroupClient {
return BoolGroupClient{NewWithBaseURI(baseURI, )}
}
// GetFalse get false Boolean value
func (client BoolGroupClient) GetFalse() (result Bool, err error) {
req, err := client.GetFalsePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetFalse", nil , "Failure preparing request")
}
resp, err := client.GetFalseSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetFalse", resp, "Failure sending request")
}
result, err = client.GetFalseResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetFalse", resp, "Failure responding to request")
}
return
}
// GetFalsePreparer prepares the GetFalse request.
func (client BoolGroupClient) GetFalsePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/bool/false"))
return preparer.Prepare(&http.Request{})
}
// GetFalseSender sends the GetFalse request. The method will close the
// http.Response Body if it receives an error.
func (client BoolGroupClient) GetFalseSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetFalseResponder handles the response to the GetFalse request. The method always
// closes the http.Response Body.
func (client BoolGroupClient) GetFalseResponder(resp *http.Response) (result Bool, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetInvalid get invalid Boolean value
func (client BoolGroupClient) GetInvalid() (result Bool, err error) {
req, err := client.GetInvalidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetInvalid", nil , "Failure preparing request")
}
resp, err := client.GetInvalidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetInvalid", resp, "Failure sending request")
}
result, err = client.GetInvalidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetInvalid", resp, "Failure responding to request")
}
return
}
// GetInvalidPreparer prepares the GetInvalid request.
func (client BoolGroupClient) GetInvalidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/bool/invalid"))
return preparer.Prepare(&http.Request{})
}
// GetInvalidSender sends the GetInvalid request. The method will close the
// http.Response Body if it receives an error.
func (client BoolGroupClient) GetInvalidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetInvalidResponder handles the response to the GetInvalid request. The method always
// closes the http.Response Body.
func (client BoolGroupClient) GetInvalidResponder(resp *http.Response) (result Bool, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get null Boolean value
func (client BoolGroupClient) GetNull() (result Bool, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client BoolGroupClient) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/bool/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client BoolGroupClient) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client BoolGroupClient) GetNullResponder(resp *http.Response) (result Bool, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetTrue get true Boolean value
func (client BoolGroupClient) GetTrue() (result Bool, err error) {
req, err := client.GetTruePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetTrue", nil , "Failure preparing request")
}
resp, err := client.GetTrueSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetTrue", resp, "Failure sending request")
}
result, err = client.GetTrueResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "GetTrue", resp, "Failure responding to request")
}
return
}
// GetTruePreparer prepares the GetTrue request.
func (client BoolGroupClient) GetTruePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/bool/true"))
return preparer.Prepare(&http.Request{})
}
// GetTrueSender sends the GetTrue request. The method will close the
// http.Response Body if it receives an error.
func (client BoolGroupClient) GetTrueSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetTrueResponder handles the response to the GetTrue request. The method always
// closes the http.Response Body.
func (client BoolGroupClient) GetTrueResponder(resp *http.Response) (result Bool, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutFalse set Boolean value false
//
func (client BoolGroupClient) PutFalse(boolBody bool) (result autorest.Response, err error) {
req, err := client.PutFalsePreparer(boolBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "PutFalse", nil , "Failure preparing request")
}
resp, err := client.PutFalseSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "PutFalse", resp, "Failure sending request")
}
result, err = client.PutFalseResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "PutFalse", resp, "Failure responding to request")
}
return
}
// PutFalsePreparer prepares the PutFalse request.
func (client BoolGroupClient) PutFalsePreparer(boolBody bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/bool/false"),
autorest.WithJSON(boolBody))
return preparer.Prepare(&http.Request{})
}
// PutFalseSender sends the PutFalse request. The method will close the
// http.Response Body if it receives an error.
func (client BoolGroupClient) PutFalseSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutFalseResponder handles the response to the PutFalse request. The method always
// closes the http.Response Body.
func (client BoolGroupClient) PutFalseResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutTrue set Boolean value true
//
func (client BoolGroupClient) PutTrue(boolBody bool) (result autorest.Response, err error) {
req, err := client.PutTruePreparer(boolBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "PutTrue", nil , "Failure preparing request")
}
resp, err := client.PutTrueSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "PutTrue", resp, "Failure sending request")
}
result, err = client.PutTrueResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "booleangroup.BoolGroupClient", "PutTrue", resp, "Failure responding to request")
}
return
}
// PutTruePreparer prepares the PutTrue request.
func (client BoolGroupClient) PutTruePreparer(boolBody bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/bool/true"),
autorest.WithJSON(boolBody))
return preparer.Prepare(&http.Request{})
}
// PutTrueSender sends the PutTrue request. The method will close the
// http.Response Body if it receives an error.
func (client BoolGroupClient) PutTrueSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutTrueResponder handles the response to the PutTrue request. The method always
// closes the http.Response Body.
func (client BoolGroupClient) PutTrueResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package booleangroup implements the Azure ARM Booleangroup service API
// version 1.0.0.
//
// Test Infrastructure for AutoRest
package booleangroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Booleangroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Booleangroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Booleangroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,26 +0,0 @@
package booleangroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
// Bool is
type Bool struct {
autorest.Response `json:"-"`
Value *bool `json:"value,omitempty"`
}
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package booleangroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "booleangroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,287 +0,0 @@
package bytegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
// OperationsClient is the test Infrastructure for AutoRest Swagger BAT
type OperationsClient struct {
ManagementClient
}
// NewOperationsClient creates an instance of the OperationsClient client.
func NewOperationsClient() OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, )
}
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
// client.
func NewOperationsClientWithBaseURI(baseURI string, ) OperationsClient {
return OperationsClient{NewWithBaseURI(baseURI, )}
}
// GetEmpty get empty byte value ''
func (client OperationsClient) GetEmpty() (result ByteArray, err error) {
req, err := client.GetEmptyPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetEmpty", nil , "Failure preparing request")
}
resp, err := client.GetEmptySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetEmpty", resp, "Failure sending request")
}
result, err = client.GetEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetEmpty", resp, "Failure responding to request")
}
return
}
// GetEmptyPreparer prepares the GetEmpty request.
func (client OperationsClient) GetEmptyPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/byte/empty"))
return preparer.Prepare(&http.Request{})
}
// GetEmptySender sends the GetEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetEmptyResponder handles the response to the GetEmpty request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetEmptyResponder(resp *http.Response) (result ByteArray, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetInvalid get invalid byte value ':::SWAGGER::::'
func (client OperationsClient) GetInvalid() (result ByteArray, err error) {
req, err := client.GetInvalidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetInvalid", nil , "Failure preparing request")
}
resp, err := client.GetInvalidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetInvalid", resp, "Failure sending request")
}
result, err = client.GetInvalidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetInvalid", resp, "Failure responding to request")
}
return
}
// GetInvalidPreparer prepares the GetInvalid request.
func (client OperationsClient) GetInvalidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/byte/invalid"))
return preparer.Prepare(&http.Request{})
}
// GetInvalidSender sends the GetInvalid request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetInvalidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetInvalidResponder handles the response to the GetInvalid request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetInvalidResponder(resp *http.Response) (result ByteArray, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNonASCII get non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6)
func (client OperationsClient) GetNonASCII() (result ByteArray, err error) {
req, err := client.GetNonASCIIPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetNonASCII", nil , "Failure preparing request")
}
resp, err := client.GetNonASCIISender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetNonASCII", resp, "Failure sending request")
}
result, err = client.GetNonASCIIResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetNonASCII", resp, "Failure responding to request")
}
return
}
// GetNonASCIIPreparer prepares the GetNonASCII request.
func (client OperationsClient) GetNonASCIIPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/byte/nonAscii"))
return preparer.Prepare(&http.Request{})
}
// GetNonASCIISender sends the GetNonASCII request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetNonASCIISender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNonASCIIResponder handles the response to the GetNonASCII request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetNonASCIIResponder(resp *http.Response) (result ByteArray, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get null byte value
func (client OperationsClient) GetNull() (result ByteArray, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client OperationsClient) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/byte/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetNullResponder(resp *http.Response) (result ByteArray, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutNonASCII put non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6)
//
// byteBody is base64-encoded non-ascii byte string hex(FF FE FD FC FB FA F9
// F8 F7 F6)
func (client OperationsClient) PutNonASCII(byteBody []byte) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{byteBody,
[]validation.Constraint{ {"byteBody", validation.Null, true, nil }}}}); err != nil {
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "PutNonASCII", nil , "Validation error ")
}
req, err := client.PutNonASCIIPreparer(byteBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "PutNonASCII", nil , "Failure preparing request")
}
resp, err := client.PutNonASCIISender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "PutNonASCII", resp, "Failure sending request")
}
result, err = client.PutNonASCIIResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "bytegroup.OperationsClient", "PutNonASCII", resp, "Failure responding to request")
}
return
}
// PutNonASCIIPreparer prepares the PutNonASCII request.
func (client OperationsClient) PutNonASCIIPreparer(byteBody []byte) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/byte/nonAscii"),
autorest.WithJSON(byteBody))
return preparer.Prepare(&http.Request{})
}
// PutNonASCIISender sends the PutNonASCII request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) PutNonASCIISender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutNonASCIIResponder handles the response to the PutNonASCII request. The method always
// closes the http.Response Body.
func (client OperationsClient) PutNonASCIIResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package bytegroup implements the Azure ARM Bytegroup service API version
// 1.0.0.
//
// Test Infrastructure for AutoRest Swagger BAT
package bytegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Bytegroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Bytegroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Bytegroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,26 +0,0 @@
package bytegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
// ByteArray is
type ByteArray struct {
autorest.Response `json:"-"`
Value *[]byte `json:"value,omitempty"`
}
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package bytegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "bytegroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,283 +0,0 @@
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// ArrayClient is the test Infrastructure for AutoRest
type ArrayClient struct {
ManagementClient
}
// NewArrayClient creates an instance of the ArrayClient client.
func NewArrayClient() ArrayClient {
return NewArrayClientWithBaseURI(DefaultBaseURI, )
}
// NewArrayClientWithBaseURI creates an instance of the ArrayClient client.
func NewArrayClientWithBaseURI(baseURI string, ) ArrayClient {
return ArrayClient{NewWithBaseURI(baseURI, )}
}
// GetEmpty get complex types with array property which is empty
func (client ArrayClient) GetEmpty() (result ArrayWrapper, err error) {
req, err := client.GetEmptyPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "GetEmpty", nil , "Failure preparing request")
}
resp, err := client.GetEmptySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "GetEmpty", resp, "Failure sending request")
}
result, err = client.GetEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "GetEmpty", resp, "Failure responding to request")
}
return
}
// GetEmptyPreparer prepares the GetEmpty request.
func (client ArrayClient) GetEmptyPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/array/empty"))
return preparer.Prepare(&http.Request{})
}
// GetEmptySender sends the GetEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client ArrayClient) GetEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetEmptyResponder handles the response to the GetEmpty request. The method always
// closes the http.Response Body.
func (client ArrayClient) GetEmptyResponder(resp *http.Response) (result ArrayWrapper, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNotProvided get complex types with array property while server doesn't
// provide a response payload
func (client ArrayClient) GetNotProvided() (result ArrayWrapper, err error) {
req, err := client.GetNotProvidedPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "GetNotProvided", nil , "Failure preparing request")
}
resp, err := client.GetNotProvidedSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "GetNotProvided", resp, "Failure sending request")
}
result, err = client.GetNotProvidedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "GetNotProvided", resp, "Failure responding to request")
}
return
}
// GetNotProvidedPreparer prepares the GetNotProvided request.
func (client ArrayClient) GetNotProvidedPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/array/notprovided"))
return preparer.Prepare(&http.Request{})
}
// GetNotProvidedSender sends the GetNotProvided request. The method will close the
// http.Response Body if it receives an error.
func (client ArrayClient) GetNotProvidedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNotProvidedResponder handles the response to the GetNotProvided request. The method always
// closes the http.Response Body.
func (client ArrayClient) GetNotProvidedResponder(resp *http.Response) (result ArrayWrapper, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetValid get complex types with array property
func (client ArrayClient) GetValid() (result ArrayWrapper, err error) {
req, err := client.GetValidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "GetValid", nil , "Failure preparing request")
}
resp, err := client.GetValidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "GetValid", resp, "Failure sending request")
}
result, err = client.GetValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "GetValid", resp, "Failure responding to request")
}
return
}
// GetValidPreparer prepares the GetValid request.
func (client ArrayClient) GetValidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/array/valid"))
return preparer.Prepare(&http.Request{})
}
// GetValidSender sends the GetValid request. The method will close the
// http.Response Body if it receives an error.
func (client ArrayClient) GetValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetValidResponder handles the response to the GetValid request. The method always
// closes the http.Response Body.
func (client ArrayClient) GetValidResponder(resp *http.Response) (result ArrayWrapper, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutEmpty put complex types with array property which is empty
//
// complexBody is please put an empty array
func (client ArrayClient) PutEmpty(complexBody ArrayWrapper) (result autorest.Response, err error) {
req, err := client.PutEmptyPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "PutEmpty", nil , "Failure preparing request")
}
resp, err := client.PutEmptySender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "PutEmpty", resp, "Failure sending request")
}
result, err = client.PutEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "PutEmpty", resp, "Failure responding to request")
}
return
}
// PutEmptyPreparer prepares the PutEmpty request.
func (client ArrayClient) PutEmptyPreparer(complexBody ArrayWrapper) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/array/empty"),
autorest.WithJSON(complexBody))
return preparer.Prepare(&http.Request{})
}
// PutEmptySender sends the PutEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client ArrayClient) PutEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutEmptyResponder handles the response to the PutEmpty request. The method always
// closes the http.Response Body.
func (client ArrayClient) PutEmptyResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutValid put complex types with array property
//
// complexBody is please put an array with 4 items: "1, 2, 3, 4", "", null,
// "&S#$(*Y", "The quick brown fox jumps over the lazy dog"
func (client ArrayClient) PutValid(complexBody ArrayWrapper) (result autorest.Response, err error) {
req, err := client.PutValidPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "PutValid", nil , "Failure preparing request")
}
resp, err := client.PutValidSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "PutValid", resp, "Failure sending request")
}
result, err = client.PutValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.ArrayClient", "PutValid", resp, "Failure responding to request")
}
return
}
// PutValidPreparer prepares the PutValid request.
func (client ArrayClient) PutValidPreparer(complexBody ArrayWrapper) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/array/valid"),
autorest.WithJSON(complexBody))
return preparer.Prepare(&http.Request{})
}
// PutValidSender sends the PutValid request. The method will close the
// http.Response Body if it receives an error.
func (client ArrayClient) PutValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutValidResponder handles the response to the PutValid request. The method always
// closes the http.Response Body.
func (client ArrayClient) PutValidResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,336 +0,0 @@
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// BasicOperationsClient is the test Infrastructure for AutoRest
type BasicOperationsClient struct {
ManagementClient
}
// NewBasicOperationsClient creates an instance of the BasicOperationsClient
// client.
func NewBasicOperationsClient() BasicOperationsClient {
return NewBasicOperationsClientWithBaseURI(DefaultBaseURI, )
}
// NewBasicOperationsClientWithBaseURI creates an instance of the
// BasicOperationsClient client.
func NewBasicOperationsClientWithBaseURI(baseURI string, ) BasicOperationsClient {
return BasicOperationsClient{NewWithBaseURI(baseURI, )}
}
// GetEmpty get a basic complex type that is empty
func (client BasicOperationsClient) GetEmpty() (result Basic, err error) {
req, err := client.GetEmptyPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetEmpty", nil , "Failure preparing request")
}
resp, err := client.GetEmptySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetEmpty", resp, "Failure sending request")
}
result, err = client.GetEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetEmpty", resp, "Failure responding to request")
}
return
}
// GetEmptyPreparer prepares the GetEmpty request.
func (client BasicOperationsClient) GetEmptyPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/basic/empty"))
return preparer.Prepare(&http.Request{})
}
// GetEmptySender sends the GetEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client BasicOperationsClient) GetEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetEmptyResponder handles the response to the GetEmpty request. The method always
// closes the http.Response Body.
func (client BasicOperationsClient) GetEmptyResponder(resp *http.Response) (result Basic, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetInvalid get a basic complex type that is invalid for the local strong
// type
func (client BasicOperationsClient) GetInvalid() (result Basic, err error) {
req, err := client.GetInvalidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetInvalid", nil , "Failure preparing request")
}
resp, err := client.GetInvalidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetInvalid", resp, "Failure sending request")
}
result, err = client.GetInvalidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetInvalid", resp, "Failure responding to request")
}
return
}
// GetInvalidPreparer prepares the GetInvalid request.
func (client BasicOperationsClient) GetInvalidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/basic/invalid"))
return preparer.Prepare(&http.Request{})
}
// GetInvalidSender sends the GetInvalid request. The method will close the
// http.Response Body if it receives an error.
func (client BasicOperationsClient) GetInvalidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetInvalidResponder handles the response to the GetInvalid request. The method always
// closes the http.Response Body.
func (client BasicOperationsClient) GetInvalidResponder(resp *http.Response) (result Basic, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNotProvided get a basic complex type while the server doesn't provide a
// response payload
func (client BasicOperationsClient) GetNotProvided() (result Basic, err error) {
req, err := client.GetNotProvidedPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetNotProvided", nil , "Failure preparing request")
}
resp, err := client.GetNotProvidedSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetNotProvided", resp, "Failure sending request")
}
result, err = client.GetNotProvidedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetNotProvided", resp, "Failure responding to request")
}
return
}
// GetNotProvidedPreparer prepares the GetNotProvided request.
func (client BasicOperationsClient) GetNotProvidedPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/basic/notprovided"))
return preparer.Prepare(&http.Request{})
}
// GetNotProvidedSender sends the GetNotProvided request. The method will close the
// http.Response Body if it receives an error.
func (client BasicOperationsClient) GetNotProvidedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNotProvidedResponder handles the response to the GetNotProvided request. The method always
// closes the http.Response Body.
func (client BasicOperationsClient) GetNotProvidedResponder(resp *http.Response) (result Basic, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get a basic complex type whose properties are null
func (client BasicOperationsClient) GetNull() (result Basic, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client BasicOperationsClient) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/basic/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client BasicOperationsClient) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client BasicOperationsClient) GetNullResponder(resp *http.Response) (result Basic, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetValid get complex type {id: 2, name: 'abc', color: 'YELLOW'}
func (client BasicOperationsClient) GetValid() (result Basic, err error) {
req, err := client.GetValidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetValid", nil , "Failure preparing request")
}
resp, err := client.GetValidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetValid", resp, "Failure sending request")
}
result, err = client.GetValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "GetValid", resp, "Failure responding to request")
}
return
}
// GetValidPreparer prepares the GetValid request.
func (client BasicOperationsClient) GetValidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/basic/valid"))
return preparer.Prepare(&http.Request{})
}
// GetValidSender sends the GetValid request. The method will close the
// http.Response Body if it receives an error.
func (client BasicOperationsClient) GetValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetValidResponder handles the response to the GetValid request. The method always
// closes the http.Response Body.
func (client BasicOperationsClient) GetValidResponder(resp *http.Response) (result Basic, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutValid please put {id: 2, name: 'abc', color: 'Magenta'}
//
// complexBody is please put {id: 2, name: 'abc', color: 'Magenta'}
func (client BasicOperationsClient) PutValid(complexBody Basic) (result autorest.Response, err error) {
req, err := client.PutValidPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "PutValid", nil , "Failure preparing request")
}
resp, err := client.PutValidSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "PutValid", resp, "Failure sending request")
}
result, err = client.PutValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.BasicOperationsClient", "PutValid", resp, "Failure responding to request")
}
return
}
// PutValidPreparer prepares the PutValid request.
func (client BasicOperationsClient) PutValidPreparer(complexBody Basic) (*http.Request, error) {
queryParameters := map[string]interface{} {
"api-version": client.APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/basic/valid"),
autorest.WithJSON(complexBody),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// PutValidSender sends the PutValid request. The method will close the
// http.Response Body if it receives an error.
func (client BasicOperationsClient) PutValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutValidResponder handles the response to the PutValid request. The method always
// closes the http.Response Body.
func (client BasicOperationsClient) PutValidResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package complexgroup implements the Azure ARM Complexgroup service API
// version 2016-02-29.
//
// Test Infrastructure for AutoRest
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Complexgroup
APIVersion = "2016-02-29"
// DefaultBaseURI is the default URI used for the service Complexgroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Complexgroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,333 +0,0 @@
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// DictionaryClient is the test Infrastructure for AutoRest
type DictionaryClient struct {
ManagementClient
}
// NewDictionaryClient creates an instance of the DictionaryClient client.
func NewDictionaryClient() DictionaryClient {
return NewDictionaryClientWithBaseURI(DefaultBaseURI, )
}
// NewDictionaryClientWithBaseURI creates an instance of the DictionaryClient
// client.
func NewDictionaryClientWithBaseURI(baseURI string, ) DictionaryClient {
return DictionaryClient{NewWithBaseURI(baseURI, )}
}
// GetEmpty get complex types with dictionary property which is empty
func (client DictionaryClient) GetEmpty() (result DictionaryWrapper, err error) {
req, err := client.GetEmptyPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetEmpty", nil , "Failure preparing request")
}
resp, err := client.GetEmptySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetEmpty", resp, "Failure sending request")
}
result, err = client.GetEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetEmpty", resp, "Failure responding to request")
}
return
}
// GetEmptyPreparer prepares the GetEmpty request.
func (client DictionaryClient) GetEmptyPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/dictionary/typed/empty"))
return preparer.Prepare(&http.Request{})
}
// GetEmptySender sends the GetEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client DictionaryClient) GetEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetEmptyResponder handles the response to the GetEmpty request. The method always
// closes the http.Response Body.
func (client DictionaryClient) GetEmptyResponder(resp *http.Response) (result DictionaryWrapper, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNotProvided get complex types with dictionary property while server
// doesn't provide a response payload
func (client DictionaryClient) GetNotProvided() (result DictionaryWrapper, err error) {
req, err := client.GetNotProvidedPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetNotProvided", nil , "Failure preparing request")
}
resp, err := client.GetNotProvidedSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetNotProvided", resp, "Failure sending request")
}
result, err = client.GetNotProvidedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetNotProvided", resp, "Failure responding to request")
}
return
}
// GetNotProvidedPreparer prepares the GetNotProvided request.
func (client DictionaryClient) GetNotProvidedPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/dictionary/typed/notprovided"))
return preparer.Prepare(&http.Request{})
}
// GetNotProvidedSender sends the GetNotProvided request. The method will close the
// http.Response Body if it receives an error.
func (client DictionaryClient) GetNotProvidedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNotProvidedResponder handles the response to the GetNotProvided request. The method always
// closes the http.Response Body.
func (client DictionaryClient) GetNotProvidedResponder(resp *http.Response) (result DictionaryWrapper, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get complex types with dictionary property which is null
func (client DictionaryClient) GetNull() (result DictionaryWrapper, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client DictionaryClient) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/dictionary/typed/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client DictionaryClient) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client DictionaryClient) GetNullResponder(resp *http.Response) (result DictionaryWrapper, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetValid get complex types with dictionary property
func (client DictionaryClient) GetValid() (result DictionaryWrapper, err error) {
req, err := client.GetValidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetValid", nil , "Failure preparing request")
}
resp, err := client.GetValidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetValid", resp, "Failure sending request")
}
result, err = client.GetValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "GetValid", resp, "Failure responding to request")
}
return
}
// GetValidPreparer prepares the GetValid request.
func (client DictionaryClient) GetValidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/dictionary/typed/valid"))
return preparer.Prepare(&http.Request{})
}
// GetValidSender sends the GetValid request. The method will close the
// http.Response Body if it receives an error.
func (client DictionaryClient) GetValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetValidResponder handles the response to the GetValid request. The method always
// closes the http.Response Body.
func (client DictionaryClient) GetValidResponder(resp *http.Response) (result DictionaryWrapper, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutEmpty put complex types with dictionary property which is empty
//
// complexBody is please put an empty dictionary
func (client DictionaryClient) PutEmpty(complexBody DictionaryWrapper) (result autorest.Response, err error) {
req, err := client.PutEmptyPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "PutEmpty", nil , "Failure preparing request")
}
resp, err := client.PutEmptySender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "PutEmpty", resp, "Failure sending request")
}
result, err = client.PutEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "PutEmpty", resp, "Failure responding to request")
}
return
}
// PutEmptyPreparer prepares the PutEmpty request.
func (client DictionaryClient) PutEmptyPreparer(complexBody DictionaryWrapper) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/dictionary/typed/empty"),
autorest.WithJSON(complexBody))
return preparer.Prepare(&http.Request{})
}
// PutEmptySender sends the PutEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client DictionaryClient) PutEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutEmptyResponder handles the response to the PutEmpty request. The method always
// closes the http.Response Body.
func (client DictionaryClient) PutEmptyResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutValid put complex types with dictionary property
//
// complexBody is please put a dictionary with 5 key-value pairs:
// "txt":"notepad", "bmp":"mspaint", "xls":"excel", "exe":"", "":null
func (client DictionaryClient) PutValid(complexBody DictionaryWrapper) (result autorest.Response, err error) {
req, err := client.PutValidPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "PutValid", nil , "Failure preparing request")
}
resp, err := client.PutValidSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "PutValid", resp, "Failure sending request")
}
result, err = client.PutValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.DictionaryClient", "PutValid", resp, "Failure responding to request")
}
return
}
// PutValidPreparer prepares the PutValid request.
func (client DictionaryClient) PutValidPreparer(complexBody DictionaryWrapper) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/dictionary/typed/valid"),
autorest.WithJSON(complexBody))
return preparer.Prepare(&http.Request{})
}
// PutValidSender sends the PutValid request. The method will close the
// http.Response Body if it receives an error.
func (client DictionaryClient) PutValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutValidResponder handles the response to the PutValid request. The method always
// closes the http.Response Body.
func (client DictionaryClient) PutValidResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,135 +0,0 @@
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// InheritanceClient is the test Infrastructure for AutoRest
type InheritanceClient struct {
ManagementClient
}
// NewInheritanceClient creates an instance of the InheritanceClient client.
func NewInheritanceClient() InheritanceClient {
return NewInheritanceClientWithBaseURI(DefaultBaseURI, )
}
// NewInheritanceClientWithBaseURI creates an instance of the
// InheritanceClient client.
func NewInheritanceClientWithBaseURI(baseURI string, ) InheritanceClient {
return InheritanceClient{NewWithBaseURI(baseURI, )}
}
// GetValid get complex types that extend others
func (client InheritanceClient) GetValid() (result Siamese, err error) {
req, err := client.GetValidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.InheritanceClient", "GetValid", nil , "Failure preparing request")
}
resp, err := client.GetValidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.InheritanceClient", "GetValid", resp, "Failure sending request")
}
result, err = client.GetValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.InheritanceClient", "GetValid", resp, "Failure responding to request")
}
return
}
// GetValidPreparer prepares the GetValid request.
func (client InheritanceClient) GetValidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/inheritance/valid"))
return preparer.Prepare(&http.Request{})
}
// GetValidSender sends the GetValid request. The method will close the
// http.Response Body if it receives an error.
func (client InheritanceClient) GetValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetValidResponder handles the response to the GetValid request. The method always
// closes the http.Response Body.
func (client InheritanceClient) GetValidResponder(resp *http.Response) (result Siamese, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutValid put complex types that extend others
//
// complexBody is please put a siamese with id=2, name="Siameee", color=green,
// breed=persion, which hates 2 dogs, the 1st one named "Potato" with id=1
// and food="tomato", and the 2nd one named "Tomato" with id=-1 and
// food="french fries".
func (client InheritanceClient) PutValid(complexBody Siamese) (result autorest.Response, err error) {
req, err := client.PutValidPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.InheritanceClient", "PutValid", nil , "Failure preparing request")
}
resp, err := client.PutValidSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.InheritanceClient", "PutValid", resp, "Failure sending request")
}
result, err = client.PutValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.InheritanceClient", "PutValid", resp, "Failure responding to request")
}
return
}
// PutValidPreparer prepares the PutValid request.
func (client InheritanceClient) PutValidPreparer(complexBody Siamese) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/inheritance/valid"),
autorest.WithJSON(complexBody))
return preparer.Prepare(&http.Request{})
}
// PutValidSender sends the PutValid request. The method will close the
// http.Response Body if it receives an error.
func (client InheritanceClient) PutValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutValidResponder handles the response to the PutValid request. The method always
// closes the http.Response Body.
func (client InheritanceClient) PutValidResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,225 +0,0 @@
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/date"
)
// CMYKColors enumerates the values for cmyk colors.
type CMYKColors string
const (
// BlacK specifies the blac k state for cmyk colors.
BlacK CMYKColors = "blacK"
// Cyan specifies the cyan state for cmyk colors.
Cyan CMYKColors = "cyan"
// Magenta specifies the magenta state for cmyk colors.
Magenta CMYKColors = "Magenta"
// YELLOW specifies the yellow state for cmyk colors.
YELLOW CMYKColors = "YELLOW"
)
// ArrayWrapper is
type ArrayWrapper struct {
autorest.Response `json:"-"`
Array *[]string `json:"array,omitempty"`
}
// Basic is
type Basic struct {
autorest.Response `json:"-"`
ID *int32 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Color CMYKColors `json:"color,omitempty"`
}
// BooleanWrapper is
type BooleanWrapper struct {
autorest.Response `json:"-"`
FieldTrue *bool `json:"field_true,omitempty"`
FieldFalse *bool `json:"field_false,omitempty"`
}
// ByteWrapper is
type ByteWrapper struct {
autorest.Response `json:"-"`
Field *[]byte `json:"field,omitempty"`
}
// Cat is
type Cat struct {
ID *int32 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Color *string `json:"color,omitempty"`
Hates *[]Dog `json:"hates,omitempty"`
}
// Cookiecuttershark is
type Cookiecuttershark struct {
Species *string `json:"species,omitempty"`
Length *float64 `json:"length,omitempty"`
Siblings *[]Fish `json:"siblings,omitempty"`
Age *int32 `json:"age,omitempty"`
Birthday *date.Time `json:"birthday,omitempty"`
}
// Datetimerfc1123Wrapper is
type Datetimerfc1123Wrapper struct {
autorest.Response `json:"-"`
Field *date.TimeRFC1123 `json:"field,omitempty"`
Now *date.TimeRFC1123 `json:"now,omitempty"`
}
// DatetimeWrapper is
type DatetimeWrapper struct {
autorest.Response `json:"-"`
Field *date.Time `json:"field,omitempty"`
Now *date.Time `json:"now,omitempty"`
}
// DateWrapper is
type DateWrapper struct {
autorest.Response `json:"-"`
Field *date.Date `json:"field,omitempty"`
Leap *date.Date `json:"leap,omitempty"`
}
// DictionaryWrapper is
type DictionaryWrapper struct {
autorest.Response `json:"-"`
DefaultProgram *map[string]*string `json:"defaultProgram,omitempty"`
}
// Dog is
type Dog struct {
ID *int32 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Food *string `json:"food,omitempty"`
}
// DoubleWrapper is
type DoubleWrapper struct {
autorest.Response `json:"-"`
Field1 *float64 `json:"field1,omitempty"`
Field56ZerosAfterTheDotAndNegativeZeroBeforeDotAndThisIsALongFieldNameOnPurpose *float64 `json:"field_56_zeros_after_the_dot_and_negative_zero_before_dot_and_this_is_a_long_field_name_on_purpose,omitempty"`
}
// DurationWrapper is
type DurationWrapper struct {
autorest.Response `json:"-"`
Field *string `json:"field,omitempty"`
}
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// Fish is
type Fish struct {
autorest.Response `json:"-"`
Species *string `json:"species,omitempty"`
Length *float64 `json:"length,omitempty"`
Siblings *[]Fish `json:"siblings,omitempty"`
}
// FloatWrapper is
type FloatWrapper struct {
autorest.Response `json:"-"`
Field1 *float64 `json:"field1,omitempty"`
Field2 *float64 `json:"field2,omitempty"`
}
// Goblinshark is
type Goblinshark struct {
Species *string `json:"species,omitempty"`
Length *float64 `json:"length,omitempty"`
Siblings *[]Fish `json:"siblings,omitempty"`
Age *int32 `json:"age,omitempty"`
Birthday *date.Time `json:"birthday,omitempty"`
Jawsize *int32 `json:"jawsize,omitempty"`
}
// IntWrapper is
type IntWrapper struct {
autorest.Response `json:"-"`
Field1 *int32 `json:"field1,omitempty"`
Field2 *int32 `json:"field2,omitempty"`
}
// LongWrapper is
type LongWrapper struct {
autorest.Response `json:"-"`
Field1 *int64 `json:"field1,omitempty"`
Field2 *int64 `json:"field2,omitempty"`
}
// Pet is
type Pet struct {
ID *int32 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
}
// ReadonlyObj is
type ReadonlyObj struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Size *int32 `json:"size,omitempty"`
}
// Salmon is
type Salmon struct {
Species *string `json:"species,omitempty"`
Length *float64 `json:"length,omitempty"`
Siblings *[]Fish `json:"siblings,omitempty"`
Location *string `json:"location,omitempty"`
Iswild *bool `json:"iswild,omitempty"`
}
// Sawshark is
type Sawshark struct {
Species *string `json:"species,omitempty"`
Length *float64 `json:"length,omitempty"`
Siblings *[]Fish `json:"siblings,omitempty"`
Age *int32 `json:"age,omitempty"`
Birthday *date.Time `json:"birthday,omitempty"`
Picture *[]byte `json:"picture,omitempty"`
}
// Shark is
type Shark struct {
Species *string `json:"species,omitempty"`
Length *float64 `json:"length,omitempty"`
Siblings *[]Fish `json:"siblings,omitempty"`
Age *int32 `json:"age,omitempty"`
Birthday *date.Time `json:"birthday,omitempty"`
}
// Siamese is
type Siamese struct {
autorest.Response `json:"-"`
ID *int32 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Color *string `json:"color,omitempty"`
Hates *[]Dog `json:"hates,omitempty"`
Breed *string `json:"breed,omitempty"`
}
// StringWrapper is
type StringWrapper struct {
autorest.Response `json:"-"`
Field *string `json:"field,omitempty"`
Empty *string `json:"empty,omitempty"`
Null *string `json:"null,omitempty"`
}

Просмотреть файл

@ -1,194 +0,0 @@
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
// PolymorphicrecursiveClient is the test Infrastructure for AutoRest
type PolymorphicrecursiveClient struct {
ManagementClient
}
// NewPolymorphicrecursiveClient creates an instance of the
// PolymorphicrecursiveClient client.
func NewPolymorphicrecursiveClient() PolymorphicrecursiveClient {
return NewPolymorphicrecursiveClientWithBaseURI(DefaultBaseURI, )
}
// NewPolymorphicrecursiveClientWithBaseURI creates an instance of the
// PolymorphicrecursiveClient client.
func NewPolymorphicrecursiveClientWithBaseURI(baseURI string, ) PolymorphicrecursiveClient {
return PolymorphicrecursiveClient{NewWithBaseURI(baseURI, )}
}
// GetValid get complex types that are polymorphic and have recursive
// references
func (client PolymorphicrecursiveClient) GetValid() (result Fish, err error) {
req, err := client.GetValidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphicrecursiveClient", "GetValid", nil , "Failure preparing request")
}
resp, err := client.GetValidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphicrecursiveClient", "GetValid", resp, "Failure sending request")
}
result, err = client.GetValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.PolymorphicrecursiveClient", "GetValid", resp, "Failure responding to request")
}
return
}
// GetValidPreparer prepares the GetValid request.
func (client PolymorphicrecursiveClient) GetValidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/polymorphicrecursive/valid"))
return preparer.Prepare(&http.Request{})
}
// GetValidSender sends the GetValid request. The method will close the
// http.Response Body if it receives an error.
func (client PolymorphicrecursiveClient) GetValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetValidResponder handles the response to the GetValid request. The method always
// closes the http.Response Body.
func (client PolymorphicrecursiveClient) GetValidResponder(resp *http.Response) (result Fish, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutValid put complex types that are polymorphic and have recursive
// references
//
// complexBody is please put a salmon that looks like this:
// {
// "fishtype": "salmon",
// "species": "king",
// "length": 1,
// "age": 1,
// "location": "alaska",
// "iswild": true,
// "siblings": [
// {
// "fishtype": "shark",
// "species": "predator",
// "length": 20,
// "age": 6,
// "siblings": [
// {
// "fishtype": "salmon",
// "species": "coho",
// "length": 2,
// "age": 2,
// "location": "atlantic",
// "iswild": true,
// "siblings": [
// {
// "fishtype": "shark",
// "species": "predator",
// "length": 20,
// "age": 6
// },
// {
// "fishtype": "sawshark",
// "species": "dangerous",
// "length": 10,
// "age": 105
// }
// ]
// },
// {
// "fishtype": "sawshark",
// "species": "dangerous",
// "length": 10,
// "age": 105
// }
// ]
// },
// {
// "fishtype": "sawshark",
// "species": "dangerous",
// "length": 10,
// "age": 105
// }
// ]
// }
func (client PolymorphicrecursiveClient) PutValid(complexBody Fish) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{complexBody,
[]validation.Constraint{ {"Length", validation.Null, true, nil }}}}); err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphicrecursiveClient", "PutValid", nil , "Validation error ")
}
req, err := client.PutValidPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphicrecursiveClient", "PutValid", nil , "Failure preparing request")
}
resp, err := client.PutValidSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphicrecursiveClient", "PutValid", resp, "Failure sending request")
}
result, err = client.PutValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.PolymorphicrecursiveClient", "PutValid", resp, "Failure responding to request")
}
return
}
// PutValidPreparer prepares the PutValid request.
func (client PolymorphicrecursiveClient) PutValidPreparer(complexBody Fish) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/polymorphicrecursive/valid"),
autorest.WithJSON(complexBody))
return preparer.Prepare(&http.Request{})
}
// PutValidSender sends the PutValid request. The method will close the
// http.Response Body if it receives an error.
func (client PolymorphicrecursiveClient) PutValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutValidResponder handles the response to the PutValid request. The method always
// closes the http.Response Body.
func (client PolymorphicrecursiveClient) PutValidResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,258 +0,0 @@
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
// PolymorphismClient is the test Infrastructure for AutoRest
type PolymorphismClient struct {
ManagementClient
}
// NewPolymorphismClient creates an instance of the PolymorphismClient client.
func NewPolymorphismClient() PolymorphismClient {
return NewPolymorphismClientWithBaseURI(DefaultBaseURI, )
}
// NewPolymorphismClientWithBaseURI creates an instance of the
// PolymorphismClient client.
func NewPolymorphismClientWithBaseURI(baseURI string, ) PolymorphismClient {
return PolymorphismClient{NewWithBaseURI(baseURI, )}
}
// GetValid get complex types that are polymorphic
func (client PolymorphismClient) GetValid() (result Fish, err error) {
req, err := client.GetValidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "GetValid", nil , "Failure preparing request")
}
resp, err := client.GetValidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "GetValid", resp, "Failure sending request")
}
result, err = client.GetValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "GetValid", resp, "Failure responding to request")
}
return
}
// GetValidPreparer prepares the GetValid request.
func (client PolymorphismClient) GetValidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/polymorphism/valid"))
return preparer.Prepare(&http.Request{})
}
// GetValidSender sends the GetValid request. The method will close the
// http.Response Body if it receives an error.
func (client PolymorphismClient) GetValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetValidResponder handles the response to the GetValid request. The method always
// closes the http.Response Body.
func (client PolymorphismClient) GetValidResponder(resp *http.Response) (result Fish, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutValid put complex types that are polymorphic
//
// complexBody is please put a salmon that looks like this:
// {
// 'fishtype':'Salmon',
// 'location':'alaska',
// 'iswild':true,
// 'species':'king',
// 'length':1.0,
// 'siblings':[
// {
// 'fishtype':'Shark',
// 'age':6,
// 'birthday': '2012-01-05T01:00:00Z',
// 'length':20.0,
// 'species':'predator',
// },
// {
// 'fishtype':'Sawshark',
// 'age':105,
// 'birthday': '1900-01-05T01:00:00Z',
// 'length':10.0,
// 'picture': new Buffer([255, 255, 255, 255,
// 254]).toString('base64'),
// 'species':'dangerous',
// },
// {
// 'fishtype': 'goblin',
// 'age': 1,
// 'birthday': '2015-08-08T00:00:00Z',
// 'length': 30.0,
// 'species': 'scary',
// 'jawsize': 5
// }
// ]
// };
func (client PolymorphismClient) PutValid(complexBody Fish) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{complexBody,
[]validation.Constraint{ {"Length", validation.Null, true, nil }}}}); err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "PutValid", nil , "Validation error ")
}
req, err := client.PutValidPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "PutValid", nil , "Failure preparing request")
}
resp, err := client.PutValidSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "PutValid", resp, "Failure sending request")
}
result, err = client.PutValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "PutValid", resp, "Failure responding to request")
}
return
}
// PutValidPreparer prepares the PutValid request.
func (client PolymorphismClient) PutValidPreparer(complexBody Fish) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/polymorphism/valid"),
autorest.WithJSON(complexBody))
return preparer.Prepare(&http.Request{})
}
// PutValidSender sends the PutValid request. The method will close the
// http.Response Body if it receives an error.
func (client PolymorphismClient) PutValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutValidResponder handles the response to the PutValid request. The method always
// closes the http.Response Body.
func (client PolymorphismClient) PutValidResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutValidMissingRequired put complex types that are polymorphic, attempting
// to omit required 'birthday' field - the request should not be allowed from
// the client
//
// complexBody is please attempt put a sawshark that looks like this, the
// client should not allow this data to be sent:
// {
// "fishtype": "sawshark",
// "species": "snaggle toothed",
// "length": 18.5,
// "age": 2,
// "birthday": "2013-06-01T01:00:00Z",
// "location": "alaska",
// "picture": base64(FF FF FF FF FE),
// "siblings": [
// {
// "fishtype": "shark",
// "species": "predator",
// "birthday": "2012-01-05T01:00:00Z",
// "length": 20,
// "age": 6
// },
// {
// "fishtype": "sawshark",
// "species": "dangerous",
// "picture": base64(FF FF FF FF FE),
// "length": 10,
// "age": 105
// }
// ]
// }
func (client PolymorphismClient) PutValidMissingRequired(complexBody Fish) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{complexBody,
[]validation.Constraint{ {"Length", validation.Null, true, nil }}}}); err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "PutValidMissingRequired", nil , "Validation error ")
}
req, err := client.PutValidMissingRequiredPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "PutValidMissingRequired", nil , "Failure preparing request")
}
resp, err := client.PutValidMissingRequiredSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "PutValidMissingRequired", resp, "Failure sending request")
}
result, err = client.PutValidMissingRequiredResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.PolymorphismClient", "PutValidMissingRequired", resp, "Failure responding to request")
}
return
}
// PutValidMissingRequiredPreparer prepares the PutValidMissingRequired request.
func (client PolymorphismClient) PutValidMissingRequiredPreparer(complexBody Fish) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/polymorphism/missingrequired/invalid"),
autorest.WithJSON(complexBody))
return preparer.Prepare(&http.Request{})
}
// PutValidMissingRequiredSender sends the PutValidMissingRequired request. The method will close the
// http.Response Body if it receives an error.
func (client PolymorphismClient) PutValidMissingRequiredSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutValidMissingRequiredResponder handles the response to the PutValidMissingRequired request. The method always
// closes the http.Response Body.
func (client PolymorphismClient) PutValidMissingRequiredResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,139 +0,0 @@
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
// ReadonlypropertyClient is the test Infrastructure for AutoRest
type ReadonlypropertyClient struct {
ManagementClient
}
// NewReadonlypropertyClient creates an instance of the ReadonlypropertyClient
// client.
func NewReadonlypropertyClient() ReadonlypropertyClient {
return NewReadonlypropertyClientWithBaseURI(DefaultBaseURI, )
}
// NewReadonlypropertyClientWithBaseURI creates an instance of the
// ReadonlypropertyClient client.
func NewReadonlypropertyClientWithBaseURI(baseURI string, ) ReadonlypropertyClient {
return ReadonlypropertyClient{NewWithBaseURI(baseURI, )}
}
// GetValid get complex types that have readonly properties
func (client ReadonlypropertyClient) GetValid() (result ReadonlyObj, err error) {
req, err := client.GetValidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.ReadonlypropertyClient", "GetValid", nil , "Failure preparing request")
}
resp, err := client.GetValidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "complexgroup.ReadonlypropertyClient", "GetValid", resp, "Failure sending request")
}
result, err = client.GetValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.ReadonlypropertyClient", "GetValid", resp, "Failure responding to request")
}
return
}
// GetValidPreparer prepares the GetValid request.
func (client ReadonlypropertyClient) GetValidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/readonlyproperty/valid"))
return preparer.Prepare(&http.Request{})
}
// GetValidSender sends the GetValid request. The method will close the
// http.Response Body if it receives an error.
func (client ReadonlypropertyClient) GetValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetValidResponder handles the response to the GetValid request. The method always
// closes the http.Response Body.
func (client ReadonlypropertyClient) GetValidResponder(resp *http.Response) (result ReadonlyObj, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutValid put complex types that have readonly properties
//
func (client ReadonlypropertyClient) PutValid(complexBody ReadonlyObj) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{complexBody,
[]validation.Constraint{ {"ID", validation.ReadOnly, true, nil }}}}); err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.ReadonlypropertyClient", "PutValid", nil , "Validation error ")
}
req, err := client.PutValidPreparer(complexBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "complexgroup.ReadonlypropertyClient", "PutValid", nil , "Failure preparing request")
}
resp, err := client.PutValidSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "complexgroup.ReadonlypropertyClient", "PutValid", resp, "Failure sending request")
}
result, err = client.PutValidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "complexgroup.ReadonlypropertyClient", "PutValid", resp, "Failure responding to request")
}
return
}
// PutValidPreparer prepares the PutValid request.
func (client ReadonlypropertyClient) PutValidPreparer(complexBody ReadonlyObj) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/complex/readonlyproperty/valid"),
autorest.WithJSON(complexBody))
return preparer.Prepare(&http.Request{})
}
// PutValidSender sends the PutValid request. The method will close the
// http.Response Body if it receives an error.
func (client ReadonlypropertyClient) PutValidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutValidResponder handles the response to the PutValid request. The method always
// closes the http.Response Body.
func (client ReadonlypropertyClient) PutValidResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,33 +0,0 @@
package complexgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "complexgroup", "2016-02-29")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package dategroup implements the Azure ARM Dategroup service API version
// 1.0.0.
//
// Test Infrastructure for AutoRest
package dategroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Dategroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Dategroup
DefaultBaseURI = "https://localhost"
)
// ManagementClient is the base client for Dategroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,428 +0,0 @@
package dategroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"net/http"
)
// OperationsClient is the test Infrastructure for AutoRest
type OperationsClient struct {
ManagementClient
}
// NewOperationsClient creates an instance of the OperationsClient client.
func NewOperationsClient() OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, )
}
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
// client.
func NewOperationsClientWithBaseURI(baseURI string, ) OperationsClient {
return OperationsClient{NewWithBaseURI(baseURI, )}
}
// GetInvalidDate get invalid date value
func (client OperationsClient) GetInvalidDate() (result Date, err error) {
req, err := client.GetInvalidDatePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetInvalidDate", nil , "Failure preparing request")
}
resp, err := client.GetInvalidDateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetInvalidDate", resp, "Failure sending request")
}
result, err = client.GetInvalidDateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetInvalidDate", resp, "Failure responding to request")
}
return
}
// GetInvalidDatePreparer prepares the GetInvalidDate request.
func (client OperationsClient) GetInvalidDatePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/date/invaliddate"))
return preparer.Prepare(&http.Request{})
}
// GetInvalidDateSender sends the GetInvalidDate request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetInvalidDateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetInvalidDateResponder handles the response to the GetInvalidDate request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetInvalidDateResponder(resp *http.Response) (result Date, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetMaxDate get max date value 9999-12-31
func (client OperationsClient) GetMaxDate() (result Date, err error) {
req, err := client.GetMaxDatePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetMaxDate", nil , "Failure preparing request")
}
resp, err := client.GetMaxDateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetMaxDate", resp, "Failure sending request")
}
result, err = client.GetMaxDateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetMaxDate", resp, "Failure responding to request")
}
return
}
// GetMaxDatePreparer prepares the GetMaxDate request.
func (client OperationsClient) GetMaxDatePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/date/max"))
return preparer.Prepare(&http.Request{})
}
// GetMaxDateSender sends the GetMaxDate request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetMaxDateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetMaxDateResponder handles the response to the GetMaxDate request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetMaxDateResponder(resp *http.Response) (result Date, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetMinDate get min date value 0000-01-01
func (client OperationsClient) GetMinDate() (result Date, err error) {
req, err := client.GetMinDatePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetMinDate", nil , "Failure preparing request")
}
resp, err := client.GetMinDateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetMinDate", resp, "Failure sending request")
}
result, err = client.GetMinDateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetMinDate", resp, "Failure responding to request")
}
return
}
// GetMinDatePreparer prepares the GetMinDate request.
func (client OperationsClient) GetMinDatePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/date/min"))
return preparer.Prepare(&http.Request{})
}
// GetMinDateSender sends the GetMinDate request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetMinDateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetMinDateResponder handles the response to the GetMinDate request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetMinDateResponder(resp *http.Response) (result Date, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get null date value
func (client OperationsClient) GetNull() (result Date, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client OperationsClient) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/date/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetNullResponder(resp *http.Response) (result Date, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetOverflowDate get overflow date value
func (client OperationsClient) GetOverflowDate() (result Date, err error) {
req, err := client.GetOverflowDatePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetOverflowDate", nil , "Failure preparing request")
}
resp, err := client.GetOverflowDateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetOverflowDate", resp, "Failure sending request")
}
result, err = client.GetOverflowDateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetOverflowDate", resp, "Failure responding to request")
}
return
}
// GetOverflowDatePreparer prepares the GetOverflowDate request.
func (client OperationsClient) GetOverflowDatePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/date/overflowdate"))
return preparer.Prepare(&http.Request{})
}
// GetOverflowDateSender sends the GetOverflowDate request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetOverflowDateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetOverflowDateResponder handles the response to the GetOverflowDate request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetOverflowDateResponder(resp *http.Response) (result Date, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUnderflowDate get underflow date value
func (client OperationsClient) GetUnderflowDate() (result Date, err error) {
req, err := client.GetUnderflowDatePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetUnderflowDate", nil , "Failure preparing request")
}
resp, err := client.GetUnderflowDateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetUnderflowDate", resp, "Failure sending request")
}
result, err = client.GetUnderflowDateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dategroup.OperationsClient", "GetUnderflowDate", resp, "Failure responding to request")
}
return
}
// GetUnderflowDatePreparer prepares the GetUnderflowDate request.
func (client OperationsClient) GetUnderflowDatePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/date/underflowdate"))
return preparer.Prepare(&http.Request{})
}
// GetUnderflowDateSender sends the GetUnderflowDate request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetUnderflowDateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUnderflowDateResponder handles the response to the GetUnderflowDate request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetUnderflowDateResponder(resp *http.Response) (result Date, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutMaxDate put max date value 9999-12-31
//
func (client OperationsClient) PutMaxDate(dateBody date.Date) (result autorest.Response, err error) {
req, err := client.PutMaxDatePreparer(dateBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "PutMaxDate", nil , "Failure preparing request")
}
resp, err := client.PutMaxDateSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "PutMaxDate", resp, "Failure sending request")
}
result, err = client.PutMaxDateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dategroup.OperationsClient", "PutMaxDate", resp, "Failure responding to request")
}
return
}
// PutMaxDatePreparer prepares the PutMaxDate request.
func (client OperationsClient) PutMaxDatePreparer(dateBody date.Date) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/date/max"),
autorest.WithJSON(dateBody))
return preparer.Prepare(&http.Request{})
}
// PutMaxDateSender sends the PutMaxDate request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) PutMaxDateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutMaxDateResponder handles the response to the PutMaxDate request. The method always
// closes the http.Response Body.
func (client OperationsClient) PutMaxDateResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutMinDate put min date value 0000-01-01
//
func (client OperationsClient) PutMinDate(dateBody date.Date) (result autorest.Response, err error) {
req, err := client.PutMinDatePreparer(dateBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "PutMinDate", nil , "Failure preparing request")
}
resp, err := client.PutMinDateSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "dategroup.OperationsClient", "PutMinDate", resp, "Failure sending request")
}
result, err = client.PutMinDateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dategroup.OperationsClient", "PutMinDate", resp, "Failure responding to request")
}
return
}
// PutMinDatePreparer prepares the PutMinDate request.
func (client OperationsClient) PutMinDatePreparer(dateBody date.Date) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/date/min"),
autorest.WithJSON(dateBody))
return preparer.Prepare(&http.Request{})
}
// PutMinDateSender sends the PutMinDate request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) PutMinDateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutMinDateResponder handles the response to the PutMinDate request. The method always
// closes the http.Response Body.
func (client OperationsClient) PutMinDateResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,27 +0,0 @@
package dategroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/date"
)
// Date is
type Date struct {
autorest.Response `json:"-"`
Value *date.Date `json:"value,omitempty"`
}
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package dategroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "dategroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package datetimerfc1123group implements the Azure ARM Datetimerfc1123group
// service API version 1.0.0.
//
// Test Infrastructure for AutoRest
package datetimerfc1123group
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Datetimerfc1123group
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Datetimerfc1123group
DefaultBaseURI = "https://localhost"
)
// ManagementClient is the base client for Datetimerfc1123group.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,480 +0,0 @@
package datetimerfc1123group
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"net/http"
)
// Datetimerfc1123Client is the test Infrastructure for AutoRest
type Datetimerfc1123Client struct {
ManagementClient
}
// NewDatetimerfc1123Client creates an instance of the Datetimerfc1123Client
// client.
func NewDatetimerfc1123Client() Datetimerfc1123Client {
return NewDatetimerfc1123ClientWithBaseURI(DefaultBaseURI, )
}
// NewDatetimerfc1123ClientWithBaseURI creates an instance of the
// Datetimerfc1123Client client.
func NewDatetimerfc1123ClientWithBaseURI(baseURI string, ) Datetimerfc1123Client {
return Datetimerfc1123Client{NewWithBaseURI(baseURI, )}
}
// GetInvalid get invalid datetime value
func (client Datetimerfc1123Client) GetInvalid() (result TimeRFC1123, err error) {
req, err := client.GetInvalidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetInvalid", nil , "Failure preparing request")
}
resp, err := client.GetInvalidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetInvalid", resp, "Failure sending request")
}
result, err = client.GetInvalidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetInvalid", resp, "Failure responding to request")
}
return
}
// GetInvalidPreparer prepares the GetInvalid request.
func (client Datetimerfc1123Client) GetInvalidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetimerfc1123/invalid"))
return preparer.Prepare(&http.Request{})
}
// GetInvalidSender sends the GetInvalid request. The method will close the
// http.Response Body if it receives an error.
func (client Datetimerfc1123Client) GetInvalidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetInvalidResponder handles the response to the GetInvalid request. The method always
// closes the http.Response Body.
func (client Datetimerfc1123Client) GetInvalidResponder(resp *http.Response) (result TimeRFC1123, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get null datetime value
func (client Datetimerfc1123Client) GetNull() (result TimeRFC1123, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client Datetimerfc1123Client) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetimerfc1123/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client Datetimerfc1123Client) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client Datetimerfc1123Client) GetNullResponder(resp *http.Response) (result TimeRFC1123, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetOverflow get overflow datetime value
func (client Datetimerfc1123Client) GetOverflow() (result TimeRFC1123, err error) {
req, err := client.GetOverflowPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetOverflow", nil , "Failure preparing request")
}
resp, err := client.GetOverflowSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetOverflow", resp, "Failure sending request")
}
result, err = client.GetOverflowResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetOverflow", resp, "Failure responding to request")
}
return
}
// GetOverflowPreparer prepares the GetOverflow request.
func (client Datetimerfc1123Client) GetOverflowPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetimerfc1123/overflow"))
return preparer.Prepare(&http.Request{})
}
// GetOverflowSender sends the GetOverflow request. The method will close the
// http.Response Body if it receives an error.
func (client Datetimerfc1123Client) GetOverflowSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetOverflowResponder handles the response to the GetOverflow request. The method always
// closes the http.Response Body.
func (client Datetimerfc1123Client) GetOverflowResponder(resp *http.Response) (result TimeRFC1123, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUnderflow get underflow datetime value
func (client Datetimerfc1123Client) GetUnderflow() (result TimeRFC1123, err error) {
req, err := client.GetUnderflowPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUnderflow", nil , "Failure preparing request")
}
resp, err := client.GetUnderflowSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUnderflow", resp, "Failure sending request")
}
result, err = client.GetUnderflowResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUnderflow", resp, "Failure responding to request")
}
return
}
// GetUnderflowPreparer prepares the GetUnderflow request.
func (client Datetimerfc1123Client) GetUnderflowPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetimerfc1123/underflow"))
return preparer.Prepare(&http.Request{})
}
// GetUnderflowSender sends the GetUnderflow request. The method will close the
// http.Response Body if it receives an error.
func (client Datetimerfc1123Client) GetUnderflowSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUnderflowResponder handles the response to the GetUnderflow request. The method always
// closes the http.Response Body.
func (client Datetimerfc1123Client) GetUnderflowResponder(resp *http.Response) (result TimeRFC1123, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUtcLowercaseMaxDateTime get max datetime value fri, 31 dec 9999 23:59:59
// gmt
func (client Datetimerfc1123Client) GetUtcLowercaseMaxDateTime() (result TimeRFC1123, err error) {
req, err := client.GetUtcLowercaseMaxDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUtcLowercaseMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.GetUtcLowercaseMaxDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUtcLowercaseMaxDateTime", resp, "Failure sending request")
}
result, err = client.GetUtcLowercaseMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUtcLowercaseMaxDateTime", resp, "Failure responding to request")
}
return
}
// GetUtcLowercaseMaxDateTimePreparer prepares the GetUtcLowercaseMaxDateTime request.
func (client Datetimerfc1123Client) GetUtcLowercaseMaxDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetimerfc1123/max/lowercase"))
return preparer.Prepare(&http.Request{})
}
// GetUtcLowercaseMaxDateTimeSender sends the GetUtcLowercaseMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client Datetimerfc1123Client) GetUtcLowercaseMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUtcLowercaseMaxDateTimeResponder handles the response to the GetUtcLowercaseMaxDateTime request. The method always
// closes the http.Response Body.
func (client Datetimerfc1123Client) GetUtcLowercaseMaxDateTimeResponder(resp *http.Response) (result TimeRFC1123, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUtcMinDateTime get min datetime value Mon, 1 Jan 0001 00:00:00 GMT
func (client Datetimerfc1123Client) GetUtcMinDateTime() (result TimeRFC1123, err error) {
req, err := client.GetUtcMinDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUtcMinDateTime", nil , "Failure preparing request")
}
resp, err := client.GetUtcMinDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUtcMinDateTime", resp, "Failure sending request")
}
result, err = client.GetUtcMinDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUtcMinDateTime", resp, "Failure responding to request")
}
return
}
// GetUtcMinDateTimePreparer prepares the GetUtcMinDateTime request.
func (client Datetimerfc1123Client) GetUtcMinDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetimerfc1123/min"))
return preparer.Prepare(&http.Request{})
}
// GetUtcMinDateTimeSender sends the GetUtcMinDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client Datetimerfc1123Client) GetUtcMinDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUtcMinDateTimeResponder handles the response to the GetUtcMinDateTime request. The method always
// closes the http.Response Body.
func (client Datetimerfc1123Client) GetUtcMinDateTimeResponder(resp *http.Response) (result TimeRFC1123, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUtcUppercaseMaxDateTime get max datetime value FRI, 31 DEC 9999 23:59:59
// GMT
func (client Datetimerfc1123Client) GetUtcUppercaseMaxDateTime() (result TimeRFC1123, err error) {
req, err := client.GetUtcUppercaseMaxDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUtcUppercaseMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.GetUtcUppercaseMaxDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUtcUppercaseMaxDateTime", resp, "Failure sending request")
}
result, err = client.GetUtcUppercaseMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "GetUtcUppercaseMaxDateTime", resp, "Failure responding to request")
}
return
}
// GetUtcUppercaseMaxDateTimePreparer prepares the GetUtcUppercaseMaxDateTime request.
func (client Datetimerfc1123Client) GetUtcUppercaseMaxDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetimerfc1123/max/uppercase"))
return preparer.Prepare(&http.Request{})
}
// GetUtcUppercaseMaxDateTimeSender sends the GetUtcUppercaseMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client Datetimerfc1123Client) GetUtcUppercaseMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUtcUppercaseMaxDateTimeResponder handles the response to the GetUtcUppercaseMaxDateTime request. The method always
// closes the http.Response Body.
func (client Datetimerfc1123Client) GetUtcUppercaseMaxDateTimeResponder(resp *http.Response) (result TimeRFC1123, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutUtcMaxDateTime put max datetime value Fri, 31 Dec 9999 23:59:59 GMT
//
func (client Datetimerfc1123Client) PutUtcMaxDateTime(datetimeBody date.TimeRFC1123) (result autorest.Response, err error) {
req, err := client.PutUtcMaxDateTimePreparer(datetimeBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "PutUtcMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.PutUtcMaxDateTimeSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "PutUtcMaxDateTime", resp, "Failure sending request")
}
result, err = client.PutUtcMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "PutUtcMaxDateTime", resp, "Failure responding to request")
}
return
}
// PutUtcMaxDateTimePreparer prepares the PutUtcMaxDateTime request.
func (client Datetimerfc1123Client) PutUtcMaxDateTimePreparer(datetimeBody date.TimeRFC1123) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetimerfc1123/max"),
autorest.WithJSON(datetimeBody))
return preparer.Prepare(&http.Request{})
}
// PutUtcMaxDateTimeSender sends the PutUtcMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client Datetimerfc1123Client) PutUtcMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutUtcMaxDateTimeResponder handles the response to the PutUtcMaxDateTime request. The method always
// closes the http.Response Body.
func (client Datetimerfc1123Client) PutUtcMaxDateTimeResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutUtcMinDateTime put min datetime value Mon, 1 Jan 0001 00:00:00 GMT
//
func (client Datetimerfc1123Client) PutUtcMinDateTime(datetimeBody date.TimeRFC1123) (result autorest.Response, err error) {
req, err := client.PutUtcMinDateTimePreparer(datetimeBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "PutUtcMinDateTime", nil , "Failure preparing request")
}
resp, err := client.PutUtcMinDateTimeSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "PutUtcMinDateTime", resp, "Failure sending request")
}
result, err = client.PutUtcMinDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimerfc1123group.Datetimerfc1123Client", "PutUtcMinDateTime", resp, "Failure responding to request")
}
return
}
// PutUtcMinDateTimePreparer prepares the PutUtcMinDateTime request.
func (client Datetimerfc1123Client) PutUtcMinDateTimePreparer(datetimeBody date.TimeRFC1123) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetimerfc1123/min"),
autorest.WithJSON(datetimeBody))
return preparer.Prepare(&http.Request{})
}
// PutUtcMinDateTimeSender sends the PutUtcMinDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client Datetimerfc1123Client) PutUtcMinDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutUtcMinDateTimeResponder handles the response to the PutUtcMinDateTime request. The method always
// closes the http.Response Body.
func (client Datetimerfc1123Client) PutUtcMinDateTimeResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,27 +0,0 @@
package datetimerfc1123group
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/date"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// TimeRFC1123 is
type TimeRFC1123 struct {
autorest.Response `json:"-"`
Value *date.TimeRFC1123 `json:"value,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package datetimerfc1123group
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "datetimerfc1123group", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package datetimegroup implements the Azure ARM Datetimegroup service API
// version 1.0.0.
//
// Test Infrastructure for AutoRest
package datetimegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Datetimegroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Datetimegroup
DefaultBaseURI = "https://localhost"
)
// ManagementClient is the base client for Datetimegroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,987 +0,0 @@
package datetimegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"net/http"
)
// DatetimeClient is the test Infrastructure for AutoRest
type DatetimeClient struct {
ManagementClient
}
// NewDatetimeClient creates an instance of the DatetimeClient client.
func NewDatetimeClient() DatetimeClient {
return NewDatetimeClientWithBaseURI(DefaultBaseURI, )
}
// NewDatetimeClientWithBaseURI creates an instance of the DatetimeClient
// client.
func NewDatetimeClientWithBaseURI(baseURI string, ) DatetimeClient {
return DatetimeClient{NewWithBaseURI(baseURI, )}
}
// GetInvalid get invalid datetime value
func (client DatetimeClient) GetInvalid() (result Time, err error) {
req, err := client.GetInvalidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetInvalid", nil , "Failure preparing request")
}
resp, err := client.GetInvalidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetInvalid", resp, "Failure sending request")
}
result, err = client.GetInvalidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetInvalid", resp, "Failure responding to request")
}
return
}
// GetInvalidPreparer prepares the GetInvalid request.
func (client DatetimeClient) GetInvalidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/invalid"))
return preparer.Prepare(&http.Request{})
}
// GetInvalidSender sends the GetInvalid request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetInvalidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetInvalidResponder handles the response to the GetInvalid request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetInvalidResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetLocalNegativeOffsetLowercaseMaxDateTime get max datetime value with
// positive num offset 9999-12-31t23:59:59.9999999-14:00
func (client DatetimeClient) GetLocalNegativeOffsetLowercaseMaxDateTime() (result Time, err error) {
req, err := client.GetLocalNegativeOffsetLowercaseMaxDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalNegativeOffsetLowercaseMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.GetLocalNegativeOffsetLowercaseMaxDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalNegativeOffsetLowercaseMaxDateTime", resp, "Failure sending request")
}
result, err = client.GetLocalNegativeOffsetLowercaseMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalNegativeOffsetLowercaseMaxDateTime", resp, "Failure responding to request")
}
return
}
// GetLocalNegativeOffsetLowercaseMaxDateTimePreparer prepares the GetLocalNegativeOffsetLowercaseMaxDateTime request.
func (client DatetimeClient) GetLocalNegativeOffsetLowercaseMaxDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/max/localnegativeoffset/lowercase"))
return preparer.Prepare(&http.Request{})
}
// GetLocalNegativeOffsetLowercaseMaxDateTimeSender sends the GetLocalNegativeOffsetLowercaseMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetLocalNegativeOffsetLowercaseMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetLocalNegativeOffsetLowercaseMaxDateTimeResponder handles the response to the GetLocalNegativeOffsetLowercaseMaxDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetLocalNegativeOffsetLowercaseMaxDateTimeResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetLocalNegativeOffsetMinDateTime get min datetime value
// 0001-01-01T00:00:00-14:00
func (client DatetimeClient) GetLocalNegativeOffsetMinDateTime() (result Time, err error) {
req, err := client.GetLocalNegativeOffsetMinDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalNegativeOffsetMinDateTime", nil , "Failure preparing request")
}
resp, err := client.GetLocalNegativeOffsetMinDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalNegativeOffsetMinDateTime", resp, "Failure sending request")
}
result, err = client.GetLocalNegativeOffsetMinDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalNegativeOffsetMinDateTime", resp, "Failure responding to request")
}
return
}
// GetLocalNegativeOffsetMinDateTimePreparer prepares the GetLocalNegativeOffsetMinDateTime request.
func (client DatetimeClient) GetLocalNegativeOffsetMinDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/min/localnegativeoffset"))
return preparer.Prepare(&http.Request{})
}
// GetLocalNegativeOffsetMinDateTimeSender sends the GetLocalNegativeOffsetMinDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetLocalNegativeOffsetMinDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetLocalNegativeOffsetMinDateTimeResponder handles the response to the GetLocalNegativeOffsetMinDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetLocalNegativeOffsetMinDateTimeResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetLocalNegativeOffsetUppercaseMaxDateTime get max datetime value with
// positive num offset 9999-12-31T23:59:59.9999999-14:00
func (client DatetimeClient) GetLocalNegativeOffsetUppercaseMaxDateTime() (result Time, err error) {
req, err := client.GetLocalNegativeOffsetUppercaseMaxDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalNegativeOffsetUppercaseMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.GetLocalNegativeOffsetUppercaseMaxDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalNegativeOffsetUppercaseMaxDateTime", resp, "Failure sending request")
}
result, err = client.GetLocalNegativeOffsetUppercaseMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalNegativeOffsetUppercaseMaxDateTime", resp, "Failure responding to request")
}
return
}
// GetLocalNegativeOffsetUppercaseMaxDateTimePreparer prepares the GetLocalNegativeOffsetUppercaseMaxDateTime request.
func (client DatetimeClient) GetLocalNegativeOffsetUppercaseMaxDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/max/localnegativeoffset/uppercase"))
return preparer.Prepare(&http.Request{})
}
// GetLocalNegativeOffsetUppercaseMaxDateTimeSender sends the GetLocalNegativeOffsetUppercaseMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetLocalNegativeOffsetUppercaseMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetLocalNegativeOffsetUppercaseMaxDateTimeResponder handles the response to the GetLocalNegativeOffsetUppercaseMaxDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetLocalNegativeOffsetUppercaseMaxDateTimeResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetLocalPositiveOffsetLowercaseMaxDateTime get max datetime value with
// positive num offset 9999-12-31t23:59:59.9999999+14:00
func (client DatetimeClient) GetLocalPositiveOffsetLowercaseMaxDateTime() (result Time, err error) {
req, err := client.GetLocalPositiveOffsetLowercaseMaxDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalPositiveOffsetLowercaseMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.GetLocalPositiveOffsetLowercaseMaxDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalPositiveOffsetLowercaseMaxDateTime", resp, "Failure sending request")
}
result, err = client.GetLocalPositiveOffsetLowercaseMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalPositiveOffsetLowercaseMaxDateTime", resp, "Failure responding to request")
}
return
}
// GetLocalPositiveOffsetLowercaseMaxDateTimePreparer prepares the GetLocalPositiveOffsetLowercaseMaxDateTime request.
func (client DatetimeClient) GetLocalPositiveOffsetLowercaseMaxDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/max/localpositiveoffset/lowercase"))
return preparer.Prepare(&http.Request{})
}
// GetLocalPositiveOffsetLowercaseMaxDateTimeSender sends the GetLocalPositiveOffsetLowercaseMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetLocalPositiveOffsetLowercaseMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetLocalPositiveOffsetLowercaseMaxDateTimeResponder handles the response to the GetLocalPositiveOffsetLowercaseMaxDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetLocalPositiveOffsetLowercaseMaxDateTimeResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetLocalPositiveOffsetMinDateTime get min datetime value
// 0001-01-01T00:00:00+14:00
func (client DatetimeClient) GetLocalPositiveOffsetMinDateTime() (result Time, err error) {
req, err := client.GetLocalPositiveOffsetMinDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalPositiveOffsetMinDateTime", nil , "Failure preparing request")
}
resp, err := client.GetLocalPositiveOffsetMinDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalPositiveOffsetMinDateTime", resp, "Failure sending request")
}
result, err = client.GetLocalPositiveOffsetMinDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalPositiveOffsetMinDateTime", resp, "Failure responding to request")
}
return
}
// GetLocalPositiveOffsetMinDateTimePreparer prepares the GetLocalPositiveOffsetMinDateTime request.
func (client DatetimeClient) GetLocalPositiveOffsetMinDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/min/localpositiveoffset"))
return preparer.Prepare(&http.Request{})
}
// GetLocalPositiveOffsetMinDateTimeSender sends the GetLocalPositiveOffsetMinDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetLocalPositiveOffsetMinDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetLocalPositiveOffsetMinDateTimeResponder handles the response to the GetLocalPositiveOffsetMinDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetLocalPositiveOffsetMinDateTimeResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetLocalPositiveOffsetUppercaseMaxDateTime get max datetime value with
// positive num offset 9999-12-31T23:59:59.9999999+14:00
func (client DatetimeClient) GetLocalPositiveOffsetUppercaseMaxDateTime() (result Time, err error) {
req, err := client.GetLocalPositiveOffsetUppercaseMaxDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalPositiveOffsetUppercaseMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.GetLocalPositiveOffsetUppercaseMaxDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalPositiveOffsetUppercaseMaxDateTime", resp, "Failure sending request")
}
result, err = client.GetLocalPositiveOffsetUppercaseMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetLocalPositiveOffsetUppercaseMaxDateTime", resp, "Failure responding to request")
}
return
}
// GetLocalPositiveOffsetUppercaseMaxDateTimePreparer prepares the GetLocalPositiveOffsetUppercaseMaxDateTime request.
func (client DatetimeClient) GetLocalPositiveOffsetUppercaseMaxDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/max/localpositiveoffset/uppercase"))
return preparer.Prepare(&http.Request{})
}
// GetLocalPositiveOffsetUppercaseMaxDateTimeSender sends the GetLocalPositiveOffsetUppercaseMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetLocalPositiveOffsetUppercaseMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetLocalPositiveOffsetUppercaseMaxDateTimeResponder handles the response to the GetLocalPositiveOffsetUppercaseMaxDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetLocalPositiveOffsetUppercaseMaxDateTimeResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get null datetime value
func (client DatetimeClient) GetNull() (result Time, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client DatetimeClient) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetNullResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetOverflow get overflow datetime value
func (client DatetimeClient) GetOverflow() (result Time, err error) {
req, err := client.GetOverflowPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetOverflow", nil , "Failure preparing request")
}
resp, err := client.GetOverflowSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetOverflow", resp, "Failure sending request")
}
result, err = client.GetOverflowResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetOverflow", resp, "Failure responding to request")
}
return
}
// GetOverflowPreparer prepares the GetOverflow request.
func (client DatetimeClient) GetOverflowPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/overflow"))
return preparer.Prepare(&http.Request{})
}
// GetOverflowSender sends the GetOverflow request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetOverflowSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetOverflowResponder handles the response to the GetOverflow request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetOverflowResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUnderflow get underflow datetime value
func (client DatetimeClient) GetUnderflow() (result Time, err error) {
req, err := client.GetUnderflowPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUnderflow", nil , "Failure preparing request")
}
resp, err := client.GetUnderflowSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUnderflow", resp, "Failure sending request")
}
result, err = client.GetUnderflowResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUnderflow", resp, "Failure responding to request")
}
return
}
// GetUnderflowPreparer prepares the GetUnderflow request.
func (client DatetimeClient) GetUnderflowPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/underflow"))
return preparer.Prepare(&http.Request{})
}
// GetUnderflowSender sends the GetUnderflow request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetUnderflowSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUnderflowResponder handles the response to the GetUnderflow request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetUnderflowResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUtcLowercaseMaxDateTime get max datetime value
// 9999-12-31t23:59:59.9999999z
func (client DatetimeClient) GetUtcLowercaseMaxDateTime() (result Time, err error) {
req, err := client.GetUtcLowercaseMaxDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUtcLowercaseMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.GetUtcLowercaseMaxDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUtcLowercaseMaxDateTime", resp, "Failure sending request")
}
result, err = client.GetUtcLowercaseMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUtcLowercaseMaxDateTime", resp, "Failure responding to request")
}
return
}
// GetUtcLowercaseMaxDateTimePreparer prepares the GetUtcLowercaseMaxDateTime request.
func (client DatetimeClient) GetUtcLowercaseMaxDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/max/utc/lowercase"))
return preparer.Prepare(&http.Request{})
}
// GetUtcLowercaseMaxDateTimeSender sends the GetUtcLowercaseMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetUtcLowercaseMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUtcLowercaseMaxDateTimeResponder handles the response to the GetUtcLowercaseMaxDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetUtcLowercaseMaxDateTimeResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUtcMinDateTime get min datetime value 0001-01-01T00:00:00Z
func (client DatetimeClient) GetUtcMinDateTime() (result Time, err error) {
req, err := client.GetUtcMinDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUtcMinDateTime", nil , "Failure preparing request")
}
resp, err := client.GetUtcMinDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUtcMinDateTime", resp, "Failure sending request")
}
result, err = client.GetUtcMinDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUtcMinDateTime", resp, "Failure responding to request")
}
return
}
// GetUtcMinDateTimePreparer prepares the GetUtcMinDateTime request.
func (client DatetimeClient) GetUtcMinDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/min/utc"))
return preparer.Prepare(&http.Request{})
}
// GetUtcMinDateTimeSender sends the GetUtcMinDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetUtcMinDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUtcMinDateTimeResponder handles the response to the GetUtcMinDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetUtcMinDateTimeResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUtcUppercaseMaxDateTime get max datetime value
// 9999-12-31T23:59:59.9999999Z
func (client DatetimeClient) GetUtcUppercaseMaxDateTime() (result Time, err error) {
req, err := client.GetUtcUppercaseMaxDateTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUtcUppercaseMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.GetUtcUppercaseMaxDateTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUtcUppercaseMaxDateTime", resp, "Failure sending request")
}
result, err = client.GetUtcUppercaseMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "GetUtcUppercaseMaxDateTime", resp, "Failure responding to request")
}
return
}
// GetUtcUppercaseMaxDateTimePreparer prepares the GetUtcUppercaseMaxDateTime request.
func (client DatetimeClient) GetUtcUppercaseMaxDateTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/max/utc/uppercase"))
return preparer.Prepare(&http.Request{})
}
// GetUtcUppercaseMaxDateTimeSender sends the GetUtcUppercaseMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) GetUtcUppercaseMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUtcUppercaseMaxDateTimeResponder handles the response to the GetUtcUppercaseMaxDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) GetUtcUppercaseMaxDateTimeResponder(resp *http.Response) (result Time, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutLocalNegativeOffsetMaxDateTime put max datetime value with positive
// numoffset 9999-12-31t23:59:59.9999999-14:00
//
func (client DatetimeClient) PutLocalNegativeOffsetMaxDateTime(datetimeBody date.Time) (result autorest.Response, err error) {
req, err := client.PutLocalNegativeOffsetMaxDateTimePreparer(datetimeBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalNegativeOffsetMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.PutLocalNegativeOffsetMaxDateTimeSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalNegativeOffsetMaxDateTime", resp, "Failure sending request")
}
result, err = client.PutLocalNegativeOffsetMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalNegativeOffsetMaxDateTime", resp, "Failure responding to request")
}
return
}
// PutLocalNegativeOffsetMaxDateTimePreparer prepares the PutLocalNegativeOffsetMaxDateTime request.
func (client DatetimeClient) PutLocalNegativeOffsetMaxDateTimePreparer(datetimeBody date.Time) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/max/localnegativeoffset"),
autorest.WithJSON(datetimeBody))
return preparer.Prepare(&http.Request{})
}
// PutLocalNegativeOffsetMaxDateTimeSender sends the PutLocalNegativeOffsetMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) PutLocalNegativeOffsetMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutLocalNegativeOffsetMaxDateTimeResponder handles the response to the PutLocalNegativeOffsetMaxDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) PutLocalNegativeOffsetMaxDateTimeResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutLocalNegativeOffsetMinDateTime put min datetime value
// 0001-01-01T00:00:00-14:00
//
func (client DatetimeClient) PutLocalNegativeOffsetMinDateTime(datetimeBody date.Time) (result autorest.Response, err error) {
req, err := client.PutLocalNegativeOffsetMinDateTimePreparer(datetimeBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalNegativeOffsetMinDateTime", nil , "Failure preparing request")
}
resp, err := client.PutLocalNegativeOffsetMinDateTimeSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalNegativeOffsetMinDateTime", resp, "Failure sending request")
}
result, err = client.PutLocalNegativeOffsetMinDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalNegativeOffsetMinDateTime", resp, "Failure responding to request")
}
return
}
// PutLocalNegativeOffsetMinDateTimePreparer prepares the PutLocalNegativeOffsetMinDateTime request.
func (client DatetimeClient) PutLocalNegativeOffsetMinDateTimePreparer(datetimeBody date.Time) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/min/localnegativeoffset"),
autorest.WithJSON(datetimeBody))
return preparer.Prepare(&http.Request{})
}
// PutLocalNegativeOffsetMinDateTimeSender sends the PutLocalNegativeOffsetMinDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) PutLocalNegativeOffsetMinDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutLocalNegativeOffsetMinDateTimeResponder handles the response to the PutLocalNegativeOffsetMinDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) PutLocalNegativeOffsetMinDateTimeResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutLocalPositiveOffsetMaxDateTime put max datetime value with positive
// numoffset 9999-12-31t23:59:59.9999999+14:00
//
func (client DatetimeClient) PutLocalPositiveOffsetMaxDateTime(datetimeBody date.Time) (result autorest.Response, err error) {
req, err := client.PutLocalPositiveOffsetMaxDateTimePreparer(datetimeBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalPositiveOffsetMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.PutLocalPositiveOffsetMaxDateTimeSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalPositiveOffsetMaxDateTime", resp, "Failure sending request")
}
result, err = client.PutLocalPositiveOffsetMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalPositiveOffsetMaxDateTime", resp, "Failure responding to request")
}
return
}
// PutLocalPositiveOffsetMaxDateTimePreparer prepares the PutLocalPositiveOffsetMaxDateTime request.
func (client DatetimeClient) PutLocalPositiveOffsetMaxDateTimePreparer(datetimeBody date.Time) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/max/localpositiveoffset"),
autorest.WithJSON(datetimeBody))
return preparer.Prepare(&http.Request{})
}
// PutLocalPositiveOffsetMaxDateTimeSender sends the PutLocalPositiveOffsetMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) PutLocalPositiveOffsetMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutLocalPositiveOffsetMaxDateTimeResponder handles the response to the PutLocalPositiveOffsetMaxDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) PutLocalPositiveOffsetMaxDateTimeResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutLocalPositiveOffsetMinDateTime put min datetime value
// 0001-01-01T00:00:00+14:00
//
func (client DatetimeClient) PutLocalPositiveOffsetMinDateTime(datetimeBody date.Time) (result autorest.Response, err error) {
req, err := client.PutLocalPositiveOffsetMinDateTimePreparer(datetimeBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalPositiveOffsetMinDateTime", nil , "Failure preparing request")
}
resp, err := client.PutLocalPositiveOffsetMinDateTimeSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalPositiveOffsetMinDateTime", resp, "Failure sending request")
}
result, err = client.PutLocalPositiveOffsetMinDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutLocalPositiveOffsetMinDateTime", resp, "Failure responding to request")
}
return
}
// PutLocalPositiveOffsetMinDateTimePreparer prepares the PutLocalPositiveOffsetMinDateTime request.
func (client DatetimeClient) PutLocalPositiveOffsetMinDateTimePreparer(datetimeBody date.Time) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/min/localpositiveoffset"),
autorest.WithJSON(datetimeBody))
return preparer.Prepare(&http.Request{})
}
// PutLocalPositiveOffsetMinDateTimeSender sends the PutLocalPositiveOffsetMinDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) PutLocalPositiveOffsetMinDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutLocalPositiveOffsetMinDateTimeResponder handles the response to the PutLocalPositiveOffsetMinDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) PutLocalPositiveOffsetMinDateTimeResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutUtcMaxDateTime put max datetime value 9999-12-31T23:59:59.9999999Z
//
func (client DatetimeClient) PutUtcMaxDateTime(datetimeBody date.Time) (result autorest.Response, err error) {
req, err := client.PutUtcMaxDateTimePreparer(datetimeBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutUtcMaxDateTime", nil , "Failure preparing request")
}
resp, err := client.PutUtcMaxDateTimeSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutUtcMaxDateTime", resp, "Failure sending request")
}
result, err = client.PutUtcMaxDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutUtcMaxDateTime", resp, "Failure responding to request")
}
return
}
// PutUtcMaxDateTimePreparer prepares the PutUtcMaxDateTime request.
func (client DatetimeClient) PutUtcMaxDateTimePreparer(datetimeBody date.Time) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/max/utc"),
autorest.WithJSON(datetimeBody))
return preparer.Prepare(&http.Request{})
}
// PutUtcMaxDateTimeSender sends the PutUtcMaxDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) PutUtcMaxDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutUtcMaxDateTimeResponder handles the response to the PutUtcMaxDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) PutUtcMaxDateTimeResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutUtcMinDateTime put min datetime value 0001-01-01T00:00:00Z
//
func (client DatetimeClient) PutUtcMinDateTime(datetimeBody date.Time) (result autorest.Response, err error) {
req, err := client.PutUtcMinDateTimePreparer(datetimeBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutUtcMinDateTime", nil , "Failure preparing request")
}
resp, err := client.PutUtcMinDateTimeSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutUtcMinDateTime", resp, "Failure sending request")
}
result, err = client.PutUtcMinDateTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "datetimegroup.DatetimeClient", "PutUtcMinDateTime", resp, "Failure responding to request")
}
return
}
// PutUtcMinDateTimePreparer prepares the PutUtcMinDateTime request.
func (client DatetimeClient) PutUtcMinDateTimePreparer(datetimeBody date.Time) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/datetime/min/utc"),
autorest.WithJSON(datetimeBody))
return preparer.Prepare(&http.Request{})
}
// PutUtcMinDateTimeSender sends the PutUtcMinDateTime request. The method will close the
// http.Response Body if it receives an error.
func (client DatetimeClient) PutUtcMinDateTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutUtcMinDateTimeResponder handles the response to the PutUtcMinDateTime request. The method always
// closes the http.Response Body.
func (client DatetimeClient) PutUtcMinDateTimeResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,27 +0,0 @@
package datetimegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/date"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// Time is
type Time struct {
autorest.Response `json:"-"`
Value *date.Time `json:"value,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package datetimegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "datetimegroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package dictionarygroup implements the Azure ARM Dictionarygroup service
// API version 1.0.0.
//
// Test Infrastructure for AutoRest Swagger BAT
package dictionarygroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Dictionarygroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Dictionarygroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Dictionarygroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,111 +0,0 @@
package dictionarygroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/date"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// SetBase64Url is
type SetBase64Url struct {
autorest.Response `json:"-"`
Value *map[string]*string `json:"value,omitempty"`
}
// SetBool is
type SetBool struct {
autorest.Response `json:"-"`
Value *map[string]*bool `json:"value,omitempty"`
}
// SetByteArray is
type SetByteArray struct {
autorest.Response `json:"-"`
Value *map[string][]byte `json:"value,omitempty"`
}
// SetDate is
type SetDate struct {
autorest.Response `json:"-"`
Value *map[string]*date.Date `json:"value,omitempty"`
}
// SetFloat64 is
type SetFloat64 struct {
autorest.Response `json:"-"`
Value *map[string]*float64 `json:"value,omitempty"`
}
// SetInt32 is
type SetInt32 struct {
autorest.Response `json:"-"`
Value *map[string]*int32 `json:"value,omitempty"`
}
// SetInt64 is
type SetInt64 struct {
autorest.Response `json:"-"`
Value *map[string]*int64 `json:"value,omitempty"`
}
// SetListString is
type SetListString struct {
autorest.Response `json:"-"`
Value *map[string][]string `json:"value,omitempty"`
}
// SetSetString is
type SetSetString struct {
autorest.Response `json:"-"`
Value *map[string]map[string]string `json:"value,omitempty"`
}
// SetString is
type SetString struct {
autorest.Response `json:"-"`
Value *map[string]*string `json:"value,omitempty"`
}
// SetTime is
type SetTime struct {
autorest.Response `json:"-"`
Value *map[string]*date.Time `json:"value,omitempty"`
}
// SetTimeRFC1123 is
type SetTimeRFC1123 struct {
autorest.Response `json:"-"`
Value *map[string]*date.TimeRFC1123 `json:"value,omitempty"`
}
// SetTimeSpan is
type SetTimeSpan struct {
autorest.Response `json:"-"`
Value *map[string]*string `json:"value,omitempty"`
}
// SetWidget is
type SetWidget struct {
autorest.Response `json:"-"`
Value *map[string]*Widget `json:"value,omitempty"`
}
// Widget is
type Widget struct {
Integer *int32 `json:"integer,omitempty"`
String *string `json:"string,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package dictionarygroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "dictionarygroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package durationgroup implements the Azure ARM Durationgroup service API
// version 1.0.0.
//
// Test Infrastructure for AutoRest
package durationgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Durationgroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Durationgroup
DefaultBaseURI = "https://localhost"
)
// ManagementClient is the base client for Durationgroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,229 +0,0 @@
package durationgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// DurationClient is the test Infrastructure for AutoRest
type DurationClient struct {
ManagementClient
}
// NewDurationClient creates an instance of the DurationClient client.
func NewDurationClient() DurationClient {
return NewDurationClientWithBaseURI(DefaultBaseURI, )
}
// NewDurationClientWithBaseURI creates an instance of the DurationClient
// client.
func NewDurationClientWithBaseURI(baseURI string, ) DurationClient {
return DurationClient{NewWithBaseURI(baseURI, )}
}
// GetInvalid get an invalid duration value
func (client DurationClient) GetInvalid() (result TimeSpan, err error) {
req, err := client.GetInvalidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "durationgroup.DurationClient", "GetInvalid", nil , "Failure preparing request")
}
resp, err := client.GetInvalidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "durationgroup.DurationClient", "GetInvalid", resp, "Failure sending request")
}
result, err = client.GetInvalidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "durationgroup.DurationClient", "GetInvalid", resp, "Failure responding to request")
}
return
}
// GetInvalidPreparer prepares the GetInvalid request.
func (client DurationClient) GetInvalidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/duration/invalid"))
return preparer.Prepare(&http.Request{})
}
// GetInvalidSender sends the GetInvalid request. The method will close the
// http.Response Body if it receives an error.
func (client DurationClient) GetInvalidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetInvalidResponder handles the response to the GetInvalid request. The method always
// closes the http.Response Body.
func (client DurationClient) GetInvalidResponder(resp *http.Response) (result TimeSpan, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get null duration value
func (client DurationClient) GetNull() (result TimeSpan, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "durationgroup.DurationClient", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "durationgroup.DurationClient", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "durationgroup.DurationClient", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client DurationClient) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/duration/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client DurationClient) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client DurationClient) GetNullResponder(resp *http.Response) (result TimeSpan, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetPositiveDuration get a positive duration value
func (client DurationClient) GetPositiveDuration() (result TimeSpan, err error) {
req, err := client.GetPositiveDurationPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "durationgroup.DurationClient", "GetPositiveDuration", nil , "Failure preparing request")
}
resp, err := client.GetPositiveDurationSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "durationgroup.DurationClient", "GetPositiveDuration", resp, "Failure sending request")
}
result, err = client.GetPositiveDurationResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "durationgroup.DurationClient", "GetPositiveDuration", resp, "Failure responding to request")
}
return
}
// GetPositiveDurationPreparer prepares the GetPositiveDuration request.
func (client DurationClient) GetPositiveDurationPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/duration/positiveduration"))
return preparer.Prepare(&http.Request{})
}
// GetPositiveDurationSender sends the GetPositiveDuration request. The method will close the
// http.Response Body if it receives an error.
func (client DurationClient) GetPositiveDurationSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetPositiveDurationResponder handles the response to the GetPositiveDuration request. The method always
// closes the http.Response Body.
func (client DurationClient) GetPositiveDurationResponder(resp *http.Response) (result TimeSpan, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutPositiveDuration put a positive duration value
//
func (client DurationClient) PutPositiveDuration(durationBody string) (result autorest.Response, err error) {
req, err := client.PutPositiveDurationPreparer(durationBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "durationgroup.DurationClient", "PutPositiveDuration", nil , "Failure preparing request")
}
resp, err := client.PutPositiveDurationSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "durationgroup.DurationClient", "PutPositiveDuration", resp, "Failure sending request")
}
result, err = client.PutPositiveDurationResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "durationgroup.DurationClient", "PutPositiveDuration", resp, "Failure responding to request")
}
return
}
// PutPositiveDurationPreparer prepares the PutPositiveDuration request.
func (client DurationClient) PutPositiveDurationPreparer(durationBody string) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/duration/positiveduration"),
autorest.WithJSON(durationBody))
return preparer.Prepare(&http.Request{})
}
// PutPositiveDurationSender sends the PutPositiveDuration request. The method will close the
// http.Response Body if it receives an error.
func (client DurationClient) PutPositiveDurationSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutPositiveDurationResponder handles the response to the PutPositiveDuration request. The method always
// closes the http.Response Body.
func (client DurationClient) PutPositiveDurationResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,26 +0,0 @@
package durationgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// TimeSpan is
type TimeSpan struct {
autorest.Response `json:"-"`
Value *string `json:"value,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package durationgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "durationgroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package filegroup implements the Azure ARM Filegroup service API version
// 1.0.0.
//
// Test Infrastructure for AutoRest Swagger BAT
package filegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Filegroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Filegroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Filegroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,174 +0,0 @@
package filegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// FilesClient is the test Infrastructure for AutoRest Swagger BAT
type FilesClient struct {
ManagementClient
}
// NewFilesClient creates an instance of the FilesClient client.
func NewFilesClient() FilesClient {
return NewFilesClientWithBaseURI(DefaultBaseURI, )
}
// NewFilesClientWithBaseURI creates an instance of the FilesClient client.
func NewFilesClientWithBaseURI(baseURI string, ) FilesClient {
return FilesClient{NewWithBaseURI(baseURI, )}
}
// GetEmptyFile get empty file
func (client FilesClient) GetEmptyFile() (result ReadCloser, err error) {
req, err := client.GetEmptyFilePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "filegroup.FilesClient", "GetEmptyFile", nil , "Failure preparing request")
}
resp, err := client.GetEmptyFileSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "filegroup.FilesClient", "GetEmptyFile", resp, "Failure sending request")
}
result, err = client.GetEmptyFileResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "filegroup.FilesClient", "GetEmptyFile", resp, "Failure responding to request")
}
return
}
// GetEmptyFilePreparer prepares the GetEmptyFile request.
func (client FilesClient) GetEmptyFilePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/files/stream/empty"))
return preparer.Prepare(&http.Request{})
}
// GetEmptyFileSender sends the GetEmptyFile request. The method will close the
// http.Response Body if it receives an error.
func (client FilesClient) GetEmptyFileSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetEmptyFileResponder handles the response to the GetEmptyFile request. The method always
// closes the http.Response Body.
func (client FilesClient) GetEmptyFileResponder(resp *http.Response) (result ReadCloser, err error) {
result.Value = &resp.Body
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK))
result.Response = autorest.Response{Response: resp}
return
}
// GetFile get file
func (client FilesClient) GetFile() (result ReadCloser, err error) {
req, err := client.GetFilePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "filegroup.FilesClient", "GetFile", nil , "Failure preparing request")
}
resp, err := client.GetFileSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "filegroup.FilesClient", "GetFile", resp, "Failure sending request")
}
result, err = client.GetFileResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "filegroup.FilesClient", "GetFile", resp, "Failure responding to request")
}
return
}
// GetFilePreparer prepares the GetFile request.
func (client FilesClient) GetFilePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/files/stream/nonempty"))
return preparer.Prepare(&http.Request{})
}
// GetFileSender sends the GetFile request. The method will close the
// http.Response Body if it receives an error.
func (client FilesClient) GetFileSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetFileResponder handles the response to the GetFile request. The method always
// closes the http.Response Body.
func (client FilesClient) GetFileResponder(resp *http.Response) (result ReadCloser, err error) {
result.Value = &resp.Body
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK))
result.Response = autorest.Response{Response: resp}
return
}
// GetFileLarge get a large file
func (client FilesClient) GetFileLarge() (result ReadCloser, err error) {
req, err := client.GetFileLargePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "filegroup.FilesClient", "GetFileLarge", nil , "Failure preparing request")
}
resp, err := client.GetFileLargeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "filegroup.FilesClient", "GetFileLarge", resp, "Failure sending request")
}
result, err = client.GetFileLargeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "filegroup.FilesClient", "GetFileLarge", resp, "Failure responding to request")
}
return
}
// GetFileLargePreparer prepares the GetFileLarge request.
func (client FilesClient) GetFileLargePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/files/stream/verylarge"))
return preparer.Prepare(&http.Request{})
}
// GetFileLargeSender sends the GetFileLarge request. The method will close the
// http.Response Body if it receives an error.
func (client FilesClient) GetFileLargeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetFileLargeResponder handles the response to the GetFileLarge request. The method always
// closes the http.Response Body.
func (client FilesClient) GetFileLargeResponder(resp *http.Response) (result ReadCloser, err error) {
result.Value = &resp.Body
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK))
result.Response = autorest.Response{Response: resp}
return
}

Просмотреть файл

@ -1,27 +0,0 @@
package filegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"io"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// ReadCloser is
type ReadCloser struct {
autorest.Response `json:"-"`
Value *io.ReadCloser `json:"value,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package filegroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "filegroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package formdatagroup implements the Azure ARM Formdatagroup service API
// version 1.0.0.
//
// Test Infrastructure for AutoRest Swagger BAT
package formdatagroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Formdatagroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Formdatagroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Formdatagroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,142 +0,0 @@
package formdatagroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"io"
"net/http"
)
// FormdataClient is the test Infrastructure for AutoRest Swagger BAT
type FormdataClient struct {
ManagementClient
}
// NewFormdataClient creates an instance of the FormdataClient client.
func NewFormdataClient() FormdataClient {
return NewFormdataClientWithBaseURI(DefaultBaseURI, )
}
// NewFormdataClientWithBaseURI creates an instance of the FormdataClient
// client.
func NewFormdataClientWithBaseURI(baseURI string, ) FormdataClient {
return FormdataClient{NewWithBaseURI(baseURI, )}
}
// UploadFile upload file
//
// fileContent is file to upload. fileContent will be closed upon successful
// return. Callers should ensure closure when receiving an error.fileName is
// file name to upload. Name has to be spelled exactly as written here.
func (client FormdataClient) UploadFile(fileContent io.ReadCloser, fileName string) (result ReadCloser, err error) {
req, err := client.UploadFilePreparer(fileContent, fileName)
if err != nil {
return result, autorest.NewErrorWithError(err, "formdatagroup.FormdataClient", "UploadFile", nil , "Failure preparing request")
}
resp, err := client.UploadFileSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "formdatagroup.FormdataClient", "UploadFile", resp, "Failure sending request")
}
result, err = client.UploadFileResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "formdatagroup.FormdataClient", "UploadFile", resp, "Failure responding to request")
}
return
}
// UploadFilePreparer prepares the UploadFile request.
func (client FormdataClient) UploadFilePreparer(fileContent io.ReadCloser, fileName string) (*http.Request, error) {
formDataParameters := map[string]interface{} {
"fileContent": fileContent,
"fileName": fileName,
}
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/formdata/stream/uploadfile"),
autorest.WithMultiPartFormData(formDataParameters))
return preparer.Prepare(&http.Request{})
}
// UploadFileSender sends the UploadFile request. The method will close the
// http.Response Body if it receives an error.
func (client FormdataClient) UploadFileSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// UploadFileResponder handles the response to the UploadFile request. The method always
// closes the http.Response Body.
func (client FormdataClient) UploadFileResponder(resp *http.Response) (result ReadCloser, err error) {
result.Value = &resp.Body
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK))
result.Response = autorest.Response{Response: resp}
return
}
// UploadFileViaBody upload file
//
// fileContent is file to upload. fileContent will be closed upon successful
// return. Callers should ensure closure when receiving an error.
func (client FormdataClient) UploadFileViaBody(fileContent io.ReadCloser) (result ReadCloser, err error) {
req, err := client.UploadFileViaBodyPreparer(fileContent)
if err != nil {
return result, autorest.NewErrorWithError(err, "formdatagroup.FormdataClient", "UploadFileViaBody", nil , "Failure preparing request")
}
resp, err := client.UploadFileViaBodySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "formdatagroup.FormdataClient", "UploadFileViaBody", resp, "Failure sending request")
}
result, err = client.UploadFileViaBodyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "formdatagroup.FormdataClient", "UploadFileViaBody", resp, "Failure responding to request")
}
return
}
// UploadFileViaBodyPreparer prepares the UploadFileViaBody request.
func (client FormdataClient) UploadFileViaBodyPreparer(fileContent io.ReadCloser) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/formdata/stream/uploadfile"),
autorest.WithFile(fileContent))
return preparer.Prepare(&http.Request{})
}
// UploadFileViaBodySender sends the UploadFileViaBody request. The method will close the
// http.Response Body if it receives an error.
func (client FormdataClient) UploadFileViaBodySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// UploadFileViaBodyResponder handles the response to the UploadFileViaBody request. The method always
// closes the http.Response Body.
func (client FormdataClient) UploadFileViaBodyResponder(resp *http.Response) (result ReadCloser, err error) {
result.Value = &resp.Body
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK))
result.Response = autorest.Response{Response: resp}
return
}

Просмотреть файл

@ -1,27 +0,0 @@
package formdatagroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"io"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// ReadCloser is
type ReadCloser struct {
autorest.Response `json:"-"`
Value *io.ReadCloser `json:"value,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package formdatagroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "formdatagroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package integergroup implements the Azure ARM Integergroup service API
// version 1.0.0.
//
// Test Infrastructure for AutoRest
package integergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Integergroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Integergroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Integergroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,727 +0,0 @@
package integergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// IntGroupClient is the test Infrastructure for AutoRest
type IntGroupClient struct {
ManagementClient
}
// NewIntGroupClient creates an instance of the IntGroupClient client.
func NewIntGroupClient() IntGroupClient {
return NewIntGroupClientWithBaseURI(DefaultBaseURI, )
}
// NewIntGroupClientWithBaseURI creates an instance of the IntGroupClient
// client.
func NewIntGroupClientWithBaseURI(baseURI string, ) IntGroupClient {
return IntGroupClient{NewWithBaseURI(baseURI, )}
}
// GetInvalid get invalid Int value
func (client IntGroupClient) GetInvalid() (result Int32, err error) {
req, err := client.GetInvalidPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetInvalid", nil , "Failure preparing request")
}
resp, err := client.GetInvalidSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetInvalid", resp, "Failure sending request")
}
result, err = client.GetInvalidResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetInvalid", resp, "Failure responding to request")
}
return
}
// GetInvalidPreparer prepares the GetInvalid request.
func (client IntGroupClient) GetInvalidPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/invalid"))
return preparer.Prepare(&http.Request{})
}
// GetInvalidSender sends the GetInvalid request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) GetInvalidSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetInvalidResponder handles the response to the GetInvalid request. The method always
// closes the http.Response Body.
func (client IntGroupClient) GetInvalidResponder(resp *http.Response) (result Int32, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetInvalidUnixTime get invalid Unix time value
func (client IntGroupClient) GetInvalidUnixTime() (result UnixTime, err error) {
req, err := client.GetInvalidUnixTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetInvalidUnixTime", nil , "Failure preparing request")
}
resp, err := client.GetInvalidUnixTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetInvalidUnixTime", resp, "Failure sending request")
}
result, err = client.GetInvalidUnixTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetInvalidUnixTime", resp, "Failure responding to request")
}
return
}
// GetInvalidUnixTimePreparer prepares the GetInvalidUnixTime request.
func (client IntGroupClient) GetInvalidUnixTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/invalidunixtime"))
return preparer.Prepare(&http.Request{})
}
// GetInvalidUnixTimeSender sends the GetInvalidUnixTime request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) GetInvalidUnixTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetInvalidUnixTimeResponder handles the response to the GetInvalidUnixTime request. The method always
// closes the http.Response Body.
func (client IntGroupClient) GetInvalidUnixTimeResponder(resp *http.Response) (result UnixTime, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get null Int value
func (client IntGroupClient) GetNull() (result Int32, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client IntGroupClient) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client IntGroupClient) GetNullResponder(resp *http.Response) (result Int32, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNullUnixTime get null Unix time value
func (client IntGroupClient) GetNullUnixTime() (result UnixTime, err error) {
req, err := client.GetNullUnixTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetNullUnixTime", nil , "Failure preparing request")
}
resp, err := client.GetNullUnixTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetNullUnixTime", resp, "Failure sending request")
}
result, err = client.GetNullUnixTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetNullUnixTime", resp, "Failure responding to request")
}
return
}
// GetNullUnixTimePreparer prepares the GetNullUnixTime request.
func (client IntGroupClient) GetNullUnixTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/nullunixtime"))
return preparer.Prepare(&http.Request{})
}
// GetNullUnixTimeSender sends the GetNullUnixTime request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) GetNullUnixTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullUnixTimeResponder handles the response to the GetNullUnixTime request. The method always
// closes the http.Response Body.
func (client IntGroupClient) GetNullUnixTimeResponder(resp *http.Response) (result UnixTime, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetOverflowInt32 get overflow Int32 value
func (client IntGroupClient) GetOverflowInt32() (result Int32, err error) {
req, err := client.GetOverflowInt32Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetOverflowInt32", nil , "Failure preparing request")
}
resp, err := client.GetOverflowInt32Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetOverflowInt32", resp, "Failure sending request")
}
result, err = client.GetOverflowInt32Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetOverflowInt32", resp, "Failure responding to request")
}
return
}
// GetOverflowInt32Preparer prepares the GetOverflowInt32 request.
func (client IntGroupClient) GetOverflowInt32Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/overflowint32"))
return preparer.Prepare(&http.Request{})
}
// GetOverflowInt32Sender sends the GetOverflowInt32 request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) GetOverflowInt32Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetOverflowInt32Responder handles the response to the GetOverflowInt32 request. The method always
// closes the http.Response Body.
func (client IntGroupClient) GetOverflowInt32Responder(resp *http.Response) (result Int32, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetOverflowInt64 get overflow Int64 value
func (client IntGroupClient) GetOverflowInt64() (result Int64, err error) {
req, err := client.GetOverflowInt64Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetOverflowInt64", nil , "Failure preparing request")
}
resp, err := client.GetOverflowInt64Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetOverflowInt64", resp, "Failure sending request")
}
result, err = client.GetOverflowInt64Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetOverflowInt64", resp, "Failure responding to request")
}
return
}
// GetOverflowInt64Preparer prepares the GetOverflowInt64 request.
func (client IntGroupClient) GetOverflowInt64Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/overflowint64"))
return preparer.Prepare(&http.Request{})
}
// GetOverflowInt64Sender sends the GetOverflowInt64 request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) GetOverflowInt64Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetOverflowInt64Responder handles the response to the GetOverflowInt64 request. The method always
// closes the http.Response Body.
func (client IntGroupClient) GetOverflowInt64Responder(resp *http.Response) (result Int64, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUnderflowInt32 get underflow Int32 value
func (client IntGroupClient) GetUnderflowInt32() (result Int32, err error) {
req, err := client.GetUnderflowInt32Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetUnderflowInt32", nil , "Failure preparing request")
}
resp, err := client.GetUnderflowInt32Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetUnderflowInt32", resp, "Failure sending request")
}
result, err = client.GetUnderflowInt32Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetUnderflowInt32", resp, "Failure responding to request")
}
return
}
// GetUnderflowInt32Preparer prepares the GetUnderflowInt32 request.
func (client IntGroupClient) GetUnderflowInt32Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/underflowint32"))
return preparer.Prepare(&http.Request{})
}
// GetUnderflowInt32Sender sends the GetUnderflowInt32 request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) GetUnderflowInt32Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUnderflowInt32Responder handles the response to the GetUnderflowInt32 request. The method always
// closes the http.Response Body.
func (client IntGroupClient) GetUnderflowInt32Responder(resp *http.Response) (result Int32, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUnderflowInt64 get underflow Int64 value
func (client IntGroupClient) GetUnderflowInt64() (result Int64, err error) {
req, err := client.GetUnderflowInt64Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetUnderflowInt64", nil , "Failure preparing request")
}
resp, err := client.GetUnderflowInt64Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetUnderflowInt64", resp, "Failure sending request")
}
result, err = client.GetUnderflowInt64Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetUnderflowInt64", resp, "Failure responding to request")
}
return
}
// GetUnderflowInt64Preparer prepares the GetUnderflowInt64 request.
func (client IntGroupClient) GetUnderflowInt64Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/underflowint64"))
return preparer.Prepare(&http.Request{})
}
// GetUnderflowInt64Sender sends the GetUnderflowInt64 request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) GetUnderflowInt64Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUnderflowInt64Responder handles the response to the GetUnderflowInt64 request. The method always
// closes the http.Response Body.
func (client IntGroupClient) GetUnderflowInt64Responder(resp *http.Response) (result Int64, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetUnixTime get datetime encoded as Unix time value
func (client IntGroupClient) GetUnixTime() (result UnixTime, err error) {
req, err := client.GetUnixTimePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetUnixTime", nil , "Failure preparing request")
}
resp, err := client.GetUnixTimeSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetUnixTime", resp, "Failure sending request")
}
result, err = client.GetUnixTimeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "GetUnixTime", resp, "Failure responding to request")
}
return
}
// GetUnixTimePreparer prepares the GetUnixTime request.
func (client IntGroupClient) GetUnixTimePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/unixtime"))
return preparer.Prepare(&http.Request{})
}
// GetUnixTimeSender sends the GetUnixTime request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) GetUnixTimeSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetUnixTimeResponder handles the response to the GetUnixTime request. The method always
// closes the http.Response Body.
func (client IntGroupClient) GetUnixTimeResponder(resp *http.Response) (result UnixTime, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutMax32 put max int32 value
//
func (client IntGroupClient) PutMax32(intBody int32) (result autorest.Response, err error) {
req, err := client.PutMax32Preparer(intBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMax32", nil , "Failure preparing request")
}
resp, err := client.PutMax32Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMax32", resp, "Failure sending request")
}
result, err = client.PutMax32Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMax32", resp, "Failure responding to request")
}
return
}
// PutMax32Preparer prepares the PutMax32 request.
func (client IntGroupClient) PutMax32Preparer(intBody int32) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/max/32"),
autorest.WithJSON(intBody))
return preparer.Prepare(&http.Request{})
}
// PutMax32Sender sends the PutMax32 request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) PutMax32Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutMax32Responder handles the response to the PutMax32 request. The method always
// closes the http.Response Body.
func (client IntGroupClient) PutMax32Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutMax64 put max int64 value
//
func (client IntGroupClient) PutMax64(intBody int64) (result autorest.Response, err error) {
req, err := client.PutMax64Preparer(intBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMax64", nil , "Failure preparing request")
}
resp, err := client.PutMax64Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMax64", resp, "Failure sending request")
}
result, err = client.PutMax64Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMax64", resp, "Failure responding to request")
}
return
}
// PutMax64Preparer prepares the PutMax64 request.
func (client IntGroupClient) PutMax64Preparer(intBody int64) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/max/64"),
autorest.WithJSON(intBody))
return preparer.Prepare(&http.Request{})
}
// PutMax64Sender sends the PutMax64 request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) PutMax64Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutMax64Responder handles the response to the PutMax64 request. The method always
// closes the http.Response Body.
func (client IntGroupClient) PutMax64Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutMin32 put min int32 value
//
func (client IntGroupClient) PutMin32(intBody int32) (result autorest.Response, err error) {
req, err := client.PutMin32Preparer(intBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMin32", nil , "Failure preparing request")
}
resp, err := client.PutMin32Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMin32", resp, "Failure sending request")
}
result, err = client.PutMin32Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMin32", resp, "Failure responding to request")
}
return
}
// PutMin32Preparer prepares the PutMin32 request.
func (client IntGroupClient) PutMin32Preparer(intBody int32) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/min/32"),
autorest.WithJSON(intBody))
return preparer.Prepare(&http.Request{})
}
// PutMin32Sender sends the PutMin32 request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) PutMin32Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutMin32Responder handles the response to the PutMin32 request. The method always
// closes the http.Response Body.
func (client IntGroupClient) PutMin32Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutMin64 put min int64 value
//
func (client IntGroupClient) PutMin64(intBody int64) (result autorest.Response, err error) {
req, err := client.PutMin64Preparer(intBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMin64", nil , "Failure preparing request")
}
resp, err := client.PutMin64Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMin64", resp, "Failure sending request")
}
result, err = client.PutMin64Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutMin64", resp, "Failure responding to request")
}
return
}
// PutMin64Preparer prepares the PutMin64 request.
func (client IntGroupClient) PutMin64Preparer(intBody int64) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/min/64"),
autorest.WithJSON(intBody))
return preparer.Prepare(&http.Request{})
}
// PutMin64Sender sends the PutMin64 request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) PutMin64Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutMin64Responder handles the response to the PutMin64 request. The method always
// closes the http.Response Body.
func (client IntGroupClient) PutMin64Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutUnixTimeDate put datetime encoded as Unix time
//
func (client IntGroupClient) PutUnixTimeDate(intBody string) (result autorest.Response, err error) {
req, err := client.PutUnixTimeDatePreparer(intBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutUnixTimeDate", nil , "Failure preparing request")
}
resp, err := client.PutUnixTimeDateSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutUnixTimeDate", resp, "Failure sending request")
}
result, err = client.PutUnixTimeDateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "integergroup.IntGroupClient", "PutUnixTimeDate", resp, "Failure responding to request")
}
return
}
// PutUnixTimeDatePreparer prepares the PutUnixTimeDate request.
func (client IntGroupClient) PutUnixTimeDatePreparer(intBody string) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/int/unixtime"),
autorest.WithJSON(intBody))
return preparer.Prepare(&http.Request{})
}
// PutUnixTimeDateSender sends the PutUnixTimeDate request. The method will close the
// http.Response Body if it receives an error.
func (client IntGroupClient) PutUnixTimeDateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutUnixTimeDateResponder handles the response to the PutUnixTimeDate request. The method always
// closes the http.Response Body.
func (client IntGroupClient) PutUnixTimeDateResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,38 +0,0 @@
package integergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// Int32 is
type Int32 struct {
autorest.Response `json:"-"`
Value *int32 `json:"value,omitempty"`
}
// Int64 is
type Int64 struct {
autorest.Response `json:"-"`
Value *int64 `json:"value,omitempty"`
}
// UnixTime is
type UnixTime struct {
autorest.Response `json:"-"`
Value *string `json:"value,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package integergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "integergroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package numbergroup implements the Azure ARM Numbergroup service API
// version 1.0.0.
//
// Test Infrastructure for AutoRest
package numbergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Numbergroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Numbergroup
DefaultBaseURI = "https://localhost"
)
// ManagementClient is the base client for Numbergroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,33 +0,0 @@
package numbergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/shopspring/decimal"
)
// Decimal is
type Decimal struct {
autorest.Response `json:"-"`
Value *decimal.Decimal `json:"value,omitempty"`
}
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// Float64 is
type Float64 struct {
autorest.Response `json:"-"`
Value *float64 `json:"value,omitempty"`
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,33 +0,0 @@
package numbergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "numbergroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package stringgroup implements the Azure ARM Stringgroup service API
// version 1.0.0.
//
// Test Infrastructure for AutoRest Swagger BAT
package stringgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Stringgroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Stringgroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Stringgroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Просмотреть файл

@ -1,345 +0,0 @@
package stringgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
// EnumClient is the test Infrastructure for AutoRest Swagger BAT
type EnumClient struct {
ManagementClient
}
// NewEnumClient creates an instance of the EnumClient client.
func NewEnumClient() EnumClient {
return NewEnumClientWithBaseURI(DefaultBaseURI, )
}
// NewEnumClientWithBaseURI creates an instance of the EnumClient client.
func NewEnumClientWithBaseURI(baseURI string, ) EnumClient {
return EnumClient{NewWithBaseURI(baseURI, )}
}
// GetNotExpandable get enum value 'red color' from enumeration of 'red
// color', 'green-color', 'blue_color'.
func (client EnumClient) GetNotExpandable() (result String, err error) {
req, err := client.GetNotExpandablePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "GetNotExpandable", nil , "Failure preparing request")
}
resp, err := client.GetNotExpandableSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "GetNotExpandable", resp, "Failure sending request")
}
result, err = client.GetNotExpandableResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.EnumClient", "GetNotExpandable", resp, "Failure responding to request")
}
return
}
// GetNotExpandablePreparer prepares the GetNotExpandable request.
func (client EnumClient) GetNotExpandablePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/enum/notExpandable"))
return preparer.Prepare(&http.Request{})
}
// GetNotExpandableSender sends the GetNotExpandable request. The method will close the
// http.Response Body if it receives an error.
func (client EnumClient) GetNotExpandableSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNotExpandableResponder handles the response to the GetNotExpandable request. The method always
// closes the http.Response Body.
func (client EnumClient) GetNotExpandableResponder(resp *http.Response) (result String, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetReferenced get enum value 'red color' from enumeration of 'red color',
// 'green-color', 'blue_color'.
func (client EnumClient) GetReferenced() (result String, err error) {
req, err := client.GetReferencedPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "GetReferenced", nil , "Failure preparing request")
}
resp, err := client.GetReferencedSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "GetReferenced", resp, "Failure sending request")
}
result, err = client.GetReferencedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.EnumClient", "GetReferenced", resp, "Failure responding to request")
}
return
}
// GetReferencedPreparer prepares the GetReferenced request.
func (client EnumClient) GetReferencedPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/enum/Referenced"))
return preparer.Prepare(&http.Request{})
}
// GetReferencedSender sends the GetReferenced request. The method will close the
// http.Response Body if it receives an error.
func (client EnumClient) GetReferencedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetReferencedResponder handles the response to the GetReferenced request. The method always
// closes the http.Response Body.
func (client EnumClient) GetReferencedResponder(resp *http.Response) (result String, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetReferencedConstant get value 'green-color' from the constant.
func (client EnumClient) GetReferencedConstant() (result RefColorConstant, err error) {
req, err := client.GetReferencedConstantPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "GetReferencedConstant", nil , "Failure preparing request")
}
resp, err := client.GetReferencedConstantSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "GetReferencedConstant", resp, "Failure sending request")
}
result, err = client.GetReferencedConstantResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.EnumClient", "GetReferencedConstant", resp, "Failure responding to request")
}
return
}
// GetReferencedConstantPreparer prepares the GetReferencedConstant request.
func (client EnumClient) GetReferencedConstantPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/enum/ReferencedConstant"))
return preparer.Prepare(&http.Request{})
}
// GetReferencedConstantSender sends the GetReferencedConstant request. The method will close the
// http.Response Body if it receives an error.
func (client EnumClient) GetReferencedConstantSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetReferencedConstantResponder handles the response to the GetReferencedConstant request. The method always
// closes the http.Response Body.
func (client EnumClient) GetReferencedConstantResponder(resp *http.Response) (result RefColorConstant, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutNotExpandable sends value 'red color' from enumeration of 'red color',
// 'green-color', 'blue_color'
//
// stringBody is possible values include: 'red color', 'green-color',
// 'blue_color'
func (client EnumClient) PutNotExpandable(stringBody Colors) (result autorest.Response, err error) {
req, err := client.PutNotExpandablePreparer(stringBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutNotExpandable", nil , "Failure preparing request")
}
resp, err := client.PutNotExpandableSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutNotExpandable", resp, "Failure sending request")
}
result, err = client.PutNotExpandableResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutNotExpandable", resp, "Failure responding to request")
}
return
}
// PutNotExpandablePreparer prepares the PutNotExpandable request.
func (client EnumClient) PutNotExpandablePreparer(stringBody Colors) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/enum/notExpandable"),
autorest.WithJSON(stringBody))
return preparer.Prepare(&http.Request{})
}
// PutNotExpandableSender sends the PutNotExpandable request. The method will close the
// http.Response Body if it receives an error.
func (client EnumClient) PutNotExpandableSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutNotExpandableResponder handles the response to the PutNotExpandable request. The method always
// closes the http.Response Body.
func (client EnumClient) PutNotExpandableResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutReferenced sends value 'red color' from enumeration of 'red color',
// 'green-color', 'blue_color'
//
// enumStringBody is possible values include: 'red color', 'green-color',
// 'blue_color'
func (client EnumClient) PutReferenced(enumStringBody Colors) (result autorest.Response, err error) {
req, err := client.PutReferencedPreparer(enumStringBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutReferenced", nil , "Failure preparing request")
}
resp, err := client.PutReferencedSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutReferenced", resp, "Failure sending request")
}
result, err = client.PutReferencedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutReferenced", resp, "Failure responding to request")
}
return
}
// PutReferencedPreparer prepares the PutReferenced request.
func (client EnumClient) PutReferencedPreparer(enumStringBody Colors) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/enum/Referenced"),
autorest.WithJSON(enumStringBody))
return preparer.Prepare(&http.Request{})
}
// PutReferencedSender sends the PutReferenced request. The method will close the
// http.Response Body if it receives an error.
func (client EnumClient) PutReferencedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutReferencedResponder handles the response to the PutReferenced request. The method always
// closes the http.Response Body.
func (client EnumClient) PutReferencedResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutReferencedConstant sends value 'green-color' from a constant
//
func (client EnumClient) PutReferencedConstant(enumStringBody RefColorConstant) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{enumStringBody,
[]validation.Constraint{ {"ColorConstant", validation.Null, true, nil }}}}); err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutReferencedConstant", nil , "Validation error ")
}
req, err := client.PutReferencedConstantPreparer(enumStringBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutReferencedConstant", nil , "Failure preparing request")
}
resp, err := client.PutReferencedConstantSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutReferencedConstant", resp, "Failure sending request")
}
result, err = client.PutReferencedConstantResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.EnumClient", "PutReferencedConstant", resp, "Failure responding to request")
}
return
}
// PutReferencedConstantPreparer prepares the PutReferencedConstant request.
func (client EnumClient) PutReferencedConstantPreparer(enumStringBody RefColorConstant) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/enum/ReferencedConstant"),
autorest.WithJSON(enumStringBody))
return preparer.Prepare(&http.Request{})
}
// PutReferencedConstantSender sends the PutReferencedConstant request. The method will close the
// http.Response Body if it receives an error.
func (client EnumClient) PutReferencedConstantSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutReferencedConstantResponder handles the response to the PutReferencedConstant request. The method always
// closes the http.Response Body.
func (client EnumClient) PutReferencedConstantResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,52 +0,0 @@
package stringgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
// Colors enumerates the values for colors.
type Colors string
const (
// BlueColor specifies the blue color state for colors.
BlueColor Colors = "blue_color"
// GreenColor specifies the green color state for colors.
GreenColor Colors = "green-color"
// Redcolor specifies the redcolor state for colors.
Redcolor Colors = "red color"
)
// Base64Url is
type Base64Url struct {
autorest.Response `json:"-"`
Value *string `json:"value,omitempty"`
}
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// RefColorConstant is
type RefColorConstant struct {
autorest.Response `json:"-"`
ColorConstant *string `json:"ColorConstant,omitempty"`
Field1 *string `json:"field1,omitempty"`
}
// String is
type String struct {
autorest.Response `json:"-"`
Value *string `json:"value,omitempty"`
}

Просмотреть файл

@ -1,695 +0,0 @@
package stringgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// OperationsClient is the test Infrastructure for AutoRest Swagger BAT
type OperationsClient struct {
ManagementClient
}
// NewOperationsClient creates an instance of the OperationsClient client.
func NewOperationsClient() OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, )
}
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
// client.
func NewOperationsClientWithBaseURI(baseURI string, ) OperationsClient {
return OperationsClient{NewWithBaseURI(baseURI, )}
}
// GetBase64Encoded get value that is base64 encoded
func (client OperationsClient) GetBase64Encoded() (result Base64Url, err error) {
req, err := client.GetBase64EncodedPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetBase64Encoded", nil , "Failure preparing request")
}
resp, err := client.GetBase64EncodedSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetBase64Encoded", resp, "Failure sending request")
}
result, err = client.GetBase64EncodedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetBase64Encoded", resp, "Failure responding to request")
}
return
}
// GetBase64EncodedPreparer prepares the GetBase64Encoded request.
func (client OperationsClient) GetBase64EncodedPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/base64Encoding"))
return preparer.Prepare(&http.Request{})
}
// GetBase64EncodedSender sends the GetBase64Encoded request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetBase64EncodedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetBase64EncodedResponder handles the response to the GetBase64Encoded request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetBase64EncodedResponder(resp *http.Response) (result Base64Url, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetBase64URLEncoded get value that is base64url encoded
func (client OperationsClient) GetBase64URLEncoded() (result Base64Url, err error) {
req, err := client.GetBase64URLEncodedPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetBase64URLEncoded", nil , "Failure preparing request")
}
resp, err := client.GetBase64URLEncodedSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetBase64URLEncoded", resp, "Failure sending request")
}
result, err = client.GetBase64URLEncodedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetBase64URLEncoded", resp, "Failure responding to request")
}
return
}
// GetBase64URLEncodedPreparer prepares the GetBase64URLEncoded request.
func (client OperationsClient) GetBase64URLEncodedPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/base64UrlEncoding"))
return preparer.Prepare(&http.Request{})
}
// GetBase64URLEncodedSender sends the GetBase64URLEncoded request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetBase64URLEncodedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetBase64URLEncodedResponder handles the response to the GetBase64URLEncoded request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetBase64URLEncodedResponder(resp *http.Response) (result Base64Url, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetEmpty get empty string value value ''
func (client OperationsClient) GetEmpty() (result String, err error) {
req, err := client.GetEmptyPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetEmpty", nil , "Failure preparing request")
}
resp, err := client.GetEmptySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetEmpty", resp, "Failure sending request")
}
result, err = client.GetEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetEmpty", resp, "Failure responding to request")
}
return
}
// GetEmptyPreparer prepares the GetEmpty request.
func (client OperationsClient) GetEmptyPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/empty"))
return preparer.Prepare(&http.Request{})
}
// GetEmptySender sends the GetEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetEmptyResponder handles the response to the GetEmpty request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetEmptyResponder(resp *http.Response) (result String, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetMbcs get mbcs string value
// '啊齄丂狛狜隣郎隣兀﨩ˊ▇█〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€ '
func (client OperationsClient) GetMbcs() (result String, err error) {
req, err := client.GetMbcsPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetMbcs", nil , "Failure preparing request")
}
resp, err := client.GetMbcsSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetMbcs", resp, "Failure sending request")
}
result, err = client.GetMbcsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetMbcs", resp, "Failure responding to request")
}
return
}
// GetMbcsPreparer prepares the GetMbcs request.
func (client OperationsClient) GetMbcsPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/mbcs"))
return preparer.Prepare(&http.Request{})
}
// GetMbcsSender sends the GetMbcs request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetMbcsSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetMbcsResponder handles the response to the GetMbcs request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetMbcsResponder(resp *http.Response) (result String, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNotProvided get String value when no string value is sent in response
// payload
func (client OperationsClient) GetNotProvided() (result String, err error) {
req, err := client.GetNotProvidedPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetNotProvided", nil , "Failure preparing request")
}
resp, err := client.GetNotProvidedSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetNotProvided", resp, "Failure sending request")
}
result, err = client.GetNotProvidedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetNotProvided", resp, "Failure responding to request")
}
return
}
// GetNotProvidedPreparer prepares the GetNotProvided request.
func (client OperationsClient) GetNotProvidedPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/notProvided"))
return preparer.Prepare(&http.Request{})
}
// GetNotProvidedSender sends the GetNotProvided request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetNotProvidedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNotProvidedResponder handles the response to the GetNotProvided request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetNotProvidedResponder(resp *http.Response) (result String, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNull get null string value value
func (client OperationsClient) GetNull() (result String, err error) {
req, err := client.GetNullPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetNull", nil , "Failure preparing request")
}
resp, err := client.GetNullSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetNull", resp, "Failure sending request")
}
result, err = client.GetNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetNull", resp, "Failure responding to request")
}
return
}
// GetNullPreparer prepares the GetNull request.
func (client OperationsClient) GetNullPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/null"))
return preparer.Prepare(&http.Request{})
}
// GetNullSender sends the GetNull request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullResponder handles the response to the GetNull request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetNullResponder(resp *http.Response) (result String, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNullBase64URLEncoded get null value that is expected to be base64url
// encoded
func (client OperationsClient) GetNullBase64URLEncoded() (result Base64Url, err error) {
req, err := client.GetNullBase64URLEncodedPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetNullBase64URLEncoded", nil , "Failure preparing request")
}
resp, err := client.GetNullBase64URLEncodedSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetNullBase64URLEncoded", resp, "Failure sending request")
}
result, err = client.GetNullBase64URLEncodedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetNullBase64URLEncoded", resp, "Failure responding to request")
}
return
}
// GetNullBase64URLEncodedPreparer prepares the GetNullBase64URLEncoded request.
func (client OperationsClient) GetNullBase64URLEncodedPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/nullBase64UrlEncoding"))
return preparer.Prepare(&http.Request{})
}
// GetNullBase64URLEncodedSender sends the GetNullBase64URLEncoded request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetNullBase64URLEncodedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNullBase64URLEncodedResponder handles the response to the GetNullBase64URLEncoded request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetNullBase64URLEncodedResponder(resp *http.Response) (result Base64Url, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetWhitespace get string value with leading and trailing whitespace
// '<tab><space><space>Now is the time for all good men to come to the aid of
// their country<tab><space><space>'
func (client OperationsClient) GetWhitespace() (result String, err error) {
req, err := client.GetWhitespacePreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetWhitespace", nil , "Failure preparing request")
}
resp, err := client.GetWhitespaceSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetWhitespace", resp, "Failure sending request")
}
result, err = client.GetWhitespaceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "GetWhitespace", resp, "Failure responding to request")
}
return
}
// GetWhitespacePreparer prepares the GetWhitespace request.
func (client OperationsClient) GetWhitespacePreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/whitespace"))
return preparer.Prepare(&http.Request{})
}
// GetWhitespaceSender sends the GetWhitespace request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) GetWhitespaceSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetWhitespaceResponder handles the response to the GetWhitespace request. The method always
// closes the http.Response Body.
func (client OperationsClient) GetWhitespaceResponder(resp *http.Response) (result String, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutBase64URLEncoded put value that is base64url encoded
//
func (client OperationsClient) PutBase64URLEncoded(stringBody string) (result autorest.Response, err error) {
req, err := client.PutBase64URLEncodedPreparer(stringBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutBase64URLEncoded", nil , "Failure preparing request")
}
resp, err := client.PutBase64URLEncodedSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutBase64URLEncoded", resp, "Failure sending request")
}
result, err = client.PutBase64URLEncodedResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutBase64URLEncoded", resp, "Failure responding to request")
}
return
}
// PutBase64URLEncodedPreparer prepares the PutBase64URLEncoded request.
func (client OperationsClient) PutBase64URLEncodedPreparer(stringBody string) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/base64UrlEncoding"),
autorest.WithJSON(stringBody))
return preparer.Prepare(&http.Request{})
}
// PutBase64URLEncodedSender sends the PutBase64URLEncoded request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) PutBase64URLEncodedSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutBase64URLEncodedResponder handles the response to the PutBase64URLEncoded request. The method always
// closes the http.Response Body.
func (client OperationsClient) PutBase64URLEncodedResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutEmpty set string value empty ''
//
// stringBody is possible values include: ''
func (client OperationsClient) PutEmpty(stringBody string) (result autorest.Response, err error) {
req, err := client.PutEmptyPreparer(stringBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutEmpty", nil , "Failure preparing request")
}
resp, err := client.PutEmptySender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutEmpty", resp, "Failure sending request")
}
result, err = client.PutEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutEmpty", resp, "Failure responding to request")
}
return
}
// PutEmptyPreparer prepares the PutEmpty request.
func (client OperationsClient) PutEmptyPreparer(stringBody string) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/empty"),
autorest.WithJSON(stringBody))
return preparer.Prepare(&http.Request{})
}
// PutEmptySender sends the PutEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) PutEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutEmptyResponder handles the response to the PutEmpty request. The method always
// closes the http.Response Body.
func (client OperationsClient) PutEmptyResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutMbcs set string value mbcs
// '啊齄丂狛狜隣郎隣兀﨩ˊ▇█〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€ '
//
// stringBody is possible values include:
// '啊齄丂狛狜隣郎隣兀﨩ˊ▇█〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€ '
func (client OperationsClient) PutMbcs(stringBody string) (result autorest.Response, err error) {
req, err := client.PutMbcsPreparer(stringBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutMbcs", nil , "Failure preparing request")
}
resp, err := client.PutMbcsSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutMbcs", resp, "Failure sending request")
}
result, err = client.PutMbcsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutMbcs", resp, "Failure responding to request")
}
return
}
// PutMbcsPreparer prepares the PutMbcs request.
func (client OperationsClient) PutMbcsPreparer(stringBody string) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/mbcs"),
autorest.WithJSON(stringBody))
return preparer.Prepare(&http.Request{})
}
// PutMbcsSender sends the PutMbcs request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) PutMbcsSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutMbcsResponder handles the response to the PutMbcs request. The method always
// closes the http.Response Body.
func (client OperationsClient) PutMbcsResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutNull set string value null
//
// stringBody is possible values include: ''
func (client OperationsClient) PutNull(stringBody string) (result autorest.Response, err error) {
req, err := client.PutNullPreparer(stringBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutNull", nil , "Failure preparing request")
}
resp, err := client.PutNullSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutNull", resp, "Failure sending request")
}
result, err = client.PutNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutNull", resp, "Failure responding to request")
}
return
}
// PutNullPreparer prepares the PutNull request.
func (client OperationsClient) PutNullPreparer(stringBody string) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/null"))
if len(string(stringBody)) > 0 {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(stringBody))
}
return preparer.Prepare(&http.Request{})
}
// PutNullSender sends the PutNull request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) PutNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutNullResponder handles the response to the PutNull request. The method always
// closes the http.Response Body.
func (client OperationsClient) PutNullResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutWhitespace set String value with leading and trailing whitespace
// '<tab><space><space>Now is the time for all good men to come to the aid of
// their country<tab><space><space>'
//
// stringBody is possible values include: ' Now is the time for all good
// men to come to the aid of their country '
func (client OperationsClient) PutWhitespace(stringBody string) (result autorest.Response, err error) {
req, err := client.PutWhitespacePreparer(stringBody)
if err != nil {
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutWhitespace", nil , "Failure preparing request")
}
resp, err := client.PutWhitespaceSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutWhitespace", resp, "Failure sending request")
}
result, err = client.PutWhitespaceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "stringgroup.OperationsClient", "PutWhitespace", resp, "Failure responding to request")
}
return
}
// PutWhitespacePreparer prepares the PutWhitespace request.
func (client OperationsClient) PutWhitespacePreparer(stringBody string) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/string/whitespace"),
autorest.WithJSON(stringBody))
return preparer.Prepare(&http.Request{})
}
// PutWhitespaceSender sends the PutWhitespace request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) PutWhitespaceSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutWhitespaceResponder handles the response to the PutWhitespace request. The method always
// closes the http.Response Body.
func (client OperationsClient) PutWhitespaceResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,33 +0,0 @@
package stringgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "stringgroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,49 +0,0 @@
// Package custombaseurlgroup implements the Azure ARM Custombaseurlgroup
// service API version 1.0.0.
//
// Test Infrastructure for AutoRest
package custombaseurlgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Custombaseurlgroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Custombaseurlgroup
DefaultBaseURI = "http://badhost"
)
// ManagementClient is the base client for Custombaseurlgroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
Host string
}
// New creates an instance of the ManagementClient client.
func New(host string) ManagementClient {
return NewWithBaseURI(DefaultBaseURI, host)
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, host string) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
Host: host,
}
}

Просмотреть файл

@ -1,16 +0,0 @@
package custombaseurlgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}

Просмотреть файл

@ -1,78 +0,0 @@
package custombaseurlgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// PathsClient is the test Infrastructure for AutoRest
type PathsClient struct {
ManagementClient
}
// NewPathsClient creates an instance of the PathsClient client.
func NewPathsClient(host string) PathsClient {
return NewPathsClientWithBaseURI(DefaultBaseURI, host)
}
// NewPathsClientWithBaseURI creates an instance of the PathsClient client.
func NewPathsClientWithBaseURI(baseURI string, host string) PathsClient {
return PathsClient{NewWithBaseURI(baseURI, host)}
}
// GetEmpty get a 200 to test a valid base uri
func (client PathsClient) GetEmpty() (result autorest.Response, err error) {
req, err := client.GetEmptyPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "custombaseurlgroup.PathsClient", "GetEmpty", nil , "Failure preparing request")
}
resp, err := client.GetEmptySender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "custombaseurlgroup.PathsClient", "GetEmpty", resp, "Failure sending request")
}
result, err = client.GetEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "custombaseurlgroup.PathsClient", "GetEmpty", resp, "Failure responding to request")
}
return
}
// GetEmptyPreparer prepares the GetEmpty request.
func (client PathsClient) GetEmptyPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/customuri"))
return preparer.Prepare(&http.Request{})
}
// GetEmptySender sends the GetEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client PathsClient) GetEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetEmptyResponder handles the response to the GetEmpty request. The method always
// closes the http.Response Body.
func (client PathsClient) GetEmptyResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,33 +0,0 @@
package custombaseurlgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "custombaseurlgroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package headergroup implements the Azure ARM Headergroup service API
// version 1.0.0.
//
// Test Infrastructure for AutoRest
package headergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Headergroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Headergroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Headergroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,29 +0,0 @@
package headergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// GreyscaleColors enumerates the values for greyscale colors.
type GreyscaleColors string
const (
// Black specifies the black state for greyscale colors.
Black GreyscaleColors = "black"
// GREY specifies the grey state for greyscale colors.
GREY GreyscaleColors = "GREY"
// White specifies the white state for greyscale colors.
White GreyscaleColors = "White"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package headergroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "headergroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,47 +0,0 @@
// Package httpinfrastructuregroup implements the Azure ARM
// Httpinfrastructuregroup service API version 1.0.0.
//
// Test Infrastructure for AutoRest
package httpinfrastructuregroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Httpinfrastructuregroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Httpinfrastructuregroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Httpinfrastructuregroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,178 +0,0 @@
package httpinfrastructuregroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// HTTPFailureClient is the test Infrastructure for AutoRest
type HTTPFailureClient struct {
ManagementClient
}
// NewHTTPFailureClient creates an instance of the HTTPFailureClient client.
func NewHTTPFailureClient() HTTPFailureClient {
return NewHTTPFailureClientWithBaseURI(DefaultBaseURI, )
}
// NewHTTPFailureClientWithBaseURI creates an instance of the
// HTTPFailureClient client.
func NewHTTPFailureClientWithBaseURI(baseURI string, ) HTTPFailureClient {
return HTTPFailureClient{NewWithBaseURI(baseURI, )}
}
// GetEmptyError get empty error form server
func (client HTTPFailureClient) GetEmptyError() (result Bool, err error) {
req, err := client.GetEmptyErrorPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPFailureClient", "GetEmptyError", nil , "Failure preparing request")
}
resp, err := client.GetEmptyErrorSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPFailureClient", "GetEmptyError", resp, "Failure sending request")
}
result, err = client.GetEmptyErrorResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPFailureClient", "GetEmptyError", resp, "Failure responding to request")
}
return
}
// GetEmptyErrorPreparer prepares the GetEmptyError request.
func (client HTTPFailureClient) GetEmptyErrorPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/failure/emptybody/error"))
return preparer.Prepare(&http.Request{})
}
// GetEmptyErrorSender sends the GetEmptyError request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPFailureClient) GetEmptyErrorSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetEmptyErrorResponder handles the response to the GetEmptyError request. The method always
// closes the http.Response Body.
func (client HTTPFailureClient) GetEmptyErrorResponder(resp *http.Response) (result Bool, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNoModelEmpty get empty response from server
func (client HTTPFailureClient) GetNoModelEmpty() (result Bool, err error) {
req, err := client.GetNoModelEmptyPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPFailureClient", "GetNoModelEmpty", nil , "Failure preparing request")
}
resp, err := client.GetNoModelEmptySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPFailureClient", "GetNoModelEmpty", resp, "Failure sending request")
}
result, err = client.GetNoModelEmptyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPFailureClient", "GetNoModelEmpty", resp, "Failure responding to request")
}
return
}
// GetNoModelEmptyPreparer prepares the GetNoModelEmpty request.
func (client HTTPFailureClient) GetNoModelEmptyPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/failure/nomodel/empty"))
return preparer.Prepare(&http.Request{})
}
// GetNoModelEmptySender sends the GetNoModelEmpty request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPFailureClient) GetNoModelEmptySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNoModelEmptyResponder handles the response to the GetNoModelEmpty request. The method always
// closes the http.Response Body.
func (client HTTPFailureClient) GetNoModelEmptyResponder(resp *http.Response) (result Bool, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetNoModelError get empty error form server
func (client HTTPFailureClient) GetNoModelError() (result Bool, err error) {
req, err := client.GetNoModelErrorPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPFailureClient", "GetNoModelError", nil , "Failure preparing request")
}
resp, err := client.GetNoModelErrorSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPFailureClient", "GetNoModelError", resp, "Failure sending request")
}
result, err = client.GetNoModelErrorResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPFailureClient", "GetNoModelError", resp, "Failure responding to request")
}
return
}
// GetNoModelErrorPreparer prepares the GetNoModelError request.
func (client HTTPFailureClient) GetNoModelErrorPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/failure/nomodel/error"))
return preparer.Prepare(&http.Request{})
}
// GetNoModelErrorSender sends the GetNoModelError request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPFailureClient) GetNoModelErrorSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetNoModelErrorResponder handles the response to the GetNoModelError request. The method always
// closes the http.Response Body.
func (client HTTPFailureClient) GetNoModelErrorResponder(resp *http.Response) (result Bool, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}

Просмотреть файл

@ -1,808 +0,0 @@
package httpinfrastructuregroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// HTTPRedirectsClient is the test Infrastructure for AutoRest
type HTTPRedirectsClient struct {
ManagementClient
}
// NewHTTPRedirectsClient creates an instance of the HTTPRedirectsClient
// client.
func NewHTTPRedirectsClient() HTTPRedirectsClient {
return NewHTTPRedirectsClientWithBaseURI(DefaultBaseURI, )
}
// NewHTTPRedirectsClientWithBaseURI creates an instance of the
// HTTPRedirectsClient client.
func NewHTTPRedirectsClientWithBaseURI(baseURI string, ) HTTPRedirectsClient {
return HTTPRedirectsClient{NewWithBaseURI(baseURI, )}
}
// Delete307 delete redirected with 307, resulting in a 200 after redirect
//
// booleanValue is simple boolean value true
func (client HTTPRedirectsClient) Delete307(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Delete307Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Delete307", nil , "Failure preparing request")
}
resp, err := client.Delete307Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Delete307", resp, "Failure sending request")
}
result, err = client.Delete307Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Delete307", resp, "Failure responding to request")
}
return
}
// Delete307Preparer prepares the Delete307 request.
func (client HTTPRedirectsClient) Delete307Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/307"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Delete307Sender sends the Delete307 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Delete307Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Delete307Responder handles the response to the Delete307 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Delete307Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusTemporaryRedirect),
autorest.ByClosing())
result.Response = resp
return
}
// Get300 return 300 status code and redirect to /http/success/200
func (client HTTPRedirectsClient) Get300() (result ListString, err error) {
req, err := client.Get300Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get300", nil , "Failure preparing request")
}
resp, err := client.Get300Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get300", resp, "Failure sending request")
}
result, err = client.Get300Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get300", resp, "Failure responding to request")
}
return
}
// Get300Preparer prepares the Get300 request.
func (client HTTPRedirectsClient) Get300Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/300"))
return preparer.Prepare(&http.Request{})
}
// Get300Sender sends the Get300 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Get300Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Get300Responder handles the response to the Get300 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Get300Responder(resp *http.Response) (result ListString, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusMultipleChoices),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Get301 return 301 status code and redirect to /http/success/200
func (client HTTPRedirectsClient) Get301() (result autorest.Response, err error) {
req, err := client.Get301Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get301", nil , "Failure preparing request")
}
resp, err := client.Get301Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get301", resp, "Failure sending request")
}
result, err = client.Get301Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get301", resp, "Failure responding to request")
}
return
}
// Get301Preparer prepares the Get301 request.
func (client HTTPRedirectsClient) Get301Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/301"))
return preparer.Prepare(&http.Request{})
}
// Get301Sender sends the Get301 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Get301Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Get301Responder handles the response to the Get301 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Get301Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusMovedPermanently),
autorest.ByClosing())
result.Response = resp
return
}
// Get302 return 302 status code and redirect to /http/success/200
func (client HTTPRedirectsClient) Get302() (result autorest.Response, err error) {
req, err := client.Get302Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get302", nil , "Failure preparing request")
}
resp, err := client.Get302Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get302", resp, "Failure sending request")
}
result, err = client.Get302Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get302", resp, "Failure responding to request")
}
return
}
// Get302Preparer prepares the Get302 request.
func (client HTTPRedirectsClient) Get302Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/302"))
return preparer.Prepare(&http.Request{})
}
// Get302Sender sends the Get302 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Get302Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Get302Responder handles the response to the Get302 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Get302Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusFound),
autorest.ByClosing())
result.Response = resp
return
}
// Get307 redirect get with 307, resulting in a 200 success
func (client HTTPRedirectsClient) Get307() (result autorest.Response, err error) {
req, err := client.Get307Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get307", nil , "Failure preparing request")
}
resp, err := client.Get307Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get307", resp, "Failure sending request")
}
result, err = client.Get307Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Get307", resp, "Failure responding to request")
}
return
}
// Get307Preparer prepares the Get307 request.
func (client HTTPRedirectsClient) Get307Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/307"))
return preparer.Prepare(&http.Request{})
}
// Get307Sender sends the Get307 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Get307Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Get307Responder handles the response to the Get307 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Get307Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusTemporaryRedirect),
autorest.ByClosing())
result.Response = resp
return
}
// Head300 return 300 status code and redirect to /http/success/200
func (client HTTPRedirectsClient) Head300() (result autorest.Response, err error) {
req, err := client.Head300Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head300", nil , "Failure preparing request")
}
resp, err := client.Head300Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head300", resp, "Failure sending request")
}
result, err = client.Head300Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head300", resp, "Failure responding to request")
}
return
}
// Head300Preparer prepares the Head300 request.
func (client HTTPRedirectsClient) Head300Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/300"))
return preparer.Prepare(&http.Request{})
}
// Head300Sender sends the Head300 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Head300Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Head300Responder handles the response to the Head300 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Head300Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusMultipleChoices),
autorest.ByClosing())
result.Response = resp
return
}
// Head301 return 301 status code and redirect to /http/success/200
func (client HTTPRedirectsClient) Head301() (result autorest.Response, err error) {
req, err := client.Head301Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head301", nil , "Failure preparing request")
}
resp, err := client.Head301Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head301", resp, "Failure sending request")
}
result, err = client.Head301Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head301", resp, "Failure responding to request")
}
return
}
// Head301Preparer prepares the Head301 request.
func (client HTTPRedirectsClient) Head301Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/301"))
return preparer.Prepare(&http.Request{})
}
// Head301Sender sends the Head301 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Head301Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Head301Responder handles the response to the Head301 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Head301Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusMovedPermanently),
autorest.ByClosing())
result.Response = resp
return
}
// Head302 return 302 status code and redirect to /http/success/200
func (client HTTPRedirectsClient) Head302() (result autorest.Response, err error) {
req, err := client.Head302Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head302", nil , "Failure preparing request")
}
resp, err := client.Head302Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head302", resp, "Failure sending request")
}
result, err = client.Head302Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head302", resp, "Failure responding to request")
}
return
}
// Head302Preparer prepares the Head302 request.
func (client HTTPRedirectsClient) Head302Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/302"))
return preparer.Prepare(&http.Request{})
}
// Head302Sender sends the Head302 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Head302Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Head302Responder handles the response to the Head302 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Head302Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusFound),
autorest.ByClosing())
result.Response = resp
return
}
// Head307 redirect with 307, resulting in a 200 success
func (client HTTPRedirectsClient) Head307() (result autorest.Response, err error) {
req, err := client.Head307Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head307", nil , "Failure preparing request")
}
resp, err := client.Head307Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head307", resp, "Failure sending request")
}
result, err = client.Head307Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Head307", resp, "Failure responding to request")
}
return
}
// Head307Preparer prepares the Head307 request.
func (client HTTPRedirectsClient) Head307Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/307"))
return preparer.Prepare(&http.Request{})
}
// Head307Sender sends the Head307 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Head307Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Head307Responder handles the response to the Head307 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Head307Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusTemporaryRedirect),
autorest.ByClosing())
result.Response = resp
return
}
// Patch302 patch true Boolean value in request returns 302. This request
// should not be automatically redirected, but should return the received 302
// to the caller for evaluation
//
// booleanValue is simple boolean value true
func (client HTTPRedirectsClient) Patch302(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Patch302Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Patch302", nil , "Failure preparing request")
}
resp, err := client.Patch302Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Patch302", resp, "Failure sending request")
}
result, err = client.Patch302Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Patch302", resp, "Failure responding to request")
}
return
}
// Patch302Preparer prepares the Patch302 request.
func (client HTTPRedirectsClient) Patch302Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/302"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Patch302Sender sends the Patch302 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Patch302Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Patch302Responder handles the response to the Patch302 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Patch302Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusFound),
autorest.ByClosing())
result.Response = resp
return
}
// Patch307 patch redirected with 307, resulting in a 200 after redirect
//
// booleanValue is simple boolean value true
func (client HTTPRedirectsClient) Patch307(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Patch307Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Patch307", nil , "Failure preparing request")
}
resp, err := client.Patch307Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Patch307", resp, "Failure sending request")
}
result, err = client.Patch307Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Patch307", resp, "Failure responding to request")
}
return
}
// Patch307Preparer prepares the Patch307 request.
func (client HTTPRedirectsClient) Patch307Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/307"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Patch307Sender sends the Patch307 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Patch307Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Patch307Responder handles the response to the Patch307 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Patch307Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusTemporaryRedirect),
autorest.ByClosing())
result.Response = resp
return
}
// Post303 post true Boolean value in request returns 303. This request
// should be automatically redirected usign a get, ultimately returning a 200
// status code
//
// booleanValue is simple boolean value true
func (client HTTPRedirectsClient) Post303(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Post303Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Post303", nil , "Failure preparing request")
}
resp, err := client.Post303Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Post303", resp, "Failure sending request")
}
result, err = client.Post303Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Post303", resp, "Failure responding to request")
}
return
}
// Post303Preparer prepares the Post303 request.
func (client HTTPRedirectsClient) Post303Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/303"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Post303Sender sends the Post303 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Post303Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Post303Responder handles the response to the Post303 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Post303Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusSeeOther),
autorest.ByClosing())
result.Response = resp
return
}
// Post307 post redirected with 307, resulting in a 200 after redirect
//
// booleanValue is simple boolean value true
func (client HTTPRedirectsClient) Post307(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Post307Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Post307", nil , "Failure preparing request")
}
resp, err := client.Post307Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Post307", resp, "Failure sending request")
}
result, err = client.Post307Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Post307", resp, "Failure responding to request")
}
return
}
// Post307Preparer prepares the Post307 request.
func (client HTTPRedirectsClient) Post307Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/307"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Post307Sender sends the Post307 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Post307Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Post307Responder handles the response to the Post307 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Post307Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusTemporaryRedirect),
autorest.ByClosing())
result.Response = resp
return
}
// Put301 put true Boolean value in request returns 301. This request should
// not be automatically redirected, but should return the received 301 to the
// caller for evaluation
//
// booleanValue is simple boolean value true
func (client HTTPRedirectsClient) Put301(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Put301Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Put301", nil , "Failure preparing request")
}
resp, err := client.Put301Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Put301", resp, "Failure sending request")
}
result, err = client.Put301Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Put301", resp, "Failure responding to request")
}
return
}
// Put301Preparer prepares the Put301 request.
func (client HTTPRedirectsClient) Put301Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/301"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Put301Sender sends the Put301 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Put301Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Put301Responder handles the response to the Put301 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Put301Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusMovedPermanently),
autorest.ByClosing())
result.Response = resp
return
}
// Put307 put redirected with 307, resulting in a 200 after redirect
//
// booleanValue is simple boolean value true
func (client HTTPRedirectsClient) Put307(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Put307Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Put307", nil , "Failure preparing request")
}
resp, err := client.Put307Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Put307", resp, "Failure sending request")
}
result, err = client.Put307Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRedirectsClient", "Put307", resp, "Failure responding to request")
}
return
}
// Put307Preparer prepares the Put307 request.
func (client HTTPRedirectsClient) Put307Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/redirect/307"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Put307Sender sends the Put307 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRedirectsClient) Put307Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Put307Responder handles the response to the Put307 request. The method always
// closes the http.Response Body.
func (client HTTPRedirectsClient) Put307Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusTemporaryRedirect),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,457 +0,0 @@
package httpinfrastructuregroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// HTTPRetryClient is the test Infrastructure for AutoRest
type HTTPRetryClient struct {
ManagementClient
}
// NewHTTPRetryClient creates an instance of the HTTPRetryClient client.
func NewHTTPRetryClient() HTTPRetryClient {
return NewHTTPRetryClientWithBaseURI(DefaultBaseURI, )
}
// NewHTTPRetryClientWithBaseURI creates an instance of the HTTPRetryClient
// client.
func NewHTTPRetryClientWithBaseURI(baseURI string, ) HTTPRetryClient {
return HTTPRetryClient{NewWithBaseURI(baseURI, )}
}
// Delete503 return 503 status code, then 200 after retry
//
// booleanValue is simple boolean value true
func (client HTTPRetryClient) Delete503(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Delete503Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Delete503", nil , "Failure preparing request")
}
resp, err := client.Delete503Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Delete503", resp, "Failure sending request")
}
result, err = client.Delete503Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Delete503", resp, "Failure responding to request")
}
return
}
// Delete503Preparer prepares the Delete503 request.
func (client HTTPRetryClient) Delete503Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/retry/503"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Delete503Sender sends the Delete503 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRetryClient) Delete503Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Delete503Responder handles the response to the Delete503 request. The method always
// closes the http.Response Body.
func (client HTTPRetryClient) Delete503Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Get502 return 502 status code, then 200 after retry
func (client HTTPRetryClient) Get502() (result autorest.Response, err error) {
req, err := client.Get502Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Get502", nil , "Failure preparing request")
}
resp, err := client.Get502Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Get502", resp, "Failure sending request")
}
result, err = client.Get502Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Get502", resp, "Failure responding to request")
}
return
}
// Get502Preparer prepares the Get502 request.
func (client HTTPRetryClient) Get502Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/retry/502"))
return preparer.Prepare(&http.Request{})
}
// Get502Sender sends the Get502 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRetryClient) Get502Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Get502Responder handles the response to the Get502 request. The method always
// closes the http.Response Body.
func (client HTTPRetryClient) Get502Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Head408 return 408 status code, then 200 after retry
func (client HTTPRetryClient) Head408() (result autorest.Response, err error) {
req, err := client.Head408Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Head408", nil , "Failure preparing request")
}
resp, err := client.Head408Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Head408", resp, "Failure sending request")
}
result, err = client.Head408Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Head408", resp, "Failure responding to request")
}
return
}
// Head408Preparer prepares the Head408 request.
func (client HTTPRetryClient) Head408Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/retry/408"))
return preparer.Prepare(&http.Request{})
}
// Head408Sender sends the Head408 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRetryClient) Head408Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Head408Responder handles the response to the Head408 request. The method always
// closes the http.Response Body.
func (client HTTPRetryClient) Head408Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Patch500 return 500 status code, then 200 after retry
//
// booleanValue is simple boolean value true
func (client HTTPRetryClient) Patch500(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Patch500Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Patch500", nil , "Failure preparing request")
}
resp, err := client.Patch500Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Patch500", resp, "Failure sending request")
}
result, err = client.Patch500Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Patch500", resp, "Failure responding to request")
}
return
}
// Patch500Preparer prepares the Patch500 request.
func (client HTTPRetryClient) Patch500Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/retry/500"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Patch500Sender sends the Patch500 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRetryClient) Patch500Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Patch500Responder handles the response to the Patch500 request. The method always
// closes the http.Response Body.
func (client HTTPRetryClient) Patch500Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Patch504 return 504 status code, then 200 after retry
//
// booleanValue is simple boolean value true
func (client HTTPRetryClient) Patch504(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Patch504Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Patch504", nil , "Failure preparing request")
}
resp, err := client.Patch504Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Patch504", resp, "Failure sending request")
}
result, err = client.Patch504Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Patch504", resp, "Failure responding to request")
}
return
}
// Patch504Preparer prepares the Patch504 request.
func (client HTTPRetryClient) Patch504Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/retry/504"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Patch504Sender sends the Patch504 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRetryClient) Patch504Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Patch504Responder handles the response to the Patch504 request. The method always
// closes the http.Response Body.
func (client HTTPRetryClient) Patch504Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Post503 return 503 status code, then 200 after retry
//
// booleanValue is simple boolean value true
func (client HTTPRetryClient) Post503(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Post503Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Post503", nil , "Failure preparing request")
}
resp, err := client.Post503Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Post503", resp, "Failure sending request")
}
result, err = client.Post503Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Post503", resp, "Failure responding to request")
}
return
}
// Post503Preparer prepares the Post503 request.
func (client HTTPRetryClient) Post503Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/retry/503"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Post503Sender sends the Post503 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRetryClient) Post503Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Post503Responder handles the response to the Post503 request. The method always
// closes the http.Response Body.
func (client HTTPRetryClient) Post503Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Put500 return 500 status code, then 200 after retry
//
// booleanValue is simple boolean value true
func (client HTTPRetryClient) Put500(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Put500Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Put500", nil , "Failure preparing request")
}
resp, err := client.Put500Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Put500", resp, "Failure sending request")
}
result, err = client.Put500Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Put500", resp, "Failure responding to request")
}
return
}
// Put500Preparer prepares the Put500 request.
func (client HTTPRetryClient) Put500Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/retry/500"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Put500Sender sends the Put500 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRetryClient) Put500Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Put500Responder handles the response to the Put500 request. The method always
// closes the http.Response Body.
func (client HTTPRetryClient) Put500Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Put504 return 504 status code, then 200 after retry
//
// booleanValue is simple boolean value true
func (client HTTPRetryClient) Put504(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Put504Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Put504", nil , "Failure preparing request")
}
resp, err := client.Put504Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Put504", resp, "Failure sending request")
}
result, err = client.Put504Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPRetryClient", "Put504", resp, "Failure responding to request")
}
return
}
// Put504Preparer prepares the Put504 request.
func (client HTTPRetryClient) Put504Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/retry/504"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Put504Sender sends the Put504 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPRetryClient) Put504Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Put504Responder handles the response to the Put504 request. The method always
// closes the http.Response Body.
func (client HTTPRetryClient) Put504Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,246 +0,0 @@
package httpinfrastructuregroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// HTTPServerFailureClient is the test Infrastructure for AutoRest
type HTTPServerFailureClient struct {
ManagementClient
}
// NewHTTPServerFailureClient creates an instance of the
// HTTPServerFailureClient client.
func NewHTTPServerFailureClient() HTTPServerFailureClient {
return NewHTTPServerFailureClientWithBaseURI(DefaultBaseURI, )
}
// NewHTTPServerFailureClientWithBaseURI creates an instance of the
// HTTPServerFailureClient client.
func NewHTTPServerFailureClientWithBaseURI(baseURI string, ) HTTPServerFailureClient {
return HTTPServerFailureClient{NewWithBaseURI(baseURI, )}
}
// Delete505 return 505 status code - should be represented in the client as
// an error
//
// booleanValue is simple boolean value true
func (client HTTPServerFailureClient) Delete505(booleanValue *bool) (result Error, err error) {
req, err := client.Delete505Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Delete505", nil , "Failure preparing request")
}
resp, err := client.Delete505Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Delete505", resp, "Failure sending request")
}
result, err = client.Delete505Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Delete505", resp, "Failure responding to request")
}
return
}
// Delete505Preparer prepares the Delete505 request.
func (client HTTPServerFailureClient) Delete505Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/failure/server/505"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Delete505Sender sends the Delete505 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPServerFailureClient) Delete505Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Delete505Responder handles the response to the Delete505 request. The method always
// closes the http.Response Body.
func (client HTTPServerFailureClient) Delete505Responder(resp *http.Response) (result Error, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Get501 return 501 status code - should be represented in the client as an
// error
func (client HTTPServerFailureClient) Get501() (result Error, err error) {
req, err := client.Get501Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Get501", nil , "Failure preparing request")
}
resp, err := client.Get501Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Get501", resp, "Failure sending request")
}
result, err = client.Get501Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Get501", resp, "Failure responding to request")
}
return
}
// Get501Preparer prepares the Get501 request.
func (client HTTPServerFailureClient) Get501Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/failure/server/501"))
return preparer.Prepare(&http.Request{})
}
// Get501Sender sends the Get501 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPServerFailureClient) Get501Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Get501Responder handles the response to the Get501 request. The method always
// closes the http.Response Body.
func (client HTTPServerFailureClient) Get501Responder(resp *http.Response) (result Error, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Head501 return 501 status code - should be represented in the client as an
// error
func (client HTTPServerFailureClient) Head501() (result Error, err error) {
req, err := client.Head501Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Head501", nil , "Failure preparing request")
}
resp, err := client.Head501Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Head501", resp, "Failure sending request")
}
result, err = client.Head501Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Head501", resp, "Failure responding to request")
}
return
}
// Head501Preparer prepares the Head501 request.
func (client HTTPServerFailureClient) Head501Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/failure/server/501"))
return preparer.Prepare(&http.Request{})
}
// Head501Sender sends the Head501 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPServerFailureClient) Head501Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Head501Responder handles the response to the Head501 request. The method always
// closes the http.Response Body.
func (client HTTPServerFailureClient) Head501Responder(resp *http.Response) (result Error, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Post505 return 505 status code - should be represented in the client as an
// error
//
// booleanValue is simple boolean value true
func (client HTTPServerFailureClient) Post505(booleanValue *bool) (result Error, err error) {
req, err := client.Post505Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Post505", nil , "Failure preparing request")
}
resp, err := client.Post505Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Post505", resp, "Failure sending request")
}
result, err = client.Post505Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPServerFailureClient", "Post505", resp, "Failure responding to request")
}
return
}
// Post505Preparer prepares the Post505 request.
func (client HTTPServerFailureClient) Post505Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/failure/server/505"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Post505Sender sends the Post505 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPServerFailureClient) Post505Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Post505Responder handles the response to the Post505 request. The method always
// closes the http.Response Body.
func (client HTTPServerFailureClient) Post505Responder(resp *http.Response) (result Error, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}

Просмотреть файл

@ -1,994 +0,0 @@
package httpinfrastructuregroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// HTTPSuccessClient is the test Infrastructure for AutoRest
type HTTPSuccessClient struct {
ManagementClient
}
// NewHTTPSuccessClient creates an instance of the HTTPSuccessClient client.
func NewHTTPSuccessClient() HTTPSuccessClient {
return NewHTTPSuccessClientWithBaseURI(DefaultBaseURI, )
}
// NewHTTPSuccessClientWithBaseURI creates an instance of the
// HTTPSuccessClient client.
func NewHTTPSuccessClientWithBaseURI(baseURI string, ) HTTPSuccessClient {
return HTTPSuccessClient{NewWithBaseURI(baseURI, )}
}
// Delete200 delete simple boolean value true returns 200
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Delete200(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Delete200Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Delete200", nil , "Failure preparing request")
}
resp, err := client.Delete200Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Delete200", resp, "Failure sending request")
}
result, err = client.Delete200Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Delete200", resp, "Failure responding to request")
}
return
}
// Delete200Preparer prepares the Delete200 request.
func (client HTTPSuccessClient) Delete200Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/200"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Delete200Sender sends the Delete200 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Delete200Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Delete200Responder handles the response to the Delete200 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Delete200Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Delete202 delete true Boolean value in request returns 202 (accepted)
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Delete202(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Delete202Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Delete202", nil , "Failure preparing request")
}
resp, err := client.Delete202Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Delete202", resp, "Failure sending request")
}
result, err = client.Delete202Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Delete202", resp, "Failure responding to request")
}
return
}
// Delete202Preparer prepares the Delete202 request.
func (client HTTPSuccessClient) Delete202Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/202"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Delete202Sender sends the Delete202 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Delete202Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Delete202Responder handles the response to the Delete202 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Delete202Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusAccepted),
autorest.ByClosing())
result.Response = resp
return
}
// Delete204 delete true Boolean value in request returns 204 (no content)
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Delete204(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Delete204Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Delete204", nil , "Failure preparing request")
}
resp, err := client.Delete204Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Delete204", resp, "Failure sending request")
}
result, err = client.Delete204Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Delete204", resp, "Failure responding to request")
}
return
}
// Delete204Preparer prepares the Delete204 request.
func (client HTTPSuccessClient) Delete204Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/204"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Delete204Sender sends the Delete204 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Delete204Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Delete204Responder handles the response to the Delete204 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Delete204Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// Get200 get 200 success
func (client HTTPSuccessClient) Get200() (result Bool, err error) {
req, err := client.Get200Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Get200", nil , "Failure preparing request")
}
resp, err := client.Get200Sender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Get200", resp, "Failure sending request")
}
result, err = client.Get200Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Get200", resp, "Failure responding to request")
}
return
}
// Get200Preparer prepares the Get200 request.
func (client HTTPSuccessClient) Get200Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/200"))
return preparer.Prepare(&http.Request{})
}
// Get200Sender sends the Get200 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Get200Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Get200Responder handles the response to the Get200 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Get200Responder(resp *http.Response) (result Bool, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Head200 return 200 status code if successful
func (client HTTPSuccessClient) Head200() (result autorest.Response, err error) {
req, err := client.Head200Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Head200", nil , "Failure preparing request")
}
resp, err := client.Head200Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Head200", resp, "Failure sending request")
}
result, err = client.Head200Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Head200", resp, "Failure responding to request")
}
return
}
// Head200Preparer prepares the Head200 request.
func (client HTTPSuccessClient) Head200Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/200"))
return preparer.Prepare(&http.Request{})
}
// Head200Sender sends the Head200 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Head200Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Head200Responder handles the response to the Head200 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Head200Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Head204 return 204 status code if successful
func (client HTTPSuccessClient) Head204() (result autorest.Response, err error) {
req, err := client.Head204Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Head204", nil , "Failure preparing request")
}
resp, err := client.Head204Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Head204", resp, "Failure sending request")
}
result, err = client.Head204Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Head204", resp, "Failure responding to request")
}
return
}
// Head204Preparer prepares the Head204 request.
func (client HTTPSuccessClient) Head204Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/204"))
return preparer.Prepare(&http.Request{})
}
// Head204Sender sends the Head204 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Head204Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Head204Responder handles the response to the Head204 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Head204Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// Head404 return 404 status code
func (client HTTPSuccessClient) Head404() (result autorest.Response, err error) {
req, err := client.Head404Preparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Head404", nil , "Failure preparing request")
}
resp, err := client.Head404Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Head404", resp, "Failure sending request")
}
result, err = client.Head404Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Head404", resp, "Failure responding to request")
}
return
}
// Head404Preparer prepares the Head404 request.
func (client HTTPSuccessClient) Head404Preparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/404"))
return preparer.Prepare(&http.Request{})
}
// Head404Sender sends the Head404 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Head404Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Head404Responder handles the response to the Head404 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Head404Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusNoContent,http.StatusNotFound),
autorest.ByClosing())
result.Response = resp
return
}
// Patch200 patch true Boolean value in request returning 200
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Patch200(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Patch200Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Patch200", nil , "Failure preparing request")
}
resp, err := client.Patch200Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Patch200", resp, "Failure sending request")
}
result, err = client.Patch200Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Patch200", resp, "Failure responding to request")
}
return
}
// Patch200Preparer prepares the Patch200 request.
func (client HTTPSuccessClient) Patch200Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/200"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Patch200Sender sends the Patch200 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Patch200Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Patch200Responder handles the response to the Patch200 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Patch200Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Patch202 patch true Boolean value in request returns 202
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Patch202(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Patch202Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Patch202", nil , "Failure preparing request")
}
resp, err := client.Patch202Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Patch202", resp, "Failure sending request")
}
result, err = client.Patch202Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Patch202", resp, "Failure responding to request")
}
return
}
// Patch202Preparer prepares the Patch202 request.
func (client HTTPSuccessClient) Patch202Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/202"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Patch202Sender sends the Patch202 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Patch202Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Patch202Responder handles the response to the Patch202 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Patch202Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusAccepted),
autorest.ByClosing())
result.Response = resp
return
}
// Patch204 patch true Boolean value in request returns 204 (no content)
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Patch204(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Patch204Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Patch204", nil , "Failure preparing request")
}
resp, err := client.Patch204Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Patch204", resp, "Failure sending request")
}
result, err = client.Patch204Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Patch204", resp, "Failure responding to request")
}
return
}
// Patch204Preparer prepares the Patch204 request.
func (client HTTPSuccessClient) Patch204Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/204"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Patch204Sender sends the Patch204 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Patch204Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Patch204Responder handles the response to the Patch204 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Patch204Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// Post200 post bollean value true in request that returns a 200
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Post200(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Post200Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post200", nil , "Failure preparing request")
}
resp, err := client.Post200Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post200", resp, "Failure sending request")
}
result, err = client.Post200Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post200", resp, "Failure responding to request")
}
return
}
// Post200Preparer prepares the Post200 request.
func (client HTTPSuccessClient) Post200Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/200"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Post200Sender sends the Post200 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Post200Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Post200Responder handles the response to the Post200 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Post200Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Post201 post true Boolean value in request returns 201 (Created)
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Post201(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Post201Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post201", nil , "Failure preparing request")
}
resp, err := client.Post201Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post201", resp, "Failure sending request")
}
result, err = client.Post201Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post201", resp, "Failure responding to request")
}
return
}
// Post201Preparer prepares the Post201 request.
func (client HTTPSuccessClient) Post201Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/201"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Post201Sender sends the Post201 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Post201Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Post201Responder handles the response to the Post201 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Post201Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusCreated),
autorest.ByClosing())
result.Response = resp
return
}
// Post202 post true Boolean value in request returns 202 (Accepted)
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Post202(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Post202Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post202", nil , "Failure preparing request")
}
resp, err := client.Post202Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post202", resp, "Failure sending request")
}
result, err = client.Post202Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post202", resp, "Failure responding to request")
}
return
}
// Post202Preparer prepares the Post202 request.
func (client HTTPSuccessClient) Post202Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/202"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Post202Sender sends the Post202 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Post202Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Post202Responder handles the response to the Post202 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Post202Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusAccepted),
autorest.ByClosing())
result.Response = resp
return
}
// Post204 post true Boolean value in request returns 204 (no content)
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Post204(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Post204Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post204", nil , "Failure preparing request")
}
resp, err := client.Post204Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post204", resp, "Failure sending request")
}
result, err = client.Post204Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Post204", resp, "Failure responding to request")
}
return
}
// Post204Preparer prepares the Post204 request.
func (client HTTPSuccessClient) Post204Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/204"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Post204Sender sends the Post204 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Post204Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Post204Responder handles the response to the Post204 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Post204Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// Put200 put boolean value true returning 200 success
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Put200(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Put200Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put200", nil , "Failure preparing request")
}
resp, err := client.Put200Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put200", resp, "Failure sending request")
}
result, err = client.Put200Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put200", resp, "Failure responding to request")
}
return
}
// Put200Preparer prepares the Put200 request.
func (client HTTPSuccessClient) Put200Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/200"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Put200Sender sends the Put200 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Put200Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Put200Responder handles the response to the Put200 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Put200Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// Put201 put true Boolean value in request returns 201
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Put201(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Put201Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put201", nil , "Failure preparing request")
}
resp, err := client.Put201Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put201", resp, "Failure sending request")
}
result, err = client.Put201Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put201", resp, "Failure responding to request")
}
return
}
// Put201Preparer prepares the Put201 request.
func (client HTTPSuccessClient) Put201Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/201"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Put201Sender sends the Put201 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Put201Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Put201Responder handles the response to the Put201 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Put201Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusCreated),
autorest.ByClosing())
result.Response = resp
return
}
// Put202 put true Boolean value in request returns 202 (Accepted)
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Put202(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Put202Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put202", nil , "Failure preparing request")
}
resp, err := client.Put202Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put202", resp, "Failure sending request")
}
result, err = client.Put202Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put202", resp, "Failure responding to request")
}
return
}
// Put202Preparer prepares the Put202 request.
func (client HTTPSuccessClient) Put202Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/202"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Put202Sender sends the Put202 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Put202Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Put202Responder handles the response to the Put202 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Put202Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusAccepted),
autorest.ByClosing())
result.Response = resp
return
}
// Put204 put true Boolean value in request returns 204 (no content)
//
// booleanValue is simple boolean value true
func (client HTTPSuccessClient) Put204(booleanValue *bool) (result autorest.Response, err error) {
req, err := client.Put204Preparer(booleanValue)
if err != nil {
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put204", nil , "Failure preparing request")
}
resp, err := client.Put204Sender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put204", resp, "Failure sending request")
}
result, err = client.Put204Responder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "httpinfrastructuregroup.HTTPSuccessClient", "Put204", resp, "Failure responding to request")
}
return
}
// Put204Preparer prepares the Put204 request.
func (client HTTPSuccessClient) Put204Preparer(booleanValue *bool) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/http/success/204"))
if booleanValue != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(booleanValue))
}
return preparer.Prepare(&http.Request{})
}
// Put204Sender sends the Put204 request. The method will close the
// http.Response Body if it receives an error.
func (client HTTPSuccessClient) Put204Sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// Put204Responder handles the response to the Put204 request. The method always
// closes the http.Response Body.
func (client HTTPSuccessClient) Put204Responder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK,http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,61 +0,0 @@
package httpinfrastructuregroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
// A is
type A struct {
autorest.Response `json:"-"`
StatusCode *string `json:"statusCode,omitempty"`
}
// B is
type B struct {
StatusCode *string `json:"statusCode,omitempty"`
TextStatusCode *string `json:"textStatusCode,omitempty"`
}
// Bool is
type Bool struct {
autorest.Response `json:"-"`
Value *bool `json:"value,omitempty"`
}
// C is
type C struct {
HTTPCode *string `json:"httpCode,omitempty"`
}
// D is
type D struct {
HTTPStatusCode *string `json:"httpStatusCode,omitempty"`
}
// Error is
type Error struct {
autorest.Response `json:"-"`
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// ListString is
type ListString struct {
autorest.Response `json:"-"`
Value *[]string `json:"value,omitempty"`
}
// SetObject is
type SetObject struct {
autorest.Response `json:"-"`
Value *map[string]interface{} `json:"value,omitempty"`
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,33 +0,0 @@
package httpinfrastructuregroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "httpinfrastructuregroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,582 +0,0 @@
// Package modelflatteninggroup implements the Azure ARM Modelflatteninggroup
// service API version 1.0.0.
//
// Resource Flattening for AutoRest
package modelflatteninggroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
const (
// APIVersion is the version of the Modelflatteninggroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Modelflatteninggroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Modelflatteninggroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}
// GetArray get External Resource as an Array
func (client ManagementClient) GetArray() (result ListFlattenedProduct, err error) {
req, err := client.GetArrayPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "GetArray", nil , "Failure preparing request")
}
resp, err := client.GetArraySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "GetArray", resp, "Failure sending request")
}
result, err = client.GetArrayResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "GetArray", resp, "Failure responding to request")
}
return
}
// GetArrayPreparer prepares the GetArray request.
func (client ManagementClient) GetArrayPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/model-flatten/array"))
return preparer.Prepare(&http.Request{})
}
// GetArraySender sends the GetArray request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) GetArraySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetArrayResponder handles the response to the GetArray request. The method always
// closes the http.Response Body.
func (client ManagementClient) GetArrayResponder(resp *http.Response) (result ListFlattenedProduct, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetDictionary get External Resource as a Dictionary
func (client ManagementClient) GetDictionary() (result SetFlattenedProduct, err error) {
req, err := client.GetDictionaryPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "GetDictionary", nil , "Failure preparing request")
}
resp, err := client.GetDictionarySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "GetDictionary", resp, "Failure sending request")
}
result, err = client.GetDictionaryResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "GetDictionary", resp, "Failure responding to request")
}
return
}
// GetDictionaryPreparer prepares the GetDictionary request.
func (client ManagementClient) GetDictionaryPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/model-flatten/dictionary"))
return preparer.Prepare(&http.Request{})
}
// GetDictionarySender sends the GetDictionary request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) GetDictionarySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetDictionaryResponder handles the response to the GetDictionary request. The method always
// closes the http.Response Body.
func (client ManagementClient) GetDictionaryResponder(resp *http.Response) (result SetFlattenedProduct, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetResourceCollection get External Resource as a ResourceCollection
func (client ManagementClient) GetResourceCollection() (result ResourceCollection, err error) {
req, err := client.GetResourceCollectionPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "GetResourceCollection", nil , "Failure preparing request")
}
resp, err := client.GetResourceCollectionSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "GetResourceCollection", resp, "Failure sending request")
}
result, err = client.GetResourceCollectionResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "GetResourceCollection", resp, "Failure responding to request")
}
return
}
// GetResourceCollectionPreparer prepares the GetResourceCollection request.
func (client ManagementClient) GetResourceCollectionPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/model-flatten/resourcecollection"))
return preparer.Prepare(&http.Request{})
}
// GetResourceCollectionSender sends the GetResourceCollection request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) GetResourceCollectionSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetResourceCollectionResponder handles the response to the GetResourceCollection request. The method always
// closes the http.Response Body.
func (client ManagementClient) GetResourceCollectionResponder(resp *http.Response) (result ResourceCollection, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PostFlattenedSimpleProduct put Flattened Simple Product with client
// flattening true on the parameter
//
// simpleBodyProduct is simple body product to post
func (client ManagementClient) PostFlattenedSimpleProduct(simpleBodyProduct *SimpleProduct) (result SimpleProduct, err error) {
if err := validation.Validate([]validation.Validation{
{simpleBodyProduct,
[]validation.Constraint{ {"simpleBodyProduct", validation.Null, false ,
[]validation.Constraint{ {"Details", validation.Null, false ,
[]validation.Constraint{ {"MaxProductDisplayName", validation.Null, true, nil },
{"MaxProductCapacity", validation.Null, true, nil },
}},
}}}}}); err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PostFlattenedSimpleProduct", nil , "Validation error ")
}
req, err := client.PostFlattenedSimpleProductPreparer(simpleBodyProduct)
if err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PostFlattenedSimpleProduct", nil , "Failure preparing request")
}
resp, err := client.PostFlattenedSimpleProductSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PostFlattenedSimpleProduct", resp, "Failure sending request")
}
result, err = client.PostFlattenedSimpleProductResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PostFlattenedSimpleProduct", resp, "Failure responding to request")
}
return
}
// PostFlattenedSimpleProductPreparer prepares the PostFlattenedSimpleProduct request.
func (client ManagementClient) PostFlattenedSimpleProductPreparer(simpleBodyProduct *SimpleProduct) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/model-flatten/customFlattening"))
if simpleBodyProduct != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(simpleBodyProduct))
}
return preparer.Prepare(&http.Request{})
}
// PostFlattenedSimpleProductSender sends the PostFlattenedSimpleProduct request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) PostFlattenedSimpleProductSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PostFlattenedSimpleProductResponder handles the response to the PostFlattenedSimpleProduct request. The method always
// closes the http.Response Body.
func (client ManagementClient) PostFlattenedSimpleProductResponder(resp *http.Response) (result SimpleProduct, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutArray put External Resource as an Array
//
// resourceArray is external Resource as an Array to put
func (client ManagementClient) PutArray(resourceArray []Resource) (result autorest.Response, err error) {
req, err := client.PutArrayPreparer(resourceArray)
if err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutArray", nil , "Failure preparing request")
}
resp, err := client.PutArraySender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutArray", resp, "Failure sending request")
}
result, err = client.PutArrayResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutArray", resp, "Failure responding to request")
}
return
}
// PutArrayPreparer prepares the PutArray request.
func (client ManagementClient) PutArrayPreparer(resourceArray []Resource) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/model-flatten/array"))
if resourceArray != nil && len(resourceArray) > 0 {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(resourceArray))
}
return preparer.Prepare(&http.Request{})
}
// PutArraySender sends the PutArray request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) PutArraySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutArrayResponder handles the response to the PutArray request. The method always
// closes the http.Response Body.
func (client ManagementClient) PutArrayResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutDictionary put External Resource as a Dictionary
//
// resourceDictionary is external Resource as a Dictionary to put
func (client ManagementClient) PutDictionary(resourceDictionary map[string]FlattenedProduct) (result autorest.Response, err error) {
req, err := client.PutDictionaryPreparer(resourceDictionary)
if err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutDictionary", nil , "Failure preparing request")
}
resp, err := client.PutDictionarySender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutDictionary", resp, "Failure sending request")
}
result, err = client.PutDictionaryResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutDictionary", resp, "Failure responding to request")
}
return
}
// PutDictionaryPreparer prepares the PutDictionary request.
func (client ManagementClient) PutDictionaryPreparer(resourceDictionary map[string]FlattenedProduct) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/model-flatten/dictionary"))
if resourceDictionary != nil && len(resourceDictionary) > 0 {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(resourceDictionary))
}
return preparer.Prepare(&http.Request{})
}
// PutDictionarySender sends the PutDictionary request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) PutDictionarySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutDictionaryResponder handles the response to the PutDictionary request. The method always
// closes the http.Response Body.
func (client ManagementClient) PutDictionaryResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutResourceCollection put External Resource as a ResourceCollection
//
// resourceComplexObject is external Resource as a ResourceCollection to put
func (client ManagementClient) PutResourceCollection(resourceComplexObject *ResourceCollection) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{resourceComplexObject,
[]validation.Constraint{ {"resourceComplexObject", validation.Null, false ,
[]validation.Constraint{ {"Productresource", validation.Null, false ,
[]validation.Constraint{ {"Properties", validation.Null, false ,
[]validation.Constraint{ {"ProvisioningStateValues", validation.ReadOnly, true, nil },
}},
}},
}}}}}); err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutResourceCollection", nil , "Validation error ")
}
req, err := client.PutResourceCollectionPreparer(resourceComplexObject)
if err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutResourceCollection", nil , "Failure preparing request")
}
resp, err := client.PutResourceCollectionSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutResourceCollection", resp, "Failure sending request")
}
result, err = client.PutResourceCollectionResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutResourceCollection", resp, "Failure responding to request")
}
return
}
// PutResourceCollectionPreparer prepares the PutResourceCollection request.
func (client ManagementClient) PutResourceCollectionPreparer(resourceComplexObject *ResourceCollection) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/model-flatten/resourcecollection"))
if resourceComplexObject != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(resourceComplexObject))
}
return preparer.Prepare(&http.Request{})
}
// PutResourceCollectionSender sends the PutResourceCollection request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) PutResourceCollectionSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutResourceCollectionResponder handles the response to the PutResourceCollection request. The method always
// closes the http.Response Body.
func (client ManagementClient) PutResourceCollectionResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutSimpleProduct put Simple Product with client flattening true on the model
//
// simpleBodyProduct is simple body product to put
func (client ManagementClient) PutSimpleProduct(simpleBodyProduct *SimpleProduct) (result SimpleProduct, err error) {
if err := validation.Validate([]validation.Validation{
{simpleBodyProduct,
[]validation.Constraint{ {"simpleBodyProduct", validation.Null, false ,
[]validation.Constraint{ {"Details", validation.Null, false ,
[]validation.Constraint{ {"MaxProductDisplayName", validation.Null, true, nil },
{"MaxProductCapacity", validation.Null, true, nil },
}},
}}}}}); err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutSimpleProduct", nil , "Validation error ")
}
req, err := client.PutSimpleProductPreparer(simpleBodyProduct)
if err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutSimpleProduct", nil , "Failure preparing request")
}
resp, err := client.PutSimpleProductSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutSimpleProduct", resp, "Failure sending request")
}
result, err = client.PutSimpleProductResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutSimpleProduct", resp, "Failure responding to request")
}
return
}
// PutSimpleProductPreparer prepares the PutSimpleProduct request.
func (client ManagementClient) PutSimpleProductPreparer(simpleBodyProduct *SimpleProduct) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/model-flatten/customFlattening"))
if simpleBodyProduct != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(simpleBodyProduct))
}
return preparer.Prepare(&http.Request{})
}
// PutSimpleProductSender sends the PutSimpleProduct request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) PutSimpleProductSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutSimpleProductResponder handles the response to the PutSimpleProduct request. The method always
// closes the http.Response Body.
func (client ManagementClient) PutSimpleProductResponder(resp *http.Response) (result SimpleProduct, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutSimpleProductWithGrouping put Simple Product with client flattening true
// on the model
//
// name is product name with value 'groupproduct' simpleBodyProduct is simple
// body product to put
func (client ManagementClient) PutSimpleProductWithGrouping(name string, simpleBodyProduct *SimpleProduct) (result SimpleProduct, err error) {
if err := validation.Validate([]validation.Validation{
{simpleBodyProduct,
[]validation.Constraint{ {"simpleBodyProduct", validation.Null, false ,
[]validation.Constraint{ {"Details", validation.Null, false ,
[]validation.Constraint{ {"MaxProductDisplayName", validation.Null, true, nil },
{"MaxProductCapacity", validation.Null, true, nil },
}},
}}}}}); err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutSimpleProductWithGrouping", nil , "Validation error ")
}
req, err := client.PutSimpleProductWithGroupingPreparer(name, simpleBodyProduct)
if err != nil {
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutSimpleProductWithGrouping", nil , "Failure preparing request")
}
resp, err := client.PutSimpleProductWithGroupingSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutSimpleProductWithGrouping", resp, "Failure sending request")
}
result, err = client.PutSimpleProductWithGroupingResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "modelflatteninggroup.ManagementClient", "PutSimpleProductWithGrouping", resp, "Failure responding to request")
}
return
}
// PutSimpleProductWithGroupingPreparer prepares the PutSimpleProductWithGrouping request.
func (client ManagementClient) PutSimpleProductWithGroupingPreparer(name string, simpleBodyProduct *SimpleProduct) (*http.Request, error) {
pathParameters := map[string]interface{} {
"name": autorest.Encode("path",name),
}
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/model-flatten/customFlattening/parametergrouping/{name}/",pathParameters))
if simpleBodyProduct != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(simpleBodyProduct))
}
return preparer.Prepare(&http.Request{})
}
// PutSimpleProductWithGroupingSender sends the PutSimpleProductWithGrouping request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) PutSimpleProductWithGroupingSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutSimpleProductWithGroupingResponder handles the response to the PutSimpleProductWithGrouping request. The method always
// closes the http.Response Body.
func (client ManagementClient) PutSimpleProductWithGroupingResponder(resp *http.Response) (result SimpleProduct, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}

Просмотреть файл

@ -1,129 +0,0 @@
package modelflatteninggroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
// ProvisioningStateValues enumerates the values for provisioning state values.
type ProvisioningStateValues string
const (
// Accepted specifies the accepted state for provisioning state values.
Accepted ProvisioningStateValues = "Accepted"
// Canceled specifies the canceled state for provisioning state values.
Canceled ProvisioningStateValues = "canceled"
// Created specifies the created state for provisioning state values.
Created ProvisioningStateValues = "Created"
// Creating specifies the creating state for provisioning state values.
Creating ProvisioningStateValues = "Creating"
// Deleted specifies the deleted state for provisioning state values.
Deleted ProvisioningStateValues = "Deleted"
// Deleting specifies the deleting state for provisioning state values.
Deleting ProvisioningStateValues = "Deleting"
// Failed specifies the failed state for provisioning state values.
Failed ProvisioningStateValues = "Failed"
// OK specifies the ok state for provisioning state values.
OK ProvisioningStateValues = "OK"
// Succeeded specifies the succeeded state for provisioning state values.
Succeeded ProvisioningStateValues = "Succeeded"
// Updated specifies the updated state for provisioning state values.
Updated ProvisioningStateValues = "Updated"
// Updating specifies the updating state for provisioning state values.
Updating ProvisioningStateValues = "Updating"
)
// BaseProduct is the product documentation.
type BaseProduct struct {
BaseProductID *string `json:"base_product_id,omitempty"`
BaseProductDescription *string `json:"base_product_description,omitempty"`
}
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
ParentError *Error `json:"parentError,omitempty"`
}
// FlattenedProduct is flattened product.
type FlattenedProduct struct {
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
Location *string `json:"location,omitempty"`
Name *string `json:"name,omitempty"`
Properties *FlattenedProductProperties `json:"properties,omitempty"`
}
// FlattenedProductProperties is
type FlattenedProductProperties struct {
Pname *string `json:"p.name,omitempty"`
Type *string `json:"type,omitempty"`
ProvisioningStateValues ProvisioningStateValues `json:"provisioningStateValues,omitempty"`
ProvisioningState *string `json:"provisioningState,omitempty"`
}
// GenericURL is the Generic URL.
type GenericURL struct {
GenericValue *string `json:"generic_value,omitempty"`
}
// ListFlattenedProduct is
type ListFlattenedProduct struct {
autorest.Response `json:"-"`
Value *[]FlattenedProduct `json:"value,omitempty"`
}
// ProductURL is the product URL.
type ProductURL struct {
GenericValue *string `json:"generic_value,omitempty"`
Odatavalue *string `json:"@odata.value,omitempty"`
}
// Resource is
type Resource struct {
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
Location *string `json:"location,omitempty"`
Name *string `json:"name,omitempty"`
}
// ResourceCollection is
type ResourceCollection struct {
autorest.Response `json:"-"`
Productresource *FlattenedProduct `json:"productresource,omitempty"`
Arrayofresources *[]FlattenedProduct `json:"arrayofresources,omitempty"`
Dictionaryofresources *map[string]*FlattenedProduct `json:"dictionaryofresources,omitempty"`
}
// SetFlattenedProduct is
type SetFlattenedProduct struct {
autorest.Response `json:"-"`
Value *map[string]*FlattenedProduct `json:"value,omitempty"`
}
// SimpleProduct is the product documentation.
type SimpleProduct struct {
autorest.Response `json:"-"`
BaseProductID *string `json:"base_product_id,omitempty"`
BaseProductDescription *string `json:"base_product_description,omitempty"`
Details *SimpleProductProperties `json:"details,omitempty"`
}
// SimpleProductProperties is the product documentation.
type SimpleProductProperties struct {
MaxProductDisplayName *string `json:"max_product_display_name,omitempty"`
MaxProductCapacity *string `json:"max_product_capacity,omitempty"`
MaxProductImage *ProductURL `json:"max_product_image,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package modelflatteninggroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "modelflatteninggroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,97 +0,0 @@
// Package report implements the Azure ARM Report service API version 1.0.0.
//
// Test Infrastructure for AutoRest
package report
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
const (
// APIVersion is the version of the Report
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Report
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Report.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
}
// New creates an instance of the ManagementClient client.
func New() ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}
// GetReport get test coverage report
func (client ManagementClient) GetReport() (result SetInt32, err error) {
req, err := client.GetReportPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "report.ManagementClient", "GetReport", nil , "Failure preparing request")
}
resp, err := client.GetReportSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "report.ManagementClient", "GetReport", resp, "Failure sending request")
}
result, err = client.GetReportResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "report.ManagementClient", "GetReport", resp, "Failure responding to request")
}
return
}
// GetReportPreparer prepares the GetReport request.
func (client ManagementClient) GetReportPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/report"))
return preparer.Prepare(&http.Request{})
}
// GetReportSender sends the GetReport request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementClient) GetReportSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetReportResponder handles the response to the GetReport request. The method always
// closes the http.Response Body.
func (client ManagementClient) GetReportResponder(resp *http.Response) (result SetInt32, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}

Просмотреть файл

@ -1,26 +0,0 @@
package report
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// SetInt32 is
type SetInt32 struct {
autorest.Response `json:"-"`
Value *map[string]*int32 `json:"value,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package report
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "report", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,53 +0,0 @@
// Package optionalgroup implements the Azure ARM Optionalgroup service API
// version 1.0.0.
//
// Test Infrastructure for AutoRest
package optionalgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Optionalgroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Optionalgroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Optionalgroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
RequiredGlobalPath string
RequiredGlobalQuery string
OptionalGlobalQuery *int32
}
// New creates an instance of the ManagementClient client.
func New(requiredGlobalPath string, requiredGlobalQuery string, optionalGlobalQuery *int32) ManagementClient {
return NewWithBaseURI(DefaultBaseURI, requiredGlobalPath, requiredGlobalQuery, optionalGlobalQuery)
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, requiredGlobalPath string, requiredGlobalQuery string, optionalGlobalQuery *int32) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
RequiredGlobalPath: requiredGlobalPath,
RequiredGlobalQuery: requiredGlobalQuery,
OptionalGlobalQuery: optionalGlobalQuery,
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,411 +0,0 @@
package optionalgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// ImplicitClient is the test Infrastructure for AutoRest
type ImplicitClient struct {
ManagementClient
}
// NewImplicitClient creates an instance of the ImplicitClient client.
func NewImplicitClient(requiredGlobalPath string, requiredGlobalQuery string, optionalGlobalQuery *int32) ImplicitClient {
return NewImplicitClientWithBaseURI(DefaultBaseURI, requiredGlobalPath, requiredGlobalQuery, optionalGlobalQuery)
}
// NewImplicitClientWithBaseURI creates an instance of the ImplicitClient
// client.
func NewImplicitClientWithBaseURI(baseURI string, requiredGlobalPath string, requiredGlobalQuery string, optionalGlobalQuery *int32) ImplicitClient {
return ImplicitClient{NewWithBaseURI(baseURI, requiredGlobalPath, requiredGlobalQuery, optionalGlobalQuery)}
}
// GetOptionalGlobalQuery test implicitly optional query parameter
func (client ImplicitClient) GetOptionalGlobalQuery() (result Error, err error) {
req, err := client.GetOptionalGlobalQueryPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetOptionalGlobalQuery", nil , "Failure preparing request")
}
resp, err := client.GetOptionalGlobalQuerySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetOptionalGlobalQuery", resp, "Failure sending request")
}
result, err = client.GetOptionalGlobalQueryResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetOptionalGlobalQuery", resp, "Failure responding to request")
}
return
}
// GetOptionalGlobalQueryPreparer prepares the GetOptionalGlobalQuery request.
func (client ImplicitClient) GetOptionalGlobalQueryPreparer() (*http.Request, error) {
queryParameters := map[string]interface{} {
}
if client.OptionalGlobalQuery != nil {
queryParameters["optional-global-query"] = autorest.Encode("query",*client.OptionalGlobalQuery)
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/reqopt/global/optional/query"),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetOptionalGlobalQuerySender sends the GetOptionalGlobalQuery request. The method will close the
// http.Response Body if it receives an error.
func (client ImplicitClient) GetOptionalGlobalQuerySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetOptionalGlobalQueryResponder handles the response to the GetOptionalGlobalQuery request. The method always
// closes the http.Response Body.
func (client ImplicitClient) GetOptionalGlobalQueryResponder(resp *http.Response) (result Error, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetRequiredGlobalPath test implicitly required path parameter
func (client ImplicitClient) GetRequiredGlobalPath() (result Error, err error) {
req, err := client.GetRequiredGlobalPathPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetRequiredGlobalPath", nil , "Failure preparing request")
}
resp, err := client.GetRequiredGlobalPathSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetRequiredGlobalPath", resp, "Failure sending request")
}
result, err = client.GetRequiredGlobalPathResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetRequiredGlobalPath", resp, "Failure responding to request")
}
return
}
// GetRequiredGlobalPathPreparer prepares the GetRequiredGlobalPath request.
func (client ImplicitClient) GetRequiredGlobalPathPreparer() (*http.Request, error) {
pathParameters := map[string]interface{} {
"required-global-path": autorest.Encode("path",client.RequiredGlobalPath),
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/reqopt/global/required/path/{required-global-path}",pathParameters))
return preparer.Prepare(&http.Request{})
}
// GetRequiredGlobalPathSender sends the GetRequiredGlobalPath request. The method will close the
// http.Response Body if it receives an error.
func (client ImplicitClient) GetRequiredGlobalPathSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetRequiredGlobalPathResponder handles the response to the GetRequiredGlobalPath request. The method always
// closes the http.Response Body.
func (client ImplicitClient) GetRequiredGlobalPathResponder(resp *http.Response) (result Error, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetRequiredGlobalQuery test implicitly required query parameter
func (client ImplicitClient) GetRequiredGlobalQuery() (result Error, err error) {
req, err := client.GetRequiredGlobalQueryPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetRequiredGlobalQuery", nil , "Failure preparing request")
}
resp, err := client.GetRequiredGlobalQuerySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetRequiredGlobalQuery", resp, "Failure sending request")
}
result, err = client.GetRequiredGlobalQueryResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetRequiredGlobalQuery", resp, "Failure responding to request")
}
return
}
// GetRequiredGlobalQueryPreparer prepares the GetRequiredGlobalQuery request.
func (client ImplicitClient) GetRequiredGlobalQueryPreparer() (*http.Request, error) {
queryParameters := map[string]interface{} {
"required-global-query": autorest.Encode("query",client.RequiredGlobalQuery),
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/reqopt/global/required/query"),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetRequiredGlobalQuerySender sends the GetRequiredGlobalQuery request. The method will close the
// http.Response Body if it receives an error.
func (client ImplicitClient) GetRequiredGlobalQuerySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetRequiredGlobalQueryResponder handles the response to the GetRequiredGlobalQuery request. The method always
// closes the http.Response Body.
func (client ImplicitClient) GetRequiredGlobalQueryResponder(resp *http.Response) (result Error, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetRequiredPath test implicitly required path parameter
//
func (client ImplicitClient) GetRequiredPath(pathParameter string) (result Error, err error) {
req, err := client.GetRequiredPathPreparer(pathParameter)
if err != nil {
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetRequiredPath", nil , "Failure preparing request")
}
resp, err := client.GetRequiredPathSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetRequiredPath", resp, "Failure sending request")
}
result, err = client.GetRequiredPathResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "GetRequiredPath", resp, "Failure responding to request")
}
return
}
// GetRequiredPathPreparer prepares the GetRequiredPath request.
func (client ImplicitClient) GetRequiredPathPreparer(pathParameter string) (*http.Request, error) {
pathParameters := map[string]interface{} {
"pathParameter": autorest.Encode("path",pathParameter),
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/reqopt/implicit/required/path/{pathParameter}",pathParameters))
return preparer.Prepare(&http.Request{})
}
// GetRequiredPathSender sends the GetRequiredPath request. The method will close the
// http.Response Body if it receives an error.
func (client ImplicitClient) GetRequiredPathSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetRequiredPathResponder handles the response to the GetRequiredPath request. The method always
// closes the http.Response Body.
func (client ImplicitClient) GetRequiredPathResponder(resp *http.Response) (result Error, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// PutOptionalBody test implicitly optional body parameter
//
func (client ImplicitClient) PutOptionalBody(bodyParameter string) (result autorest.Response, err error) {
req, err := client.PutOptionalBodyPreparer(bodyParameter)
if err != nil {
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "PutOptionalBody", nil , "Failure preparing request")
}
resp, err := client.PutOptionalBodySender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "PutOptionalBody", resp, "Failure sending request")
}
result, err = client.PutOptionalBodyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "PutOptionalBody", resp, "Failure responding to request")
}
return
}
// PutOptionalBodyPreparer prepares the PutOptionalBody request.
func (client ImplicitClient) PutOptionalBodyPreparer(bodyParameter string) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/reqopt/implicit/optional/body"))
if len(bodyParameter) > 0 {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(bodyParameter))
}
return preparer.Prepare(&http.Request{})
}
// PutOptionalBodySender sends the PutOptionalBody request. The method will close the
// http.Response Body if it receives an error.
func (client ImplicitClient) PutOptionalBodySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutOptionalBodyResponder handles the response to the PutOptionalBody request. The method always
// closes the http.Response Body.
func (client ImplicitClient) PutOptionalBodyResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutOptionalHeader test implicitly optional header parameter
//
func (client ImplicitClient) PutOptionalHeader(queryParameter string) (result autorest.Response, err error) {
req, err := client.PutOptionalHeaderPreparer(queryParameter)
if err != nil {
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "PutOptionalHeader", nil , "Failure preparing request")
}
resp, err := client.PutOptionalHeaderSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "PutOptionalHeader", resp, "Failure sending request")
}
result, err = client.PutOptionalHeaderResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "PutOptionalHeader", resp, "Failure responding to request")
}
return
}
// PutOptionalHeaderPreparer prepares the PutOptionalHeader request.
func (client ImplicitClient) PutOptionalHeaderPreparer(queryParameter string) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/reqopt/implicit/optional/header"))
if len(queryParameter) > 0 {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithHeader("queryParameter",autorest.String(queryParameter)))
}
return preparer.Prepare(&http.Request{})
}
// PutOptionalHeaderSender sends the PutOptionalHeader request. The method will close the
// http.Response Body if it receives an error.
func (client ImplicitClient) PutOptionalHeaderSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutOptionalHeaderResponder handles the response to the PutOptionalHeader request. The method always
// closes the http.Response Body.
func (client ImplicitClient) PutOptionalHeaderResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// PutOptionalQuery test implicitly optional query parameter
//
func (client ImplicitClient) PutOptionalQuery(queryParameter string) (result autorest.Response, err error) {
req, err := client.PutOptionalQueryPreparer(queryParameter)
if err != nil {
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "PutOptionalQuery", nil , "Failure preparing request")
}
resp, err := client.PutOptionalQuerySender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "PutOptionalQuery", resp, "Failure sending request")
}
result, err = client.PutOptionalQueryResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "optionalgroup.ImplicitClient", "PutOptionalQuery", resp, "Failure responding to request")
}
return
}
// PutOptionalQueryPreparer prepares the PutOptionalQuery request.
func (client ImplicitClient) PutOptionalQueryPreparer(queryParameter string) (*http.Request, error) {
queryParameters := map[string]interface{} {
}
if len(queryParameter) > 0 {
queryParameters["queryParameter"] = autorest.Encode("query",queryParameter)
}
preparer := autorest.CreatePreparer(
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/reqopt/implicit/optional/query"),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// PutOptionalQuerySender sends the PutOptionalQuery request. The method will close the
// http.Response Body if it receives an error.
func (client ImplicitClient) PutOptionalQuerySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// PutOptionalQueryResponder handles the response to the PutOptionalQuery request. The method always
// closes the http.Response Body.
func (client ImplicitClient) PutOptionalQueryResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Просмотреть файл

@ -1,67 +0,0 @@
package optionalgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
// ArrayOptionalWrapper is
type ArrayOptionalWrapper struct {
Value *[]string `json:"value,omitempty"`
}
// ArrayWrapper is
type ArrayWrapper struct {
Value *[]string `json:"value,omitempty"`
}
// ClassOptionalWrapper is
type ClassOptionalWrapper struct {
Value *Product `json:"value,omitempty"`
}
// ClassWrapper is
type ClassWrapper struct {
Value *Product `json:"value,omitempty"`
}
// Error is
type Error struct {
autorest.Response `json:"-"`
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}
// IntOptionalWrapper is
type IntOptionalWrapper struct {
Value *int32 `json:"value,omitempty"`
}
// IntWrapper is
type IntWrapper struct {
Value *int32 `json:"value,omitempty"`
}
// Product is
type Product struct {
ID *int32 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
}
// StringOptionalWrapper is
type StringOptionalWrapper struct {
Value *string `json:"value,omitempty"`
}
// StringWrapper is
type StringWrapper struct {
Value *string `json:"value,omitempty"`
}

Просмотреть файл

@ -1,33 +0,0 @@
package optionalgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "optionalgroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Просмотреть файл

@ -1,51 +0,0 @@
// Package urlgroup implements the Azure ARM Urlgroup service API version
// 1.0.0.
//
// Test Infrastructure for AutoRest
package urlgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
)
const (
// APIVersion is the version of the Urlgroup
APIVersion = "1.0.0"
// DefaultBaseURI is the default URI used for the service Urlgroup
DefaultBaseURI = "http://localhost"
)
// ManagementClient is the base client for Urlgroup.
type ManagementClient struct {
autorest.Client
BaseURI string
APIVersion string
GlobalStringPath string
GlobalStringQuery string
}
// New creates an instance of the ManagementClient client.
func New(globalStringPath string, globalStringQuery string) ManagementClient {
return NewWithBaseURI(DefaultBaseURI, globalStringPath, globalStringQuery)
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, globalStringPath string, globalStringQuery string) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
GlobalStringPath: globalStringPath,
GlobalStringQuery: globalStringQuery,
}
}

Просмотреть файл

@ -1,29 +0,0 @@
package urlgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// URIColor enumerates the values for uri color.
type URIColor string
const (
// Bluecolor specifies the bluecolor state for uri color.
Bluecolor URIColor = "blue color"
// Greencolor specifies the greencolor state for uri color.
Greencolor URIColor = "green color"
// Redcolor specifies the redcolor state for uri color.
Redcolor URIColor = "red color"
)
// Error is
type Error struct {
Status *int32 `json:"status,omitempty"`
Message *string `json:"message,omitempty"`
}

Просмотреть файл

@ -1,335 +0,0 @@
package urlgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// PathItemsClient is the test Infrastructure for AutoRest
type PathItemsClient struct {
ManagementClient
}
// NewPathItemsClient creates an instance of the PathItemsClient client.
func NewPathItemsClient(globalStringPath string, globalStringQuery string) PathItemsClient {
return NewPathItemsClientWithBaseURI(DefaultBaseURI, globalStringPath, globalStringQuery)
}
// NewPathItemsClientWithBaseURI creates an instance of the PathItemsClient
// client.
func NewPathItemsClientWithBaseURI(baseURI string, globalStringPath string, globalStringQuery string) PathItemsClient {
return PathItemsClient{NewWithBaseURI(baseURI, globalStringPath, globalStringQuery)}
}
// GetAllWithValues send globalStringPath='globalStringPath',
// pathItemStringPath='pathItemStringPath',
// localStringPath='localStringPath', globalStringQuery='globalStringQuery',
// pathItemStringQuery='pathItemStringQuery',
// localStringQuery='localStringQuery'
//
// localStringPath is should contain value 'localStringPath'
// pathItemStringPath is a string value 'pathItemStringPath' that appears in
// the path localStringQuery is should contain value 'localStringQuery'
// pathItemStringQuery is a string value 'pathItemStringQuery' that appears
// as a query parameter
func (client PathItemsClient) GetAllWithValues(localStringPath string, pathItemStringPath string, localStringQuery string, pathItemStringQuery string) (result autorest.Response, err error) {
req, err := client.GetAllWithValuesPreparer(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery)
if err != nil {
return result, autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetAllWithValues", nil , "Failure preparing request")
}
resp, err := client.GetAllWithValuesSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetAllWithValues", resp, "Failure sending request")
}
result, err = client.GetAllWithValuesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetAllWithValues", resp, "Failure responding to request")
}
return
}
// GetAllWithValuesPreparer prepares the GetAllWithValues request.
func (client PathItemsClient) GetAllWithValuesPreparer(localStringPath string, pathItemStringPath string, localStringQuery string, pathItemStringQuery string) (*http.Request, error) {
pathParameters := map[string]interface{} {
"globalStringPath": autorest.Encode("path",client.GlobalStringPath),
"localStringPath": autorest.Encode("path",localStringPath),
"pathItemStringPath": autorest.Encode("path",pathItemStringPath),
}
queryParameters := map[string]interface{} {
}
if len(localStringQuery) > 0 {
queryParameters["localStringQuery"] = autorest.Encode("query",localStringQuery)
}
if len(pathItemStringQuery) > 0 {
queryParameters["pathItemStringQuery"] = autorest.Encode("query",pathItemStringQuery)
}
if len(client.GlobalStringQuery) > 0 {
queryParameters["globalStringQuery"] = autorest.Encode("query",client.GlobalStringQuery)
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/pathitem/nullable/globalStringPath/{globalStringPath}/pathItemStringPath/{pathItemStringPath}/localStringPath/{localStringPath}/globalStringQuery/pathItemStringQuery/localStringQuery",pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetAllWithValuesSender sends the GetAllWithValues request. The method will close the
// http.Response Body if it receives an error.
func (client PathItemsClient) GetAllWithValuesSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetAllWithValuesResponder handles the response to the GetAllWithValues request. The method always
// closes the http.Response Body.
func (client PathItemsClient) GetAllWithValuesResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// GetGlobalAndLocalQueryNull send globalStringPath=globalStringPath,
// pathItemStringPath='pathItemStringPath',
// localStringPath='localStringPath', globalStringQuery=null,
// pathItemStringQuery='pathItemStringQuery', localStringQuery=null
//
// localStringPath is should contain value 'localStringPath'
// pathItemStringPath is a string value 'pathItemStringPath' that appears in
// the path localStringQuery is should contain null value pathItemStringQuery
// is a string value 'pathItemStringQuery' that appears as a query parameter
func (client PathItemsClient) GetGlobalAndLocalQueryNull(localStringPath string, pathItemStringPath string, localStringQuery string, pathItemStringQuery string) (result autorest.Response, err error) {
req, err := client.GetGlobalAndLocalQueryNullPreparer(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery)
if err != nil {
return result, autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetGlobalAndLocalQueryNull", nil , "Failure preparing request")
}
resp, err := client.GetGlobalAndLocalQueryNullSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetGlobalAndLocalQueryNull", resp, "Failure sending request")
}
result, err = client.GetGlobalAndLocalQueryNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetGlobalAndLocalQueryNull", resp, "Failure responding to request")
}
return
}
// GetGlobalAndLocalQueryNullPreparer prepares the GetGlobalAndLocalQueryNull request.
func (client PathItemsClient) GetGlobalAndLocalQueryNullPreparer(localStringPath string, pathItemStringPath string, localStringQuery string, pathItemStringQuery string) (*http.Request, error) {
pathParameters := map[string]interface{} {
"globalStringPath": autorest.Encode("path",client.GlobalStringPath),
"localStringPath": autorest.Encode("path",localStringPath),
"pathItemStringPath": autorest.Encode("path",pathItemStringPath),
}
queryParameters := map[string]interface{} {
}
if len(localStringQuery) > 0 {
queryParameters["localStringQuery"] = autorest.Encode("query",localStringQuery)
}
if len(pathItemStringQuery) > 0 {
queryParameters["pathItemStringQuery"] = autorest.Encode("query",pathItemStringQuery)
}
if len(client.GlobalStringQuery) > 0 {
queryParameters["globalStringQuery"] = autorest.Encode("query",client.GlobalStringQuery)
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/pathitem/nullable/globalStringPath/{globalStringPath}/pathItemStringPath/{pathItemStringPath}/localStringPath/{localStringPath}/null/pathItemStringQuery/null",pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetGlobalAndLocalQueryNullSender sends the GetGlobalAndLocalQueryNull request. The method will close the
// http.Response Body if it receives an error.
func (client PathItemsClient) GetGlobalAndLocalQueryNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetGlobalAndLocalQueryNullResponder handles the response to the GetGlobalAndLocalQueryNull request. The method always
// closes the http.Response Body.
func (client PathItemsClient) GetGlobalAndLocalQueryNullResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// GetGlobalQueryNull send globalStringPath='globalStringPath',
// pathItemStringPath='pathItemStringPath',
// localStringPath='localStringPath', globalStringQuery=null,
// pathItemStringQuery='pathItemStringQuery',
// localStringQuery='localStringQuery'
//
// localStringPath is should contain value 'localStringPath'
// pathItemStringPath is a string value 'pathItemStringPath' that appears in
// the path localStringQuery is should contain value 'localStringQuery'
// pathItemStringQuery is a string value 'pathItemStringQuery' that appears
// as a query parameter
func (client PathItemsClient) GetGlobalQueryNull(localStringPath string, pathItemStringPath string, localStringQuery string, pathItemStringQuery string) (result autorest.Response, err error) {
req, err := client.GetGlobalQueryNullPreparer(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery)
if err != nil {
return result, autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetGlobalQueryNull", nil , "Failure preparing request")
}
resp, err := client.GetGlobalQueryNullSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetGlobalQueryNull", resp, "Failure sending request")
}
result, err = client.GetGlobalQueryNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetGlobalQueryNull", resp, "Failure responding to request")
}
return
}
// GetGlobalQueryNullPreparer prepares the GetGlobalQueryNull request.
func (client PathItemsClient) GetGlobalQueryNullPreparer(localStringPath string, pathItemStringPath string, localStringQuery string, pathItemStringQuery string) (*http.Request, error) {
pathParameters := map[string]interface{} {
"globalStringPath": autorest.Encode("path",client.GlobalStringPath),
"localStringPath": autorest.Encode("path",localStringPath),
"pathItemStringPath": autorest.Encode("path",pathItemStringPath),
}
queryParameters := map[string]interface{} {
}
if len(localStringQuery) > 0 {
queryParameters["localStringQuery"] = autorest.Encode("query",localStringQuery)
}
if len(pathItemStringQuery) > 0 {
queryParameters["pathItemStringQuery"] = autorest.Encode("query",pathItemStringQuery)
}
if len(client.GlobalStringQuery) > 0 {
queryParameters["globalStringQuery"] = autorest.Encode("query",client.GlobalStringQuery)
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/pathitem/nullable/globalStringPath/{globalStringPath}/pathItemStringPath/{pathItemStringPath}/localStringPath/{localStringPath}/null/pathItemStringQuery/localStringQuery",pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetGlobalQueryNullSender sends the GetGlobalQueryNull request. The method will close the
// http.Response Body if it receives an error.
func (client PathItemsClient) GetGlobalQueryNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetGlobalQueryNullResponder handles the response to the GetGlobalQueryNull request. The method always
// closes the http.Response Body.
func (client PathItemsClient) GetGlobalQueryNullResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}
// GetLocalPathItemQueryNull send globalStringPath='globalStringPath',
// pathItemStringPath='pathItemStringPath',
// localStringPath='localStringPath', globalStringQuery='globalStringQuery',
// pathItemStringQuery=null, localStringQuery=null
//
// localStringPath is should contain value 'localStringPath'
// pathItemStringPath is a string value 'pathItemStringPath' that appears in
// the path localStringQuery is should contain value null pathItemStringQuery
// is should contain value null
func (client PathItemsClient) GetLocalPathItemQueryNull(localStringPath string, pathItemStringPath string, localStringQuery string, pathItemStringQuery string) (result autorest.Response, err error) {
req, err := client.GetLocalPathItemQueryNullPreparer(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery)
if err != nil {
return result, autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetLocalPathItemQueryNull", nil , "Failure preparing request")
}
resp, err := client.GetLocalPathItemQueryNullSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetLocalPathItemQueryNull", resp, "Failure sending request")
}
result, err = client.GetLocalPathItemQueryNullResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "urlgroup.PathItemsClient", "GetLocalPathItemQueryNull", resp, "Failure responding to request")
}
return
}
// GetLocalPathItemQueryNullPreparer prepares the GetLocalPathItemQueryNull request.
func (client PathItemsClient) GetLocalPathItemQueryNullPreparer(localStringPath string, pathItemStringPath string, localStringQuery string, pathItemStringQuery string) (*http.Request, error) {
pathParameters := map[string]interface{} {
"globalStringPath": autorest.Encode("path",client.GlobalStringPath),
"localStringPath": autorest.Encode("path",localStringPath),
"pathItemStringPath": autorest.Encode("path",pathItemStringPath),
}
queryParameters := map[string]interface{} {
}
if len(localStringQuery) > 0 {
queryParameters["localStringQuery"] = autorest.Encode("query",localStringQuery)
}
if len(pathItemStringQuery) > 0 {
queryParameters["pathItemStringQuery"] = autorest.Encode("query",pathItemStringQuery)
}
if len(client.GlobalStringQuery) > 0 {
queryParameters["globalStringQuery"] = autorest.Encode("query",client.GlobalStringQuery)
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/pathitem/nullable/globalStringPath/{globalStringPath}/pathItemStringPath/{pathItemStringPath}/localStringPath/{localStringPath}/globalStringQuery/null/null",pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetLocalPathItemQueryNullSender sends the GetLocalPathItemQueryNull request. The method will close the
// http.Response Body if it receives an error.
func (client PathItemsClient) GetLocalPathItemQueryNullSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetLocalPathItemQueryNullResponder handles the response to the GetLocalPathItemQueryNull request. The method always
// closes the http.Response Body.
func (client PathItemsClient) GetLocalPathItemQueryNullResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,33 +0,0 @@
package urlgroup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"fmt"
)
const (
major = "3"
minor = "1"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
userAgentFormat = "Azure-SDK-for-Go/%s arm-%s/%s"
)
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "urlgroup", "1.0.0")
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше