vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537055 additions and 189679 deletions
+64 -29
View File
@@ -14,9 +14,8 @@ package consumption
// 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"
)
// UsageDetailsClient is the consumption management client provides access to
// consumption resources for Azure Web-Direct subscriptions. Other subscription
// types which were not purchased directly through the Azure web portal are not
// supported through this preview API.
// UsageDetailsClient is the consumption management client provides access to consumption resources for Azure
// Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal
// are not supported through this preview API.
type UsageDetailsClient struct {
ManagementClient
}
@@ -38,32 +36,24 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient {
return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewUsageDetailsClientWithBaseURI creates an instance of the
// UsageDetailsClient client.
// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client.
func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient {
return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List lists the usage details for a scope in reverse chronological order by
// billing period. Usage details are available via this API only for January 1,
// 2017 or later.
// List lists the usage details for a scope in reverse chronological order by billing period. Usage details are
// available via this API only for January 1, 2017 or later.
//
// scope is the scope of the usage details. The scope can be
// '/subscriptions/{subscriptionId}/' for a subscription, or
// '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}'
// for an invoice or
// '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
// for a billing perdiod. expand is may be used to expand the
// additionalProperties or meterDetails property within a list of usage
// details. By default, these fields are not included when listing usage
// details. filter is may be used to filter usageDetails by usageEnd (Utc
// time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
// not currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only
// used if a previous operation returned a partial result. If a previous
// response contains a nextLink element, the value of the nextLink element will
// include a skiptoken parameter that specifies a starting point to use for
// subsequent calls. top is may be used to limit the number of results to the
// most recent N usageDetails.
// scope is the scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or
// '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}' for an invoice or
// '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing
// perdiod. expand is may be used to expand the additionalProperties or meterDetails property within a list of usage
// details. By default, these fields are not included when listing usage details. filter is may be used to filter
// usageDetails by usageEnd (Utc time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
// currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used if a previous operation returned a
// partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a
// skiptoken parameter that specifies a starting point to use for subsequent calls. top is may be used to limit the
// number of results to the most recent N usageDetails.
func (client UsageDetailsClient) List(scope string, expand string, filter string, skiptoken string, top *int32) (result UsageDetailsListResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: top,
@@ -98,7 +88,7 @@ func (client UsageDetailsClient) List(scope string, expand string, filter string
// ListPreparer prepares the List request.
func (client UsageDetailsClient) ListPreparer(scope string, expand string, filter string, skiptoken string, top *int32) (*http.Request, error) {
pathParameters := map[string]interface{}{
"scope": autorest.Encode("path", scope),
"scope": scope,
}
const APIVersion = "2017-04-24-preview"
@@ -168,3 +158,48 @@ func (client UsageDetailsClient) ListNextResults(lastResults UsageDetailsListRes
return
}
// ListComplete gets all elements from the list without paging.
func (client UsageDetailsClient) ListComplete(scope string, expand string, filter string, skiptoken string, top *int32, cancel <-chan struct{}) (<-chan UsageDetail, <-chan error) {
resultChan := make(chan UsageDetail)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(scope, expand, filter, skiptoken, top)
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
}