/*
 * IONOS Cloud - API Gateway
 *
 * API Gateway is an application that acts as a \"front door\" for backend services and APIs, handling client requests and routing them to the appropriate backend.
 *
 * API version: 0.0.1
 */

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

package ionoscloud

import (
	"encoding/json"
)

// MetadataWithEndpointAllOf struct for MetadataWithEndpointAllOf
type MetadataWithEndpointAllOf struct {
	// The public endpoint of the API Gateway instance.
	PublicEndpoint *string `json:"publicEndpoint"`
}

// NewMetadataWithEndpointAllOf instantiates a new MetadataWithEndpointAllOf 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 NewMetadataWithEndpointAllOf(publicEndpoint string) *MetadataWithEndpointAllOf {
	this := MetadataWithEndpointAllOf{}

	this.PublicEndpoint = &publicEndpoint

	return &this
}

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

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

	return o.PublicEndpoint

}

// GetPublicEndpointOk returns a tuple with the PublicEndpoint 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 *MetadataWithEndpointAllOf) GetPublicEndpointOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.PublicEndpoint, true
}

// SetPublicEndpoint sets field value
func (o *MetadataWithEndpointAllOf) SetPublicEndpoint(v string) {

	o.PublicEndpoint = &v

}

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

	return false
}

func (o MetadataWithEndpointAllOf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.PublicEndpoint != nil {
		toSerialize["publicEndpoint"] = o.PublicEndpoint
	}

	return json.Marshal(toSerialize)
}

type NullableMetadataWithEndpointAllOf struct {
	value *MetadataWithEndpointAllOf
	isSet bool
}

func (v NullableMetadataWithEndpointAllOf) Get() *MetadataWithEndpointAllOf {
	return v.value
}

func (v *NullableMetadataWithEndpointAllOf) Set(val *MetadataWithEndpointAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMetadataWithEndpointAllOf(val *MetadataWithEndpointAllOf) *NullableMetadataWithEndpointAllOf {
	return &NullableMetadataWithEndpointAllOf{value: val, isSet: true}
}

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

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