/*
 * Subset of Influx API covered by Influx CLI
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 2.0.0
 */

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

package api

import (
	"encoding/json"
)

// BucketMetadataManifest struct for BucketMetadataManifest
type BucketMetadataManifest struct {
	OrganizationID         string                    `json:"organizationID" yaml:"organizationID"`
	OrganizationName       string                    `json:"organizationName" yaml:"organizationName"`
	BucketID               string                    `json:"bucketID" yaml:"bucketID"`
	BucketName             string                    `json:"bucketName" yaml:"bucketName"`
	Description            *string                   `json:"description,omitempty" yaml:"description,omitempty"`
	DefaultRetentionPolicy string                    `json:"defaultRetentionPolicy" yaml:"defaultRetentionPolicy"`
	RetentionPolicies      []RetentionPolicyManifest `json:"retentionPolicies" yaml:"retentionPolicies"`
}

// NewBucketMetadataManifest instantiates a new BucketMetadataManifest 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 NewBucketMetadataManifest(organizationID string, organizationName string, bucketID string, bucketName string, defaultRetentionPolicy string, retentionPolicies []RetentionPolicyManifest) *BucketMetadataManifest {
	this := BucketMetadataManifest{}
	this.OrganizationID = organizationID
	this.OrganizationName = organizationName
	this.BucketID = bucketID
	this.BucketName = bucketName
	this.DefaultRetentionPolicy = defaultRetentionPolicy
	this.RetentionPolicies = retentionPolicies
	return &this
}

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

// GetOrganizationID returns the OrganizationID field value
func (o *BucketMetadataManifest) GetOrganizationID() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.OrganizationID
}

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

// SetOrganizationID sets field value
func (o *BucketMetadataManifest) SetOrganizationID(v string) {
	o.OrganizationID = v
}

// GetOrganizationName returns the OrganizationName field value
func (o *BucketMetadataManifest) GetOrganizationName() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.OrganizationName
}

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

// SetOrganizationName sets field value
func (o *BucketMetadataManifest) SetOrganizationName(v string) {
	o.OrganizationName = v
}

// GetBucketID returns the BucketID field value
func (o *BucketMetadataManifest) GetBucketID() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.BucketID
}

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

// SetBucketID sets field value
func (o *BucketMetadataManifest) SetBucketID(v string) {
	o.BucketID = v
}

// GetBucketName returns the BucketName field value
func (o *BucketMetadataManifest) GetBucketName() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.BucketName
}

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

// SetBucketName sets field value
func (o *BucketMetadataManifest) SetBucketName(v string) {
	o.BucketName = v
}

// GetDescription returns the Description field value if set, zero value otherwise.
func (o *BucketMetadataManifest) GetDescription() string {
	if o == nil || o.Description == nil {
		var ret string
		return ret
	}
	return *o.Description
}

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

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

	return false
}

// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *BucketMetadataManifest) SetDescription(v string) {
	o.Description = &v
}

// GetDefaultRetentionPolicy returns the DefaultRetentionPolicy field value
func (o *BucketMetadataManifest) GetDefaultRetentionPolicy() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.DefaultRetentionPolicy
}

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

// SetDefaultRetentionPolicy sets field value
func (o *BucketMetadataManifest) SetDefaultRetentionPolicy(v string) {
	o.DefaultRetentionPolicy = v
}

// GetRetentionPolicies returns the RetentionPolicies field value
func (o *BucketMetadataManifest) GetRetentionPolicies() []RetentionPolicyManifest {
	if o == nil {
		var ret []RetentionPolicyManifest
		return ret
	}

	return o.RetentionPolicies
}

// GetRetentionPoliciesOk returns a tuple with the RetentionPolicies field value
// and a boolean to check if the value has been set.
func (o *BucketMetadataManifest) GetRetentionPoliciesOk() (*[]RetentionPolicyManifest, bool) {
	if o == nil {
		return nil, false
	}
	return &o.RetentionPolicies, true
}

// SetRetentionPolicies sets field value
func (o *BucketMetadataManifest) SetRetentionPolicies(v []RetentionPolicyManifest) {
	o.RetentionPolicies = v
}

func (o BucketMetadataManifest) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["organizationID"] = o.OrganizationID
	}
	if true {
		toSerialize["organizationName"] = o.OrganizationName
	}
	if true {
		toSerialize["bucketID"] = o.BucketID
	}
	if true {
		toSerialize["bucketName"] = o.BucketName
	}
	if o.Description != nil {
		toSerialize["description"] = o.Description
	}
	if true {
		toSerialize["defaultRetentionPolicy"] = o.DefaultRetentionPolicy
	}
	if true {
		toSerialize["retentionPolicies"] = o.RetentionPolicies
	}
	return json.Marshal(toSerialize)
}

type NullableBucketMetadataManifest struct {
	value *BucketMetadataManifest
	isSet bool
}

func (v NullableBucketMetadataManifest) Get() *BucketMetadataManifest {
	return v.value
}

func (v *NullableBucketMetadataManifest) Set(val *BucketMetadataManifest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableBucketMetadataManifest(val *BucketMetadataManifest) *NullableBucketMetadataManifest {
	return &NullableBucketMetadataManifest{value: val, isSet: true}
}

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

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