cloud/azure/resource/client/resources/resources_check_existence_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"
)
// NewResourcesCheckExistenceByIDParams creates a new ResourcesCheckExistenceByIDParams object
// with the default values initialized.
func NewResourcesCheckExistenceByIDParams() *ResourcesCheckExistenceByIDParams {
var ()
return &ResourcesCheckExistenceByIDParams{
timeout: cr.DefaultTimeout,
}
}
// NewResourcesCheckExistenceByIDParamsWithTimeout creates a new ResourcesCheckExistenceByIDParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewResourcesCheckExistenceByIDParamsWithTimeout(timeout time.Duration) *ResourcesCheckExistenceByIDParams {
var ()
return &ResourcesCheckExistenceByIDParams{
timeout: timeout,
}
}
// NewResourcesCheckExistenceByIDParamsWithContext creates a new ResourcesCheckExistenceByIDParams object
// with the default values initialized, and the ability to set a context for a request
func NewResourcesCheckExistenceByIDParamsWithContext(ctx context.Context) *ResourcesCheckExistenceByIDParams {
var ()
return &ResourcesCheckExistenceByIDParams{
Context: ctx,
}
}
// NewResourcesCheckExistenceByIDParamsWithHTTPClient creates a new ResourcesCheckExistenceByIDParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewResourcesCheckExistenceByIDParamsWithHTTPClient(client *http.Client) *ResourcesCheckExistenceByIDParams {
var ()
return &ResourcesCheckExistenceByIDParams{
HTTPClient: client,
}
}
/*ResourcesCheckExistenceByIDParams contains all the parameters to send to the API endpoint
for the resources check existence by Id operation typically these are written to a http.Request
*/
type ResourcesCheckExistenceByIDParams 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 check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) WithTimeout(timeout time.Duration) *ResourcesCheckExistenceByIDParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the resources check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the resources check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) WithContext(ctx context.Context) *ResourcesCheckExistenceByIDParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the resources check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the resources check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) WithHTTPClient(client *http.Client) *ResourcesCheckExistenceByIDParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the resources check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAPIVersion adds the aPIVersion to the resources check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) WithAPIVersion(aPIVersion string) *ResourcesCheckExistenceByIDParams {
o.SetAPIVersion(aPIVersion)
return o
}
// SetAPIVersion adds the apiVersion to the resources check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) SetAPIVersion(aPIVersion string) {
o.APIVersion = aPIVersion
}
// WithResourceID adds the resourceID to the resources check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) WithResourceID(resourceID string) *ResourcesCheckExistenceByIDParams {
o.SetResourceID(resourceID)
return o
}
// SetResourceID adds the resourceId to the resources check existence by Id params
func (o *ResourcesCheckExistenceByIDParams) SetResourceID(resourceID string) {
o.ResourceID = resourceID
}
// WriteToRequest writes these params to a swagger request
func (o *ResourcesCheckExistenceByIDParams) 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
}