jkawamoto/roadie

View on GitHub
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_parameters.go

Summary

Maintainability
D
2 days
Test Coverage
package virtual_machine_scale_sets

// 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"
)

// NewVirtualMachineScaleSetsReimageParams creates a new VirtualMachineScaleSetsReimageParams object
// with the default values initialized.
func NewVirtualMachineScaleSetsReimageParams() *VirtualMachineScaleSetsReimageParams {
    var ()
    return &VirtualMachineScaleSetsReimageParams{

        timeout: cr.DefaultTimeout,
    }
}

// NewVirtualMachineScaleSetsReimageParamsWithTimeout creates a new VirtualMachineScaleSetsReimageParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewVirtualMachineScaleSetsReimageParamsWithTimeout(timeout time.Duration) *VirtualMachineScaleSetsReimageParams {
    var ()
    return &VirtualMachineScaleSetsReimageParams{

        timeout: timeout,
    }
}

// NewVirtualMachineScaleSetsReimageParamsWithContext creates a new VirtualMachineScaleSetsReimageParams object
// with the default values initialized, and the ability to set a context for a request
func NewVirtualMachineScaleSetsReimageParamsWithContext(ctx context.Context) *VirtualMachineScaleSetsReimageParams {
    var ()
    return &VirtualMachineScaleSetsReimageParams{

        Context: ctx,
    }
}

/*VirtualMachineScaleSetsReimageParams contains all the parameters to send to the API endpoint
for the virtual machine scale sets reimage operation typically these are written to a http.Request
*/
type VirtualMachineScaleSetsReimageParams struct {

    /*APIVersion
      Client Api Version.

    */
    APIVersion string
    /*ResourceGroupName
      The name of the resource group.

    */
    ResourceGroupName string
    /*SubscriptionID
      Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

    */
    SubscriptionID string
    /*VMScaleSetName
      The name of the VM scale set.

    */
    VMScaleSetName string

    timeout    time.Duration
    Context    context.Context
    HTTPClient *http.Client
}

// WithTimeout adds the timeout to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) WithTimeout(timeout time.Duration) *VirtualMachineScaleSetsReimageParams {
    o.SetTimeout(timeout)
    return o
}

// SetTimeout adds the timeout to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) SetTimeout(timeout time.Duration) {
    o.timeout = timeout
}

// WithContext adds the context to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) WithContext(ctx context.Context) *VirtualMachineScaleSetsReimageParams {
    o.SetContext(ctx)
    return o
}

// SetContext adds the context to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) SetContext(ctx context.Context) {
    o.Context = ctx
}

// WithAPIVersion adds the aPIVersion to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) WithAPIVersion(aPIVersion string) *VirtualMachineScaleSetsReimageParams {
    o.SetAPIVersion(aPIVersion)
    return o
}

// SetAPIVersion adds the apiVersion to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) SetAPIVersion(aPIVersion string) {
    o.APIVersion = aPIVersion
}

// WithResourceGroupName adds the resourceGroupName to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) WithResourceGroupName(resourceGroupName string) *VirtualMachineScaleSetsReimageParams {
    o.SetResourceGroupName(resourceGroupName)
    return o
}

// SetResourceGroupName adds the resourceGroupName to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) SetResourceGroupName(resourceGroupName string) {
    o.ResourceGroupName = resourceGroupName
}

// WithSubscriptionID adds the subscriptionID to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) WithSubscriptionID(subscriptionID string) *VirtualMachineScaleSetsReimageParams {
    o.SetSubscriptionID(subscriptionID)
    return o
}

// SetSubscriptionID adds the subscriptionId to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) SetSubscriptionID(subscriptionID string) {
    o.SubscriptionID = subscriptionID
}

// WithVMScaleSetName adds the vMScaleSetName to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) WithVMScaleSetName(vMScaleSetName string) *VirtualMachineScaleSetsReimageParams {
    o.SetVMScaleSetName(vMScaleSetName)
    return o
}

// SetVMScaleSetName adds the vmScaleSetName to the virtual machine scale sets reimage params
func (o *VirtualMachineScaleSetsReimageParams) SetVMScaleSetName(vMScaleSetName string) {
    o.VMScaleSetName = vMScaleSetName
}

// WriteToRequest writes these params to a swagger request
func (o *VirtualMachineScaleSetsReimageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.timeout)
    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 resourceGroupName
    if err := r.SetPathParam("resourceGroupName", o.ResourceGroupName); err != nil {
        return err
    }

    // path param subscriptionId
    if err := r.SetPathParam("subscriptionId", o.SubscriptionID); err != nil {
        return err
    }

    // path param vmScaleSetName
    if err := r.SetPathParam("vmScaleSetName", o.VMScaleSetName); err != nil {
        return err
    }

    if len(res) > 0 {
        return errors.CompositeValidationError(res...)
    }
    return nil
}