vendor: update all dependencies to latest versions
This commit is contained in:
+64
-24
@@ -14,9 +14,8 @@ package hdinsight
|
||||
// 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"
|
||||
@@ -24,7 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ApplicationsClient is the the HDInsight Management Client.
|
||||
// ApplicationsClient is the hDInsight Management Client
|
||||
type ApplicationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -34,17 +33,15 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient {
|
||||
return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewApplicationsClientWithBaseURI creates an instance of the
|
||||
// ApplicationsClient client.
|
||||
// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client.
|
||||
func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient {
|
||||
return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create the operation creates applications for the HDInsight cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. applicationName is the constant value for the
|
||||
// applicationName parameters is the application create request.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. applicationName is the
|
||||
// constant value for the applicationName parameters is the application create request.
|
||||
func (client ApplicationsClient) Create(resourceGroupName string, clusterName string, applicationName string, parameters ApplicationGetProperties) (result Application, err error) {
|
||||
req, err := client.CreatePreparer(resourceGroupName, clusterName, applicationName, parameters)
|
||||
if err != nil {
|
||||
@@ -110,14 +107,12 @@ func (client ApplicationsClient) CreateResponder(resp *http.Response) (result Ap
|
||||
return
|
||||
}
|
||||
|
||||
// Delete lists all of the applications HDInsight cluster. 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.
|
||||
// Delete lists all of the applications HDInsight cluster. 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. clusterName is the name
|
||||
// of the cluster. applicationName is the constant value for the
|
||||
// applicationName.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. applicationName is the
|
||||
// constant value for the applicationName.
|
||||
func (client ApplicationsClient) Delete(resourceGroupName string, clusterName string, applicationName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -125,8 +120,10 @@ func (client ApplicationsClient) Delete(resourceGroupName string, clusterName st
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -195,10 +192,9 @@ func (client ApplicationsClient) DeleteResponder(resp *http.Response) (result au
|
||||
|
||||
// Get lists properties of the application.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster. applicationName is the constant value for the
|
||||
// applicationName
|
||||
func (client ApplicationsClient) Get(resourceGroupName string, clusterName string, applicationName string) (result Application, err error) {
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. applicationName is the
|
||||
// constant value for the applicationName
|
||||
func (client ApplicationsClient) Get(resourceGroupName string, clusterName string, applicationName ApplicationName) (result Application, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, clusterName, applicationName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "hdinsight.ApplicationsClient", "Get", nil, "Failure preparing request")
|
||||
@@ -221,7 +217,7 @@ func (client ApplicationsClient) Get(resourceGroupName string, clusterName strin
|
||||
}
|
||||
|
||||
// GetPreparer prepares the Get request.
|
||||
func (client ApplicationsClient) GetPreparer(resourceGroupName string, clusterName string, applicationName string) (*http.Request, error) {
|
||||
func (client ApplicationsClient) GetPreparer(resourceGroupName string, clusterName string, applicationName ApplicationName) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"applicationName": autorest.Encode("path", applicationName),
|
||||
"clusterName": autorest.Encode("path", clusterName),
|
||||
@@ -263,8 +259,7 @@ func (client ApplicationsClient) GetResponder(resp *http.Response) (result Appli
|
||||
|
||||
// List lists all of the applications HDInsight cluster.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name
|
||||
// of the cluster.
|
||||
// resourceGroupName is the name of the resource group. clusterName is the name of the cluster.
|
||||
func (client ApplicationsClient) List(resourceGroupName string, clusterName string) (result ApplicationListResult, err error) {
|
||||
req, err := client.ListPreparer(resourceGroupName, clusterName)
|
||||
if err != nil {
|
||||
@@ -350,3 +345,48 @@ func (client ApplicationsClient) ListNextResults(lastResults ApplicationListResu
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ApplicationsClient) ListComplete(resourceGroupName string, clusterName string, cancel <-chan struct{}) (<-chan Application, <-chan error) {
|
||||
resultChan := make(chan Application)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(resourceGroupName, clusterName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user