/*
 * VM Auto Scaling API
 *
 * The VM Auto Scaling Service enables IONOS clients to horizontally scale the number of VM replicas based on configured rules. You can use VM Auto Scaling to ensure that you have a sufficient number of replicas to handle your application loads at all times.  For this purpose, create a VM Auto Scaling Group that contains the server replicas. The VM Auto Scaling Service ensures that the number of replicas in the group is always within the defined limits.   When scaling policies are set, VM Auto Scaling creates or deletes replicas according to the requirements of your applications. For each policy, specified 'scale-in' and 'scale-out' actions are performed when the corresponding thresholds are reached.
 *
 * API version: 1-SDK.1
 * Contact: support@cloud.ionos.com
 */

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

package ionoscloud

import (
	"encoding/json"
)

// NicFlowLog struct for NicFlowLog
type NicFlowLog struct {
	// The flow log name.
	Name *string `json:"name"`
	// Specifies the traffic action pattern.
	Action *string `json:"action"`
	// Specifies the traffic direction pattern.
	Direction *string `json:"direction"`
	// The S3 bucket name of an existing IONOS Cloud S3 bucket.
	Bucket *string `json:"bucket"`
}

// NewNicFlowLog instantiates a new NicFlowLog 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 NewNicFlowLog(name string, action string, direction string, bucket string) *NicFlowLog {
	this := NicFlowLog{}

	this.Name = &name
	this.Action = &action
	this.Direction = &direction
	this.Bucket = &bucket

	return &this
}

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

// GetName returns the Name field value
// If the value is explicit nil, the zero value for string will be returned
func (o *NicFlowLog) GetName() *string {
	if o == nil {
		return nil
	}

	return o.Name

}

// GetNameOk returns a tuple with the Name field value
// 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 *NicFlowLog) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Name, true
}

// SetName sets field value
func (o *NicFlowLog) SetName(v string) {

	o.Name = &v

}

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

	return false
}

// GetAction returns the Action field value
// If the value is explicit nil, the zero value for string will be returned
func (o *NicFlowLog) GetAction() *string {
	if o == nil {
		return nil
	}

	return o.Action

}

// GetActionOk returns a tuple with the Action field value
// 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 *NicFlowLog) GetActionOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Action, true
}

// SetAction sets field value
func (o *NicFlowLog) SetAction(v string) {

	o.Action = &v

}

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

	return false
}

// GetDirection returns the Direction field value
// If the value is explicit nil, the zero value for string will be returned
func (o *NicFlowLog) GetDirection() *string {
	if o == nil {
		return nil
	}

	return o.Direction

}

// GetDirectionOk returns a tuple with the Direction field value
// 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 *NicFlowLog) GetDirectionOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Direction, true
}

// SetDirection sets field value
func (o *NicFlowLog) SetDirection(v string) {

	o.Direction = &v

}

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

	return false
}

// GetBucket returns the Bucket field value
// If the value is explicit nil, the zero value for string will be returned
func (o *NicFlowLog) GetBucket() *string {
	if o == nil {
		return nil
	}

	return o.Bucket

}

// GetBucketOk returns a tuple with the Bucket field value
// 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 *NicFlowLog) GetBucketOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Bucket, true
}

// SetBucket sets field value
func (o *NicFlowLog) SetBucket(v string) {

	o.Bucket = &v

}

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

	return false
}

func (o NicFlowLog) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Name != nil {
		toSerialize["name"] = o.Name
	}

	if o.Action != nil {
		toSerialize["action"] = o.Action
	}

	if o.Direction != nil {
		toSerialize["direction"] = o.Direction
	}

	if o.Bucket != nil {
		toSerialize["bucket"] = o.Bucket
	}

	return json.Marshal(toSerialize)
}

type NullableNicFlowLog struct {
	value *NicFlowLog
	isSet bool
}

func (v NullableNicFlowLog) Get() *NicFlowLog {
	return v.value
}

func (v *NullableNicFlowLog) Set(val *NicFlowLog) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableNicFlowLog(val *NicFlowLog) *NullableNicFlowLog {
	return &NullableNicFlowLog{value: val, isSet: true}
}

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

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