cloud/azure/batch/client/applications/applications_client.go
package applications
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/runtime"
strfmt "github.com/go-openapi/strfmt"
)
// New creates a new applications API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
return &Client{transport: transport, formats: formats}
}
/*
Client for applications API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
/*
ApplicationGet gets information about the specified application
*/
func (a *Client) ApplicationGet(params *ApplicationGetParams) (*ApplicationGetOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewApplicationGetParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "Application_Get",
Method: "GET",
PathPattern: "/applications/{applicationId}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json; odata=minimalmetadata"},
Schemes: []string{"https"},
Params: params,
Reader: &ApplicationGetReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*ApplicationGetOK), nil
}
/*
ApplicationList lists all of the applications available in the specified account
This operation returns only applications and versions that are available for use on compute nodes; that is, that can be used in an application package reference. For administrator information about applications and versions that are not yet available to compute nodes, use the Azure portal or the Azure Resource Manager API.
*/
func (a *Client) ApplicationList(params *ApplicationListParams) (*ApplicationListOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewApplicationListParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "Application_List",
Method: "GET",
PathPattern: "/applications",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json; odata=minimalmetadata"},
Schemes: []string{"https"},
Params: params,
Reader: &ApplicationListReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*ApplicationListOK), nil
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}