io.kubernetes.client.openapi.models.V1beta2DeviceTaint Maven / Gradle / Ivy
/*
Copyright 2025 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.
*/
package io.kubernetes.client.openapi.models;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.time.OffsetDateTime;
/**
* The device this taint is attached to has the \"effect\" on any claim which does not tolerate the taint and, through the claim, to pods using the claim.
*/
@ApiModel(description = "The device this taint is attached to has the \"effect\" on any claim which does not tolerate the taint and, through the claim, to pods using the claim.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-22T21:20:49.874193Z[Etc/UTC]")
public class V1beta2DeviceTaint {
public static final String SERIALIZED_NAME_EFFECT = "effect";
@SerializedName(SERIALIZED_NAME_EFFECT)
private String effect;
public static final String SERIALIZED_NAME_KEY = "key";
@SerializedName(SERIALIZED_NAME_KEY)
private String key;
public static final String SERIALIZED_NAME_TIME_ADDED = "timeAdded";
@SerializedName(SERIALIZED_NAME_TIME_ADDED)
private OffsetDateTime timeAdded;
public static final String SERIALIZED_NAME_VALUE = "value";
@SerializedName(SERIALIZED_NAME_VALUE)
private String value;
public V1beta2DeviceTaint effect(String effect) {
this.effect = effect;
return this;
}
/**
* The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here.
* @return effect
**/
@ApiModelProperty(required = true, value = "The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here.")
public String getEffect() {
return effect;
}
public void setEffect(String effect) {
this.effect = effect;
}
public V1beta2DeviceTaint key(String key) {
this.key = key;
return this;
}
/**
* The taint key to be applied to a device. Must be a label name.
* @return key
**/
@ApiModelProperty(required = true, value = "The taint key to be applied to a device. Must be a label name.")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public V1beta2DeviceTaint timeAdded(OffsetDateTime timeAdded) {
this.timeAdded = timeAdded;
return this;
}
/**
* TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.
* @return timeAdded
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.")
public OffsetDateTime getTimeAdded() {
return timeAdded;
}
public void setTimeAdded(OffsetDateTime timeAdded) {
this.timeAdded = timeAdded;
}
public V1beta2DeviceTaint value(String value) {
this.value = value;
return this;
}
/**
* The taint value corresponding to the taint key. Must be a label value.
* @return value
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The taint value corresponding to the taint key. Must be a label value.")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1beta2DeviceTaint v1beta2DeviceTaint = (V1beta2DeviceTaint) o;
return Objects.equals(this.effect, v1beta2DeviceTaint.effect) &&
Objects.equals(this.key, v1beta2DeviceTaint.key) &&
Objects.equals(this.timeAdded, v1beta2DeviceTaint.timeAdded) &&
Objects.equals(this.value, v1beta2DeviceTaint.value);
}
@Override
public int hashCode() {
return Objects.hash(effect, key, timeAdded, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1beta2DeviceTaint {\n");
sb.append(" effect: ").append(toIndentedString(effect)).append("\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" timeAdded: ").append(toIndentedString(timeAdded)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy