/*
DM OpenAPI DOC

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 6.0.0
*/

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

package dm

import (
	"encoding/json"
)

// checks if the TaskFullMigrateConf type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TaskFullMigrateConf{}

// TaskFullMigrateConf configuration of full migrate tasks
type TaskFullMigrateConf struct {
	Analyze  *TaskFullMigrateConfAnalyze `json:"analyze,omitempty"`
	Checksum *TaskFullMigrateConfAnalyze `json:"checksum,omitempty"`
	// to control compress kv pairs of physical import
	CompressKvPairs *string `json:"compress-kv-pairs,omitempty"`
	// to control the way in which data is exported for consistency assurance
	Consistency *string `json:"consistency,omitempty"`
	// storage dir name
	DataDir *string `json:"data_dir,omitempty"`
	// disk quota for physical import
	DiskQuota *string `json:"disk_quota,omitempty"`
	// full export of concurrent
	ExportThreads *int32                         `json:"export_threads,omitempty"`
	ImportMode    *TaskFullMigrateConfImportMode `json:"import_mode,omitempty"`
	// full import of concurrent
	ImportThreads       *int32                                  `json:"import_threads,omitempty"`
	OnDuplicateLogical  *TaskFullMigrateConfOnDuplicateLogical  `json:"on_duplicate_logical,omitempty"`
	OnDuplicatePhysical *TaskFullMigrateConfOnDuplicatePhysical `json:"on_duplicate_physical,omitempty"`
	// address of pd
	PdAddr *string `json:"pd_addr,omitempty"`
	// to control range concurrency of physical import
	RangeConcurrency *int32           `json:"range_concurrency,omitempty"`
	Security         NullableSecurity `json:"security,omitempty"`
	// sorting dir name for physical import
	SortingDir *string `json:"sorting_dir,omitempty"`
}

// NewTaskFullMigrateConf instantiates a new TaskFullMigrateConf 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 NewTaskFullMigrateConf() *TaskFullMigrateConf {
	this := TaskFullMigrateConf{}
	var exportThreads int32 = 4
	this.ExportThreads = &exportThreads
	var importThreads int32 = 16
	this.ImportThreads = &importThreads
	var rangeConcurrency int32 = 0
	this.RangeConcurrency = &rangeConcurrency
	return &this
}

// NewTaskFullMigrateConfWithDefaults instantiates a new TaskFullMigrateConf 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 NewTaskFullMigrateConfWithDefaults() *TaskFullMigrateConf {
	this := TaskFullMigrateConf{}
	var exportThreads int32 = 4
	this.ExportThreads = &exportThreads
	var importThreads int32 = 16
	this.ImportThreads = &importThreads
	var rangeConcurrency int32 = 0
	this.RangeConcurrency = &rangeConcurrency
	return &this
}

// GetAnalyze returns the Analyze field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetAnalyze() TaskFullMigrateConfAnalyze {
	if o == nil || IsNil(o.Analyze) {
		var ret TaskFullMigrateConfAnalyze
		return ret
	}
	return *o.Analyze
}

// GetAnalyzeOk returns a tuple with the Analyze field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskFullMigrateConf) GetAnalyzeOk() (*TaskFullMigrateConfAnalyze, bool) {
	if o == nil || IsNil(o.Analyze) {
		return nil, false
	}
	return o.Analyze, true
}

// HasAnalyze returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasAnalyze() bool {
	if o != nil && !IsNil(o.Analyze) {
		return true
	}

	return false
}

// SetAnalyze gets a reference to the given TaskFullMigrateConfAnalyze and assigns it to the Analyze field.
func (o *TaskFullMigrateConf) SetAnalyze(v TaskFullMigrateConfAnalyze) {
	o.Analyze = &v
}

// GetChecksum returns the Checksum field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetChecksum() TaskFullMigrateConfAnalyze {
	if o == nil || IsNil(o.Checksum) {
		var ret TaskFullMigrateConfAnalyze
		return ret
	}
	return *o.Checksum
}

// GetChecksumOk returns a tuple with the Checksum field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskFullMigrateConf) GetChecksumOk() (*TaskFullMigrateConfAnalyze, bool) {
	if o == nil || IsNil(o.Checksum) {
		return nil, false
	}
	return o.Checksum, true
}

// HasChecksum returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasChecksum() bool {
	if o != nil && !IsNil(o.Checksum) {
		return true
	}

	return false
}

// SetChecksum gets a reference to the given TaskFullMigrateConfAnalyze and assigns it to the Checksum field.
func (o *TaskFullMigrateConf) SetChecksum(v TaskFullMigrateConfAnalyze) {
	o.Checksum = &v
}

// GetCompressKvPairs returns the CompressKvPairs field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetCompressKvPairs() string {
	if o == nil || IsNil(o.CompressKvPairs) {
		var ret string
		return ret
	}
	return *o.CompressKvPairs
}

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

// HasCompressKvPairs returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasCompressKvPairs() bool {
	if o != nil && !IsNil(o.CompressKvPairs) {
		return true
	}

	return false
}

// SetCompressKvPairs gets a reference to the given string and assigns it to the CompressKvPairs field.
func (o *TaskFullMigrateConf) SetCompressKvPairs(v string) {
	o.CompressKvPairs = &v
}

// GetConsistency returns the Consistency field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetConsistency() string {
	if o == nil || IsNil(o.Consistency) {
		var ret string
		return ret
	}
	return *o.Consistency
}

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

// HasConsistency returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasConsistency() bool {
	if o != nil && !IsNil(o.Consistency) {
		return true
	}

	return false
}

// SetConsistency gets a reference to the given string and assigns it to the Consistency field.
func (o *TaskFullMigrateConf) SetConsistency(v string) {
	o.Consistency = &v
}

// GetDataDir returns the DataDir field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetDataDir() string {
	if o == nil || IsNil(o.DataDir) {
		var ret string
		return ret
	}
	return *o.DataDir
}

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

// HasDataDir returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasDataDir() bool {
	if o != nil && !IsNil(o.DataDir) {
		return true
	}

	return false
}

// SetDataDir gets a reference to the given string and assigns it to the DataDir field.
func (o *TaskFullMigrateConf) SetDataDir(v string) {
	o.DataDir = &v
}

// GetDiskQuota returns the DiskQuota field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetDiskQuota() string {
	if o == nil || IsNil(o.DiskQuota) {
		var ret string
		return ret
	}
	return *o.DiskQuota
}

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

// HasDiskQuota returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasDiskQuota() bool {
	if o != nil && !IsNil(o.DiskQuota) {
		return true
	}

	return false
}

// SetDiskQuota gets a reference to the given string and assigns it to the DiskQuota field.
func (o *TaskFullMigrateConf) SetDiskQuota(v string) {
	o.DiskQuota = &v
}

// GetExportThreads returns the ExportThreads field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetExportThreads() int32 {
	if o == nil || IsNil(o.ExportThreads) {
		var ret int32
		return ret
	}
	return *o.ExportThreads
}

// GetExportThreadsOk returns a tuple with the ExportThreads field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskFullMigrateConf) GetExportThreadsOk() (*int32, bool) {
	if o == nil || IsNil(o.ExportThreads) {
		return nil, false
	}
	return o.ExportThreads, true
}

// HasExportThreads returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasExportThreads() bool {
	if o != nil && !IsNil(o.ExportThreads) {
		return true
	}

	return false
}

// SetExportThreads gets a reference to the given int32 and assigns it to the ExportThreads field.
func (o *TaskFullMigrateConf) SetExportThreads(v int32) {
	o.ExportThreads = &v
}

// GetImportMode returns the ImportMode field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetImportMode() TaskFullMigrateConfImportMode {
	if o == nil || IsNil(o.ImportMode) {
		var ret TaskFullMigrateConfImportMode
		return ret
	}
	return *o.ImportMode
}

// GetImportModeOk returns a tuple with the ImportMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskFullMigrateConf) GetImportModeOk() (*TaskFullMigrateConfImportMode, bool) {
	if o == nil || IsNil(o.ImportMode) {
		return nil, false
	}
	return o.ImportMode, true
}

// HasImportMode returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasImportMode() bool {
	if o != nil && !IsNil(o.ImportMode) {
		return true
	}

	return false
}

// SetImportMode gets a reference to the given TaskFullMigrateConfImportMode and assigns it to the ImportMode field.
func (o *TaskFullMigrateConf) SetImportMode(v TaskFullMigrateConfImportMode) {
	o.ImportMode = &v
}

// GetImportThreads returns the ImportThreads field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetImportThreads() int32 {
	if o == nil || IsNil(o.ImportThreads) {
		var ret int32
		return ret
	}
	return *o.ImportThreads
}

// GetImportThreadsOk returns a tuple with the ImportThreads field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskFullMigrateConf) GetImportThreadsOk() (*int32, bool) {
	if o == nil || IsNil(o.ImportThreads) {
		return nil, false
	}
	return o.ImportThreads, true
}

// HasImportThreads returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasImportThreads() bool {
	if o != nil && !IsNil(o.ImportThreads) {
		return true
	}

	return false
}

// SetImportThreads gets a reference to the given int32 and assigns it to the ImportThreads field.
func (o *TaskFullMigrateConf) SetImportThreads(v int32) {
	o.ImportThreads = &v
}

// GetOnDuplicateLogical returns the OnDuplicateLogical field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetOnDuplicateLogical() TaskFullMigrateConfOnDuplicateLogical {
	if o == nil || IsNil(o.OnDuplicateLogical) {
		var ret TaskFullMigrateConfOnDuplicateLogical
		return ret
	}
	return *o.OnDuplicateLogical
}

// GetOnDuplicateLogicalOk returns a tuple with the OnDuplicateLogical field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskFullMigrateConf) GetOnDuplicateLogicalOk() (*TaskFullMigrateConfOnDuplicateLogical, bool) {
	if o == nil || IsNil(o.OnDuplicateLogical) {
		return nil, false
	}
	return o.OnDuplicateLogical, true
}

// HasOnDuplicateLogical returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasOnDuplicateLogical() bool {
	if o != nil && !IsNil(o.OnDuplicateLogical) {
		return true
	}

	return false
}

// SetOnDuplicateLogical gets a reference to the given TaskFullMigrateConfOnDuplicateLogical and assigns it to the OnDuplicateLogical field.
func (o *TaskFullMigrateConf) SetOnDuplicateLogical(v TaskFullMigrateConfOnDuplicateLogical) {
	o.OnDuplicateLogical = &v
}

// GetOnDuplicatePhysical returns the OnDuplicatePhysical field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetOnDuplicatePhysical() TaskFullMigrateConfOnDuplicatePhysical {
	if o == nil || IsNil(o.OnDuplicatePhysical) {
		var ret TaskFullMigrateConfOnDuplicatePhysical
		return ret
	}
	return *o.OnDuplicatePhysical
}

// GetOnDuplicatePhysicalOk returns a tuple with the OnDuplicatePhysical field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskFullMigrateConf) GetOnDuplicatePhysicalOk() (*TaskFullMigrateConfOnDuplicatePhysical, bool) {
	if o == nil || IsNil(o.OnDuplicatePhysical) {
		return nil, false
	}
	return o.OnDuplicatePhysical, true
}

// HasOnDuplicatePhysical returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasOnDuplicatePhysical() bool {
	if o != nil && !IsNil(o.OnDuplicatePhysical) {
		return true
	}

	return false
}

// SetOnDuplicatePhysical gets a reference to the given TaskFullMigrateConfOnDuplicatePhysical and assigns it to the OnDuplicatePhysical field.
func (o *TaskFullMigrateConf) SetOnDuplicatePhysical(v TaskFullMigrateConfOnDuplicatePhysical) {
	o.OnDuplicatePhysical = &v
}

// GetPdAddr returns the PdAddr field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetPdAddr() string {
	if o == nil || IsNil(o.PdAddr) {
		var ret string
		return ret
	}
	return *o.PdAddr
}

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

// HasPdAddr returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasPdAddr() bool {
	if o != nil && !IsNil(o.PdAddr) {
		return true
	}

	return false
}

// SetPdAddr gets a reference to the given string and assigns it to the PdAddr field.
func (o *TaskFullMigrateConf) SetPdAddr(v string) {
	o.PdAddr = &v
}

// GetRangeConcurrency returns the RangeConcurrency field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetRangeConcurrency() int32 {
	if o == nil || IsNil(o.RangeConcurrency) {
		var ret int32
		return ret
	}
	return *o.RangeConcurrency
}

// GetRangeConcurrencyOk returns a tuple with the RangeConcurrency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaskFullMigrateConf) GetRangeConcurrencyOk() (*int32, bool) {
	if o == nil || IsNil(o.RangeConcurrency) {
		return nil, false
	}
	return o.RangeConcurrency, true
}

// HasRangeConcurrency returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasRangeConcurrency() bool {
	if o != nil && !IsNil(o.RangeConcurrency) {
		return true
	}

	return false
}

// SetRangeConcurrency gets a reference to the given int32 and assigns it to the RangeConcurrency field.
func (o *TaskFullMigrateConf) SetRangeConcurrency(v int32) {
	o.RangeConcurrency = &v
}

// GetSecurity returns the Security field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TaskFullMigrateConf) GetSecurity() Security {
	if o == nil || IsNil(o.Security.Get()) {
		var ret Security
		return ret
	}
	return *o.Security.Get()
}

// GetSecurityOk returns a tuple with the Security field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *TaskFullMigrateConf) GetSecurityOk() (*Security, bool) {
	if o == nil {
		return nil, false
	}
	return o.Security.Get(), o.Security.IsSet()
}

// HasSecurity returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasSecurity() bool {
	if o != nil && o.Security.IsSet() {
		return true
	}

	return false
}

// SetSecurity gets a reference to the given NullableSecurity and assigns it to the Security field.
func (o *TaskFullMigrateConf) SetSecurity(v Security) {
	o.Security.Set(&v)
}

// SetSecurityNil sets the value for Security to be an explicit nil
func (o *TaskFullMigrateConf) SetSecurityNil() {
	o.Security.Set(nil)
}

// UnsetSecurity ensures that no value is present for Security, not even an explicit nil
func (o *TaskFullMigrateConf) UnsetSecurity() {
	o.Security.Unset()
}

// GetSortingDir returns the SortingDir field value if set, zero value otherwise.
func (o *TaskFullMigrateConf) GetSortingDir() string {
	if o == nil || IsNil(o.SortingDir) {
		var ret string
		return ret
	}
	return *o.SortingDir
}

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

// HasSortingDir returns a boolean if a field has been set.
func (o *TaskFullMigrateConf) HasSortingDir() bool {
	if o != nil && !IsNil(o.SortingDir) {
		return true
	}

	return false
}

// SetSortingDir gets a reference to the given string and assigns it to the SortingDir field.
func (o *TaskFullMigrateConf) SetSortingDir(v string) {
	o.SortingDir = &v
}

func (o TaskFullMigrateConf) MarshalJSON() ([]byte, error) {
	toSerialize, err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o TaskFullMigrateConf) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Analyze) {
		toSerialize["analyze"] = o.Analyze
	}
	if !IsNil(o.Checksum) {
		toSerialize["checksum"] = o.Checksum
	}
	if !IsNil(o.CompressKvPairs) {
		toSerialize["compress-kv-pairs"] = o.CompressKvPairs
	}
	if !IsNil(o.Consistency) {
		toSerialize["consistency"] = o.Consistency
	}
	if !IsNil(o.DataDir) {
		toSerialize["data_dir"] = o.DataDir
	}
	if !IsNil(o.DiskQuota) {
		toSerialize["disk_quota"] = o.DiskQuota
	}
	if !IsNil(o.ExportThreads) {
		toSerialize["export_threads"] = o.ExportThreads
	}
	if !IsNil(o.ImportMode) {
		toSerialize["import_mode"] = o.ImportMode
	}
	if !IsNil(o.ImportThreads) {
		toSerialize["import_threads"] = o.ImportThreads
	}
	if !IsNil(o.OnDuplicateLogical) {
		toSerialize["on_duplicate_logical"] = o.OnDuplicateLogical
	}
	if !IsNil(o.OnDuplicatePhysical) {
		toSerialize["on_duplicate_physical"] = o.OnDuplicatePhysical
	}
	if !IsNil(o.PdAddr) {
		toSerialize["pd_addr"] = o.PdAddr
	}
	if !IsNil(o.RangeConcurrency) {
		toSerialize["range_concurrency"] = o.RangeConcurrency
	}
	if o.Security.IsSet() {
		toSerialize["security"] = o.Security.Get()
	}
	if !IsNil(o.SortingDir) {
		toSerialize["sorting_dir"] = o.SortingDir
	}
	return toSerialize, nil
}

type NullableTaskFullMigrateConf struct {
	value *TaskFullMigrateConf
	isSet bool
}

func (v NullableTaskFullMigrateConf) Get() *TaskFullMigrateConf {
	return v.value
}

func (v *NullableTaskFullMigrateConf) Set(val *TaskFullMigrateConf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableTaskFullMigrateConf(val *TaskFullMigrateConf) *NullableTaskFullMigrateConf {
	return &NullableTaskFullMigrateConf{value: val, isSet: true}
}

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

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