/*
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

import (
	resource "k8s.io/apimachinery/pkg/api/resource"
)

// ShareableCapacityStatusApplyConfiguration represents a declarative configuration of the ShareableCapacityStatus type for use
// with apply.
//
// ShareableCapacityStatus reports aggregate amounts for a single shareable
// capacity key.
type ShareableCapacityStatusApplyConfiguration struct {
	// Name is the capacity name.
	Name *string `json:"name,omitempty"`
	// Total is the sum of this capacity across shareable devices in the pool.
	Total *resource.Quantity `json:"total,omitempty"`
	// Consumed is the amount drawn by current allocations.
	Consumed *resource.Quantity `json:"consumed,omitempty"`
	// Available is Total minus Consumed, never negative.
	Available *resource.Quantity `json:"available,omitempty"`
}

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

// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *ShareableCapacityStatusApplyConfiguration) WithName(value string) *ShareableCapacityStatusApplyConfiguration {
	b.Name = &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 *ShareableCapacityStatusApplyConfiguration) WithTotal(value resource.Quantity) *ShareableCapacityStatusApplyConfiguration {
	b.Total = &value
	return b
}

// WithConsumed sets the Consumed 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 Consumed field is set to the value of the last call.
func (b *ShareableCapacityStatusApplyConfiguration) WithConsumed(value resource.Quantity) *ShareableCapacityStatusApplyConfiguration {
	b.Consumed = &value
	return b
}

// WithAvailable sets the Available 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 Available field is set to the value of the last call.
func (b *ShareableCapacityStatusApplyConfiguration) WithAvailable(value resource.Quantity) *ShareableCapacityStatusApplyConfiguration {
	b.Available = &value
	return b
}
