/*
 * IONOS Object Storage API for contract-owned buckets
 *
 * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems.  ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools)  ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` |  ## Changelog - 30.05.2024 Initial version
 *
 * API version: 2.0.2
 * Contact: support@cloud.ionos.com
 */

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

package ionoscloud

import (
	"encoding/json"
)

import "encoding/xml"

// ListPartsOutput struct for ListPartsOutput
type ListPartsOutput struct {
	XMLName xml.Name `xml:"ListPartsOutput"`
	// The bucket name.
	Bucket *string `json:"Bucket,omitempty" xml:"Name"`
	// The object key.
	Key *string `json:"Key,omitempty" xml:"Key"`
	// ID of the multipart upload.
	UploadId *string `json:"UploadId,omitempty" xml:"UploadId"`
	// When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.
	PartNumberMarker *int32 `json:"PartNumberMarker,omitempty" xml:"PartNumberMarker"`
	// When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.
	NextPartNumberMarker *string `json:"NextPartNumberMarker,omitempty" xml:"NextPartNumberMarker"`
	// Maximum number of parts that were allowed in the response.
	MaxParts *string `json:"MaxParts,omitempty" xml:"MaxParts"`
	// A flag that indicates whether IONOS Object Storage returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.
	IsTruncated *bool `json:"IsTruncated,omitempty" xml:"IsTruncated"`
	//  Container for elements related to a particular part. A response can contain zero or more `Part` elements.
	Parts        *[]Part       `json:"Parts,omitempty" xml:"Parts"`
	Initiator    *Initiator    `json:"Initiator,omitempty" xml:"Initiator"`
	Owner        *Owner        `json:"Owner,omitempty" xml:"Owner"`
	StorageClass *StorageClass `json:"StorageClass,omitempty" xml:"StorageClass"`
}

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

	return &this
}

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

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

	return o.Bucket

}

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

	return o.Bucket, true
}

// SetBucket sets field value
func (o *ListPartsOutput) SetBucket(v string) {

	o.Bucket = &v

}

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

	return false
}

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

	return o.Key

}

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

	return o.Key, true
}

// SetKey sets field value
func (o *ListPartsOutput) SetKey(v string) {

	o.Key = &v

}

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

	return false
}

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

	return o.UploadId

}

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

	return o.UploadId, true
}

// SetUploadId sets field value
func (o *ListPartsOutput) SetUploadId(v string) {

	o.UploadId = &v

}

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

	return false
}

// GetPartNumberMarker returns the PartNumberMarker field value
// If the value is explicit nil, the zero value for int32 will be returned
func (o *ListPartsOutput) GetPartNumberMarker() *int32 {
	if o == nil {
		return nil
	}

	return o.PartNumberMarker

}

// GetPartNumberMarkerOk returns a tuple with the PartNumberMarker 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 *ListPartsOutput) GetPartNumberMarkerOk() (*int32, bool) {
	if o == nil {
		return nil, false
	}

	return o.PartNumberMarker, true
}

// SetPartNumberMarker sets field value
func (o *ListPartsOutput) SetPartNumberMarker(v int32) {

	o.PartNumberMarker = &v

}

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

	return false
}

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

	return o.NextPartNumberMarker

}

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

	return o.NextPartNumberMarker, true
}

// SetNextPartNumberMarker sets field value
func (o *ListPartsOutput) SetNextPartNumberMarker(v string) {

	o.NextPartNumberMarker = &v

}

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

	return false
}

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

	return o.MaxParts

}

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

	return o.MaxParts, true
}

// SetMaxParts sets field value
func (o *ListPartsOutput) SetMaxParts(v string) {

	o.MaxParts = &v

}

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

	return false
}

// GetIsTruncated returns the IsTruncated field value
// If the value is explicit nil, the zero value for bool will be returned
func (o *ListPartsOutput) GetIsTruncated() *bool {
	if o == nil {
		return nil
	}

	return o.IsTruncated

}

// GetIsTruncatedOk returns a tuple with the IsTruncated 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 *ListPartsOutput) GetIsTruncatedOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}

	return o.IsTruncated, true
}

// SetIsTruncated sets field value
func (o *ListPartsOutput) SetIsTruncated(v bool) {

	o.IsTruncated = &v

}

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

	return false
}

// GetParts returns the Parts field value
// If the value is explicit nil, the zero value for []Part will be returned
func (o *ListPartsOutput) GetParts() *[]Part {
	if o == nil {
		return nil
	}

	return o.Parts

}

// GetPartsOk returns a tuple with the Parts 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 *ListPartsOutput) GetPartsOk() (*[]Part, bool) {
	if o == nil {
		return nil, false
	}

	return o.Parts, true
}

// SetParts sets field value
func (o *ListPartsOutput) SetParts(v []Part) {

	o.Parts = &v

}

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

	return false
}

// GetInitiator returns the Initiator field value
// If the value is explicit nil, the zero value for Initiator will be returned
func (o *ListPartsOutput) GetInitiator() *Initiator {
	if o == nil {
		return nil
	}

	return o.Initiator

}

// GetInitiatorOk returns a tuple with the Initiator 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 *ListPartsOutput) GetInitiatorOk() (*Initiator, bool) {
	if o == nil {
		return nil, false
	}

	return o.Initiator, true
}

// SetInitiator sets field value
func (o *ListPartsOutput) SetInitiator(v Initiator) {

	o.Initiator = &v

}

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

	return false
}

// GetOwner returns the Owner field value
// If the value is explicit nil, the zero value for Owner will be returned
func (o *ListPartsOutput) GetOwner() *Owner {
	if o == nil {
		return nil
	}

	return o.Owner

}

// GetOwnerOk returns a tuple with the Owner 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 *ListPartsOutput) GetOwnerOk() (*Owner, bool) {
	if o == nil {
		return nil, false
	}

	return o.Owner, true
}

// SetOwner sets field value
func (o *ListPartsOutput) SetOwner(v Owner) {

	o.Owner = &v

}

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

	return false
}

// GetStorageClass returns the StorageClass field value
// If the value is explicit nil, the zero value for StorageClass will be returned
func (o *ListPartsOutput) GetStorageClass() *StorageClass {
	if o == nil {
		return nil
	}

	return o.StorageClass

}

// GetStorageClassOk returns a tuple with the StorageClass 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 *ListPartsOutput) GetStorageClassOk() (*StorageClass, bool) {
	if o == nil {
		return nil, false
	}

	return o.StorageClass, true
}

// SetStorageClass sets field value
func (o *ListPartsOutput) SetStorageClass(v StorageClass) {

	o.StorageClass = &v

}

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

	return false
}

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

	if o.Key != nil {
		toSerialize["Key"] = o.Key
	}

	if o.UploadId != nil {
		toSerialize["UploadId"] = o.UploadId
	}

	if o.PartNumberMarker != nil {
		toSerialize["PartNumberMarker"] = o.PartNumberMarker
	}

	if o.NextPartNumberMarker != nil {
		toSerialize["NextPartNumberMarker"] = o.NextPartNumberMarker
	}

	if o.MaxParts != nil {
		toSerialize["MaxParts"] = o.MaxParts
	}

	if o.IsTruncated != nil {
		toSerialize["IsTruncated"] = o.IsTruncated
	}

	if o.Parts != nil {
		toSerialize["Parts"] = o.Parts
	}

	if o.Initiator != nil {
		toSerialize["Initiator"] = o.Initiator
	}

	if o.Owner != nil {
		toSerialize["Owner"] = o.Owner
	}

	if o.StorageClass != nil {
		toSerialize["StorageClass"] = o.StorageClass
	}

	return json.Marshal(toSerialize)
}

type NullableListPartsOutput struct {
	value *ListPartsOutput
	isSet bool
}

func (v NullableListPartsOutput) Get() *ListPartsOutput {
	return v.value
}

func (v *NullableListPartsOutput) Set(val *ListPartsOutput) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableListPartsOutput(val *ListPartsOutput) *NullableListPartsOutput {
	return &NullableListPartsOutput{value: val, isSet: true}
}

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

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