vendor: update all dependencies to latest versions
This commit is contained in:
+255
-197
@@ -14,9 +14,8 @@ package servicebus
|
||||
// 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"
|
||||
@@ -42,10 +41,9 @@ func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsCli
|
||||
|
||||
// CreateOrUpdate creates a topic in the specified namespace.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name topicName is the topic
|
||||
// name. parameters is parameters supplied to create a topic resource.
|
||||
func (client TopicsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, topicName string, parameters TopicCreateOrUpdateParameters) (result TopicResource, err error) {
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
// topicName is the topic name. parameters is parameters supplied to create a topic resource.
|
||||
func (client TopicsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, topicName string, parameters SBTopic) (result SBTopic, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
@@ -54,10 +52,7 @@ func (client TopicsClient) CreateOrUpdate(resourceGroupName string, namespaceNam
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
|
||||
{TargetValue: topicName,
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
{TargetValue: parameters,
|
||||
Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "CreateOrUpdate")
|
||||
}
|
||||
|
||||
@@ -83,7 +78,7 @@ func (client TopicsClient) CreateOrUpdate(resourceGroupName string, namespaceNam
|
||||
}
|
||||
|
||||
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
|
||||
func (client TopicsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, topicName string, parameters TopicCreateOrUpdateParameters) (*http.Request, error) {
|
||||
func (client TopicsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, topicName string, parameters SBTopic) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"namespaceName": autorest.Encode("path", namespaceName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
@@ -91,7 +86,7 @@ func (client TopicsClient) CreateOrUpdatePreparer(resourceGroupName string, name
|
||||
"topicName": autorest.Encode("path", topicName),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -114,7 +109,7 @@ func (client TopicsClient) CreateOrUpdateSender(req *http.Request) (*http.Respon
|
||||
|
||||
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result TopicResource, err error) {
|
||||
func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result SBTopic, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
@@ -125,14 +120,12 @@ func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result
|
||||
return
|
||||
}
|
||||
|
||||
// CreateOrUpdateAuthorizationRule creates an authorizatio rule for the
|
||||
// specified topic.
|
||||
// CreateOrUpdateAuthorizationRule creates an authorizatio rule for the specified topic.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name topicName is the topic
|
||||
// name. authorizationRuleName is the authorizationrule name. parameters is the
|
||||
// shared access authorization rule.
|
||||
func (client TopicsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) {
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
// topicName is the topic name. authorizationRuleName is the authorizationrule name. parameters is the shared access
|
||||
// authorization rule.
|
||||
func (client TopicsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SBAuthorizationRule) (result SBAuthorizationRule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
@@ -141,14 +134,9 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRule(resourceGroupName str
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
|
||||
{TargetValue: topicName,
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
{TargetValue: authorizationRuleName,
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
{TargetValue: parameters,
|
||||
Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "CreateOrUpdateAuthorizationRule")
|
||||
}
|
||||
|
||||
@@ -174,7 +162,7 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRule(resourceGroupName str
|
||||
}
|
||||
|
||||
// CreateOrUpdateAuthorizationRulePreparer prepares the CreateOrUpdateAuthorizationRule request.
|
||||
func (client TopicsClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (*http.Request, error) {
|
||||
func (client TopicsClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SBAuthorizationRule) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
|
||||
"namespaceName": autorest.Encode("path", namespaceName),
|
||||
@@ -183,7 +171,7 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroup
|
||||
"topicName": autorest.Encode("path", topicName),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -206,7 +194,7 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRuleSender(req *http.Reque
|
||||
|
||||
// CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client TopicsClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) {
|
||||
func (client TopicsClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
@@ -219,9 +207,8 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.R
|
||||
|
||||
// Delete deletes a topic from the specified namespace and resource group.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name topicName is the topic
|
||||
// name.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
// topicName is the topic name.
|
||||
func (client TopicsClient) Delete(resourceGroupName string, namespaceName string, topicName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -231,8 +218,7 @@ func (client TopicsClient) Delete(resourceGroupName string, namespaceName string
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
|
||||
{TargetValue: topicName,
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "Delete")
|
||||
}
|
||||
|
||||
@@ -266,7 +252,7 @@ func (client TopicsClient) DeletePreparer(resourceGroupName string, namespaceNam
|
||||
"topicName": autorest.Encode("path", topicName),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -299,9 +285,8 @@ func (client TopicsClient) DeleteResponder(resp *http.Response) (result autorest
|
||||
|
||||
// DeleteAuthorizationRule deletes a topic authorization rule.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name topicName is the topic
|
||||
// name. authorizationRuleName is the authorizationrule name.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
// topicName is the topic name. authorizationRuleName is the authorizationrule name.
|
||||
func (client TopicsClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -311,11 +296,9 @@ func (client TopicsClient) DeleteAuthorizationRule(resourceGroupName string, nam
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
|
||||
{TargetValue: topicName,
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
{TargetValue: authorizationRuleName,
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "DeleteAuthorizationRule")
|
||||
}
|
||||
|
||||
@@ -350,7 +333,7 @@ func (client TopicsClient) DeleteAuthorizationRulePreparer(resourceGroupName str
|
||||
"topicName": autorest.Encode("path", topicName),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -383,10 +366,9 @@ func (client TopicsClient) DeleteAuthorizationRuleResponder(resp *http.Response)
|
||||
|
||||
// Get returns a description for the specified topic.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name topicName is the topic
|
||||
// name.
|
||||
func (client TopicsClient) Get(resourceGroupName string, namespaceName string, topicName string) (result TopicResource, err error) {
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
// topicName is the topic name.
|
||||
func (client TopicsClient) Get(resourceGroupName string, namespaceName string, topicName string) (result SBTopic, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
@@ -395,8 +377,7 @@ func (client TopicsClient) Get(resourceGroupName string, namespaceName string, t
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
|
||||
{TargetValue: topicName,
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "Get")
|
||||
}
|
||||
|
||||
@@ -430,7 +411,7 @@ func (client TopicsClient) GetPreparer(resourceGroupName string, namespaceName s
|
||||
"topicName": autorest.Encode("path", topicName),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -451,7 +432,7 @@ func (client TopicsClient) GetSender(req *http.Request) (*http.Response, error)
|
||||
|
||||
// GetResponder handles the response to the Get request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client TopicsClient) GetResponder(resp *http.Response) (result TopicResource, err error) {
|
||||
func (client TopicsClient) GetResponder(resp *http.Response) (result SBTopic, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
@@ -464,10 +445,9 @@ func (client TopicsClient) GetResponder(resp *http.Response) (result TopicResour
|
||||
|
||||
// GetAuthorizationRule returns the specified authorization rule.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name topicName is the topic
|
||||
// name. authorizationRuleName is the authorizationrule name.
|
||||
func (client TopicsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) {
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
// topicName is the topic name. authorizationRuleName is the authorizationrule name.
|
||||
func (client TopicsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result SBAuthorizationRule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
@@ -476,11 +456,9 @@ func (client TopicsClient) GetAuthorizationRule(resourceGroupName string, namesp
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
|
||||
{TargetValue: topicName,
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
{TargetValue: authorizationRuleName,
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "GetAuthorizationRule")
|
||||
}
|
||||
|
||||
@@ -515,7 +493,7 @@ func (client TopicsClient) GetAuthorizationRulePreparer(resourceGroupName string
|
||||
"topicName": autorest.Encode("path", topicName),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -536,7 +514,7 @@ func (client TopicsClient) GetAuthorizationRuleSender(req *http.Request) (*http.
|
||||
|
||||
// GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client TopicsClient) GetAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) {
|
||||
func (client TopicsClient) GetAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
@@ -547,112 +525,11 @@ func (client TopicsClient) GetAuthorizationRuleResponder(resp *http.Response) (r
|
||||
return
|
||||
}
|
||||
|
||||
// ListAll gets all the topics in a namespace.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name
|
||||
func (client TopicsClient) ListAll(resourceGroupName string, namespaceName string) (result TopicListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
{TargetValue: namespaceName,
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "ListAll")
|
||||
}
|
||||
|
||||
req, err := client.ListAllPreparer(resourceGroupName, namespaceName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListAllSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListAllResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListAllPreparer prepares the ListAll request.
|
||||
func (client TopicsClient) ListAllPreparer(resourceGroupName string, namespaceName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"namespaceName": autorest.Encode("path", namespaceName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListAllSender sends the ListAll request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client TopicsClient) ListAllSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListAllResponder handles the response to the ListAll request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client TopicsClient) ListAllResponder(resp *http.Response) (result TopicListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListAllNextResults retrieves the next set of results, if any.
|
||||
func (client TopicsClient) ListAllNextResults(lastResults TopicListResult) (result TopicListResult, err error) {
|
||||
req, err := lastResults.TopicListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", nil, "Failure preparing next results request")
|
||||
}
|
||||
if req == nil {
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListAllSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListAllResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListAuthorizationRules gets authorization rules for a topic.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name topicName is the topic
|
||||
// name.
|
||||
func (client TopicsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, topicName string) (result SharedAccessAuthorizationRuleListResult, err error) {
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
// topicName is the topic name.
|
||||
func (client TopicsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, topicName string) (result SBAuthorizationRuleListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
@@ -661,8 +538,7 @@ func (client TopicsClient) ListAuthorizationRules(resourceGroupName string, name
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
|
||||
{TargetValue: topicName,
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "ListAuthorizationRules")
|
||||
}
|
||||
|
||||
@@ -696,7 +572,7 @@ func (client TopicsClient) ListAuthorizationRulesPreparer(resourceGroupName stri
|
||||
"topicName": autorest.Encode("path", topicName),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -717,7 +593,7 @@ func (client TopicsClient) ListAuthorizationRulesSender(req *http.Request) (*htt
|
||||
|
||||
// ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client TopicsClient) ListAuthorizationRulesResponder(resp *http.Response) (result SharedAccessAuthorizationRuleListResult, err error) {
|
||||
func (client TopicsClient) ListAuthorizationRulesResponder(resp *http.Response) (result SBAuthorizationRuleListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
@@ -729,8 +605,8 @@ func (client TopicsClient) ListAuthorizationRulesResponder(resp *http.Response)
|
||||
}
|
||||
|
||||
// ListAuthorizationRulesNextResults retrieves the next set of results, if any.
|
||||
func (client TopicsClient) ListAuthorizationRulesNextResults(lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) {
|
||||
req, err := lastResults.SharedAccessAuthorizationRuleListResultPreparer()
|
||||
func (client TopicsClient) ListAuthorizationRulesNextResults(lastResults SBAuthorizationRuleListResult) (result SBAuthorizationRuleListResult, err error) {
|
||||
req, err := lastResults.SBAuthorizationRuleListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAuthorizationRules", nil, "Failure preparing next results request")
|
||||
}
|
||||
@@ -752,12 +628,200 @@ func (client TopicsClient) ListAuthorizationRulesNextResults(lastResults SharedA
|
||||
return
|
||||
}
|
||||
|
||||
// ListAuthorizationRulesComplete gets all elements from the list without paging.
|
||||
func (client TopicsClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, topicName string, cancel <-chan struct{}) (<-chan SBAuthorizationRule, <-chan error) {
|
||||
resultChan := make(chan SBAuthorizationRule)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName, topicName)
|
||||
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.ListAuthorizationRulesNextResults(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
|
||||
}
|
||||
|
||||
// ListByNamespace gets all the topics in a namespace.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
func (client TopicsClient) ListByNamespace(resourceGroupName string, namespaceName string) (result SBTopicListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
{TargetValue: namespaceName,
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "ListByNamespace")
|
||||
}
|
||||
|
||||
req, err := client.ListByNamespacePreparer(resourceGroupName, namespaceName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListByNamespaceSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListByNamespaceResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByNamespacePreparer prepares the ListByNamespace request.
|
||||
func (client TopicsClient) ListByNamespacePreparer(resourceGroupName string, namespaceName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"namespaceName": autorest.Encode("path", namespaceName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListByNamespaceSender sends the ListByNamespace request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client TopicsClient) ListByNamespaceSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListByNamespaceResponder handles the response to the ListByNamespace request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client TopicsClient) ListByNamespaceResponder(resp *http.Response) (result SBTopicListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListByNamespaceNextResults retrieves the next set of results, if any.
|
||||
func (client TopicsClient) ListByNamespaceNextResults(lastResults SBTopicListResult) (result SBTopicListResult, err error) {
|
||||
req, err := lastResults.SBTopicListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", nil, "Failure preparing next results request")
|
||||
}
|
||||
if req == nil {
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListByNamespaceSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListByNamespaceResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByNamespaceComplete gets all elements from the list without paging.
|
||||
func (client TopicsClient) ListByNamespaceComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan SBTopic, <-chan error) {
|
||||
resultChan := make(chan SBTopic)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByNamespace(resourceGroupName, namespaceName)
|
||||
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.ListByNamespaceNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListKeys gets the primary and secondary connection strings for the topic.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name topicName is the topic
|
||||
// name. authorizationRuleName is the authorizationrule name.
|
||||
func (client TopicsClient) ListKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result ResourceListKeys, err error) {
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
// topicName is the topic name. authorizationRuleName is the authorizationrule name.
|
||||
func (client TopicsClient) ListKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result AccessKeys, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
@@ -766,11 +830,9 @@ func (client TopicsClient) ListKeys(resourceGroupName string, namespaceName stri
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
|
||||
{TargetValue: topicName,
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
{TargetValue: authorizationRuleName,
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "ListKeys")
|
||||
}
|
||||
|
||||
@@ -805,7 +867,7 @@ func (client TopicsClient) ListKeysPreparer(resourceGroupName string, namespaceN
|
||||
"topicName": autorest.Encode("path", topicName),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -826,7 +888,7 @@ func (client TopicsClient) ListKeysSender(req *http.Request) (*http.Response, er
|
||||
|
||||
// ListKeysResponder handles the response to the ListKeys request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client TopicsClient) ListKeysResponder(resp *http.Response) (result ResourceListKeys, err error) {
|
||||
func (client TopicsClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
@@ -837,14 +899,12 @@ func (client TopicsClient) ListKeysResponder(resp *http.Response) (result Resour
|
||||
return
|
||||
}
|
||||
|
||||
// RegenerateKeys regenerates primary or secondary connection strings for the
|
||||
// topic.
|
||||
// RegenerateKeys regenerates primary or secondary connection strings for the topic.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. namespaceName is the namespace name topicName is the topic
|
||||
// name. authorizationRuleName is the authorizationrule name. parameters is
|
||||
// parameters supplied to regenerate the authorization rule.
|
||||
func (client TopicsClient) RegenerateKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) {
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
|
||||
// topicName is the topic name. authorizationRuleName is the authorizationrule name. parameters is parameters supplied
|
||||
// to regenerate the authorization rule.
|
||||
func (client TopicsClient) RegenerateKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
@@ -853,11 +913,9 @@ func (client TopicsClient) RegenerateKeys(resourceGroupName string, namespaceNam
|
||||
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
|
||||
{TargetValue: topicName,
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
|
||||
{TargetValue: authorizationRuleName,
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
|
||||
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "RegenerateKeys")
|
||||
}
|
||||
|
||||
@@ -883,7 +941,7 @@ func (client TopicsClient) RegenerateKeys(resourceGroupName string, namespaceNam
|
||||
}
|
||||
|
||||
// RegenerateKeysPreparer prepares the RegenerateKeys request.
|
||||
func (client TopicsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) {
|
||||
func (client TopicsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
|
||||
"namespaceName": autorest.Encode("path", namespaceName),
|
||||
@@ -892,7 +950,7 @@ func (client TopicsClient) RegenerateKeysPreparer(resourceGroupName string, name
|
||||
"topicName": autorest.Encode("path", topicName),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-08-01"
|
||||
const APIVersion = "2017-04-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -915,7 +973,7 @@ func (client TopicsClient) RegenerateKeysSender(req *http.Request) (*http.Respon
|
||||
|
||||
// RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client TopicsClient) RegenerateKeysResponder(resp *http.Response) (result ResourceListKeys, err error) {
|
||||
func (client TopicsClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
|
||||
Reference in New Issue
Block a user