/*
Copyright The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v1alpha3

// PartitionTypeStatusApplyConfiguration represents a declarative configuration of the PartitionTypeStatus type for use
// with apply.
//
// PartitionTypeStatus reports allocatability for a single partition type,
// identified by the value of a grouping attribute.
type PartitionTypeStatusApplyConfiguration struct {
	// Attribute is the fully qualified name of the device attribute whose value
	// groups this entry. It is the PartitionTypeAttribute declared by the
	// devices' own slice, or the default named in the request when their slice
	// declares none.
	Attribute *string `json:"attribute,omitempty"`
	// Type is the partition type value (e.g. "Full" or "Half").
	Type *string `json:"type,omitempty"`
	// Total is the number of devices of this partition type in the pool.
	Total *int32 `json:"total,omitempty"`
	// Allocatable is the number of additional devices of this partition type
	// that could still be allocated given current shared-counter consumption.
	Allocatable *int32 `json:"allocatable,omitempty"`
}

// PartitionTypeStatusApplyConfiguration constructs a declarative configuration of the PartitionTypeStatus type for use with
// apply.
func PartitionTypeStatus() *PartitionTypeStatusApplyConfiguration {
	return &PartitionTypeStatusApplyConfiguration{}
}

// WithAttribute sets the Attribute field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Attribute field is set to the value of the last call.
func (b *PartitionTypeStatusApplyConfiguration) WithAttribute(value string) *PartitionTypeStatusApplyConfiguration {
	b.Attribute = &value
	return b
}

// WithType sets the Type field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Type field is set to the value of the last call.
func (b *PartitionTypeStatusApplyConfiguration) WithType(value string) *PartitionTypeStatusApplyConfiguration {
	b.Type = &value
	return b
}

// WithTotal sets the Total field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Total field is set to the value of the last call.
func (b *PartitionTypeStatusApplyConfiguration) WithTotal(value int32) *PartitionTypeStatusApplyConfiguration {
	b.Total = &value
	return b
}

// WithAllocatable sets the Allocatable field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Allocatable field is set to the value of the last call.
func (b *PartitionTypeStatusApplyConfiguration) WithAllocatable(value int32) *PartitionTypeStatusApplyConfiguration {
	b.Allocatable = &value
	return b
}
