197 lines
4.8 KiB
Go
197 lines
4.8 KiB
Go
/*
|
|
* Subset of Influx API covered by Influx CLI
|
|
*
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* API version: 2.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// ScriptCreateRequest struct for ScriptCreateRequest
|
|
type ScriptCreateRequest struct {
|
|
// Script name. The name must be unique within the organization.
|
|
Name string `json:"name" yaml:"name"`
|
|
// Script description. A description of the script.
|
|
Description string `json:"description" yaml:"description"`
|
|
// The script to execute.
|
|
Script string `json:"script" yaml:"script"`
|
|
Language ScriptLanguage `json:"language" yaml:"language"`
|
|
}
|
|
|
|
// NewScriptCreateRequest instantiates a new ScriptCreateRequest object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewScriptCreateRequest(name string, description string, script string, language ScriptLanguage) *ScriptCreateRequest {
|
|
this := ScriptCreateRequest{}
|
|
this.Name = name
|
|
this.Description = description
|
|
this.Script = script
|
|
this.Language = language
|
|
return &this
|
|
}
|
|
|
|
// NewScriptCreateRequestWithDefaults instantiates a new ScriptCreateRequest object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewScriptCreateRequestWithDefaults() *ScriptCreateRequest {
|
|
this := ScriptCreateRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *ScriptCreateRequest) GetName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ScriptCreateRequest) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *ScriptCreateRequest) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetDescription returns the Description field value
|
|
func (o *ScriptCreateRequest) GetDescription() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ScriptCreateRequest) GetDescriptionOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Description, true
|
|
}
|
|
|
|
// SetDescription sets field value
|
|
func (o *ScriptCreateRequest) SetDescription(v string) {
|
|
o.Description = v
|
|
}
|
|
|
|
// GetScript returns the Script field value
|
|
func (o *ScriptCreateRequest) GetScript() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Script
|
|
}
|
|
|
|
// GetScriptOk returns a tuple with the Script field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ScriptCreateRequest) GetScriptOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Script, true
|
|
}
|
|
|
|
// SetScript sets field value
|
|
func (o *ScriptCreateRequest) SetScript(v string) {
|
|
o.Script = v
|
|
}
|
|
|
|
// GetLanguage returns the Language field value
|
|
func (o *ScriptCreateRequest) GetLanguage() ScriptLanguage {
|
|
if o == nil {
|
|
var ret ScriptLanguage
|
|
return ret
|
|
}
|
|
|
|
return o.Language
|
|
}
|
|
|
|
// GetLanguageOk returns a tuple with the Language field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ScriptCreateRequest) GetLanguageOk() (*ScriptLanguage, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Language, true
|
|
}
|
|
|
|
// SetLanguage sets field value
|
|
func (o *ScriptCreateRequest) SetLanguage(v ScriptLanguage) {
|
|
o.Language = v
|
|
}
|
|
|
|
func (o ScriptCreateRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if true {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if true {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if true {
|
|
toSerialize["script"] = o.Script
|
|
}
|
|
if true {
|
|
toSerialize["language"] = o.Language
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableScriptCreateRequest struct {
|
|
value *ScriptCreateRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableScriptCreateRequest) Get() *ScriptCreateRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableScriptCreateRequest) Set(val *ScriptCreateRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableScriptCreateRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableScriptCreateRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableScriptCreateRequest(val *ScriptCreateRequest) *NullableScriptCreateRequest {
|
|
return &NullableScriptCreateRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableScriptCreateRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableScriptCreateRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|