vendor: update all dependencies to latest versions
This commit is contained in:
+65
-28
@@ -14,9 +14,8 @@ package billing
|
||||
// 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"
|
||||
)
|
||||
|
||||
// InvoicesClient is the billing client provides access to billing 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.
|
||||
// InvoicesClient is the billing client provides access to billing 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 InvoicesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -38,14 +36,13 @@ func NewInvoicesClient(subscriptionID string) InvoicesClient {
|
||||
return NewInvoicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient
|
||||
// client.
|
||||
// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client.
|
||||
func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient {
|
||||
return InvoicesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get gets a named invoice resource. When getting a single invoice, the
|
||||
// downloadUrl property is expanded automatically.
|
||||
// Get gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded
|
||||
// automatically.
|
||||
//
|
||||
// invoiceName is the name of an invoice resource.
|
||||
func (client InvoicesClient) Get(invoiceName string) (result Invoice, err error) {
|
||||
@@ -109,8 +106,8 @@ func (client InvoicesClient) GetResponder(resp *http.Response) (result Invoice,
|
||||
return
|
||||
}
|
||||
|
||||
// GetLatest gets the most recent invoice. When getting a single invoice, the
|
||||
// downloadUrl property is expanded automatically.
|
||||
// GetLatest gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded
|
||||
// automatically.
|
||||
func (client InvoicesClient) GetLatest() (result Invoice, err error) {
|
||||
req, err := client.GetLatestPreparer()
|
||||
if err != nil {
|
||||
@@ -171,22 +168,17 @@ func (client InvoicesClient) GetLatestResponder(resp *http.Response) (result Inv
|
||||
return
|
||||
}
|
||||
|
||||
// List lists the available invoices for a subscription in reverse
|
||||
// chronological order beginning with the most recent invoice. In preview,
|
||||
// invoices are available via this API only for invoice periods which end
|
||||
// December 1, 2016 or later.
|
||||
// List lists the available invoices for a subscription in reverse chronological order beginning with the most recent
|
||||
// invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or
|
||||
// later.
|
||||
//
|
||||
// expand is may be used to expand the downloadUrl property within a list of
|
||||
// invoices. This enables download links to be generated for multiple invoices
|
||||
// at once. By default, downloadURLs are not included when listing invoices.
|
||||
// filter is may be used to filter invoices by invoicePeriodEndDate. 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 invoices.
|
||||
// expand is may be used to expand the downloadUrl property within a list of invoices. This enables download links to
|
||||
// be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. filter
|
||||
// is may be used to filter invoices by invoicePeriodEndDate. 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 invoices.
|
||||
func (client InvoicesClient) List(expand string, filter string, skiptoken string, top *int32) (result InvoicesListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: top,
|
||||
@@ -291,3 +283,48 @@ func (client InvoicesClient) ListNextResults(lastResults InvoicesListResult) (re
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client InvoicesClient) ListComplete(expand string, filter string, skiptoken string, top *int32, cancel <-chan struct{}) (<-chan Invoice, <-chan error) {
|
||||
resultChan := make(chan Invoice)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user