cloud/azure/resource/client/tags/tags_create_or_update_value_parameters.go
package tags
// 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"
)
// NewTagsCreateOrUpdateValueParams creates a new TagsCreateOrUpdateValueParams object
// with the default values initialized.
func NewTagsCreateOrUpdateValueParams() *TagsCreateOrUpdateValueParams {
var ()
return &TagsCreateOrUpdateValueParams{
timeout: cr.DefaultTimeout,
}
}
// NewTagsCreateOrUpdateValueParamsWithTimeout creates a new TagsCreateOrUpdateValueParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewTagsCreateOrUpdateValueParamsWithTimeout(timeout time.Duration) *TagsCreateOrUpdateValueParams {
var ()
return &TagsCreateOrUpdateValueParams{
timeout: timeout,
}
}
// NewTagsCreateOrUpdateValueParamsWithContext creates a new TagsCreateOrUpdateValueParams object
// with the default values initialized, and the ability to set a context for a request
func NewTagsCreateOrUpdateValueParamsWithContext(ctx context.Context) *TagsCreateOrUpdateValueParams {
var ()
return &TagsCreateOrUpdateValueParams{
Context: ctx,
}
}
// NewTagsCreateOrUpdateValueParamsWithHTTPClient creates a new TagsCreateOrUpdateValueParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewTagsCreateOrUpdateValueParamsWithHTTPClient(client *http.Client) *TagsCreateOrUpdateValueParams {
var ()
return &TagsCreateOrUpdateValueParams{
HTTPClient: client,
}
}
/*TagsCreateOrUpdateValueParams contains all the parameters to send to the API endpoint
for the tags create or update value operation typically these are written to a http.Request
*/
type TagsCreateOrUpdateValueParams struct {
/*APIVersion
The API version to use for this operation.
*/
APIVersion string
/*SubscriptionID
The ID of the target subscription.
*/
SubscriptionID string
/*TagName
The name of the tag.
*/
TagName string
/*TagValue
The value of the tag to create.
*/
TagValue string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) WithTimeout(timeout time.Duration) *TagsCreateOrUpdateValueParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) WithContext(ctx context.Context) *TagsCreateOrUpdateValueParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) WithHTTPClient(client *http.Client) *TagsCreateOrUpdateValueParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAPIVersion adds the aPIVersion to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) WithAPIVersion(aPIVersion string) *TagsCreateOrUpdateValueParams {
o.SetAPIVersion(aPIVersion)
return o
}
// SetAPIVersion adds the apiVersion to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) SetAPIVersion(aPIVersion string) {
o.APIVersion = aPIVersion
}
// WithSubscriptionID adds the subscriptionID to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) WithSubscriptionID(subscriptionID string) *TagsCreateOrUpdateValueParams {
o.SetSubscriptionID(subscriptionID)
return o
}
// SetSubscriptionID adds the subscriptionId to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) SetSubscriptionID(subscriptionID string) {
o.SubscriptionID = subscriptionID
}
// WithTagName adds the tagName to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) WithTagName(tagName string) *TagsCreateOrUpdateValueParams {
o.SetTagName(tagName)
return o
}
// SetTagName adds the tagName to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) SetTagName(tagName string) {
o.TagName = tagName
}
// WithTagValue adds the tagValue to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) WithTagValue(tagValue string) *TagsCreateOrUpdateValueParams {
o.SetTagValue(tagValue)
return o
}
// SetTagValue adds the tagValue to the tags create or update value params
func (o *TagsCreateOrUpdateValueParams) SetTagValue(tagValue string) {
o.TagValue = tagValue
}
// WriteToRequest writes these params to a swagger request
func (o *TagsCreateOrUpdateValueParams) 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 subscriptionId
if err := r.SetPathParam("subscriptionId", o.SubscriptionID); err != nil {
return err
}
// path param tagName
if err := r.SetPathParam("tagName", o.TagName); err != nil {
return err
}
// path param tagValue
if err := r.SetPathParam("tagValue", o.TagValue); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}