vendor: update all dependencies to latest versions
This commit is contained in:
+74
-72
@@ -14,20 +14,18 @@ package search
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/azure"
|
||||
"github.com/Azure/go-autorest/autorest/validation"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ServicesClient is the client that can be used to manage Azure Search
|
||||
// services and API keys.
|
||||
// ServicesClient is the client that can be used to manage Azure Search services and API keys.
|
||||
type ServicesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -37,20 +35,17 @@ func NewServicesClient(subscriptionID string) ServicesClient {
|
||||
return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewServicesClientWithBaseURI creates an instance of the ServicesClient
|
||||
// client.
|
||||
// NewServicesClientWithBaseURI creates an instance of the ServicesClient client.
|
||||
func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient {
|
||||
return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CheckNameAvailability checks whether or not the given Search service name is
|
||||
// available for use. Search service names must be globally unique since they
|
||||
// are part of the service URI (https://<name>.search.windows.net).
|
||||
// CheckNameAvailability checks whether or not the given Search service name is available for use. Search service names
|
||||
// must be globally unique since they are part of the service URI (https://<name>.search.windows.net).
|
||||
//
|
||||
// checkNameAvailabilityInput is the resource name and type to check.
|
||||
// clientRequestID is a client-generated GUID value that identifies this
|
||||
// request. If specified, this will be included in response information as a
|
||||
// way to track the request.
|
||||
// checkNameAvailabilityInput is the resource name and type to check. clientRequestID is a client-generated GUID value
|
||||
// that identifies this request. If specified, this will be included in response information as a way to track the
|
||||
// request.
|
||||
func (client ServicesClient) CheckNameAvailability(checkNameAvailabilityInput CheckNameAvailabilityInput, clientRequestID *uuid.UUID) (result CheckNameAvailabilityOutput, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: checkNameAvailabilityInput,
|
||||
@@ -124,23 +119,22 @@ func (client ServicesClient) CheckNameAvailabilityResponder(resp *http.Response)
|
||||
return
|
||||
}
|
||||
|
||||
// CreateOrUpdate creates or updates a Search service in the given resource
|
||||
// group. If the Search service already exists, all properties will be updated
|
||||
// with the given values.
|
||||
// CreateOrUpdate creates or updates a Search service in the given resource group. If the Search service already
|
||||
// exists, all properties will be updated with the given values. This method may poll for completion. Polling can be
|
||||
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
|
||||
// requests.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the current
|
||||
// subscription. You can obtain this value from the Azure Resource Manager API
|
||||
// or the portal. searchServiceName is the name of the Azure Search service to
|
||||
// create or update. Search service names must only contain lowercase letters,
|
||||
// digits or dashes, cannot use dash as the first two or last one characters,
|
||||
// cannot contain consecutive dashes, and must be between 2 and 60 characters
|
||||
// in length. Search service names must be globally unique since they are part
|
||||
// of the service URI (https://<name>.search.windows.net). You cannot change
|
||||
// the service name after the service is created. service is the definition of
|
||||
// the Search service to create or update. clientRequestID is a
|
||||
// client-generated GUID value that identifies this request. If specified, this
|
||||
// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from
|
||||
// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service to create or
|
||||
// update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two
|
||||
// or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search
|
||||
// service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net).
|
||||
// You cannot change the service name after the service is created. service is the definition of the Search service to
|
||||
// create or update. clientRequestID is a client-generated GUID value that identifies this request. If specified, this
|
||||
// will be included in response information as a way to track the request.
|
||||
func (client ServicesClient) CreateOrUpdate(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID) (result Service, err error) {
|
||||
func (client ServicesClient) CreateOrUpdate(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID, cancel <-chan struct{}) (<-chan Service, <-chan error) {
|
||||
resultChan := make(chan Service, 1)
|
||||
errChan := make(chan error, 1)
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: service,
|
||||
Constraints: []validation.Constraint{{Target: "service.ServiceProperties", Name: validation.Null, Rule: false,
|
||||
@@ -154,32 +148,46 @@ func (client ServicesClient) CreateOrUpdate(resourceGroupName string, searchServ
|
||||
}},
|
||||
}},
|
||||
{Target: "service.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "search.ServicesClient", "CreateOrUpdate")
|
||||
errChan <- validation.NewErrorWithValidationError(err, "search.ServicesClient", "CreateOrUpdate")
|
||||
close(errChan)
|
||||
close(resultChan)
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
req, err := client.CreateOrUpdatePreparer(resourceGroupName, searchServiceName, service, clientRequestID)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
var err error
|
||||
var result Service
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
req, err := client.CreateOrUpdatePreparer(resourceGroupName, searchServiceName, service, clientRequestID, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.CreateOrUpdateSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
resp, err := client.CreateOrUpdateSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.CreateOrUpdateResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
result, err = client.CreateOrUpdateResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
|
||||
func (client ServicesClient) CreateOrUpdatePreparer(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID) (*http.Request, error) {
|
||||
func (client ServicesClient) CreateOrUpdatePreparer(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"searchServiceName": autorest.Encode("path", searchServiceName),
|
||||
@@ -202,13 +210,15 @@ func (client ServicesClient) CreateOrUpdatePreparer(resourceGroupName string, se
|
||||
preparer = autorest.DecoratePreparer(preparer,
|
||||
autorest.WithHeader("x-ms-client-request-id", autorest.String(clientRequestID)))
|
||||
}
|
||||
return preparer.Prepare(&http.Request{})
|
||||
return preparer.Prepare(&http.Request{Cancel: cancel})
|
||||
}
|
||||
|
||||
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServicesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
return autorest.SendWithSender(client,
|
||||
req,
|
||||
azure.DoPollForAsynchronous(client.PollingDelay))
|
||||
}
|
||||
|
||||
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
|
||||
@@ -224,15 +234,12 @@ func (client ServicesClient) CreateOrUpdateResponder(resp *http.Response) (resul
|
||||
return
|
||||
}
|
||||
|
||||
// Delete deletes a Search service in the given resource group, along with its
|
||||
// associated resources.
|
||||
// Delete deletes a Search service in the given resource group, along with its associated resources.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the current
|
||||
// subscription. You can obtain this value from the Azure Resource Manager API
|
||||
// or the portal. searchServiceName is the name of the Azure Search service
|
||||
// associated with the specified resource group. clientRequestID is a
|
||||
// client-generated GUID value that identifies this request. If specified, this
|
||||
// will be included in response information as a way to track the request.
|
||||
// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from
|
||||
// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated
|
||||
// with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If
|
||||
// specified, this will be included in response information as a way to track the request.
|
||||
func (client ServicesClient) Delete(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, searchServiceName, clientRequestID)
|
||||
if err != nil {
|
||||
@@ -300,12 +307,10 @@ func (client ServicesClient) DeleteResponder(resp *http.Response) (result autore
|
||||
|
||||
// Get gets the Search service with the given name in the given resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the current
|
||||
// subscription. You can obtain this value from the Azure Resource Manager API
|
||||
// or the portal. searchServiceName is the name of the Azure Search service
|
||||
// associated with the specified resource group. clientRequestID is a
|
||||
// client-generated GUID value that identifies this request. If specified, this
|
||||
// will be included in response information as a way to track the request.
|
||||
// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from
|
||||
// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated
|
||||
// with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If
|
||||
// specified, this will be included in response information as a way to track the request.
|
||||
func (client ServicesClient) Get(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result Service, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, searchServiceName, clientRequestID)
|
||||
if err != nil {
|
||||
@@ -372,14 +377,11 @@ func (client ServicesClient) GetResponder(resp *http.Response) (result Service,
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroup gets a list of all Search services in the given resource
|
||||
// group.
|
||||
// ListByResourceGroup gets a list of all Search services in the given resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the current
|
||||
// subscription. You can obtain this value from the Azure Resource Manager API
|
||||
// or the portal. clientRequestID is a client-generated GUID value that
|
||||
// identifies this request. If specified, this will be included in response
|
||||
// information as a way to track the request.
|
||||
// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from
|
||||
// the Azure Resource Manager API or the portal. clientRequestID is a client-generated GUID value that identifies this
|
||||
// request. If specified, this will be included in response information as a way to track the request.
|
||||
func (client ServicesClient) ListByResourceGroup(resourceGroupName string, clientRequestID *uuid.UUID) (result ServiceListResult, err error) {
|
||||
req, err := client.ListByResourceGroupPreparer(resourceGroupName, clientRequestID)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user