package openapi

import (
	"encoding/json"
)

type InvTaskInfo struct {
	Args          *map[string]AdvanceArg `json:"args,omitempty"`
	Comment       *string                `json:"comment,omitempty"`
	Conditions    *[]TaskCondition       `json:"conditions,omitempty"`
	InTaskID      *string                `json:"inTaskID,omitempty"`
	Input         *string                `json:"input,omitempty"`
	InvId         *string                `json:"invId,omitempty"`
	LoopArgs      *map[string]AdvanceArg `json:"loopArgs,omitempty"`
	LoopCondition *[][]ArgAtomicFilter   `json:"loopCondition,omitempty"`
	Version       *int64                 `json:"version,omitempty"`
}

func NewInvTaskInfo() *InvTaskInfo {
	this := InvTaskInfo{}
	return &this
}

func NewInvTaskInfoWithDefaults() *InvTaskInfo {
	this := InvTaskInfo{}
	return &this
}

func (o *InvTaskInfo) GetArgs() map[string]AdvanceArg {
	if o == nil || o.Args == nil {
		var ret map[string]AdvanceArg
		return ret
	}
	return *o.Args
}

func (o *InvTaskInfo) GetArgsOk() (*map[string]AdvanceArg, bool) {
	if o == nil || o.Args == nil {
		return nil, false
	}
	return o.Args, true
}

func (o *InvTaskInfo) HasArgs() bool {
	if o != nil && o.Args != nil {
		return true
	}

	return false
}

func (o *InvTaskInfo) SetArgs(v map[string]AdvanceArg) {
	o.Args = &v
}

func (o *InvTaskInfo) GetComment() string {
	if o == nil || o.Comment == nil {
		var ret string
		return ret
	}
	return *o.Comment
}

func (o *InvTaskInfo) GetCommentOk() (*string, bool) {
	if o == nil || o.Comment == nil {
		return nil, false
	}
	return o.Comment, true
}

func (o *InvTaskInfo) HasComment() bool {
	if o != nil && o.Comment != nil {
		return true
	}

	return false
}

func (o *InvTaskInfo) SetComment(v string) {
	o.Comment = &v
}

func (o *InvTaskInfo) GetConditions() []TaskCondition {
	if o == nil || o.Conditions == nil {
		var ret []TaskCondition
		return ret
	}
	return *o.Conditions
}

func (o *InvTaskInfo) GetConditionsOk() (*[]TaskCondition, bool) {
	if o == nil || o.Conditions == nil {
		return nil, false
	}
	return o.Conditions, true
}

func (o *InvTaskInfo) HasConditions() bool {
	if o != nil && o.Conditions != nil {
		return true
	}

	return false
}

func (o *InvTaskInfo) SetConditions(v []TaskCondition) {
	o.Conditions = &v
}

func (o *InvTaskInfo) GetInTaskID() string {
	if o == nil || o.InTaskID == nil {
		var ret string
		return ret
	}
	return *o.InTaskID
}

func (o *InvTaskInfo) GetInTaskIDOk() (*string, bool) {
	if o == nil || o.InTaskID == nil {
		return nil, false
	}
	return o.InTaskID, true
}

func (o *InvTaskInfo) HasInTaskID() bool {
	if o != nil && o.InTaskID != nil {
		return true
	}

	return false
}

func (o *InvTaskInfo) SetInTaskID(v string) {
	o.InTaskID = &v
}

func (o *InvTaskInfo) GetInput() string {
	if o == nil || o.Input == nil {
		var ret string
		return ret
	}
	return *o.Input
}

func (o *InvTaskInfo) GetInputOk() (*string, bool) {
	if o == nil || o.Input == nil {
		return nil, false
	}
	return o.Input, true
}

func (o *InvTaskInfo) HasInput() bool {
	if o != nil && o.Input != nil {
		return true
	}

	return false
}

func (o *InvTaskInfo) SetInput(v string) {
	o.Input = &v
}

func (o *InvTaskInfo) GetInvId() string {
	if o == nil || o.InvId == nil {
		var ret string
		return ret
	}
	return *o.InvId
}

func (o *InvTaskInfo) GetInvIdOk() (*string, bool) {
	if o == nil || o.InvId == nil {
		return nil, false
	}
	return o.InvId, true
}

func (o *InvTaskInfo) HasInvId() bool {
	if o != nil && o.InvId != nil {
		return true
	}

	return false
}

func (o *InvTaskInfo) SetInvId(v string) {
	o.InvId = &v
}

func (o *InvTaskInfo) GetLoopArgs() map[string]AdvanceArg {
	if o == nil || o.LoopArgs == nil {
		var ret map[string]AdvanceArg
		return ret
	}
	return *o.LoopArgs
}

func (o *InvTaskInfo) GetLoopArgsOk() (*map[string]AdvanceArg, bool) {
	if o == nil || o.LoopArgs == nil {
		return nil, false
	}
	return o.LoopArgs, true
}

func (o *InvTaskInfo) HasLoopArgs() bool {
	if o != nil && o.LoopArgs != nil {
		return true
	}

	return false
}

func (o *InvTaskInfo) SetLoopArgs(v map[string]AdvanceArg) {
	o.LoopArgs = &v
}

func (o *InvTaskInfo) GetLoopCondition() [][]ArgAtomicFilter {
	if o == nil || o.LoopCondition == nil {
		var ret [][]ArgAtomicFilter
		return ret
	}
	return *o.LoopCondition
}

func (o *InvTaskInfo) GetLoopConditionOk() (*[][]ArgAtomicFilter, bool) {
	if o == nil || o.LoopCondition == nil {
		return nil, false
	}
	return o.LoopCondition, true
}

func (o *InvTaskInfo) HasLoopCondition() bool {
	if o != nil && o.LoopCondition != nil {
		return true
	}

	return false
}

func (o *InvTaskInfo) SetLoopCondition(v [][]ArgAtomicFilter) {
	o.LoopCondition = &v
}

func (o *InvTaskInfo) GetVersion() int64 {
	if o == nil || o.Version == nil {
		var ret int64
		return ret
	}
	return *o.Version
}

func (o *InvTaskInfo) GetVersionOk() (*int64, bool) {
	if o == nil || o.Version == nil {
		return nil, false
	}
	return o.Version, true
}

func (o *InvTaskInfo) HasVersion() bool {
	if o != nil && o.Version != nil {
		return true
	}

	return false
}

func (o *InvTaskInfo) SetVersion(v int64) {
	o.Version = &v
}

func (o InvTaskInfo) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Args != nil {
		toSerialize["args"] = o.Args
	}
	if o.Comment != nil {
		toSerialize["comment"] = o.Comment
	}
	if o.Conditions != nil {
		toSerialize["conditions"] = o.Conditions
	}
	if o.InTaskID != nil {
		toSerialize["inTaskID"] = o.InTaskID
	}
	if o.Input != nil {
		toSerialize["input"] = o.Input
	}
	if o.InvId != nil {
		toSerialize["invId"] = o.InvId
	}
	if o.LoopArgs != nil {
		toSerialize["loopArgs"] = o.LoopArgs
	}
	if o.LoopCondition != nil {
		toSerialize["loopCondition"] = o.LoopCondition
	}
	if o.Version != nil {
		toSerialize["version"] = o.Version
	}
	return json.Marshal(toSerialize)
}

type NullableInvTaskInfo struct {
	value *InvTaskInfo
	isSet bool
}

func (v NullableInvTaskInfo) Get() *InvTaskInfo {
	return v.value
}

func (v *NullableInvTaskInfo) Set(val *InvTaskInfo) {
	v.value = val
	v.isSet = true
}

func (v NullableInvTaskInfo) IsSet() bool {
	return v.isSet
}

func (v *NullableInvTaskInfo) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableInvTaskInfo(val *InvTaskInfo) *NullableInvTaskInfo {
	return &NullableInvTaskInfo{value: val, isSet: true}
}

func (v NullableInvTaskInfo) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableInvTaskInfo) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
/*
Cortex XSOAR API

This is the public REST API to integrate with the Cortex XSOAR server. HTTP request can be sent using any HTTP-client.  For an example dedicated client take a look at: https://github.com/demisto/demisto-py.  Requests must include API-key that can be generated in the Cortex XSOAR web client under 'Settings' -> 'Integrations' -> 'API keys'   Optimistic Locking and Versioning\\:  When using Cortex XSOAR REST API, you will need to make sure to work on the latest version of the item (incident, entry, etc.), otherwise, you will get a DB version error (which not allow you to override a newer item). In addition, you can pass 'version\\: -1' to force data override (make sure that other users data might be lost).  Assume that Alice and Bob both read the same data from Cortex XSOAR server, then they both changed the data, and then both tried to write the new versions back to the server. Whose changes should be saved? Alice’s? Bob’s? To solve this, each data item in Cortex XSOAR has a numeric incremental version. If Alice saved an item with version 4 and Bob trying to save the same item with version 3, Cortex XSOAR will rollback Bob request and returns a DB version conflict error. Bob will need to get the latest item and work on it so Alice work will not get lost.  Example request using 'curl'\\:  ``` curl 'https://hostname:443/incidents/search' -H 'content-type: application/json' -H 'accept: application/json' -H 'Authorization: <API Key goes here>' --data-binary '{\"filter\":{\"query\":\"-status:closed -category:job\",\"period\":{\"by\":\"day\",\"fromValue\":7}}}' --compressed ```

API version: 2.0.0
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package openapi

import (
	"encoding/json"
)

// InvTaskInfo struct for InvTaskInfo
type InvTaskInfo struct {
	Args          *map[string]AdvanceArg `json:"args,omitempty"`
	Comment       *string                `json:"comment,omitempty"`
	Conditions    *[]TaskCondition       `json:"conditions,omitempty"`
	InTaskID      *string                `json:"inTaskID,omitempty"`
	Input         *string                `json:"input,omitempty"`
	InvId         *string                `json:"invId,omitempty"`
	LoopArgs      *map[string]AdvanceArg `json:"loopArgs,omitempty"`
	LoopCondition *[][]ArgAtomicFilter   `json:"loopCondition,omitempty"`
	Version       *int64                 `json:"version,omitempty"`
}

// NewInvTaskInfo instantiates a new InvTaskInfo 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 NewInvTaskInfo() *InvTaskInfo {
	this := InvTaskInfo{}
	return &this
}

// NewInvTaskInfoWithDefaults instantiates a new InvTaskInfo 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 NewInvTaskInfoWithDefaults() *InvTaskInfo {
	this := InvTaskInfo{}
	return &this
}

// GetArgs returns the Args field value if set, zero value otherwise.
func (o *InvTaskInfo) GetArgs() map[string]AdvanceArg {
	if o == nil || o.Args == nil {
		var ret map[string]AdvanceArg
		return ret
	}
	return *o.Args
}

// GetArgsOk returns a tuple with the Args field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvTaskInfo) GetArgsOk() (*map[string]AdvanceArg, bool) {
	if o == nil || o.Args == nil {
		return nil, false
	}
	return o.Args, true
}

// HasArgs returns a boolean if a field has been set.
func (o *InvTaskInfo) HasArgs() bool {
	if o != nil && o.Args != nil {
		return true
	}

	return false
}

// SetArgs gets a reference to the given map[string]AdvanceArg and assigns it to the Args field.
func (o *InvTaskInfo) SetArgs(v map[string]AdvanceArg) {
	o.Args = &v
}

// GetComment returns the Comment field value if set, zero value otherwise.
func (o *InvTaskInfo) GetComment() string {
	if o == nil || o.Comment == nil {
		var ret string
		return ret
	}
	return *o.Comment
}

// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvTaskInfo) GetCommentOk() (*string, bool) {
	if o == nil || o.Comment == nil {
		return nil, false
	}
	return o.Comment, true
}

// HasComment returns a boolean if a field has been set.
func (o *InvTaskInfo) HasComment() bool {
	if o != nil && o.Comment != nil {
		return true
	}

	return false
}

// SetComment gets a reference to the given string and assigns it to the Comment field.
func (o *InvTaskInfo) SetComment(v string) {
	o.Comment = &v
}

// GetConditions returns the Conditions field value if set, zero value otherwise.
func (o *InvTaskInfo) GetConditions() []TaskCondition {
	if o == nil || o.Conditions == nil {
		var ret []TaskCondition
		return ret
	}
	return *o.Conditions
}

// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvTaskInfo) GetConditionsOk() (*[]TaskCondition, bool) {
	if o == nil || o.Conditions == nil {
		return nil, false
	}
	return o.Conditions, true
}

// HasConditions returns a boolean if a field has been set.
func (o *InvTaskInfo) HasConditions() bool {
	if o != nil && o.Conditions != nil {
		return true
	}

	return false
}

// SetConditions gets a reference to the given []TaskCondition and assigns it to the Conditions field.
func (o *InvTaskInfo) SetConditions(v []TaskCondition) {
	o.Conditions = &v
}

// GetInTaskID returns the InTaskID field value if set, zero value otherwise.
func (o *InvTaskInfo) GetInTaskID() string {
	if o == nil || o.InTaskID == nil {
		var ret string
		return ret
	}
	return *o.InTaskID
}

// GetInTaskIDOk returns a tuple with the InTaskID field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvTaskInfo) GetInTaskIDOk() (*string, bool) {
	if o == nil || o.InTaskID == nil {
		return nil, false
	}
	return o.InTaskID, true
}

// HasInTaskID returns a boolean if a field has been set.
func (o *InvTaskInfo) HasInTaskID() bool {
	if o != nil && o.InTaskID != nil {
		return true
	}

	return false
}

// SetInTaskID gets a reference to the given string and assigns it to the InTaskID field.
func (o *InvTaskInfo) SetInTaskID(v string) {
	o.InTaskID = &v
}

// GetInput returns the Input field value if set, zero value otherwise.
func (o *InvTaskInfo) GetInput() string {
	if o == nil || o.Input == nil {
		var ret string
		return ret
	}
	return *o.Input
}

// GetInputOk returns a tuple with the Input field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvTaskInfo) GetInputOk() (*string, bool) {
	if o == nil || o.Input == nil {
		return nil, false
	}
	return o.Input, true
}

// HasInput returns a boolean if a field has been set.
func (o *InvTaskInfo) HasInput() bool {
	if o != nil && o.Input != nil {
		return true
	}

	return false
}

// SetInput gets a reference to the given string and assigns it to the Input field.
func (o *InvTaskInfo) SetInput(v string) {
	o.Input = &v
}

// GetInvId returns the InvId field value if set, zero value otherwise.
func (o *InvTaskInfo) GetInvId() string {
	if o == nil || o.InvId == nil {
		var ret string
		return ret
	}
	return *o.InvId
}

// GetInvIdOk returns a tuple with the InvId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvTaskInfo) GetInvIdOk() (*string, bool) {
	if o == nil || o.InvId == nil {
		return nil, false
	}
	return o.InvId, true
}

// HasInvId returns a boolean if a field has been set.
func (o *InvTaskInfo) HasInvId() bool {
	if o != nil && o.InvId != nil {
		return true
	}

	return false
}

// SetInvId gets a reference to the given string and assigns it to the InvId field.
func (o *InvTaskInfo) SetInvId(v string) {
	o.InvId = &v
}

// GetLoopArgs returns the LoopArgs field value if set, zero value otherwise.
func (o *InvTaskInfo) GetLoopArgs() map[string]AdvanceArg {
	if o == nil || o.LoopArgs == nil {
		var ret map[string]AdvanceArg
		return ret
	}
	return *o.LoopArgs
}

// GetLoopArgsOk returns a tuple with the LoopArgs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvTaskInfo) GetLoopArgsOk() (*map[string]AdvanceArg, bool) {
	if o == nil || o.LoopArgs == nil {
		return nil, false
	}
	return o.LoopArgs, true
}

// HasLoopArgs returns a boolean if a field has been set.
func (o *InvTaskInfo) HasLoopArgs() bool {
	if o != nil && o.LoopArgs != nil {
		return true
	}

	return false
}

// SetLoopArgs gets a reference to the given map[string]AdvanceArg and assigns it to the LoopArgs field.
func (o *InvTaskInfo) SetLoopArgs(v map[string]AdvanceArg) {
	o.LoopArgs = &v
}

// GetLoopCondition returns the LoopCondition field value if set, zero value otherwise.
func (o *InvTaskInfo) GetLoopCondition() [][]ArgAtomicFilter {
	if o == nil || o.LoopCondition == nil {
		var ret [][]ArgAtomicFilter
		return ret
	}
	return *o.LoopCondition
}

// GetLoopConditionOk returns a tuple with the LoopCondition field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvTaskInfo) GetLoopConditionOk() (*[][]ArgAtomicFilter, bool) {
	if o == nil || o.LoopCondition == nil {
		return nil, false
	}
	return o.LoopCondition, true
}

// HasLoopCondition returns a boolean if a field has been set.
func (o *InvTaskInfo) HasLoopCondition() bool {
	if o != nil && o.LoopCondition != nil {
		return true
	}

	return false
}

// SetLoopCondition gets a reference to the given [][]ArgAtomicFilter and assigns it to the LoopCondition field.
func (o *InvTaskInfo) SetLoopCondition(v [][]ArgAtomicFilter) {
	o.LoopCondition = &v
}

// GetVersion returns the Version field value if set, zero value otherwise.
func (o *InvTaskInfo) GetVersion() int64 {
	if o == nil || o.Version == nil {
		var ret int64
		return ret
	}
	return *o.Version
}

// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvTaskInfo) GetVersionOk() (*int64, bool) {
	if o == nil || o.Version == nil {
		return nil, false
	}
	return o.Version, true
}

// HasVersion returns a boolean if a field has been set.
func (o *InvTaskInfo) HasVersion() bool {
	if o != nil && o.Version != nil {
		return true
	}

	return false
}

// SetVersion gets a reference to the given int64 and assigns it to the Version field.
func (o *InvTaskInfo) SetVersion(v int64) {
	o.Version = &v
}

func (o InvTaskInfo) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Args != nil {
		toSerialize["args"] = o.Args
	}
	if o.Comment != nil {
		toSerialize["comment"] = o.Comment
	}
	if o.Conditions != nil {
		toSerialize["conditions"] = o.Conditions
	}
	if o.InTaskID != nil {
		toSerialize["inTaskID"] = o.InTaskID
	}
	if o.Input != nil {
		toSerialize["input"] = o.Input
	}
	if o.InvId != nil {
		toSerialize["invId"] = o.InvId
	}
	if o.LoopArgs != nil {
		toSerialize["loopArgs"] = o.LoopArgs
	}
	if o.LoopCondition != nil {
		toSerialize["loopCondition"] = o.LoopCondition
	}
	if o.Version != nil {
		toSerialize["version"] = o.Version
	}
	return json.Marshal(toSerialize)
}

type NullableInvTaskInfo struct {
	value *InvTaskInfo
	isSet bool
}

func (v NullableInvTaskInfo) Get() *InvTaskInfo {
	return v.value
}

func (v *NullableInvTaskInfo) Set(val *InvTaskInfo) {
	v.value = val
	v.isSet = true
}

func (v NullableInvTaskInfo) IsSet() bool {
	return v.isSet
}

func (v *NullableInvTaskInfo) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableInvTaskInfo(val *InvTaskInfo) *NullableInvTaskInfo {
	return &NullableInvTaskInfo{value: val, isSet: true}
}

func (v NullableInvTaskInfo) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableInvTaskInfo) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
