vendor: update all dependencies to latest versions
This commit is contained in:
+68
-26
@@ -14,9 +14,8 @@ package customerinsights
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,10 +24,9 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// LinksClient is the the Azure Customer Insights management API provides a
|
||||
// RESTful set of web services that interact with Azure Customer Insights
|
||||
// service to manage your resources. The API has entities that capture the
|
||||
// relationship between an end user and the Azure Customer Insights service.
|
||||
// LinksClient is the the Azure Customer Insights management API provides a RESTful set of web services that interact
|
||||
// with Azure Customer Insights service to manage your resources. The API has entities that capture the relationship
|
||||
// between an end user and the Azure Customer Insights service.
|
||||
type LinksClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -43,14 +41,12 @@ func NewLinksClientWithBaseURI(baseURI string, subscriptionID string) LinksClien
|
||||
return LinksClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate creates a link or updates an existing link in the hub. 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
|
||||
// CreateOrUpdate creates a link or updates an existing link in the hub. 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. hubName is the name of
|
||||
// the hub. linkName is the name of the link. parameters is parameters supplied
|
||||
// to the CreateOrUpdate Link operation.
|
||||
// resourceGroupName is the name of the resource group. hubName is the name of the hub. linkName is the name of the
|
||||
// link. parameters is parameters supplied to the CreateOrUpdate Link operation.
|
||||
func (client LinksClient) CreateOrUpdate(resourceGroupName string, hubName string, linkName string, parameters LinkResourceFormat, cancel <-chan struct{}) (<-chan LinkResourceFormat, <-chan error) {
|
||||
resultChan := make(chan LinkResourceFormat, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -61,8 +57,8 @@ func (client LinksClient) CreateOrUpdate(resourceGroupName string, hubName strin
|
||||
{Target: "linkName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9_]+$`, Chain: nil}}},
|
||||
{TargetValue: parameters,
|
||||
Constraints: []validation.Constraint{{Target: "parameters.LinkDefinition", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.LinkDefinition.SourceInteractionType", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.LinkDefinition.TargetProfileType", Name: validation.Null, Rule: true, Chain: nil},
|
||||
Chain: []validation.Constraint{{Target: "parameters.LinkDefinition.SourceEntityTypeName", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.LinkDefinition.TargetEntityTypeName", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.LinkDefinition.ParticipantPropertyReferences", Name: validation.Null, Rule: true, Chain: nil},
|
||||
}}}}}); err != nil {
|
||||
errChan <- validation.NewErrorWithValidationError(err, "customerinsights.LinksClient", "CreateOrUpdate")
|
||||
@@ -75,8 +71,10 @@ func (client LinksClient) CreateOrUpdate(resourceGroupName string, hubName strin
|
||||
var err error
|
||||
var result LinkResourceFormat
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -110,7 +108,7 @@ func (client LinksClient) CreateOrUpdatePreparer(resourceGroupName string, hubNa
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-04-26"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -148,8 +146,8 @@ func (client LinksClient) CreateOrUpdateResponder(resp *http.Response) (result L
|
||||
|
||||
// Delete deletes a link in the hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. hubName is the name of
|
||||
// the hub. linkName is the name of the link.
|
||||
// resourceGroupName is the name of the resource group. hubName is the name of the hub. linkName is the name of the
|
||||
// link.
|
||||
func (client LinksClient) Delete(resourceGroupName string, hubName string, linkName string) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, hubName, linkName)
|
||||
if err != nil {
|
||||
@@ -181,7 +179,7 @@ func (client LinksClient) DeletePreparer(resourceGroupName string, hubName strin
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-04-26"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -214,8 +212,8 @@ func (client LinksClient) DeleteResponder(resp *http.Response) (result autorest.
|
||||
|
||||
// Get gets a link in the hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. hubName is the name of
|
||||
// the hub. linkName is the name of the link.
|
||||
// resourceGroupName is the name of the resource group. hubName is the name of the hub. linkName is the name of the
|
||||
// link.
|
||||
func (client LinksClient) Get(resourceGroupName string, hubName string, linkName string) (result LinkResourceFormat, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, hubName, linkName)
|
||||
if err != nil {
|
||||
@@ -247,7 +245,7 @@ func (client LinksClient) GetPreparer(resourceGroupName string, hubName string,
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-04-26"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -281,8 +279,7 @@ func (client LinksClient) GetResponder(resp *http.Response) (result LinkResource
|
||||
|
||||
// ListByHub gets all the links in the specified hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. hubName is the name of
|
||||
// the hub.
|
||||
// resourceGroupName is the name of the resource group. hubName is the name of the hub.
|
||||
func (client LinksClient) ListByHub(resourceGroupName string, hubName string) (result LinkListResult, err error) {
|
||||
req, err := client.ListByHubPreparer(resourceGroupName, hubName)
|
||||
if err != nil {
|
||||
@@ -313,7 +310,7 @@ func (client LinksClient) ListByHubPreparer(resourceGroupName string, hubName st
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-04-26"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -368,3 +365,48 @@ func (client LinksClient) ListByHubNextResults(lastResults LinkListResult) (resu
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByHubComplete gets all elements from the list without paging.
|
||||
func (client LinksClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan LinkResourceFormat, <-chan error) {
|
||||
resultChan := make(chan LinkResourceFormat)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByHub(resourceGroupName, hubName)
|
||||
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.ListByHubNextResults(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