/*
 * Kafka as a Service API
 *
 * An managed Apache Kafka cluster is designed to be highly fault-tolerant and scalable, allowing large volumes of data to be ingested, stored, and processed in real-time. By distributing data across multiple brokers, Kafka achieves high throughput and low latency, making it suitable for applications requiring real-time data processing and analytics.
 *
 * API version: 1.7.1
 * Contact: support@cloud.ionos.com
 */

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

package ionoscloud

import (
	"encoding/json"
)

// ClusterMetadataAllOf struct for ClusterMetadataAllOf
type ClusterMetadataAllOf struct {
	// IP addresses and ports of cluster brokers.
	BrokerAddresses *[]string `json:"brokerAddresses,omitempty"`
}

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

	return &this
}

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

// GetBrokerAddresses returns the BrokerAddresses field value
// If the value is explicit nil, the zero value for []string will be returned
func (o *ClusterMetadataAllOf) GetBrokerAddresses() *[]string {
	if o == nil {
		return nil
	}

	return o.BrokerAddresses

}

// GetBrokerAddressesOk returns a tuple with the BrokerAddresses 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 *ClusterMetadataAllOf) GetBrokerAddressesOk() (*[]string, bool) {
	if o == nil {
		return nil, false
	}

	return o.BrokerAddresses, true
}

// SetBrokerAddresses sets field value
func (o *ClusterMetadataAllOf) SetBrokerAddresses(v []string) {

	o.BrokerAddresses = &v

}

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

	return false
}

func (o ClusterMetadataAllOf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.BrokerAddresses != nil {
		toSerialize["brokerAddresses"] = o.BrokerAddresses
	}

	return json.Marshal(toSerialize)
}

type NullableClusterMetadataAllOf struct {
	value *ClusterMetadataAllOf
	isSet bool
}

func (v NullableClusterMetadataAllOf) Get() *ClusterMetadataAllOf {
	return v.value
}

func (v *NullableClusterMetadataAllOf) Set(val *ClusterMetadataAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableClusterMetadataAllOf(val *ClusterMetadataAllOf) *NullableClusterMetadataAllOf {
	return &NullableClusterMetadataAllOf{value: val, isSet: true}
}

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

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