/*
 * IONOS Logging REST API
 *
 * The logging service offers a centralized platform to collect and store logs from various systems and applications. It includes tools to search, filter, visualize, and create alerts based on your log data.  This API provides programmatic control over logging pipelines, enabling you to create new pipelines or modify existing ones. It mirrors the functionality of the DCD visual tool, ensuring a consistent experience regardless of your chosen interface.
 *
 * API version: 0.0.1
 */

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

package logging

import (
	"encoding/json"

	"time"
)

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

// ProvisioningMetadata struct for ProvisioningMetadata
type ProvisioningMetadata struct {
	// The ISO 8601 creation timestamp.
	CreatedDate       *IonosTime `json:"createdDate,omitempty"`
	CreatedBy         *string    `json:"createdBy,omitempty"`
	CreatedByUserId   *string    `json:"createdByUserId,omitempty"`
	CreatedByUserUuid *string    `json:"createdByUserUuid,omitempty"`
	// The ISO 8601 modified timestamp.
	LastModifiedDate       *IonosTime `json:"lastModifiedDate,omitempty"`
	LastModifiedBy         *string    `json:"lastModifiedBy,omitempty"`
	LastModifiedByUserId   *string    `json:"lastModifiedByUserId,omitempty"`
	LastModifiedByUserUuid *string    `json:"lastModifiedByUserUuid,omitempty"`
	// The current state reported back by the pipeline.
	State *string `json:"state,omitempty"`
}

// NewProvisioningMetadata instantiates a new ProvisioningMetadata 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 NewProvisioningMetadata() *ProvisioningMetadata {
	this := ProvisioningMetadata{}

	return &this
}

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

// GetCreatedDate returns the CreatedDate field value if set, zero value otherwise.
func (o *ProvisioningMetadata) GetCreatedDate() time.Time {
	if o == nil || IsNil(o.CreatedDate) {
		var ret time.Time
		return ret
	}
	return o.CreatedDate.Time
}

// GetCreatedDateOk returns a tuple with the CreatedDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningMetadata) GetCreatedDateOk() (*time.Time, bool) {
	if o == nil || IsNil(o.CreatedDate) {
		return nil, false
	}
	return &o.CreatedDate.Time, true
}

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

	return false
}

// SetCreatedDate gets a reference to the given time.Time and assigns it to the CreatedDate field.
func (o *ProvisioningMetadata) SetCreatedDate(v time.Time) {
	o.CreatedDate = &IonosTime{v}
}

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

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

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

	return false
}

// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field.
func (o *ProvisioningMetadata) SetCreatedBy(v string) {
	o.CreatedBy = &v
}

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

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

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

	return false
}

// SetCreatedByUserId gets a reference to the given string and assigns it to the CreatedByUserId field.
func (o *ProvisioningMetadata) SetCreatedByUserId(v string) {
	o.CreatedByUserId = &v
}

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

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

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

	return false
}

// SetCreatedByUserUuid gets a reference to the given string and assigns it to the CreatedByUserUuid field.
func (o *ProvisioningMetadata) SetCreatedByUserUuid(v string) {
	o.CreatedByUserUuid = &v
}

// GetLastModifiedDate returns the LastModifiedDate field value if set, zero value otherwise.
func (o *ProvisioningMetadata) GetLastModifiedDate() time.Time {
	if o == nil || IsNil(o.LastModifiedDate) {
		var ret time.Time
		return ret
	}
	return o.LastModifiedDate.Time
}

// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProvisioningMetadata) GetLastModifiedDateOk() (*time.Time, bool) {
	if o == nil || IsNil(o.LastModifiedDate) {
		return nil, false
	}
	return &o.LastModifiedDate.Time, true
}

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

	return false
}

// SetLastModifiedDate gets a reference to the given time.Time and assigns it to the LastModifiedDate field.
func (o *ProvisioningMetadata) SetLastModifiedDate(v time.Time) {
	o.LastModifiedDate = &IonosTime{v}
}

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

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

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

	return false
}

// SetLastModifiedBy gets a reference to the given string and assigns it to the LastModifiedBy field.
func (o *ProvisioningMetadata) SetLastModifiedBy(v string) {
	o.LastModifiedBy = &v
}

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

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

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

	return false
}

// SetLastModifiedByUserId gets a reference to the given string and assigns it to the LastModifiedByUserId field.
func (o *ProvisioningMetadata) SetLastModifiedByUserId(v string) {
	o.LastModifiedByUserId = &v
}

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

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

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

	return false
}

// SetLastModifiedByUserUuid gets a reference to the given string and assigns it to the LastModifiedByUserUuid field.
func (o *ProvisioningMetadata) SetLastModifiedByUserUuid(v string) {
	o.LastModifiedByUserUuid = &v
}

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

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

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

	return false
}

// SetState gets a reference to the given string and assigns it to the State field.
func (o *ProvisioningMetadata) SetState(v string) {
	o.State = &v
}

func (o ProvisioningMetadata) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.CreatedDate) {
		toSerialize["createdDate"] = o.CreatedDate
	}
	if !IsNil(o.CreatedBy) {
		toSerialize["createdBy"] = o.CreatedBy
	}
	if !IsNil(o.CreatedByUserId) {
		toSerialize["createdByUserId"] = o.CreatedByUserId
	}
	if !IsNil(o.CreatedByUserUuid) {
		toSerialize["createdByUserUuid"] = o.CreatedByUserUuid
	}
	if !IsNil(o.LastModifiedDate) {
		toSerialize["lastModifiedDate"] = o.LastModifiedDate
	}
	if !IsNil(o.LastModifiedBy) {
		toSerialize["lastModifiedBy"] = o.LastModifiedBy
	}
	if !IsNil(o.LastModifiedByUserId) {
		toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId
	}
	if !IsNil(o.LastModifiedByUserUuid) {
		toSerialize["lastModifiedByUserUuid"] = o.LastModifiedByUserUuid
	}
	if !IsNil(o.State) {
		toSerialize["state"] = o.State
	}
	return toSerialize, nil
}

type NullableProvisioningMetadata struct {
	value *ProvisioningMetadata
	isSet bool
}

func (v NullableProvisioningMetadata) Get() *ProvisioningMetadata {
	return v.value
}

func (v *NullableProvisioningMetadata) Set(val *ProvisioningMetadata) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableProvisioningMetadata(val *ProvisioningMetadata) *NullableProvisioningMetadata {
	return &NullableProvisioningMetadata{value: val, isSet: true}
}

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

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