/*
Hindsight HTTP API

HTTP API for Hindsight

API version: 0.5.3
*/

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

package hindsight

import (
	"encoding/json"
	"bytes"
	"fmt"
)

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

// BankTemplateImportResponse Response model for the bank template import endpoint.
type BankTemplateImportResponse struct {
	// Bank that was imported into
	BankId string `json:"bank_id"`
	// Whether bank config was updated
	ConfigApplied bool `json:"config_applied"`
	// IDs of newly created mental models
	MentalModelsCreated []string `json:"mental_models_created,omitempty"`
	// IDs of updated mental models
	MentalModelsUpdated []string `json:"mental_models_updated,omitempty"`
	// Names of newly created directives
	DirectivesCreated []string `json:"directives_created,omitempty"`
	// Names of updated directives
	DirectivesUpdated []string `json:"directives_updated,omitempty"`
	// Operation IDs for mental model content generation (async)
	OperationIds []string `json:"operation_ids,omitempty"`
	// True if this was a validation-only run
	DryRun *bool `json:"dry_run,omitempty"`
}

type _BankTemplateImportResponse BankTemplateImportResponse

// NewBankTemplateImportResponse instantiates a new BankTemplateImportResponse 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 NewBankTemplateImportResponse(bankId string, configApplied bool) *BankTemplateImportResponse {
	this := BankTemplateImportResponse{}
	this.BankId = bankId
	this.ConfigApplied = configApplied
	var dryRun bool = false
	this.DryRun = &dryRun
	return &this
}

// NewBankTemplateImportResponseWithDefaults instantiates a new BankTemplateImportResponse 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 NewBankTemplateImportResponseWithDefaults() *BankTemplateImportResponse {
	this := BankTemplateImportResponse{}
	var dryRun bool = false
	this.DryRun = &dryRun
	return &this
}

// GetBankId returns the BankId field value
func (o *BankTemplateImportResponse) GetBankId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.BankId
}

// GetBankIdOk returns a tuple with the BankId field value
// and a boolean to check if the value has been set.
func (o *BankTemplateImportResponse) GetBankIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.BankId, true
}

// SetBankId sets field value
func (o *BankTemplateImportResponse) SetBankId(v string) {
	o.BankId = v
}

// GetConfigApplied returns the ConfigApplied field value
func (o *BankTemplateImportResponse) GetConfigApplied() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.ConfigApplied
}

// GetConfigAppliedOk returns a tuple with the ConfigApplied field value
// and a boolean to check if the value has been set.
func (o *BankTemplateImportResponse) GetConfigAppliedOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.ConfigApplied, true
}

// SetConfigApplied sets field value
func (o *BankTemplateImportResponse) SetConfigApplied(v bool) {
	o.ConfigApplied = v
}

// GetMentalModelsCreated returns the MentalModelsCreated field value if set, zero value otherwise.
func (o *BankTemplateImportResponse) GetMentalModelsCreated() []string {
	if o == nil || IsNil(o.MentalModelsCreated) {
		var ret []string
		return ret
	}
	return o.MentalModelsCreated
}

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

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

	return false
}

// SetMentalModelsCreated gets a reference to the given []string and assigns it to the MentalModelsCreated field.
func (o *BankTemplateImportResponse) SetMentalModelsCreated(v []string) {
	o.MentalModelsCreated = v
}

// GetMentalModelsUpdated returns the MentalModelsUpdated field value if set, zero value otherwise.
func (o *BankTemplateImportResponse) GetMentalModelsUpdated() []string {
	if o == nil || IsNil(o.MentalModelsUpdated) {
		var ret []string
		return ret
	}
	return o.MentalModelsUpdated
}

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

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

	return false
}

// SetMentalModelsUpdated gets a reference to the given []string and assigns it to the MentalModelsUpdated field.
func (o *BankTemplateImportResponse) SetMentalModelsUpdated(v []string) {
	o.MentalModelsUpdated = v
}

// GetDirectivesCreated returns the DirectivesCreated field value if set, zero value otherwise.
func (o *BankTemplateImportResponse) GetDirectivesCreated() []string {
	if o == nil || IsNil(o.DirectivesCreated) {
		var ret []string
		return ret
	}
	return o.DirectivesCreated
}

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

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

	return false
}

// SetDirectivesCreated gets a reference to the given []string and assigns it to the DirectivesCreated field.
func (o *BankTemplateImportResponse) SetDirectivesCreated(v []string) {
	o.DirectivesCreated = v
}

// GetDirectivesUpdated returns the DirectivesUpdated field value if set, zero value otherwise.
func (o *BankTemplateImportResponse) GetDirectivesUpdated() []string {
	if o == nil || IsNil(o.DirectivesUpdated) {
		var ret []string
		return ret
	}
	return o.DirectivesUpdated
}

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

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

	return false
}

// SetDirectivesUpdated gets a reference to the given []string and assigns it to the DirectivesUpdated field.
func (o *BankTemplateImportResponse) SetDirectivesUpdated(v []string) {
	o.DirectivesUpdated = v
}

// GetOperationIds returns the OperationIds field value if set, zero value otherwise.
func (o *BankTemplateImportResponse) GetOperationIds() []string {
	if o == nil || IsNil(o.OperationIds) {
		var ret []string
		return ret
	}
	return o.OperationIds
}

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

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

	return false
}

// SetOperationIds gets a reference to the given []string and assigns it to the OperationIds field.
func (o *BankTemplateImportResponse) SetOperationIds(v []string) {
	o.OperationIds = v
}

// GetDryRun returns the DryRun field value if set, zero value otherwise.
func (o *BankTemplateImportResponse) GetDryRun() bool {
	if o == nil || IsNil(o.DryRun) {
		var ret bool
		return ret
	}
	return *o.DryRun
}

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

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

	return false
}

// SetDryRun gets a reference to the given bool and assigns it to the DryRun field.
func (o *BankTemplateImportResponse) SetDryRun(v bool) {
	o.DryRun = &v
}

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

func (o BankTemplateImportResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["bank_id"] = o.BankId
	toSerialize["config_applied"] = o.ConfigApplied
	if !IsNil(o.MentalModelsCreated) {
		toSerialize["mental_models_created"] = o.MentalModelsCreated
	}
	if !IsNil(o.MentalModelsUpdated) {
		toSerialize["mental_models_updated"] = o.MentalModelsUpdated
	}
	if !IsNil(o.DirectivesCreated) {
		toSerialize["directives_created"] = o.DirectivesCreated
	}
	if !IsNil(o.DirectivesUpdated) {
		toSerialize["directives_updated"] = o.DirectivesUpdated
	}
	if !IsNil(o.OperationIds) {
		toSerialize["operation_ids"] = o.OperationIds
	}
	if !IsNil(o.DryRun) {
		toSerialize["dry_run"] = o.DryRun
	}
	return toSerialize, nil
}

func (o *BankTemplateImportResponse) UnmarshalJSON(data []byte) (err error) {
	// This validates that all required properties are included in the JSON object
	// by unmarshalling the object into a generic map with string keys and checking
	// that every required field exists as a key in the generic map.
	requiredProperties := []string{
		"bank_id",
		"config_applied",
	}

	allProperties := make(map[string]interface{})

	err = json.Unmarshal(data, &allProperties)

	if err != nil {
		return err;
	}

	for _, requiredProperty := range(requiredProperties) {
		if _, exists := allProperties[requiredProperty]; !exists {
			return fmt.Errorf("no value given for required property %v", requiredProperty)
		}
	}

	varBankTemplateImportResponse := _BankTemplateImportResponse{}

	decoder := json.NewDecoder(bytes.NewReader(data))
	decoder.DisallowUnknownFields()
	err = decoder.Decode(&varBankTemplateImportResponse)

	if err != nil {
		return err
	}

	*o = BankTemplateImportResponse(varBankTemplateImportResponse)

	return err
}

type NullableBankTemplateImportResponse struct {
	value *BankTemplateImportResponse
	isSet bool
}

func (v NullableBankTemplateImportResponse) Get() *BankTemplateImportResponse {
	return v.value
}

func (v *NullableBankTemplateImportResponse) Set(val *BankTemplateImportResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableBankTemplateImportResponse(val *BankTemplateImportResponse) *NullableBankTemplateImportResponse {
	return &NullableBankTemplateImportResponse{value: val, isSet: true}
}

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

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


