/*
Garage Administration API v0+garage-v0.9.0

Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks.  *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* 

API version: v0.9.0
*/

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

package garage

import (
	"encoding/json"
)

// AllowBucketKeyRequest struct for AllowBucketKeyRequest
type AllowBucketKeyRequest struct {
	BucketId string `json:"bucketId"`
	AccessKeyId string `json:"accessKeyId"`
	Permissions AllowBucketKeyRequestPermissions `json:"permissions"`
}

// NewAllowBucketKeyRequest instantiates a new AllowBucketKeyRequest 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 NewAllowBucketKeyRequest(bucketId string, accessKeyId string, permissions AllowBucketKeyRequestPermissions) *AllowBucketKeyRequest {
	this := AllowBucketKeyRequest{}
	this.BucketId = bucketId
	this.AccessKeyId = accessKeyId
	this.Permissions = permissions
	return &this
}

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

// GetBucketId returns the BucketId field value
func (o *AllowBucketKeyRequest) 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 *AllowBucketKeyRequest) GetBucketIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.BucketId, true
}

// SetBucketId sets field value
func (o *AllowBucketKeyRequest) SetBucketId(v string) {
	o.BucketId = v
}

// GetAccessKeyId returns the AccessKeyId field value
func (o *AllowBucketKeyRequest) GetAccessKeyId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.AccessKeyId
}

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

// SetAccessKeyId sets field value
func (o *AllowBucketKeyRequest) SetAccessKeyId(v string) {
	o.AccessKeyId = v
}

// GetPermissions returns the Permissions field value
func (o *AllowBucketKeyRequest) GetPermissions() AllowBucketKeyRequestPermissions {
	if o == nil {
		var ret AllowBucketKeyRequestPermissions
		return ret
	}

	return o.Permissions
}

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

// SetPermissions sets field value
func (o *AllowBucketKeyRequest) SetPermissions(v AllowBucketKeyRequestPermissions) {
	o.Permissions = v
}

func (o AllowBucketKeyRequest) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["bucketId"] = o.BucketId
	}
	if true {
		toSerialize["accessKeyId"] = o.AccessKeyId
	}
	if true {
		toSerialize["permissions"] = o.Permissions
	}
	return json.Marshal(toSerialize)
}

type NullableAllowBucketKeyRequest struct {
	value *AllowBucketKeyRequest
	isSet bool
}

func (v NullableAllowBucketKeyRequest) Get() *AllowBucketKeyRequest {
	return v.value
}

func (v *NullableAllowBucketKeyRequest) Set(val *AllowBucketKeyRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableAllowBucketKeyRequest(val *AllowBucketKeyRequest) *NullableAllowBucketKeyRequest {
	return &NullableAllowBucketKeyRequest{value: val, isSet: true}
}

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

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