cloud/azure/resource/client/resources/resources_delete_by_id_parameters.go
package resources
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"time"
"golang.org/x/net/context"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
strfmt "github.com/go-openapi/strfmt"
)
// NewResourcesDeleteByIDParams creates a new ResourcesDeleteByIDParams object
// with the default values initialized.
func NewResourcesDeleteByIDParams() *ResourcesDeleteByIDParams {
var ()
return &ResourcesDeleteByIDParams{
timeout: cr.DefaultTimeout,
}
}
// NewResourcesDeleteByIDParamsWithTimeout creates a new ResourcesDeleteByIDParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewResourcesDeleteByIDParamsWithTimeout(timeout time.Duration) *ResourcesDeleteByIDParams {
var ()
return &ResourcesDeleteByIDParams{
timeout: timeout,
}
}
// NewResourcesDeleteByIDParamsWithContext creates a new ResourcesDeleteByIDParams object
// with the default values initialized, and the ability to set a context for a request
func NewResourcesDeleteByIDParamsWithContext(ctx context.Context) *ResourcesDeleteByIDParams {
var ()
return &ResourcesDeleteByIDParams{
Context: ctx,
}
}
// NewResourcesDeleteByIDParamsWithHTTPClient creates a new ResourcesDeleteByIDParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewResourcesDeleteByIDParamsWithHTTPClient(client *http.Client) *ResourcesDeleteByIDParams {
var ()
return &ResourcesDeleteByIDParams{
HTTPClient: client,
}
}
/*ResourcesDeleteByIDParams contains all the parameters to send to the API endpoint
for the resources delete by Id operation typically these are written to a http.Request
*/
type ResourcesDeleteByIDParams struct {
/*APIVersion
The API version to use for the operation.
*/
APIVersion string
/*ResourceID
The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
*/
ResourceID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) WithTimeout(timeout time.Duration) *ResourcesDeleteByIDParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) WithContext(ctx context.Context) *ResourcesDeleteByIDParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) WithHTTPClient(client *http.Client) *ResourcesDeleteByIDParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAPIVersion adds the aPIVersion to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) WithAPIVersion(aPIVersion string) *ResourcesDeleteByIDParams {
o.SetAPIVersion(aPIVersion)
return o
}
// SetAPIVersion adds the apiVersion to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) SetAPIVersion(aPIVersion string) {
o.APIVersion = aPIVersion
}
// WithResourceID adds the resourceID to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) WithResourceID(resourceID string) *ResourcesDeleteByIDParams {
o.SetResourceID(resourceID)
return o
}
// SetResourceID adds the resourceId to the resources delete by Id params
func (o *ResourcesDeleteByIDParams) SetResourceID(resourceID string) {
o.ResourceID = resourceID
}
// WriteToRequest writes these params to a swagger request
func (o *ResourcesDeleteByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// query param api-version
qrAPIVersion := o.APIVersion
qAPIVersion := qrAPIVersion
if qAPIVersion != "" {
if err := r.SetQueryParam("api-version", qAPIVersion); err != nil {
return err
}
}
// path param resourceId
if err := r.SetPathParam("resourceId", o.ResourceID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}