
io.kubernetes.client.proto.V1Autoscaling Maven / Gradle / Ivy
/*
Copyright 2021 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.proto;
public final class V1Autoscaling {
private V1Autoscaling() {}
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface ContainerResourceMetricSourceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ContainerResourceMetricSource)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
boolean hasName();
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
java.lang.String getName();
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
boolean hasTargetAverageUtilization();
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
int getTargetAverageUtilization();
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
boolean hasTargetAverageValue();
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue();
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetAverageValueOrBuilder();
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
boolean hasContainer();
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
java.lang.String getContainer();
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
com.google.protobuf.ByteString getContainerBytes();
}
/**
*
*
*
* ContainerResourceMetricSource indicates how to scale on a resource metric known to
* Kubernetes, as specified in the requests and limits, describing a single container in
* each of the pods of the current scale target(e.g. CPU or memory). The values will be
* averaged together before being compared to the target. Such metrics are built into
* Kubernetes, and have special scaling options on top of those available to
* normal per-pod metrics using the "pods" source. Only one "target" type
* should be set.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ContainerResourceMetricSource}
*/
public static final class ContainerResourceMetricSource
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ContainerResourceMetricSource)
ContainerResourceMetricSourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use ContainerResourceMetricSource.newBuilder() to construct.
private ContainerResourceMetricSource(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ContainerResourceMetricSource() {
name_ = "";
targetAverageUtilization_ = 0;
container_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ContainerResourceMetricSource(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
name_ = bs;
break;
}
case 16:
{
bitField0_ |= 0x00000002;
targetAverageUtilization_ = input.readInt32();
break;
}
case 26:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = targetAverageValue_.toBuilder();
}
targetAverageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(targetAverageValue_);
targetAverageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 42:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000008;
container_ = bs;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TARGETAVERAGEUTILIZATION_FIELD_NUMBER = 2;
private int targetAverageUtilization_;
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public boolean hasTargetAverageUtilization() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public int getTargetAverageUtilization() {
return targetAverageUtilization_;
}
public static final int TARGETAVERAGEVALUE_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Resource.Quantity targetAverageValue_;
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
public boolean hasTargetAverageValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue() {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetAverageValueOrBuilder() {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
public static final int CONTAINER_FIELD_NUMBER = 5;
private volatile java.lang.Object container_;
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
public boolean hasContainer() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
public java.lang.String getContainer() {
java.lang.Object ref = container_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
container_ = s;
}
return s;
}
}
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
public com.google.protobuf.ByteString getContainerBytes() {
java.lang.Object ref = container_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
container_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, targetAverageUtilization_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getTargetAverageValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, container_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size +=
com.google.protobuf.CodedOutputStream.computeInt32Size(2, targetAverageUtilization_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetAverageValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, container_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource other =
(io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource) obj;
boolean result = true;
result = result && (hasName() == other.hasName());
if (hasName()) {
result = result && getName().equals(other.getName());
}
result = result && (hasTargetAverageUtilization() == other.hasTargetAverageUtilization());
if (hasTargetAverageUtilization()) {
result = result && (getTargetAverageUtilization() == other.getTargetAverageUtilization());
}
result = result && (hasTargetAverageValue() == other.hasTargetAverageValue());
if (hasTargetAverageValue()) {
result = result && getTargetAverageValue().equals(other.getTargetAverageValue());
}
result = result && (hasContainer() == other.hasContainer());
if (hasContainer()) {
result = result && getContainer().equals(other.getContainer());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasTargetAverageUtilization()) {
hash = (37 * hash) + TARGETAVERAGEUTILIZATION_FIELD_NUMBER;
hash = (53 * hash) + getTargetAverageUtilization();
}
if (hasTargetAverageValue()) {
hash = (37 * hash) + TARGETAVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getTargetAverageValue().hashCode();
}
if (hasContainer()) {
hash = (37 * hash) + CONTAINER_FIELD_NUMBER;
hash = (53 * hash) + getContainer().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ContainerResourceMetricSource indicates how to scale on a resource metric known to
* Kubernetes, as specified in the requests and limits, describing a single container in
* each of the pods of the current scale target(e.g. CPU or memory). The values will be
* averaged together before being compared to the target. Such metrics are built into
* Kubernetes, and have special scaling options on top of those available to
* normal per-pod metrics using the "pods" source. Only one "target" type
* should be set.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ContainerResourceMetricSource}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ContainerResourceMetricSource)
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.Builder
.class);
}
// Construct using
// io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getTargetAverageValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
targetAverageUtilization_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = null;
} else {
targetAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
container_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource build() {
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource result =
new io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.targetAverageUtilization_ = targetAverageUtilization_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (targetAverageValueBuilder_ == null) {
result.targetAverageValue_ = targetAverageValue_;
} else {
result.targetAverageValue_ = targetAverageValueBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.container_ = container_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource) {
return mergeFrom(
(io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
.getDefaultInstance()) return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (other.hasTargetAverageUtilization()) {
setTargetAverageUtilization(other.getTargetAverageUtilization());
}
if (other.hasTargetAverageValue()) {
mergeTargetAverageValue(other.getTargetAverageValue());
}
if (other.hasContainer()) {
bitField0_ |= 0x00000008;
container_ = other.container_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
private int targetAverageUtilization_;
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public boolean hasTargetAverageUtilization() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public int getTargetAverageUtilization() {
return targetAverageUtilization_;
}
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public Builder setTargetAverageUtilization(int value) {
bitField0_ |= 0x00000002;
targetAverageUtilization_ = value;
onChanged();
return this;
}
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public Builder clearTargetAverageUtilization() {
bitField0_ = (bitField0_ & ~0x00000002);
targetAverageUtilization_ = 0;
onChanged();
return this;
}
private io.kubernetes.client.proto.Resource.Quantity targetAverageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
targetAverageValueBuilder_;
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public boolean hasTargetAverageValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue() {
if (targetAverageValueBuilder_ == null) {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
} else {
return targetAverageValueBuilder_.getMessage();
}
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public Builder setTargetAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetAverageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
targetAverageValue_ = value;
onChanged();
} else {
targetAverageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public Builder setTargetAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = builderForValue.build();
onChanged();
} else {
targetAverageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public Builder mergeTargetAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetAverageValueBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& targetAverageValue_ != null
&& targetAverageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
targetAverageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(targetAverageValue_)
.mergeFrom(value)
.buildPartial();
} else {
targetAverageValue_ = value;
}
onChanged();
} else {
targetAverageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public Builder clearTargetAverageValue() {
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = null;
onChanged();
} else {
targetAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getTargetAverageValueBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTargetAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder
getTargetAverageValueOrBuilder() {
if (targetAverageValueBuilder_ != null) {
return targetAverageValueBuilder_.getMessageOrBuilder();
} else {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getTargetAverageValueFieldBuilder() {
if (targetAverageValueBuilder_ == null) {
targetAverageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getTargetAverageValue(), getParentForChildren(), isClean());
targetAverageValue_ = null;
}
return targetAverageValueBuilder_;
}
private java.lang.Object container_ = "";
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
public boolean hasContainer() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
public java.lang.String getContainer() {
java.lang.Object ref = container_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
container_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
public com.google.protobuf.ByteString getContainerBytes() {
java.lang.Object ref = container_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
container_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
public Builder setContainer(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
container_ = value;
onChanged();
return this;
}
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
public Builder clearContainer() {
bitField0_ = (bitField0_ & ~0x00000008);
container_ = getDefaultInstance().getContainer();
onChanged();
return this;
}
/**
*
*
*
* container is the name of the container in the pods of the scaling target.
*
*
* optional string container = 5;
*/
public Builder setContainerBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
container_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ContainerResourceMetricSource)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ContainerResourceMetricSource)
private static final io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource();
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ContainerResourceMetricSource parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ContainerResourceMetricSource(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ContainerResourceMetricStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
boolean hasName();
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
java.lang.String getName();
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
boolean hasCurrentAverageUtilization();
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
int getCurrentAverageUtilization();
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
boolean hasCurrentAverageValue();
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue();
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentAverageValueOrBuilder();
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
boolean hasContainer();
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
java.lang.String getContainer();
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
com.google.protobuf.ByteString getContainerBytes();
}
/**
*
*
*
* ContainerResourceMetricStatus indicates the current value of a resource metric known to
* Kubernetes, as specified in requests and limits, describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available to
* normal per-pod metrics using the "pods" source.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus}
*/
public static final class ContainerResourceMetricStatus
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus)
ContainerResourceMetricStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use ContainerResourceMetricStatus.newBuilder() to construct.
private ContainerResourceMetricStatus(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ContainerResourceMetricStatus() {
name_ = "";
currentAverageUtilization_ = 0;
container_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ContainerResourceMetricStatus(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
name_ = bs;
break;
}
case 16:
{
bitField0_ |= 0x00000002;
currentAverageUtilization_ = input.readInt32();
break;
}
case 26:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = currentAverageValue_.toBuilder();
}
currentAverageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(currentAverageValue_);
currentAverageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000008;
container_ = bs;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CURRENTAVERAGEUTILIZATION_FIELD_NUMBER = 2;
private int currentAverageUtilization_;
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public boolean hasCurrentAverageUtilization() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public int getCurrentAverageUtilization() {
return currentAverageUtilization_;
}
public static final int CURRENTAVERAGEVALUE_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Resource.Quantity currentAverageValue_;
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
public boolean hasCurrentAverageValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue() {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentAverageValueOrBuilder() {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
public static final int CONTAINER_FIELD_NUMBER = 4;
private volatile java.lang.Object container_;
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
public boolean hasContainer() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
public java.lang.String getContainer() {
java.lang.Object ref = container_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
container_ = s;
}
return s;
}
}
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
public com.google.protobuf.ByteString getContainerBytes() {
java.lang.Object ref = container_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
container_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, currentAverageUtilization_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getCurrentAverageValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, container_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size +=
com.google.protobuf.CodedOutputStream.computeInt32Size(2, currentAverageUtilization_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCurrentAverageValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, container_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus other =
(io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus) obj;
boolean result = true;
result = result && (hasName() == other.hasName());
if (hasName()) {
result = result && getName().equals(other.getName());
}
result = result && (hasCurrentAverageUtilization() == other.hasCurrentAverageUtilization());
if (hasCurrentAverageUtilization()) {
result = result && (getCurrentAverageUtilization() == other.getCurrentAverageUtilization());
}
result = result && (hasCurrentAverageValue() == other.hasCurrentAverageValue());
if (hasCurrentAverageValue()) {
result = result && getCurrentAverageValue().equals(other.getCurrentAverageValue());
}
result = result && (hasContainer() == other.hasContainer());
if (hasContainer()) {
result = result && getContainer().equals(other.getContainer());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasCurrentAverageUtilization()) {
hash = (37 * hash) + CURRENTAVERAGEUTILIZATION_FIELD_NUMBER;
hash = (53 * hash) + getCurrentAverageUtilization();
}
if (hasCurrentAverageValue()) {
hash = (37 * hash) + CURRENTAVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getCurrentAverageValue().hashCode();
}
if (hasContainer()) {
hash = (37 * hash) + CONTAINER_FIELD_NUMBER;
hash = (53 * hash) + getContainer().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ContainerResourceMetricStatus indicates the current value of a resource metric known to
* Kubernetes, as specified in requests and limits, describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available to
* normal per-pod metrics using the "pods" source.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus)
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.Builder
.class);
}
// Construct using
// io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCurrentAverageValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
currentAverageUtilization_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = null;
} else {
currentAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
container_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus build() {
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus result =
new io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.currentAverageUtilization_ = currentAverageUtilization_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (currentAverageValueBuilder_ == null) {
result.currentAverageValue_ = currentAverageValue_;
} else {
result.currentAverageValue_ = currentAverageValueBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.container_ = container_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus) {
return mergeFrom(
(io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
.getDefaultInstance()) return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (other.hasCurrentAverageUtilization()) {
setCurrentAverageUtilization(other.getCurrentAverageUtilization());
}
if (other.hasCurrentAverageValue()) {
mergeCurrentAverageValue(other.getCurrentAverageValue());
}
if (other.hasContainer()) {
bitField0_ |= 0x00000008;
container_ = other.container_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
private int currentAverageUtilization_;
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public boolean hasCurrentAverageUtilization() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public int getCurrentAverageUtilization() {
return currentAverageUtilization_;
}
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public Builder setCurrentAverageUtilization(int value) {
bitField0_ |= 0x00000002;
currentAverageUtilization_ = value;
onChanged();
return this;
}
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public Builder clearCurrentAverageUtilization() {
bitField0_ = (bitField0_ & ~0x00000002);
currentAverageUtilization_ = 0;
onChanged();
return this;
}
private io.kubernetes.client.proto.Resource.Quantity currentAverageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
currentAverageValueBuilder_;
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public boolean hasCurrentAverageValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue() {
if (currentAverageValueBuilder_ == null) {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
} else {
return currentAverageValueBuilder_.getMessage();
}
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public Builder setCurrentAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentAverageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
currentAverageValue_ = value;
onChanged();
} else {
currentAverageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public Builder setCurrentAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = builderForValue.build();
onChanged();
} else {
currentAverageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public Builder mergeCurrentAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentAverageValueBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& currentAverageValue_ != null
&& currentAverageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
currentAverageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(currentAverageValue_)
.mergeFrom(value)
.buildPartial();
} else {
currentAverageValue_ = value;
}
onChanged();
} else {
currentAverageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public Builder clearCurrentAverageValue() {
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = null;
onChanged();
} else {
currentAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getCurrentAverageValueBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getCurrentAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder
getCurrentAverageValueOrBuilder() {
if (currentAverageValueBuilder_ != null) {
return currentAverageValueBuilder_.getMessageOrBuilder();
} else {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getCurrentAverageValueFieldBuilder() {
if (currentAverageValueBuilder_ == null) {
currentAverageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getCurrentAverageValue(), getParentForChildren(), isClean());
currentAverageValue_ = null;
}
return currentAverageValueBuilder_;
}
private java.lang.Object container_ = "";
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
public boolean hasContainer() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
public java.lang.String getContainer() {
java.lang.Object ref = container_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
container_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
public com.google.protobuf.ByteString getContainerBytes() {
java.lang.Object ref = container_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
container_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
public Builder setContainer(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
container_ = value;
onChanged();
return this;
}
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
public Builder clearContainer() {
bitField0_ = (bitField0_ & ~0x00000008);
container_ = getDefaultInstance().getContainer();
onChanged();
return this;
}
/**
*
*
*
* container is the name of the container in the pods of the scaling taget
*
*
* optional string container = 4;
*/
public Builder setContainerBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
container_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus)
private static final io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus();
}
public static io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ContainerResourceMetricStatus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ContainerResourceMetricStatus(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CrossVersionObjectReferenceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.CrossVersionObjectReference)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
boolean hasKind();
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
java.lang.String getKind();
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
com.google.protobuf.ByteString getKindBytes();
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
boolean hasName();
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
java.lang.String getName();
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
boolean hasApiVersion();
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
java.lang.String getApiVersion();
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
com.google.protobuf.ByteString getApiVersionBytes();
}
/**
*
*
*
* CrossVersionObjectReference contains enough information to let you identify the referred resource.
* +structType=atomic
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.CrossVersionObjectReference}
*/
public static final class CrossVersionObjectReference
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.CrossVersionObjectReference)
CrossVersionObjectReferenceOrBuilder {
private static final long serialVersionUID = 0L;
// Use CrossVersionObjectReference.newBuilder() to construct.
private CrossVersionObjectReference(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CrossVersionObjectReference() {
kind_ = "";
name_ = "";
apiVersion_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private CrossVersionObjectReference(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
kind_ = bs;
break;
}
case 18:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
name_ = bs;
break;
}
case 26:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000004;
apiVersion_ = bs;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.class,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder.class);
}
private int bitField0_;
public static final int KIND_FIELD_NUMBER = 1;
private volatile java.lang.Object kind_;
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
public boolean hasKind() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
public java.lang.String getKind() {
java.lang.Object ref = kind_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
kind_ = s;
}
return s;
}
}
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
public com.google.protobuf.ByteString getKindBytes() {
java.lang.Object ref = kind_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int APIVERSION_FIELD_NUMBER = 3;
private volatile java.lang.Object apiVersion_;
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
public boolean hasApiVersion() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
public java.lang.String getApiVersion() {
java.lang.Object ref = apiVersion_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
apiVersion_ = s;
}
return s;
}
}
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
public com.google.protobuf.ByteString getApiVersionBytes() {
java.lang.Object ref = apiVersion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
apiVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, apiVersion_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, apiVersion_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference other =
(io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference) obj;
boolean result = true;
result = result && (hasKind() == other.hasKind());
if (hasKind()) {
result = result && getKind().equals(other.getKind());
}
result = result && (hasName() == other.hasName());
if (hasName()) {
result = result && getName().equals(other.getName());
}
result = result && (hasApiVersion() == other.hasApiVersion());
if (hasApiVersion()) {
result = result && getApiVersion().equals(other.getApiVersion());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasKind()) {
hash = (37 * hash) + KIND_FIELD_NUMBER;
hash = (53 * hash) + getKind().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasApiVersion()) {
hash = (37 * hash) + APIVERSION_FIELD_NUMBER;
hash = (53 * hash) + getApiVersion().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* CrossVersionObjectReference contains enough information to let you identify the referred resource.
* +structType=atomic
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.CrossVersionObjectReference}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.CrossVersionObjectReference)
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.class,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder.class);
}
// Construct using
// io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
kind_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
name_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
apiVersion_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference build() {
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference result =
new io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.kind_ = kind_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.apiVersion_ = apiVersion_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference) {
return mergeFrom(
(io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()) return this;
if (other.hasKind()) {
bitField0_ |= 0x00000001;
kind_ = other.kind_;
onChanged();
}
if (other.hasName()) {
bitField0_ |= 0x00000002;
name_ = other.name_;
onChanged();
}
if (other.hasApiVersion()) {
bitField0_ |= 0x00000004;
apiVersion_ = other.apiVersion_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object kind_ = "";
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
public boolean hasKind() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
public java.lang.String getKind() {
java.lang.Object ref = kind_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
kind_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
public com.google.protobuf.ByteString getKindBytes() {
java.lang.Object ref = kind_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
public Builder setKind(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
kind_ = value;
onChanged();
return this;
}
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
public Builder clearKind() {
bitField0_ = (bitField0_ & ~0x00000001);
kind_ = getDefaultInstance().getKind();
onChanged();
return this;
}
/**
*
*
*
* Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
*
*
* optional string kind = 1;
*/
public Builder setKindBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
kind_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
name_ = value;
onChanged();
return this;
}
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000002);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*
*
* Name of the referent; More info: https://kubernetes.io/docs/user-guide/identifiers#names
*
*
* optional string name = 2;
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
name_ = value;
onChanged();
return this;
}
private java.lang.Object apiVersion_ = "";
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
public boolean hasApiVersion() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
public java.lang.String getApiVersion() {
java.lang.Object ref = apiVersion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
apiVersion_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
public com.google.protobuf.ByteString getApiVersionBytes() {
java.lang.Object ref = apiVersion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
apiVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
public Builder setApiVersion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
apiVersion_ = value;
onChanged();
return this;
}
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
public Builder clearApiVersion() {
bitField0_ = (bitField0_ & ~0x00000004);
apiVersion_ = getDefaultInstance().getApiVersion();
onChanged();
return this;
}
/**
*
*
*
* API version of the referent
* +optional
*
*
* optional string apiVersion = 3;
*/
public Builder setApiVersionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
apiVersion_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.CrossVersionObjectReference)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.CrossVersionObjectReference)
private static final io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference();
}
public static io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CrossVersionObjectReference parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CrossVersionObjectReference(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExternalMetricSourceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ExternalMetricSource)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
boolean hasMetricName();
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
java.lang.String getMetricName();
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
com.google.protobuf.ByteString getMetricNameBytes();
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
boolean hasMetricSelector();
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
io.kubernetes.client.proto.Meta.LabelSelector getMetricSelector();
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getMetricSelectorOrBuilder();
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
boolean hasTargetValue();
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
io.kubernetes.client.proto.Resource.Quantity getTargetValue();
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetValueOrBuilder();
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*/
boolean hasTargetAverageValue();
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*/
io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue();
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetAverageValueOrBuilder();
}
/**
*
*
*
* ExternalMetricSource indicates how to scale on a metric not associated with
* any Kubernetes object (for example length of queue in cloud
* messaging service, or QPS from loadbalancer running outside of cluster).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ExternalMetricSource}
*/
public static final class ExternalMetricSource extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ExternalMetricSource)
ExternalMetricSourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExternalMetricSource.newBuilder() to construct.
private ExternalMetricSource(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExternalMetricSource() {
metricName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ExternalMetricSource(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
metricName_ = bs;
break;
}
case 18:
{
io.kubernetes.client.proto.Meta.LabelSelector.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = metricSelector_.toBuilder();
}
metricSelector_ =
input.readMessage(
io.kubernetes.client.proto.Meta.LabelSelector.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metricSelector_);
metricSelector_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 26:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = targetValue_.toBuilder();
}
targetValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(targetValue_);
targetValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = targetAverageValue_.toBuilder();
}
targetAverageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(targetAverageValue_);
targetAverageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.Builder.class);
}
private int bitField0_;
public static final int METRICNAME_FIELD_NUMBER = 1;
private volatile java.lang.Object metricName_;
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
}
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int METRICSELECTOR_FIELD_NUMBER = 2;
private io.kubernetes.client.proto.Meta.LabelSelector metricSelector_;
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
public boolean hasMetricSelector() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getMetricSelector() {
return metricSelector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: metricSelector_;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getMetricSelectorOrBuilder() {
return metricSelector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: metricSelector_;
}
public static final int TARGETVALUE_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Resource.Quantity targetValue_;
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public boolean hasTargetValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetValue() {
return targetValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetValue_;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetValueOrBuilder() {
return targetValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetValue_;
}
public static final int TARGETAVERAGEVALUE_FIELD_NUMBER = 4;
private io.kubernetes.client.proto.Resource.Quantity targetAverageValue_;
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*/
public boolean hasTargetAverageValue() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue() {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetAverageValueOrBuilder() {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, getMetricSelector());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getTargetValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, getTargetAverageValue());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetricSelector());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTargetAverageValue());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource other =
(io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource) obj;
boolean result = true;
result = result && (hasMetricName() == other.hasMetricName());
if (hasMetricName()) {
result = result && getMetricName().equals(other.getMetricName());
}
result = result && (hasMetricSelector() == other.hasMetricSelector());
if (hasMetricSelector()) {
result = result && getMetricSelector().equals(other.getMetricSelector());
}
result = result && (hasTargetValue() == other.hasTargetValue());
if (hasTargetValue()) {
result = result && getTargetValue().equals(other.getTargetValue());
}
result = result && (hasTargetAverageValue() == other.hasTargetAverageValue());
if (hasTargetAverageValue()) {
result = result && getTargetAverageValue().equals(other.getTargetAverageValue());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMetricName()) {
hash = (37 * hash) + METRICNAME_FIELD_NUMBER;
hash = (53 * hash) + getMetricName().hashCode();
}
if (hasMetricSelector()) {
hash = (37 * hash) + METRICSELECTOR_FIELD_NUMBER;
hash = (53 * hash) + getMetricSelector().hashCode();
}
if (hasTargetValue()) {
hash = (37 * hash) + TARGETVALUE_FIELD_NUMBER;
hash = (53 * hash) + getTargetValue().hashCode();
}
if (hasTargetAverageValue()) {
hash = (37 * hash) + TARGETAVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getTargetAverageValue().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ExternalMetricSource indicates how to scale on a metric not associated with
* any Kubernetes object (for example length of queue in cloud
* messaging service, or QPS from loadbalancer running outside of cluster).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ExternalMetricSource}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ExternalMetricSource)
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getMetricSelectorFieldBuilder();
getTargetValueFieldBuilder();
getTargetAverageValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
metricName_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
if (metricSelectorBuilder_ == null) {
metricSelector_ = null;
} else {
metricSelectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (targetValueBuilder_ == null) {
targetValue_ = null;
} else {
targetValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = null;
} else {
targetAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource build() {
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource result =
new io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.metricName_ = metricName_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (metricSelectorBuilder_ == null) {
result.metricSelector_ = metricSelector_;
} else {
result.metricSelector_ = metricSelectorBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (targetValueBuilder_ == null) {
result.targetValue_ = targetValue_;
} else {
result.targetValue_ = targetValueBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (targetAverageValueBuilder_ == null) {
result.targetAverageValue_ = targetAverageValue_;
} else {
result.targetAverageValue_ = targetAverageValueBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.getDefaultInstance())
return this;
if (other.hasMetricName()) {
bitField0_ |= 0x00000001;
metricName_ = other.metricName_;
onChanged();
}
if (other.hasMetricSelector()) {
mergeMetricSelector(other.getMetricSelector());
}
if (other.hasTargetValue()) {
mergeTargetValue(other.getTargetValue());
}
if (other.hasTargetAverageValue()) {
mergeTargetAverageValue(other.getTargetAverageValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object metricName_ = "";
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
public Builder setMetricName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
metricName_ = value;
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
public Builder clearMetricName() {
bitField0_ = (bitField0_ & ~0x00000001);
metricName_ = getDefaultInstance().getMetricName();
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 1;
*/
public Builder setMetricNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
metricName_ = value;
onChanged();
return this;
}
private io.kubernetes.client.proto.Meta.LabelSelector metricSelector_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
metricSelectorBuilder_;
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public boolean hasMetricSelector() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public io.kubernetes.client.proto.Meta.LabelSelector getMetricSelector() {
if (metricSelectorBuilder_ == null) {
return metricSelector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: metricSelector_;
} else {
return metricSelectorBuilder_.getMessage();
}
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public Builder setMetricSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (metricSelectorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metricSelector_ = value;
onChanged();
} else {
metricSelectorBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public Builder setMetricSelector(
io.kubernetes.client.proto.Meta.LabelSelector.Builder builderForValue) {
if (metricSelectorBuilder_ == null) {
metricSelector_ = builderForValue.build();
onChanged();
} else {
metricSelectorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public Builder mergeMetricSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (metricSelectorBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)
&& metricSelector_ != null
&& metricSelector_
!= io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()) {
metricSelector_ =
io.kubernetes.client.proto.Meta.LabelSelector.newBuilder(metricSelector_)
.mergeFrom(value)
.buildPartial();
} else {
metricSelector_ = value;
}
onChanged();
} else {
metricSelectorBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public Builder clearMetricSelector() {
if (metricSelectorBuilder_ == null) {
metricSelector_ = null;
onChanged();
} else {
metricSelectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public io.kubernetes.client.proto.Meta.LabelSelector.Builder getMetricSelectorBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getMetricSelectorFieldBuilder().getBuilder();
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getMetricSelectorOrBuilder() {
if (metricSelectorBuilder_ != null) {
return metricSelectorBuilder_.getMessageOrBuilder();
} else {
return metricSelector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: metricSelector_;
}
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
getMetricSelectorFieldBuilder() {
if (metricSelectorBuilder_ == null) {
metricSelectorBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>(
getMetricSelector(), getParentForChildren(), isClean());
metricSelector_ = null;
}
return metricSelectorBuilder_;
}
private io.kubernetes.client.proto.Resource.Quantity targetValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
targetValueBuilder_;
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public boolean hasTargetValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetValue() {
if (targetValueBuilder_ == null) {
return targetValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetValue_;
} else {
return targetValueBuilder_.getMessage();
}
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public Builder setTargetValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
targetValue_ = value;
onChanged();
} else {
targetValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public Builder setTargetValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (targetValueBuilder_ == null) {
targetValue_ = builderForValue.build();
onChanged();
} else {
targetValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public Builder mergeTargetValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetValueBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& targetValue_ != null
&& targetValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
targetValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(targetValue_)
.mergeFrom(value)
.buildPartial();
} else {
targetValue_ = value;
}
onChanged();
} else {
targetValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public Builder clearTargetValue() {
if (targetValueBuilder_ == null) {
targetValue_ = null;
onChanged();
} else {
targetValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getTargetValueBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTargetValueFieldBuilder().getBuilder();
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetValueOrBuilder() {
if (targetValueBuilder_ != null) {
return targetValueBuilder_.getMessageOrBuilder();
} else {
return targetValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetValue_;
}
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
* Mutually exclusive with TargetAverageValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getTargetValueFieldBuilder() {
if (targetValueBuilder_ == null) {
targetValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getTargetValue(), getParentForChildren(), isClean());
targetValue_ = null;
}
return targetValueBuilder_;
}
private io.kubernetes.client.proto.Resource.Quantity targetAverageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
targetAverageValueBuilder_;
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*
*/
public boolean hasTargetAverageValue() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue() {
if (targetAverageValueBuilder_ == null) {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
} else {
return targetAverageValueBuilder_.getMessage();
}
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*
*/
public Builder setTargetAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetAverageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
targetAverageValue_ = value;
onChanged();
} else {
targetAverageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*
*/
public Builder setTargetAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = builderForValue.build();
onChanged();
} else {
targetAverageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*
*/
public Builder mergeTargetAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetAverageValueBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)
&& targetAverageValue_ != null
&& targetAverageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
targetAverageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(targetAverageValue_)
.mergeFrom(value)
.buildPartial();
} else {
targetAverageValue_ = value;
}
onChanged();
} else {
targetAverageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*
*/
public Builder clearTargetAverageValue() {
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = null;
onChanged();
} else {
targetAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getTargetAverageValueBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getTargetAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder
getTargetAverageValueOrBuilder() {
if (targetAverageValueBuilder_ != null) {
return targetAverageValueBuilder_.getMessageOrBuilder();
} else {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
}
/**
*
*
*
* targetAverageValue is the target per-pod value of global metric (as a quantity).
* Mutually exclusive with TargetValue.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getTargetAverageValueFieldBuilder() {
if (targetAverageValueBuilder_ == null) {
targetAverageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getTargetAverageValue(), getParentForChildren(), isClean());
targetAverageValue_ = null;
}
return targetAverageValueBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ExternalMetricSource)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ExternalMetricSource)
private static final io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource();
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExternalMetricSource parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ExternalMetricSource(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExternalMetricStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ExternalMetricStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
boolean hasMetricName();
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
java.lang.String getMetricName();
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
com.google.protobuf.ByteString getMetricNameBytes();
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
boolean hasMetricSelector();
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
io.kubernetes.client.proto.Meta.LabelSelector getMetricSelector();
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getMetricSelectorOrBuilder();
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
boolean hasCurrentValue();
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
io.kubernetes.client.proto.Resource.Quantity getCurrentValue();
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentValueOrBuilder();
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*/
boolean hasCurrentAverageValue();
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*/
io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue();
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentAverageValueOrBuilder();
}
/**
*
*
*
* ExternalMetricStatus indicates the current value of a global metric
* not associated with any Kubernetes object.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ExternalMetricStatus}
*/
public static final class ExternalMetricStatus extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ExternalMetricStatus)
ExternalMetricStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExternalMetricStatus.newBuilder() to construct.
private ExternalMetricStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExternalMetricStatus() {
metricName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ExternalMetricStatus(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
metricName_ = bs;
break;
}
case 18:
{
io.kubernetes.client.proto.Meta.LabelSelector.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = metricSelector_.toBuilder();
}
metricSelector_ =
input.readMessage(
io.kubernetes.client.proto.Meta.LabelSelector.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metricSelector_);
metricSelector_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 26:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = currentValue_.toBuilder();
}
currentValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(currentValue_);
currentValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = currentAverageValue_.toBuilder();
}
currentAverageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(currentAverageValue_);
currentAverageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.Builder.class);
}
private int bitField0_;
public static final int METRICNAME_FIELD_NUMBER = 1;
private volatile java.lang.Object metricName_;
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
}
}
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int METRICSELECTOR_FIELD_NUMBER = 2;
private io.kubernetes.client.proto.Meta.LabelSelector metricSelector_;
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
public boolean hasMetricSelector() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getMetricSelector() {
return metricSelector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: metricSelector_;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getMetricSelectorOrBuilder() {
return metricSelector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: metricSelector_;
}
public static final int CURRENTVALUE_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Resource.Quantity currentValue_;
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public boolean hasCurrentValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentValue() {
return currentValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentValue_;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentValueOrBuilder() {
return currentValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentValue_;
}
public static final int CURRENTAVERAGEVALUE_FIELD_NUMBER = 4;
private io.kubernetes.client.proto.Resource.Quantity currentAverageValue_;
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*/
public boolean hasCurrentAverageValue() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue() {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentAverageValueOrBuilder() {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, getMetricSelector());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getCurrentValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, getCurrentAverageValue());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetricSelector());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCurrentValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCurrentAverageValue());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus other =
(io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus) obj;
boolean result = true;
result = result && (hasMetricName() == other.hasMetricName());
if (hasMetricName()) {
result = result && getMetricName().equals(other.getMetricName());
}
result = result && (hasMetricSelector() == other.hasMetricSelector());
if (hasMetricSelector()) {
result = result && getMetricSelector().equals(other.getMetricSelector());
}
result = result && (hasCurrentValue() == other.hasCurrentValue());
if (hasCurrentValue()) {
result = result && getCurrentValue().equals(other.getCurrentValue());
}
result = result && (hasCurrentAverageValue() == other.hasCurrentAverageValue());
if (hasCurrentAverageValue()) {
result = result && getCurrentAverageValue().equals(other.getCurrentAverageValue());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMetricName()) {
hash = (37 * hash) + METRICNAME_FIELD_NUMBER;
hash = (53 * hash) + getMetricName().hashCode();
}
if (hasMetricSelector()) {
hash = (37 * hash) + METRICSELECTOR_FIELD_NUMBER;
hash = (53 * hash) + getMetricSelector().hashCode();
}
if (hasCurrentValue()) {
hash = (37 * hash) + CURRENTVALUE_FIELD_NUMBER;
hash = (53 * hash) + getCurrentValue().hashCode();
}
if (hasCurrentAverageValue()) {
hash = (37 * hash) + CURRENTAVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getCurrentAverageValue().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ExternalMetricStatus indicates the current value of a global metric
* not associated with any Kubernetes object.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ExternalMetricStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ExternalMetricStatus)
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getMetricSelectorFieldBuilder();
getCurrentValueFieldBuilder();
getCurrentAverageValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
metricName_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
if (metricSelectorBuilder_ == null) {
metricSelector_ = null;
} else {
metricSelectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (currentValueBuilder_ == null) {
currentValue_ = null;
} else {
currentValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = null;
} else {
currentAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus build() {
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus result =
new io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.metricName_ = metricName_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (metricSelectorBuilder_ == null) {
result.metricSelector_ = metricSelector_;
} else {
result.metricSelector_ = metricSelectorBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (currentValueBuilder_ == null) {
result.currentValue_ = currentValue_;
} else {
result.currentValue_ = currentValueBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (currentAverageValueBuilder_ == null) {
result.currentAverageValue_ = currentAverageValue_;
} else {
result.currentAverageValue_ = currentAverageValueBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.getDefaultInstance())
return this;
if (other.hasMetricName()) {
bitField0_ |= 0x00000001;
metricName_ = other.metricName_;
onChanged();
}
if (other.hasMetricSelector()) {
mergeMetricSelector(other.getMetricSelector());
}
if (other.hasCurrentValue()) {
mergeCurrentValue(other.getCurrentValue());
}
if (other.hasCurrentAverageValue()) {
mergeCurrentAverageValue(other.getCurrentAverageValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object metricName_ = "";
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
public Builder setMetricName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
metricName_ = value;
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
public Builder clearMetricName() {
bitField0_ = (bitField0_ & ~0x00000001);
metricName_ = getDefaultInstance().getMetricName();
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of a metric used for autoscaling in
* metric system.
*
*
* optional string metricName = 1;
*/
public Builder setMetricNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
metricName_ = value;
onChanged();
return this;
}
private io.kubernetes.client.proto.Meta.LabelSelector metricSelector_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
metricSelectorBuilder_;
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public boolean hasMetricSelector() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public io.kubernetes.client.proto.Meta.LabelSelector getMetricSelector() {
if (metricSelectorBuilder_ == null) {
return metricSelector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: metricSelector_;
} else {
return metricSelectorBuilder_.getMessage();
}
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public Builder setMetricSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (metricSelectorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metricSelector_ = value;
onChanged();
} else {
metricSelectorBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public Builder setMetricSelector(
io.kubernetes.client.proto.Meta.LabelSelector.Builder builderForValue) {
if (metricSelectorBuilder_ == null) {
metricSelector_ = builderForValue.build();
onChanged();
} else {
metricSelectorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public Builder mergeMetricSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (metricSelectorBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)
&& metricSelector_ != null
&& metricSelector_
!= io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()) {
metricSelector_ =
io.kubernetes.client.proto.Meta.LabelSelector.newBuilder(metricSelector_)
.mergeFrom(value)
.buildPartial();
} else {
metricSelector_ = value;
}
onChanged();
} else {
metricSelectorBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public Builder clearMetricSelector() {
if (metricSelectorBuilder_ == null) {
metricSelector_ = null;
onChanged();
} else {
metricSelectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public io.kubernetes.client.proto.Meta.LabelSelector.Builder getMetricSelectorBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getMetricSelectorFieldBuilder().getBuilder();
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getMetricSelectorOrBuilder() {
if (metricSelectorBuilder_ != null) {
return metricSelectorBuilder_.getMessageOrBuilder();
} else {
return metricSelector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: metricSelector_;
}
}
/**
*
*
*
* metricSelector is used to identify a specific time series
* within a given metric.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
getMetricSelectorFieldBuilder() {
if (metricSelectorBuilder_ == null) {
metricSelectorBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>(
getMetricSelector(), getParentForChildren(), isClean());
metricSelector_ = null;
}
return metricSelectorBuilder_;
}
private io.kubernetes.client.proto.Resource.Quantity currentValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
currentValueBuilder_;
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public boolean hasCurrentValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentValue() {
if (currentValueBuilder_ == null) {
return currentValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentValue_;
} else {
return currentValueBuilder_.getMessage();
}
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public Builder setCurrentValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
currentValue_ = value;
onChanged();
} else {
currentValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public Builder setCurrentValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (currentValueBuilder_ == null) {
currentValue_ = builderForValue.build();
onChanged();
} else {
currentValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public Builder mergeCurrentValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentValueBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& currentValue_ != null
&& currentValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
currentValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(currentValue_)
.mergeFrom(value)
.buildPartial();
} else {
currentValue_ = value;
}
onChanged();
} else {
currentValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public Builder clearCurrentValue() {
if (currentValueBuilder_ == null) {
currentValue_ = null;
onChanged();
} else {
currentValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getCurrentValueBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getCurrentValueFieldBuilder().getBuilder();
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentValueOrBuilder() {
if (currentValueBuilder_ != null) {
return currentValueBuilder_.getMessageOrBuilder();
} else {
return currentValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentValue_;
}
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getCurrentValueFieldBuilder() {
if (currentValueBuilder_ == null) {
currentValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getCurrentValue(), getParentForChildren(), isClean());
currentValue_ = null;
}
return currentValueBuilder_;
}
private io.kubernetes.client.proto.Resource.Quantity currentAverageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
currentAverageValueBuilder_;
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*
*/
public boolean hasCurrentAverageValue() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue() {
if (currentAverageValueBuilder_ == null) {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
} else {
return currentAverageValueBuilder_.getMessage();
}
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*
*/
public Builder setCurrentAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentAverageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
currentAverageValue_ = value;
onChanged();
} else {
currentAverageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*
*/
public Builder setCurrentAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = builderForValue.build();
onChanged();
} else {
currentAverageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*
*/
public Builder mergeCurrentAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentAverageValueBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)
&& currentAverageValue_ != null
&& currentAverageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
currentAverageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(currentAverageValue_)
.mergeFrom(value)
.buildPartial();
} else {
currentAverageValue_ = value;
}
onChanged();
} else {
currentAverageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*
*/
public Builder clearCurrentAverageValue() {
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = null;
onChanged();
} else {
currentAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getCurrentAverageValueBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getCurrentAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder
getCurrentAverageValueOrBuilder() {
if (currentAverageValueBuilder_ != null) {
return currentAverageValueBuilder_.getMessageOrBuilder();
} else {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
}
/**
*
*
*
* currentAverageValue is the current value of metric averaged over autoscaled pods.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getCurrentAverageValueFieldBuilder() {
if (currentAverageValueBuilder_ == null) {
currentAverageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getCurrentAverageValue(), getParentForChildren(), isClean());
currentAverageValue_ = null;
}
return currentAverageValueBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ExternalMetricStatus)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ExternalMetricStatus)
private static final io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus();
}
public static io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExternalMetricStatus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ExternalMetricStatus(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HorizontalPodAutoscalerOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
boolean hasMetadata();
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
io.kubernetes.client.proto.Meta.ObjectMeta getMetadata();
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder getMetadataOrBuilder();
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
boolean hasSpec();
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec getSpec();
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
getSpecOrBuilder();
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
boolean hasStatus();
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus getStatus();
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatusOrBuilder
getStatusOrBuilder();
}
/**
*
*
*
* configuration of a horizontal pod autoscaler.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler}
*/
public static final class HorizontalPodAutoscaler extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler)
HorizontalPodAutoscalerOrBuilder {
private static final long serialVersionUID = 0L;
// Use HorizontalPodAutoscaler.newBuilder() to construct.
private HorizontalPodAutoscaler(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HorizontalPodAutoscaler() {}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private HorizontalPodAutoscaler(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
io.kubernetes.client.proto.Meta.ObjectMeta.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = metadata_.toBuilder();
}
metadata_ =
input.readMessage(
io.kubernetes.client.proto.Meta.ObjectMeta.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 18:
{
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.Builder
subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = spec_.toBuilder();
}
spec_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(spec_);
spec_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 26:
{
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.Builder
subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = status_.toBuilder();
}
status_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(status_);
status_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder.class);
}
private int bitField0_;
public static final int METADATA_FIELD_NUMBER = 1;
private io.kubernetes.client.proto.Meta.ObjectMeta metadata_;
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMeta getMetadata() {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()
: metadata_;
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder getMetadataOrBuilder() {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()
: metadata_;
}
public static final int SPEC_FIELD_NUMBER = 2;
private io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec spec_;
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public boolean hasSpec() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec getSpec() {
return spec_ == null
? io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
.getDefaultInstance()
: spec_;
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
getSpecOrBuilder() {
return spec_ == null
? io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
.getDefaultInstance()
: spec_;
}
public static final int STATUS_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus status_;
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus getStatus() {
return status_ == null
? io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
.getDefaultInstance()
: status_;
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatusOrBuilder
getStatusOrBuilder() {
return status_ == null
? io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
.getDefaultInstance()
: status_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, getMetadata());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, getSpec());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getStatus());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpec());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStatus());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler other =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler) obj;
boolean result = true;
result = result && (hasMetadata() == other.hasMetadata());
if (hasMetadata()) {
result = result && getMetadata().equals(other.getMetadata());
}
result = result && (hasSpec() == other.hasSpec());
if (hasSpec()) {
result = result && getSpec().equals(other.getSpec());
}
result = result && (hasStatus() == other.hasStatus());
if (hasStatus()) {
result = result && getStatus().equals(other.getStatus());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
if (hasSpec()) {
hash = (37 * hash) + SPEC_FIELD_NUMBER;
hash = (53 * hash) + getSpec().hashCode();
}
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* configuration of a horizontal pod autoscaler.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler)
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder.class);
}
// Construct using
// io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getMetadataFieldBuilder();
getSpecFieldBuilder();
getStatusFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (specBuilder_ == null) {
spec_ = null;
} else {
specBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (statusBuilder_ == null) {
status_ = null;
} else {
statusBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler build() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler result =
new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (specBuilder_ == null) {
result.spec_ = spec_;
} else {
result.spec_ = specBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (statusBuilder_ == null) {
result.status_ = status_;
} else {
result.status_ = statusBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler) {
return mergeFrom(
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
.getDefaultInstance()) return this;
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
if (other.hasSpec()) {
mergeSpec(other.getSpec());
}
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.kubernetes.client.proto.Meta.ObjectMeta metadata_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.ObjectMeta,
io.kubernetes.client.proto.Meta.ObjectMeta.Builder,
io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder>
metadataBuilder_;
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMeta getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()
: metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public Builder setMetadata(io.kubernetes.client.proto.Meta.ObjectMeta value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public Builder setMetadata(
io.kubernetes.client.proto.Meta.ObjectMeta.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public Builder mergeMetadata(io.kubernetes.client.proto.Meta.ObjectMeta value) {
if (metadataBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)
&& metadata_ != null
&& metadata_ != io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()) {
metadata_ =
io.kubernetes.client.proto.Meta.ObjectMeta.newBuilder(metadata_)
.mergeFrom(value)
.buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMeta.Builder getMetadataBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()
: metadata_;
}
}
/**
*
*
*
* Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.ObjectMeta,
io.kubernetes.client.proto.Meta.ObjectMeta.Builder,
io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.ObjectMeta,
io.kubernetes.client.proto.Meta.ObjectMeta.Builder,
io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder>(
getMetadata(), getParentForChildren(), isClean());
metadata_ = null;
}
return metadataBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec spec_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.Builder,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder>
specBuilder_;
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public boolean hasSpec() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec getSpec() {
if (specBuilder_ == null) {
return spec_ == null
? io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
.getDefaultInstance()
: spec_;
} else {
return specBuilder_.getMessage();
}
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public Builder setSpec(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec value) {
if (specBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
spec_ = value;
onChanged();
} else {
specBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public Builder setSpec(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.Builder
builderForValue) {
if (specBuilder_ == null) {
spec_ = builderForValue.build();
onChanged();
} else {
specBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public Builder mergeSpec(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec value) {
if (specBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)
&& spec_ != null
&& spec_
!= io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
.getDefaultInstance()) {
spec_ =
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.newBuilder(
spec_)
.mergeFrom(value)
.buildPartial();
} else {
spec_ = value;
}
onChanged();
} else {
specBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public Builder clearSpec() {
if (specBuilder_ == null) {
spec_ = null;
onChanged();
} else {
specBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.Builder
getSpecBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getSpecFieldBuilder().getBuilder();
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
getSpecOrBuilder() {
if (specBuilder_ != null) {
return specBuilder_.getMessageOrBuilder();
} else {
return spec_ == null
? io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
.getDefaultInstance()
: spec_;
}
}
/**
*
*
*
* behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec spec = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.Builder,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder>
getSpecFieldBuilder() {
if (specBuilder_ == null) {
specBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.Builder,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder>(
getSpec(), getParentForChildren(), isClean());
spec_ = null;
}
return specBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus status_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatusOrBuilder>
statusBuilder_;
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus getStatus() {
if (statusBuilder_ == null) {
return status_ == null
? io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
.getDefaultInstance()
: status_;
} else {
return statusBuilder_.getMessage();
}
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public Builder setStatus(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus value) {
if (statusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
onChanged();
} else {
statusBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public Builder setStatus(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.Builder
builderForValue) {
if (statusBuilder_ == null) {
status_ = builderForValue.build();
onChanged();
} else {
statusBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public Builder mergeStatus(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus value) {
if (statusBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& status_ != null
&& status_
!= io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
.getDefaultInstance()) {
status_ =
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.newBuilder(
status_)
.mergeFrom(value)
.buildPartial();
} else {
status_ = value;
}
onChanged();
} else {
statusBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public Builder clearStatus() {
if (statusBuilder_ == null) {
status_ = null;
onChanged();
} else {
statusBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.Builder
getStatusBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatusOrBuilder
getStatusOrBuilder() {
if (statusBuilder_ != null) {
return statusBuilder_.getMessageOrBuilder();
} else {
return status_ == null
? io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
.getDefaultInstance()
: status_;
}
}
/**
*
*
*
* current information about the autoscaler.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus status = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatusOrBuilder>
getStatusFieldBuilder() {
if (statusBuilder_ == null) {
statusBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatusOrBuilder>(
getStatus(), getParentForChildren(), isClean());
status_ = null;
}
return statusBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler)
private static final io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler();
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HorizontalPodAutoscaler parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HorizontalPodAutoscaler(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HorizontalPodAutoscalerConditionOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
boolean hasType();
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
java.lang.String getType();
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
com.google.protobuf.ByteString getTypeBytes();
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
boolean hasStatus();
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
java.lang.String getStatus();
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
com.google.protobuf.ByteString getStatusBytes();
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
boolean hasLastTransitionTime();
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
io.kubernetes.client.proto.Meta.Time getLastTransitionTime();
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
io.kubernetes.client.proto.Meta.TimeOrBuilder getLastTransitionTimeOrBuilder();
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
boolean hasReason();
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
java.lang.String getReason();
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
com.google.protobuf.ByteString getReasonBytes();
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
boolean hasMessage();
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
java.lang.String getMessage();
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
com.google.protobuf.ByteString getMessageBytes();
}
/**
*
*
*
* HorizontalPodAutoscalerCondition describes the state of
* a HorizontalPodAutoscaler at a certain point.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition}
*/
public static final class HorizontalPodAutoscalerCondition
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition)
HorizontalPodAutoscalerConditionOrBuilder {
private static final long serialVersionUID = 0L;
// Use HorizontalPodAutoscalerCondition.newBuilder() to construct.
private HorizontalPodAutoscalerCondition(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HorizontalPodAutoscalerCondition() {
type_ = "";
status_ = "";
reason_ = "";
message_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private HorizontalPodAutoscalerCondition(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
type_ = bs;
break;
}
case 18:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
status_ = bs;
break;
}
case 26:
{
io.kubernetes.client.proto.Meta.Time.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = lastTransitionTime_.toBuilder();
}
lastTransitionTime_ =
input.readMessage(
io.kubernetes.client.proto.Meta.Time.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(lastTransitionTime_);
lastTransitionTime_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000008;
reason_ = bs;
break;
}
case 42:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000010;
message_ = bs;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition.Builder
.class);
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private volatile java.lang.Object type_;
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
}
}
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
public com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 2;
private volatile java.lang.Object status_;
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
public java.lang.String getStatus() {
java.lang.Object ref = status_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
status_ = s;
}
return s;
}
}
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
public com.google.protobuf.ByteString getStatusBytes() {
java.lang.Object ref = status_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
status_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LASTTRANSITIONTIME_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Meta.Time lastTransitionTime_;
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public boolean hasLastTransitionTime() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public io.kubernetes.client.proto.Meta.Time getLastTransitionTime() {
return lastTransitionTime_ == null
? io.kubernetes.client.proto.Meta.Time.getDefaultInstance()
: lastTransitionTime_;
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public io.kubernetes.client.proto.Meta.TimeOrBuilder getLastTransitionTimeOrBuilder() {
return lastTransitionTime_ == null
? io.kubernetes.client.proto.Meta.Time.getDefaultInstance()
: lastTransitionTime_;
}
public static final int REASON_FIELD_NUMBER = 4;
private volatile java.lang.Object reason_;
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
public boolean hasReason() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
public java.lang.String getReason() {
java.lang.Object ref = reason_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
reason_ = s;
}
return s;
}
}
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
public com.google.protobuf.ByteString getReasonBytes() {
java.lang.Object ref = reason_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
reason_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MESSAGE_FIELD_NUMBER = 5;
private volatile java.lang.Object message_;
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
public boolean hasMessage() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
public java.lang.String getMessage() {
java.lang.Object ref = message_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
message_ = s;
}
return s;
}
}
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
public com.google.protobuf.ByteString getMessageBytes() {
java.lang.Object ref = message_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
message_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, status_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getLastTransitionTime());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, reason_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, message_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, status_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLastTransitionTime());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, reason_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, message_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition other =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition) obj;
boolean result = true;
result = result && (hasType() == other.hasType());
if (hasType()) {
result = result && getType().equals(other.getType());
}
result = result && (hasStatus() == other.hasStatus());
if (hasStatus()) {
result = result && getStatus().equals(other.getStatus());
}
result = result && (hasLastTransitionTime() == other.hasLastTransitionTime());
if (hasLastTransitionTime()) {
result = result && getLastTransitionTime().equals(other.getLastTransitionTime());
}
result = result && (hasReason() == other.hasReason());
if (hasReason()) {
result = result && getReason().equals(other.getReason());
}
result = result && (hasMessage() == other.hasMessage());
if (hasMessage()) {
result = result && getMessage().equals(other.getMessage());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
}
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
if (hasLastTransitionTime()) {
hash = (37 * hash) + LASTTRANSITIONTIME_FIELD_NUMBER;
hash = (53 * hash) + getLastTransitionTime().hashCode();
}
if (hasReason()) {
hash = (37 * hash) + REASON_FIELD_NUMBER;
hash = (53 * hash) + getReason().hashCode();
}
if (hasMessage()) {
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* HorizontalPodAutoscalerCondition describes the state of
* a HorizontalPodAutoscaler at a certain point.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition)
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerConditionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition.Builder
.class);
}
// Construct using
// io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getLastTransitionTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
type_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
status_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
if (lastTransitionTimeBuilder_ == null) {
lastTransitionTime_ = null;
} else {
lastTransitionTimeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
reason_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
message_ = "";
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition build() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition result =
new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.status_ = status_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (lastTransitionTimeBuilder_ == null) {
result.lastTransitionTime_ = lastTransitionTime_;
} else {
result.lastTransitionTime_ = lastTransitionTimeBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.reason_ = reason_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.message_ = message_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition) {
return mergeFrom(
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
.getDefaultInstance()) return this;
if (other.hasType()) {
bitField0_ |= 0x00000001;
type_ = other.type_;
onChanged();
}
if (other.hasStatus()) {
bitField0_ |= 0x00000002;
status_ = other.status_;
onChanged();
}
if (other.hasLastTransitionTime()) {
mergeLastTransitionTime(other.getLastTransitionTime());
}
if (other.hasReason()) {
bitField0_ |= 0x00000008;
reason_ = other.reason_;
onChanged();
}
if (other.hasMessage()) {
bitField0_ |= 0x00000010;
message_ = other.message_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition parsedMessage =
null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object type_ = "";
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
public com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
public Builder setType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
*
*
*
* type describes the current condition
*
*
* optional string type = 1;
*/
public Builder setTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
private java.lang.Object status_ = "";
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
public java.lang.String getStatus() {
java.lang.Object ref = status_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
status_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
public com.google.protobuf.ByteString getStatusBytes() {
java.lang.Object ref = status_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
status_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
public Builder setStatus(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
status_ = value;
onChanged();
return this;
}
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
public Builder clearStatus() {
bitField0_ = (bitField0_ & ~0x00000002);
status_ = getDefaultInstance().getStatus();
onChanged();
return this;
}
/**
*
*
*
* status is the status of the condition (True, False, Unknown)
*
*
* optional string status = 2;
*/
public Builder setStatusBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
status_ = value;
onChanged();
return this;
}
private io.kubernetes.client.proto.Meta.Time lastTransitionTime_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.Time,
io.kubernetes.client.proto.Meta.Time.Builder,
io.kubernetes.client.proto.Meta.TimeOrBuilder>
lastTransitionTimeBuilder_;
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public boolean hasLastTransitionTime() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public io.kubernetes.client.proto.Meta.Time getLastTransitionTime() {
if (lastTransitionTimeBuilder_ == null) {
return lastTransitionTime_ == null
? io.kubernetes.client.proto.Meta.Time.getDefaultInstance()
: lastTransitionTime_;
} else {
return lastTransitionTimeBuilder_.getMessage();
}
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public Builder setLastTransitionTime(io.kubernetes.client.proto.Meta.Time value) {
if (lastTransitionTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lastTransitionTime_ = value;
onChanged();
} else {
lastTransitionTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public Builder setLastTransitionTime(
io.kubernetes.client.proto.Meta.Time.Builder builderForValue) {
if (lastTransitionTimeBuilder_ == null) {
lastTransitionTime_ = builderForValue.build();
onChanged();
} else {
lastTransitionTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public Builder mergeLastTransitionTime(io.kubernetes.client.proto.Meta.Time value) {
if (lastTransitionTimeBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& lastTransitionTime_ != null
&& lastTransitionTime_ != io.kubernetes.client.proto.Meta.Time.getDefaultInstance()) {
lastTransitionTime_ =
io.kubernetes.client.proto.Meta.Time.newBuilder(lastTransitionTime_)
.mergeFrom(value)
.buildPartial();
} else {
lastTransitionTime_ = value;
}
onChanged();
} else {
lastTransitionTimeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public Builder clearLastTransitionTime() {
if (lastTransitionTimeBuilder_ == null) {
lastTransitionTime_ = null;
onChanged();
} else {
lastTransitionTimeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public io.kubernetes.client.proto.Meta.Time.Builder getLastTransitionTimeBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getLastTransitionTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
public io.kubernetes.client.proto.Meta.TimeOrBuilder getLastTransitionTimeOrBuilder() {
if (lastTransitionTimeBuilder_ != null) {
return lastTransitionTimeBuilder_.getMessageOrBuilder();
} else {
return lastTransitionTime_ == null
? io.kubernetes.client.proto.Meta.Time.getDefaultInstance()
: lastTransitionTime_;
}
}
/**
*
*
*
* lastTransitionTime is the last time the condition transitioned from
* one status to another
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.Time,
io.kubernetes.client.proto.Meta.Time.Builder,
io.kubernetes.client.proto.Meta.TimeOrBuilder>
getLastTransitionTimeFieldBuilder() {
if (lastTransitionTimeBuilder_ == null) {
lastTransitionTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.Time,
io.kubernetes.client.proto.Meta.Time.Builder,
io.kubernetes.client.proto.Meta.TimeOrBuilder>(
getLastTransitionTime(), getParentForChildren(), isClean());
lastTransitionTime_ = null;
}
return lastTransitionTimeBuilder_;
}
private java.lang.Object reason_ = "";
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
public boolean hasReason() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
public java.lang.String getReason() {
java.lang.Object ref = reason_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
reason_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
public com.google.protobuf.ByteString getReasonBytes() {
java.lang.Object ref = reason_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
reason_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
public Builder setReason(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
reason_ = value;
onChanged();
return this;
}
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
public Builder clearReason() {
bitField0_ = (bitField0_ & ~0x00000008);
reason_ = getDefaultInstance().getReason();
onChanged();
return this;
}
/**
*
*
*
* reason is the reason for the condition's last transition.
* +optional
*
*
* optional string reason = 4;
*/
public Builder setReasonBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
reason_ = value;
onChanged();
return this;
}
private java.lang.Object message_ = "";
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
public boolean hasMessage() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
public java.lang.String getMessage() {
java.lang.Object ref = message_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
message_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
public com.google.protobuf.ByteString getMessageBytes() {
java.lang.Object ref = message_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
message_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
public Builder setMessage(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
message_ = value;
onChanged();
return this;
}
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
public Builder clearMessage() {
bitField0_ = (bitField0_ & ~0x00000010);
message_ = getDefaultInstance().getMessage();
onChanged();
return this;
}
/**
*
*
*
* message is a human-readable explanation containing details about
* the transition
* +optional
*
*
* optional string message = 5;
*/
public Builder setMessageBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
message_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition)
private static final io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition();
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HorizontalPodAutoscalerCondition parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HorizontalPodAutoscalerCondition(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerCondition
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HorizontalPodAutoscalerListOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
boolean hasMetadata();
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
io.kubernetes.client.proto.Meta.ListMeta getMetadata();
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
io.kubernetes.client.proto.Meta.ListMetaOrBuilder getMetadataOrBuilder();
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
java.util.List getItemsList();
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler getItems(int index);
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
int getItemsCount();
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
java.util.List<
? extends io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder>
getItemsOrBuilderList();
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder getItemsOrBuilder(
int index);
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList}
*/
public static final class HorizontalPodAutoscalerList
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList)
HorizontalPodAutoscalerListOrBuilder {
private static final long serialVersionUID = 0L;
// Use HorizontalPodAutoscalerList.newBuilder() to construct.
private HorizontalPodAutoscalerList(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HorizontalPodAutoscalerList() {
items_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private HorizontalPodAutoscalerList(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
io.kubernetes.client.proto.Meta.ListMeta.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = metadata_.toBuilder();
}
metadata_ =
input.readMessage(
io.kubernetes.client.proto.Meta.ListMeta.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 18:
{
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
items_ =
new java.util.ArrayList<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler>();
mutable_bitField0_ |= 0x00000002;
}
items_.add(
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.PARSER,
extensionRegistry));
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
items_ = java.util.Collections.unmodifiableList(items_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList.Builder.class);
}
private int bitField0_;
public static final int METADATA_FIELD_NUMBER = 1;
private io.kubernetes.client.proto.Meta.ListMeta metadata_;
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ListMeta getMetadata() {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ListMeta.getDefaultInstance()
: metadata_;
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ListMetaOrBuilder getMetadataOrBuilder() {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ListMeta.getDefaultInstance()
: metadata_;
}
public static final int ITEMS_FIELD_NUMBER = 2;
private java.util.List items_;
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public java.util.List
getItemsList() {
return items_;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public java.util.List<
? extends io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder>
getItemsOrBuilderList() {
return items_;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public int getItemsCount() {
return items_.size();
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler getItems(int index) {
return items_.get(index);
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder
getItemsOrBuilder(int index) {
return items_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, getMetadata());
}
for (int i = 0; i < items_.size(); i++) {
output.writeMessage(2, items_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata());
}
for (int i = 0; i < items_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, items_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList other =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList) obj;
boolean result = true;
result = result && (hasMetadata() == other.hasMetadata());
if (hasMetadata()) {
result = result && getMetadata().equals(other.getMetadata());
}
result = result && getItemsList().equals(other.getItemsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
if (getItemsCount() > 0) {
hash = (37 * hash) + ITEMS_FIELD_NUMBER;
hash = (53 * hash) + getItemsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList)
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList.Builder.class);
}
// Construct using
// io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getMetadataFieldBuilder();
getItemsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
itemsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList
.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList build() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList result =
new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
if (itemsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
items_ = java.util.Collections.unmodifiableList(items_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.items_ = items_;
} else {
result.items_ = itemsBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList) {
return mergeFrom(
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList
.getDefaultInstance()) return this;
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
if (itemsBuilder_ == null) {
if (!other.items_.isEmpty()) {
if (items_.isEmpty()) {
items_ = other.items_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureItemsIsMutable();
items_.addAll(other.items_);
}
onChanged();
}
} else {
if (!other.items_.isEmpty()) {
if (itemsBuilder_.isEmpty()) {
itemsBuilder_.dispose();
itemsBuilder_ = null;
items_ = other.items_;
bitField0_ = (bitField0_ & ~0x00000002);
itemsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getItemsFieldBuilder()
: null;
} else {
itemsBuilder_.addAllMessages(other.items_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.kubernetes.client.proto.Meta.ListMeta metadata_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.ListMeta,
io.kubernetes.client.proto.Meta.ListMeta.Builder,
io.kubernetes.client.proto.Meta.ListMetaOrBuilder>
metadataBuilder_;
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ListMeta getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ListMeta.getDefaultInstance()
: metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public Builder setMetadata(io.kubernetes.client.proto.Meta.ListMeta value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public Builder setMetadata(io.kubernetes.client.proto.Meta.ListMeta.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public Builder mergeMetadata(io.kubernetes.client.proto.Meta.ListMeta value) {
if (metadataBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)
&& metadata_ != null
&& metadata_ != io.kubernetes.client.proto.Meta.ListMeta.getDefaultInstance()) {
metadata_ =
io.kubernetes.client.proto.Meta.ListMeta.newBuilder(metadata_)
.mergeFrom(value)
.buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ListMeta.Builder getMetadataBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ListMetaOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ListMeta.getDefaultInstance()
: metadata_;
}
}
/**
*
*
*
* Standard list metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.ListMeta,
io.kubernetes.client.proto.Meta.ListMeta.Builder,
io.kubernetes.client.proto.Meta.ListMetaOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.ListMeta,
io.kubernetes.client.proto.Meta.ListMeta.Builder,
io.kubernetes.client.proto.Meta.ListMetaOrBuilder>(
getMetadata(), getParentForChildren(), isClean());
metadata_ = null;
}
return metadataBuilder_;
}
private java.util.List
items_ = java.util.Collections.emptyList();
private void ensureItemsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
items_ =
new java.util.ArrayList<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler>(items_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder>
itemsBuilder_;
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public java.util.List
getItemsList() {
if (itemsBuilder_ == null) {
return java.util.Collections.unmodifiableList(items_);
} else {
return itemsBuilder_.getMessageList();
}
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public int getItemsCount() {
if (itemsBuilder_ == null) {
return items_.size();
} else {
return itemsBuilder_.getCount();
}
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler getItems(int index) {
if (itemsBuilder_ == null) {
return items_.get(index);
} else {
return itemsBuilder_.getMessage(index);
}
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public Builder setItems(
int index, io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.set(index, value);
onChanged();
} else {
itemsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public Builder setItems(
int index,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder
builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.set(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public Builder addItems(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.add(value);
onChanged();
} else {
itemsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public Builder addItems(
int index, io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.add(index, value);
onChanged();
} else {
itemsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public Builder addItems(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder
builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public Builder addItems(
int index,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder
builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public Builder addAllItems(
java.lang.Iterable<
? extends io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler>
values) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_);
onChanged();
} else {
itemsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public Builder clearItems() {
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
itemsBuilder_.clear();
}
return this;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public Builder removeItems(int index) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.remove(index);
onChanged();
} else {
itemsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder
getItemsBuilder(int index) {
return getItemsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder
getItemsOrBuilder(int index) {
if (itemsBuilder_ == null) {
return items_.get(index);
} else {
return itemsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public java.util.List<
? extends io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder>
getItemsOrBuilderList() {
if (itemsBuilder_ != null) {
return itemsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(items_);
}
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder
addItemsBuilder() {
return getItemsFieldBuilder()
.addBuilder(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
.getDefaultInstance());
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder
addItemsBuilder(int index) {
return getItemsFieldBuilder()
.addBuilder(
index,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler
.getDefaultInstance());
}
/**
*
*
*
* list of horizontal pod autoscaler objects.
*
*
* repeated .k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler items = 2;
*/
public java.util.List<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder>
getItemsBuilderList() {
return getItemsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder>
getItemsFieldBuilder() {
if (itemsBuilder_ == null) {
itemsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscaler.Builder,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerOrBuilder>(
items_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
items_ = null;
}
return itemsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList)
private static final io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList();
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HorizontalPodAutoscalerList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HorizontalPodAutoscalerList(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerList
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HorizontalPodAutoscalerSpecOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
boolean hasScaleTargetRef();
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference getScaleTargetRef();
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder
getScaleTargetRefOrBuilder();
/**
*
*
*
* minReplicas is the lower limit for the number of replicas to which the autoscaler
* can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
* alpha feature gate HPAScaleToZero is enabled and at least one Object or External
* metric is configured. Scaling is active as long as at least one metric value is
* available.
* +optional
*
*
* optional int32 minReplicas = 2;
*/
boolean hasMinReplicas();
/**
*
*
*
* minReplicas is the lower limit for the number of replicas to which the autoscaler
* can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
* alpha feature gate HPAScaleToZero is enabled and at least one Object or External
* metric is configured. Scaling is active as long as at least one metric value is
* available.
* +optional
*
*
* optional int32 minReplicas = 2;
*/
int getMinReplicas();
/**
*
*
*
* upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
*
*
* optional int32 maxReplicas = 3;
*/
boolean hasMaxReplicas();
/**
*
*
*
* upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
*
*
* optional int32 maxReplicas = 3;
*/
int getMaxReplicas();
/**
*
*
*
* target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
* if not specified the default autoscaling policy will be used.
* +optional
*
*
* optional int32 targetCPUUtilizationPercentage = 4;
*/
boolean hasTargetCPUUtilizationPercentage();
/**
*
*
*
* target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
* if not specified the default autoscaling policy will be used.
* +optional
*
*
* optional int32 targetCPUUtilizationPercentage = 4;
*/
int getTargetCPUUtilizationPercentage();
}
/**
*
*
*
* specification of a horizontal pod autoscaler.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec}
*/
public static final class HorizontalPodAutoscalerSpec
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec)
HorizontalPodAutoscalerSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use HorizontalPodAutoscalerSpec.newBuilder() to construct.
private HorizontalPodAutoscalerSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HorizontalPodAutoscalerSpec() {
minReplicas_ = 0;
maxReplicas_ = 0;
targetCPUUtilizationPercentage_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private HorizontalPodAutoscalerSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder
subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = scaleTargetRef_.toBuilder();
}
scaleTargetRef_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(scaleTargetRef_);
scaleTargetRef_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 16:
{
bitField0_ |= 0x00000002;
minReplicas_ = input.readInt32();
break;
}
case 24:
{
bitField0_ |= 0x00000004;
maxReplicas_ = input.readInt32();
break;
}
case 32:
{
bitField0_ |= 0x00000008;
targetCPUUtilizationPercentage_ = input.readInt32();
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.Builder.class);
}
private int bitField0_;
public static final int SCALETARGETREF_FIELD_NUMBER = 1;
private io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference scaleTargetRef_;
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public boolean hasScaleTargetRef() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
getScaleTargetRef() {
return scaleTargetRef_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: scaleTargetRef_;
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder
getScaleTargetRefOrBuilder() {
return scaleTargetRef_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: scaleTargetRef_;
}
public static final int MINREPLICAS_FIELD_NUMBER = 2;
private int minReplicas_;
/**
*
*
*
* minReplicas is the lower limit for the number of replicas to which the autoscaler
* can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
* alpha feature gate HPAScaleToZero is enabled and at least one Object or External
* metric is configured. Scaling is active as long as at least one metric value is
* available.
* +optional
*
*
* optional int32 minReplicas = 2;
*/
public boolean hasMinReplicas() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* minReplicas is the lower limit for the number of replicas to which the autoscaler
* can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
* alpha feature gate HPAScaleToZero is enabled and at least one Object or External
* metric is configured. Scaling is active as long as at least one metric value is
* available.
* +optional
*
*
* optional int32 minReplicas = 2;
*/
public int getMinReplicas() {
return minReplicas_;
}
public static final int MAXREPLICAS_FIELD_NUMBER = 3;
private int maxReplicas_;
/**
*
*
*
* upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
*
*
* optional int32 maxReplicas = 3;
*/
public boolean hasMaxReplicas() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
*
*
* optional int32 maxReplicas = 3;
*/
public int getMaxReplicas() {
return maxReplicas_;
}
public static final int TARGETCPUUTILIZATIONPERCENTAGE_FIELD_NUMBER = 4;
private int targetCPUUtilizationPercentage_;
/**
*
*
*
* target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
* if not specified the default autoscaling policy will be used.
* +optional
*
*
* optional int32 targetCPUUtilizationPercentage = 4;
*/
public boolean hasTargetCPUUtilizationPercentage() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
* if not specified the default autoscaling policy will be used.
* +optional
*
*
* optional int32 targetCPUUtilizationPercentage = 4;
*/
public int getTargetCPUUtilizationPercentage() {
return targetCPUUtilizationPercentage_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, getScaleTargetRef());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, minReplicas_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, maxReplicas_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeInt32(4, targetCPUUtilizationPercentage_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getScaleTargetRef());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, minReplicas_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxReplicas_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size +=
com.google.protobuf.CodedOutputStream.computeInt32Size(
4, targetCPUUtilizationPercentage_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec other =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec) obj;
boolean result = true;
result = result && (hasScaleTargetRef() == other.hasScaleTargetRef());
if (hasScaleTargetRef()) {
result = result && getScaleTargetRef().equals(other.getScaleTargetRef());
}
result = result && (hasMinReplicas() == other.hasMinReplicas());
if (hasMinReplicas()) {
result = result && (getMinReplicas() == other.getMinReplicas());
}
result = result && (hasMaxReplicas() == other.hasMaxReplicas());
if (hasMaxReplicas()) {
result = result && (getMaxReplicas() == other.getMaxReplicas());
}
result =
result
&& (hasTargetCPUUtilizationPercentage() == other.hasTargetCPUUtilizationPercentage());
if (hasTargetCPUUtilizationPercentage()) {
result =
result
&& (getTargetCPUUtilizationPercentage()
== other.getTargetCPUUtilizationPercentage());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasScaleTargetRef()) {
hash = (37 * hash) + SCALETARGETREF_FIELD_NUMBER;
hash = (53 * hash) + getScaleTargetRef().hashCode();
}
if (hasMinReplicas()) {
hash = (37 * hash) + MINREPLICAS_FIELD_NUMBER;
hash = (53 * hash) + getMinReplicas();
}
if (hasMaxReplicas()) {
hash = (37 * hash) + MAXREPLICAS_FIELD_NUMBER;
hash = (53 * hash) + getMaxReplicas();
}
if (hasTargetCPUUtilizationPercentage()) {
hash = (37 * hash) + TARGETCPUUTILIZATIONPERCENTAGE_FIELD_NUMBER;
hash = (53 * hash) + getTargetCPUUtilizationPercentage();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* specification of a horizontal pod autoscaler.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec)
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.Builder.class);
}
// Construct using
// io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getScaleTargetRefFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (scaleTargetRefBuilder_ == null) {
scaleTargetRef_ = null;
} else {
scaleTargetRefBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
minReplicas_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
maxReplicas_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
targetCPUUtilizationPercentage_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec build() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec result =
new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (scaleTargetRefBuilder_ == null) {
result.scaleTargetRef_ = scaleTargetRef_;
} else {
result.scaleTargetRef_ = scaleTargetRefBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.minReplicas_ = minReplicas_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.maxReplicas_ = maxReplicas_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.targetCPUUtilizationPercentage_ = targetCPUUtilizationPercentage_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec) {
return mergeFrom(
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
.getDefaultInstance()) return this;
if (other.hasScaleTargetRef()) {
mergeScaleTargetRef(other.getScaleTargetRef());
}
if (other.hasMinReplicas()) {
setMinReplicas(other.getMinReplicas());
}
if (other.hasMaxReplicas()) {
setMaxReplicas(other.getMaxReplicas());
}
if (other.hasTargetCPUUtilizationPercentage()) {
setTargetCPUUtilizationPercentage(other.getTargetCPUUtilizationPercentage());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference scaleTargetRef_ =
null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder>
scaleTargetRefBuilder_;
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public boolean hasScaleTargetRef() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
getScaleTargetRef() {
if (scaleTargetRefBuilder_ == null) {
return scaleTargetRef_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: scaleTargetRef_;
} else {
return scaleTargetRefBuilder_.getMessage();
}
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public Builder setScaleTargetRef(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference value) {
if (scaleTargetRefBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
scaleTargetRef_ = value;
onChanged();
} else {
scaleTargetRefBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public Builder setScaleTargetRef(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder
builderForValue) {
if (scaleTargetRefBuilder_ == null) {
scaleTargetRef_ = builderForValue.build();
onChanged();
} else {
scaleTargetRefBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public Builder mergeScaleTargetRef(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference value) {
if (scaleTargetRefBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)
&& scaleTargetRef_ != null
&& scaleTargetRef_
!= io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()) {
scaleTargetRef_ =
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.newBuilder(
scaleTargetRef_)
.mergeFrom(value)
.buildPartial();
} else {
scaleTargetRef_ = value;
}
onChanged();
} else {
scaleTargetRefBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public Builder clearScaleTargetRef() {
if (scaleTargetRefBuilder_ == null) {
scaleTargetRef_ = null;
onChanged();
} else {
scaleTargetRefBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder
getScaleTargetRefBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getScaleTargetRefFieldBuilder().getBuilder();
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder
getScaleTargetRefOrBuilder() {
if (scaleTargetRefBuilder_ != null) {
return scaleTargetRefBuilder_.getMessageOrBuilder();
} else {
return scaleTargetRef_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: scaleTargetRef_;
}
}
/**
*
*
*
* reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
* and will set the desired number of pods by using its Scale subresource.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference scaleTargetRef = 1;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder>
getScaleTargetRefFieldBuilder() {
if (scaleTargetRefBuilder_ == null) {
scaleTargetRefBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder>(
getScaleTargetRef(), getParentForChildren(), isClean());
scaleTargetRef_ = null;
}
return scaleTargetRefBuilder_;
}
private int minReplicas_;
/**
*
*
*
* minReplicas is the lower limit for the number of replicas to which the autoscaler
* can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
* alpha feature gate HPAScaleToZero is enabled and at least one Object or External
* metric is configured. Scaling is active as long as at least one metric value is
* available.
* +optional
*
*
* optional int32 minReplicas = 2;
*/
public boolean hasMinReplicas() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* minReplicas is the lower limit for the number of replicas to which the autoscaler
* can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
* alpha feature gate HPAScaleToZero is enabled and at least one Object or External
* metric is configured. Scaling is active as long as at least one metric value is
* available.
* +optional
*
*
* optional int32 minReplicas = 2;
*/
public int getMinReplicas() {
return minReplicas_;
}
/**
*
*
*
* minReplicas is the lower limit for the number of replicas to which the autoscaler
* can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
* alpha feature gate HPAScaleToZero is enabled and at least one Object or External
* metric is configured. Scaling is active as long as at least one metric value is
* available.
* +optional
*
*
* optional int32 minReplicas = 2;
*/
public Builder setMinReplicas(int value) {
bitField0_ |= 0x00000002;
minReplicas_ = value;
onChanged();
return this;
}
/**
*
*
*
* minReplicas is the lower limit for the number of replicas to which the autoscaler
* can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
* alpha feature gate HPAScaleToZero is enabled and at least one Object or External
* metric is configured. Scaling is active as long as at least one metric value is
* available.
* +optional
*
*
* optional int32 minReplicas = 2;
*/
public Builder clearMinReplicas() {
bitField0_ = (bitField0_ & ~0x00000002);
minReplicas_ = 0;
onChanged();
return this;
}
private int maxReplicas_;
/**
*
*
*
* upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
*
*
* optional int32 maxReplicas = 3;
*/
public boolean hasMaxReplicas() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
*
*
* optional int32 maxReplicas = 3;
*/
public int getMaxReplicas() {
return maxReplicas_;
}
/**
*
*
*
* upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
*
*
* optional int32 maxReplicas = 3;
*/
public Builder setMaxReplicas(int value) {
bitField0_ |= 0x00000004;
maxReplicas_ = value;
onChanged();
return this;
}
/**
*
*
*
* upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
*
*
* optional int32 maxReplicas = 3;
*/
public Builder clearMaxReplicas() {
bitField0_ = (bitField0_ & ~0x00000004);
maxReplicas_ = 0;
onChanged();
return this;
}
private int targetCPUUtilizationPercentage_;
/**
*
*
*
* target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
* if not specified the default autoscaling policy will be used.
* +optional
*
*
* optional int32 targetCPUUtilizationPercentage = 4;
*/
public boolean hasTargetCPUUtilizationPercentage() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
* if not specified the default autoscaling policy will be used.
* +optional
*
*
* optional int32 targetCPUUtilizationPercentage = 4;
*/
public int getTargetCPUUtilizationPercentage() {
return targetCPUUtilizationPercentage_;
}
/**
*
*
*
* target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
* if not specified the default autoscaling policy will be used.
* +optional
*
*
* optional int32 targetCPUUtilizationPercentage = 4;
*/
public Builder setTargetCPUUtilizationPercentage(int value) {
bitField0_ |= 0x00000008;
targetCPUUtilizationPercentage_ = value;
onChanged();
return this;
}
/**
*
*
*
* target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
* if not specified the default autoscaling policy will be used.
* +optional
*
*
* optional int32 targetCPUUtilizationPercentage = 4;
*/
public Builder clearTargetCPUUtilizationPercentage() {
bitField0_ = (bitField0_ & ~0x00000008);
targetCPUUtilizationPercentage_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerSpec)
private static final io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec();
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HorizontalPodAutoscalerSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HorizontalPodAutoscalerSpec(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerSpec
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HorizontalPodAutoscalerStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* most recent generation observed by this autoscaler.
* +optional
*
*
* optional int64 observedGeneration = 1;
*/
boolean hasObservedGeneration();
/**
*
*
*
* most recent generation observed by this autoscaler.
* +optional
*
*
* optional int64 observedGeneration = 1;
*/
long getObservedGeneration();
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
boolean hasLastScaleTime();
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
io.kubernetes.client.proto.Meta.Time getLastScaleTime();
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
io.kubernetes.client.proto.Meta.TimeOrBuilder getLastScaleTimeOrBuilder();
/**
*
*
*
* current number of replicas of pods managed by this autoscaler.
*
*
* optional int32 currentReplicas = 3;
*/
boolean hasCurrentReplicas();
/**
*
*
*
* current number of replicas of pods managed by this autoscaler.
*
*
* optional int32 currentReplicas = 3;
*/
int getCurrentReplicas();
/**
*
*
*
* desired number of replicas of pods managed by this autoscaler.
*
*
* optional int32 desiredReplicas = 4;
*/
boolean hasDesiredReplicas();
/**
*
*
*
* desired number of replicas of pods managed by this autoscaler.
*
*
* optional int32 desiredReplicas = 4;
*/
int getDesiredReplicas();
/**
*
*
*
* current average CPU utilization over all pods, represented as a percentage of requested CPU,
* e.g. 70 means that an average pod is using now 70% of its requested CPU.
* +optional
*
*
* optional int32 currentCPUUtilizationPercentage = 5;
*/
boolean hasCurrentCPUUtilizationPercentage();
/**
*
*
*
* current average CPU utilization over all pods, represented as a percentage of requested CPU,
* e.g. 70 means that an average pod is using now 70% of its requested CPU.
* +optional
*
*
* optional int32 currentCPUUtilizationPercentage = 5;
*/
int getCurrentCPUUtilizationPercentage();
}
/**
*
*
*
* current status of a horizontal pod autoscaler
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus}
*/
public static final class HorizontalPodAutoscalerStatus
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus)
HorizontalPodAutoscalerStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use HorizontalPodAutoscalerStatus.newBuilder() to construct.
private HorizontalPodAutoscalerStatus(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HorizontalPodAutoscalerStatus() {
observedGeneration_ = 0L;
currentReplicas_ = 0;
desiredReplicas_ = 0;
currentCPUUtilizationPercentage_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private HorizontalPodAutoscalerStatus(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
bitField0_ |= 0x00000001;
observedGeneration_ = input.readInt64();
break;
}
case 18:
{
io.kubernetes.client.proto.Meta.Time.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = lastScaleTime_.toBuilder();
}
lastScaleTime_ =
input.readMessage(
io.kubernetes.client.proto.Meta.Time.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(lastScaleTime_);
lastScaleTime_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 24:
{
bitField0_ |= 0x00000004;
currentReplicas_ = input.readInt32();
break;
}
case 32:
{
bitField0_ |= 0x00000008;
desiredReplicas_ = input.readInt32();
break;
}
case 40:
{
bitField0_ |= 0x00000010;
currentCPUUtilizationPercentage_ = input.readInt32();
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.Builder.class);
}
private int bitField0_;
public static final int OBSERVEDGENERATION_FIELD_NUMBER = 1;
private long observedGeneration_;
/**
*
*
*
* most recent generation observed by this autoscaler.
* +optional
*
*
* optional int64 observedGeneration = 1;
*/
public boolean hasObservedGeneration() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* most recent generation observed by this autoscaler.
* +optional
*
*
* optional int64 observedGeneration = 1;
*/
public long getObservedGeneration() {
return observedGeneration_;
}
public static final int LASTSCALETIME_FIELD_NUMBER = 2;
private io.kubernetes.client.proto.Meta.Time lastScaleTime_;
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public boolean hasLastScaleTime() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public io.kubernetes.client.proto.Meta.Time getLastScaleTime() {
return lastScaleTime_ == null
? io.kubernetes.client.proto.Meta.Time.getDefaultInstance()
: lastScaleTime_;
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public io.kubernetes.client.proto.Meta.TimeOrBuilder getLastScaleTimeOrBuilder() {
return lastScaleTime_ == null
? io.kubernetes.client.proto.Meta.Time.getDefaultInstance()
: lastScaleTime_;
}
public static final int CURRENTREPLICAS_FIELD_NUMBER = 3;
private int currentReplicas_;
/**
*
*
*
* current number of replicas of pods managed by this autoscaler.
*
*
* optional int32 currentReplicas = 3;
*/
public boolean hasCurrentReplicas() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* current number of replicas of pods managed by this autoscaler.
*
*
* optional int32 currentReplicas = 3;
*/
public int getCurrentReplicas() {
return currentReplicas_;
}
public static final int DESIREDREPLICAS_FIELD_NUMBER = 4;
private int desiredReplicas_;
/**
*
*
*
* desired number of replicas of pods managed by this autoscaler.
*
*
* optional int32 desiredReplicas = 4;
*/
public boolean hasDesiredReplicas() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* desired number of replicas of pods managed by this autoscaler.
*
*
* optional int32 desiredReplicas = 4;
*/
public int getDesiredReplicas() {
return desiredReplicas_;
}
public static final int CURRENTCPUUTILIZATIONPERCENTAGE_FIELD_NUMBER = 5;
private int currentCPUUtilizationPercentage_;
/**
*
*
*
* current average CPU utilization over all pods, represented as a percentage of requested CPU,
* e.g. 70 means that an average pod is using now 70% of its requested CPU.
* +optional
*
*
* optional int32 currentCPUUtilizationPercentage = 5;
*/
public boolean hasCurrentCPUUtilizationPercentage() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* current average CPU utilization over all pods, represented as a percentage of requested CPU,
* e.g. 70 means that an average pod is using now 70% of its requested CPU.
* +optional
*
*
* optional int32 currentCPUUtilizationPercentage = 5;
*/
public int getCurrentCPUUtilizationPercentage() {
return currentCPUUtilizationPercentage_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt64(1, observedGeneration_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, getLastScaleTime());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, currentReplicas_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeInt32(4, desiredReplicas_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeInt32(5, currentCPUUtilizationPercentage_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, observedGeneration_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLastScaleTime());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, currentReplicas_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, desiredReplicas_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size +=
com.google.protobuf.CodedOutputStream.computeInt32Size(
5, currentCPUUtilizationPercentage_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus other =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus) obj;
boolean result = true;
result = result && (hasObservedGeneration() == other.hasObservedGeneration());
if (hasObservedGeneration()) {
result = result && (getObservedGeneration() == other.getObservedGeneration());
}
result = result && (hasLastScaleTime() == other.hasLastScaleTime());
if (hasLastScaleTime()) {
result = result && getLastScaleTime().equals(other.getLastScaleTime());
}
result = result && (hasCurrentReplicas() == other.hasCurrentReplicas());
if (hasCurrentReplicas()) {
result = result && (getCurrentReplicas() == other.getCurrentReplicas());
}
result = result && (hasDesiredReplicas() == other.hasDesiredReplicas());
if (hasDesiredReplicas()) {
result = result && (getDesiredReplicas() == other.getDesiredReplicas());
}
result =
result
&& (hasCurrentCPUUtilizationPercentage()
== other.hasCurrentCPUUtilizationPercentage());
if (hasCurrentCPUUtilizationPercentage()) {
result =
result
&& (getCurrentCPUUtilizationPercentage()
== other.getCurrentCPUUtilizationPercentage());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasObservedGeneration()) {
hash = (37 * hash) + OBSERVEDGENERATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObservedGeneration());
}
if (hasLastScaleTime()) {
hash = (37 * hash) + LASTSCALETIME_FIELD_NUMBER;
hash = (53 * hash) + getLastScaleTime().hashCode();
}
if (hasCurrentReplicas()) {
hash = (37 * hash) + CURRENTREPLICAS_FIELD_NUMBER;
hash = (53 * hash) + getCurrentReplicas();
}
if (hasDesiredReplicas()) {
hash = (37 * hash) + DESIREDREPLICAS_FIELD_NUMBER;
hash = (53 * hash) + getDesiredReplicas();
}
if (hasCurrentCPUUtilizationPercentage()) {
hash = (37 * hash) + CURRENTCPUUTILIZATIONPERCENTAGE_FIELD_NUMBER;
hash = (53 * hash) + getCurrentCPUUtilizationPercentage();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* current status of a horizontal pod autoscaler
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus)
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.class,
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.Builder
.class);
}
// Construct using
// io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getLastScaleTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
observedGeneration_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
if (lastScaleTimeBuilder_ == null) {
lastScaleTime_ = null;
} else {
lastScaleTimeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
currentReplicas_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
desiredReplicas_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
currentCPUUtilizationPercentage_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus build() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus result =
new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.observedGeneration_ = observedGeneration_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (lastScaleTimeBuilder_ == null) {
result.lastScaleTime_ = lastScaleTime_;
} else {
result.lastScaleTime_ = lastScaleTimeBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.currentReplicas_ = currentReplicas_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.desiredReplicas_ = desiredReplicas_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.currentCPUUtilizationPercentage_ = currentCPUUtilizationPercentage_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus) {
return mergeFrom(
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
.getDefaultInstance()) return this;
if (other.hasObservedGeneration()) {
setObservedGeneration(other.getObservedGeneration());
}
if (other.hasLastScaleTime()) {
mergeLastScaleTime(other.getLastScaleTime());
}
if (other.hasCurrentReplicas()) {
setCurrentReplicas(other.getCurrentReplicas());
}
if (other.hasDesiredReplicas()) {
setDesiredReplicas(other.getDesiredReplicas());
}
if (other.hasCurrentCPUUtilizationPercentage()) {
setCurrentCPUUtilizationPercentage(other.getCurrentCPUUtilizationPercentage());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long observedGeneration_;
/**
*
*
*
* most recent generation observed by this autoscaler.
* +optional
*
*
* optional int64 observedGeneration = 1;
*/
public boolean hasObservedGeneration() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* most recent generation observed by this autoscaler.
* +optional
*
*
* optional int64 observedGeneration = 1;
*/
public long getObservedGeneration() {
return observedGeneration_;
}
/**
*
*
*
* most recent generation observed by this autoscaler.
* +optional
*
*
* optional int64 observedGeneration = 1;
*/
public Builder setObservedGeneration(long value) {
bitField0_ |= 0x00000001;
observedGeneration_ = value;
onChanged();
return this;
}
/**
*
*
*
* most recent generation observed by this autoscaler.
* +optional
*
*
* optional int64 observedGeneration = 1;
*/
public Builder clearObservedGeneration() {
bitField0_ = (bitField0_ & ~0x00000001);
observedGeneration_ = 0L;
onChanged();
return this;
}
private io.kubernetes.client.proto.Meta.Time lastScaleTime_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.Time,
io.kubernetes.client.proto.Meta.Time.Builder,
io.kubernetes.client.proto.Meta.TimeOrBuilder>
lastScaleTimeBuilder_;
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public boolean hasLastScaleTime() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public io.kubernetes.client.proto.Meta.Time getLastScaleTime() {
if (lastScaleTimeBuilder_ == null) {
return lastScaleTime_ == null
? io.kubernetes.client.proto.Meta.Time.getDefaultInstance()
: lastScaleTime_;
} else {
return lastScaleTimeBuilder_.getMessage();
}
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public Builder setLastScaleTime(io.kubernetes.client.proto.Meta.Time value) {
if (lastScaleTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lastScaleTime_ = value;
onChanged();
} else {
lastScaleTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public Builder setLastScaleTime(
io.kubernetes.client.proto.Meta.Time.Builder builderForValue) {
if (lastScaleTimeBuilder_ == null) {
lastScaleTime_ = builderForValue.build();
onChanged();
} else {
lastScaleTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public Builder mergeLastScaleTime(io.kubernetes.client.proto.Meta.Time value) {
if (lastScaleTimeBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)
&& lastScaleTime_ != null
&& lastScaleTime_ != io.kubernetes.client.proto.Meta.Time.getDefaultInstance()) {
lastScaleTime_ =
io.kubernetes.client.proto.Meta.Time.newBuilder(lastScaleTime_)
.mergeFrom(value)
.buildPartial();
} else {
lastScaleTime_ = value;
}
onChanged();
} else {
lastScaleTimeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public Builder clearLastScaleTime() {
if (lastScaleTimeBuilder_ == null) {
lastScaleTime_ = null;
onChanged();
} else {
lastScaleTimeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public io.kubernetes.client.proto.Meta.Time.Builder getLastScaleTimeBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getLastScaleTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
public io.kubernetes.client.proto.Meta.TimeOrBuilder getLastScaleTimeOrBuilder() {
if (lastScaleTimeBuilder_ != null) {
return lastScaleTimeBuilder_.getMessageOrBuilder();
} else {
return lastScaleTime_ == null
? io.kubernetes.client.proto.Meta.Time.getDefaultInstance()
: lastScaleTime_;
}
}
/**
*
*
*
* last time the HorizontalPodAutoscaler scaled the number of pods;
* used by the autoscaler to control how often the number of pods is changed.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.Time,
io.kubernetes.client.proto.Meta.Time.Builder,
io.kubernetes.client.proto.Meta.TimeOrBuilder>
getLastScaleTimeFieldBuilder() {
if (lastScaleTimeBuilder_ == null) {
lastScaleTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.Time,
io.kubernetes.client.proto.Meta.Time.Builder,
io.kubernetes.client.proto.Meta.TimeOrBuilder>(
getLastScaleTime(), getParentForChildren(), isClean());
lastScaleTime_ = null;
}
return lastScaleTimeBuilder_;
}
private int currentReplicas_;
/**
*
*
*
* current number of replicas of pods managed by this autoscaler.
*
*
* optional int32 currentReplicas = 3;
*/
public boolean hasCurrentReplicas() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* current number of replicas of pods managed by this autoscaler.
*
*
* optional int32 currentReplicas = 3;
*/
public int getCurrentReplicas() {
return currentReplicas_;
}
/**
*
*
*
* current number of replicas of pods managed by this autoscaler.
*
*
* optional int32 currentReplicas = 3;
*/
public Builder setCurrentReplicas(int value) {
bitField0_ |= 0x00000004;
currentReplicas_ = value;
onChanged();
return this;
}
/**
*
*
*
* current number of replicas of pods managed by this autoscaler.
*
*
* optional int32 currentReplicas = 3;
*/
public Builder clearCurrentReplicas() {
bitField0_ = (bitField0_ & ~0x00000004);
currentReplicas_ = 0;
onChanged();
return this;
}
private int desiredReplicas_;
/**
*
*
*
* desired number of replicas of pods managed by this autoscaler.
*
*
* optional int32 desiredReplicas = 4;
*/
public boolean hasDesiredReplicas() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* desired number of replicas of pods managed by this autoscaler.
*
*
* optional int32 desiredReplicas = 4;
*/
public int getDesiredReplicas() {
return desiredReplicas_;
}
/**
*
*
*
* desired number of replicas of pods managed by this autoscaler.
*
*
* optional int32 desiredReplicas = 4;
*/
public Builder setDesiredReplicas(int value) {
bitField0_ |= 0x00000008;
desiredReplicas_ = value;
onChanged();
return this;
}
/**
*
*
*
* desired number of replicas of pods managed by this autoscaler.
*
*
* optional int32 desiredReplicas = 4;
*/
public Builder clearDesiredReplicas() {
bitField0_ = (bitField0_ & ~0x00000008);
desiredReplicas_ = 0;
onChanged();
return this;
}
private int currentCPUUtilizationPercentage_;
/**
*
*
*
* current average CPU utilization over all pods, represented as a percentage of requested CPU,
* e.g. 70 means that an average pod is using now 70% of its requested CPU.
* +optional
*
*
* optional int32 currentCPUUtilizationPercentage = 5;
*/
public boolean hasCurrentCPUUtilizationPercentage() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* current average CPU utilization over all pods, represented as a percentage of requested CPU,
* e.g. 70 means that an average pod is using now 70% of its requested CPU.
* +optional
*
*
* optional int32 currentCPUUtilizationPercentage = 5;
*/
public int getCurrentCPUUtilizationPercentage() {
return currentCPUUtilizationPercentage_;
}
/**
*
*
*
* current average CPU utilization over all pods, represented as a percentage of requested CPU,
* e.g. 70 means that an average pod is using now 70% of its requested CPU.
* +optional
*
*
* optional int32 currentCPUUtilizationPercentage = 5;
*/
public Builder setCurrentCPUUtilizationPercentage(int value) {
bitField0_ |= 0x00000010;
currentCPUUtilizationPercentage_ = value;
onChanged();
return this;
}
/**
*
*
*
* current average CPU utilization over all pods, represented as a percentage of requested CPU,
* e.g. 70 means that an average pod is using now 70% of its requested CPU.
* +optional
*
*
* optional int32 currentCPUUtilizationPercentage = 5;
*/
public Builder clearCurrentCPUUtilizationPercentage() {
bitField0_ = (bitField0_ & ~0x00000010);
currentCPUUtilizationPercentage_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerStatus)
private static final io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus();
}
public static io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HorizontalPodAutoscalerStatus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HorizontalPodAutoscalerStatus(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.HorizontalPodAutoscalerStatus
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MetricSpecOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.MetricSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
boolean hasType();
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
java.lang.String getType();
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
com.google.protobuf.ByteString getTypeBytes();
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
boolean hasObject();
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource getObject();
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSourceOrBuilder getObjectOrBuilder();
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
boolean hasPods();
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource getPods();
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSourceOrBuilder getPodsOrBuilder();
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
boolean hasResource();
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource getResource();
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSourceOrBuilder getResourceOrBuilder();
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
boolean hasContainerResource();
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource getContainerResource();
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSourceOrBuilder
getContainerResourceOrBuilder();
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
boolean hasExternal();
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource getExternal();
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSourceOrBuilder getExternalOrBuilder();
}
/**
*
*
*
* MetricSpec specifies how to scale based on a single metric
* (only `type` and one other matching field should be set at once).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.MetricSpec}
*/
public static final class MetricSpec extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.MetricSpec)
MetricSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetricSpec.newBuilder() to construct.
private MetricSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MetricSpec() {
type_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private MetricSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
type_ = bs;
break;
}
case 18:
{
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.Builder subBuilder =
null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = object_.toBuilder();
}
object_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(object_);
object_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 26:
{
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = pods_.toBuilder();
}
pods_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(pods_);
pods_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34:
{
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.Builder subBuilder =
null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = resource_.toBuilder();
}
resource_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(resource_);
resource_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 42:
{
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.Builder subBuilder =
null;
if (((bitField0_ & 0x00000020) == 0x00000020)) {
subBuilder = external_.toBuilder();
}
external_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(external_);
external_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000020;
break;
}
case 58:
{
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.Builder
subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
subBuilder = containerResource_.toBuilder();
}
containerResource_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(containerResource_);
containerResource_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.MetricSpec.class,
io.kubernetes.client.proto.V1Autoscaling.MetricSpec.Builder.class);
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private volatile java.lang.Object type_;
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
}
}
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OBJECT_FIELD_NUMBER = 2;
private io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource object_;
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public boolean hasObject() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource getObject() {
return object_ == null
? io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.getDefaultInstance()
: object_;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSourceOrBuilder
getObjectOrBuilder() {
return object_ == null
? io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.getDefaultInstance()
: object_;
}
public static final int PODS_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource pods_;
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public boolean hasPods() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource getPods() {
return pods_ == null
? io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.getDefaultInstance()
: pods_;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricSourceOrBuilder getPodsOrBuilder() {
return pods_ == null
? io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.getDefaultInstance()
: pods_;
}
public static final int RESOURCE_FIELD_NUMBER = 4;
private io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource resource_;
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public boolean hasResource() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource getResource() {
return resource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.getDefaultInstance()
: resource_;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSourceOrBuilder
getResourceOrBuilder() {
return resource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.getDefaultInstance()
: resource_;
}
public static final int CONTAINERRESOURCE_FIELD_NUMBER = 7;
private io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
containerResource_;
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public boolean hasContainerResource() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
getContainerResource() {
return containerResource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
.getDefaultInstance()
: containerResource_;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSourceOrBuilder
getContainerResourceOrBuilder() {
return containerResource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
.getDefaultInstance()
: containerResource_;
}
public static final int EXTERNAL_FIELD_NUMBER = 5;
private io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource external_;
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public boolean hasExternal() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource getExternal() {
return external_ == null
? io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.getDefaultInstance()
: external_;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSourceOrBuilder
getExternalOrBuilder() {
return external_ == null
? io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.getDefaultInstance()
: external_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, getObject());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getPods());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, getResource());
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeMessage(5, getExternal());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(7, getContainerResource());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getObject());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPods());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getResource());
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExternal());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getContainerResource());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.MetricSpec)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.MetricSpec other =
(io.kubernetes.client.proto.V1Autoscaling.MetricSpec) obj;
boolean result = true;
result = result && (hasType() == other.hasType());
if (hasType()) {
result = result && getType().equals(other.getType());
}
result = result && (hasObject() == other.hasObject());
if (hasObject()) {
result = result && getObject().equals(other.getObject());
}
result = result && (hasPods() == other.hasPods());
if (hasPods()) {
result = result && getPods().equals(other.getPods());
}
result = result && (hasResource() == other.hasResource());
if (hasResource()) {
result = result && getResource().equals(other.getResource());
}
result = result && (hasContainerResource() == other.hasContainerResource());
if (hasContainerResource()) {
result = result && getContainerResource().equals(other.getContainerResource());
}
result = result && (hasExternal() == other.hasExternal());
if (hasExternal()) {
result = result && getExternal().equals(other.getExternal());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
}
if (hasObject()) {
hash = (37 * hash) + OBJECT_FIELD_NUMBER;
hash = (53 * hash) + getObject().hashCode();
}
if (hasPods()) {
hash = (37 * hash) + PODS_FIELD_NUMBER;
hash = (53 * hash) + getPods().hashCode();
}
if (hasResource()) {
hash = (37 * hash) + RESOURCE_FIELD_NUMBER;
hash = (53 * hash) + getResource().hashCode();
}
if (hasContainerResource()) {
hash = (37 * hash) + CONTAINERRESOURCE_FIELD_NUMBER;
hash = (53 * hash) + getContainerResource().hashCode();
}
if (hasExternal()) {
hash = (37 * hash) + EXTERNAL_FIELD_NUMBER;
hash = (53 * hash) + getExternal().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.MetricSpec prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* MetricSpec specifies how to scale based on a single metric
* (only `type` and one other matching field should be set at once).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.MetricSpec}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.MetricSpec)
io.kubernetes.client.proto.V1Autoscaling.MetricSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.MetricSpec.class,
io.kubernetes.client.proto.V1Autoscaling.MetricSpec.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.MetricSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getObjectFieldBuilder();
getPodsFieldBuilder();
getResourceFieldBuilder();
getContainerResourceFieldBuilder();
getExternalFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
type_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
if (objectBuilder_ == null) {
object_ = null;
} else {
objectBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (podsBuilder_ == null) {
pods_ = null;
} else {
podsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (resourceBuilder_ == null) {
resource_ = null;
} else {
resourceBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (containerResourceBuilder_ == null) {
containerResource_ = null;
} else {
containerResourceBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
if (externalBuilder_ == null) {
external_ = null;
} else {
externalBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricSpec_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.MetricSpec getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.MetricSpec.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.MetricSpec build() {
io.kubernetes.client.proto.V1Autoscaling.MetricSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.MetricSpec buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.MetricSpec result =
new io.kubernetes.client.proto.V1Autoscaling.MetricSpec(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (objectBuilder_ == null) {
result.object_ = object_;
} else {
result.object_ = objectBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (podsBuilder_ == null) {
result.pods_ = pods_;
} else {
result.pods_ = podsBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (resourceBuilder_ == null) {
result.resource_ = resource_;
} else {
result.resource_ = resourceBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
if (containerResourceBuilder_ == null) {
result.containerResource_ = containerResource_;
} else {
result.containerResource_ = containerResourceBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020;
}
if (externalBuilder_ == null) {
result.external_ = external_;
} else {
result.external_ = externalBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.MetricSpec) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.MetricSpec) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.kubernetes.client.proto.V1Autoscaling.MetricSpec other) {
if (other == io.kubernetes.client.proto.V1Autoscaling.MetricSpec.getDefaultInstance())
return this;
if (other.hasType()) {
bitField0_ |= 0x00000001;
type_ = other.type_;
onChanged();
}
if (other.hasObject()) {
mergeObject(other.getObject());
}
if (other.hasPods()) {
mergePods(other.getPods());
}
if (other.hasResource()) {
mergeResource(other.getResource());
}
if (other.hasContainerResource()) {
mergeContainerResource(other.getContainerResource());
}
if (other.hasExternal()) {
mergeExternal(other.getExternal());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.MetricSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.MetricSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object type_ = "";
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public Builder setType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
*
*
*
* type is the type of metric source. It should be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public Builder setTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
private io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource object_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSourceOrBuilder>
objectBuilder_;
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public boolean hasObject() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource getObject() {
if (objectBuilder_ == null) {
return object_ == null
? io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.getDefaultInstance()
: object_;
} else {
return objectBuilder_.getMessage();
}
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public Builder setObject(io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource value) {
if (objectBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
object_ = value;
onChanged();
} else {
objectBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public Builder setObject(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.Builder builderForValue) {
if (objectBuilder_ == null) {
object_ = builderForValue.build();
onChanged();
} else {
objectBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public Builder mergeObject(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource value) {
if (objectBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)
&& object_ != null
&& object_
!= io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource
.getDefaultInstance()) {
object_ =
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.newBuilder(object_)
.mergeFrom(value)
.buildPartial();
} else {
object_ = value;
}
onChanged();
} else {
objectBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public Builder clearObject() {
if (objectBuilder_ == null) {
object_ = null;
onChanged();
} else {
objectBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.Builder
getObjectBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getObjectFieldBuilder().getBuilder();
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSourceOrBuilder
getObjectOrBuilder() {
if (objectBuilder_ != null) {
return objectBuilder_.getMessageOrBuilder();
} else {
return object_ == null
? io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.getDefaultInstance()
: object_;
}
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricSource object = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSourceOrBuilder>
getObjectFieldBuilder() {
if (objectBuilder_ == null) {
objectBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSourceOrBuilder>(
getObject(), getParentForChildren(), isClean());
object_ = null;
}
return objectBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource pods_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSourceOrBuilder>
podsBuilder_;
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public boolean hasPods() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource getPods() {
if (podsBuilder_ == null) {
return pods_ == null
? io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.getDefaultInstance()
: pods_;
} else {
return podsBuilder_.getMessage();
}
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public Builder setPods(io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource value) {
if (podsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
pods_ = value;
onChanged();
} else {
podsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public Builder setPods(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.Builder builderForValue) {
if (podsBuilder_ == null) {
pods_ = builderForValue.build();
onChanged();
} else {
podsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public Builder mergePods(io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource value) {
if (podsBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& pods_ != null
&& pods_
!= io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource
.getDefaultInstance()) {
pods_ =
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.newBuilder(pods_)
.mergeFrom(value)
.buildPartial();
} else {
pods_ = value;
}
onChanged();
} else {
podsBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public Builder clearPods() {
if (podsBuilder_ == null) {
pods_ = null;
onChanged();
} else {
podsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.Builder getPodsBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getPodsFieldBuilder().getBuilder();
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricSourceOrBuilder getPodsOrBuilder() {
if (podsBuilder_ != null) {
return podsBuilder_.getMessageOrBuilder();
} else {
return pods_ == null
? io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.getDefaultInstance()
: pods_;
}
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricSource pods = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSourceOrBuilder>
getPodsFieldBuilder() {
if (podsBuilder_ == null) {
podsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSourceOrBuilder>(
getPods(), getParentForChildren(), isClean());
pods_ = null;
}
return podsBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource resource_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSourceOrBuilder>
resourceBuilder_;
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public boolean hasResource() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource getResource() {
if (resourceBuilder_ == null) {
return resource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.getDefaultInstance()
: resource_;
} else {
return resourceBuilder_.getMessage();
}
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public Builder setResource(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource value) {
if (resourceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
resource_ = value;
onChanged();
} else {
resourceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public Builder setResource(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.Builder builderForValue) {
if (resourceBuilder_ == null) {
resource_ = builderForValue.build();
onChanged();
} else {
resourceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public Builder mergeResource(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource value) {
if (resourceBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)
&& resource_ != null
&& resource_
!= io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource
.getDefaultInstance()) {
resource_ =
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.newBuilder(resource_)
.mergeFrom(value)
.buildPartial();
} else {
resource_ = value;
}
onChanged();
} else {
resourceBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public Builder clearResource() {
if (resourceBuilder_ == null) {
resource_ = null;
onChanged();
} else {
resourceBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.Builder
getResourceBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getResourceFieldBuilder().getBuilder();
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSourceOrBuilder
getResourceOrBuilder() {
if (resourceBuilder_ != null) {
return resourceBuilder_.getMessageOrBuilder();
} else {
return resource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.getDefaultInstance()
: resource_;
}
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricSource resource = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSourceOrBuilder>
getResourceFieldBuilder() {
if (resourceBuilder_ == null) {
resourceBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSourceOrBuilder>(
getResource(), getParentForChildren(), isClean());
resource_ = null;
}
return resourceBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
containerResource_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSourceOrBuilder>
containerResourceBuilder_;
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public boolean hasContainerResource() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
getContainerResource() {
if (containerResourceBuilder_ == null) {
return containerResource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
.getDefaultInstance()
: containerResource_;
} else {
return containerResourceBuilder_.getMessage();
}
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public Builder setContainerResource(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource value) {
if (containerResourceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
containerResource_ = value;
onChanged();
} else {
containerResourceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public Builder setContainerResource(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.Builder
builderForValue) {
if (containerResourceBuilder_ == null) {
containerResource_ = builderForValue.build();
onChanged();
} else {
containerResourceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public Builder mergeContainerResource(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource value) {
if (containerResourceBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)
&& containerResource_ != null
&& containerResource_
!= io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
.getDefaultInstance()) {
containerResource_ =
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.newBuilder(
containerResource_)
.mergeFrom(value)
.buildPartial();
} else {
containerResource_ = value;
}
onChanged();
} else {
containerResourceBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public Builder clearContainerResource() {
if (containerResourceBuilder_ == null) {
containerResource_ = null;
onChanged();
} else {
containerResourceBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.Builder
getContainerResourceBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getContainerResourceFieldBuilder().getBuilder();
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSourceOrBuilder
getContainerResourceOrBuilder() {
if (containerResourceBuilder_ != null) {
return containerResourceBuilder_.getMessageOrBuilder();
} else {
return containerResource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource
.getDefaultInstance()
: containerResource_;
}
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod of the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricSource containerResource = 7;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSourceOrBuilder>
getContainerResourceFieldBuilder() {
if (containerResourceBuilder_ == null) {
containerResourceBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricSourceOrBuilder>(
getContainerResource(), getParentForChildren(), isClean());
containerResource_ = null;
}
return containerResourceBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource external_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSourceOrBuilder>
externalBuilder_;
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public boolean hasExternal() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource getExternal() {
if (externalBuilder_ == null) {
return external_ == null
? io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.getDefaultInstance()
: external_;
} else {
return externalBuilder_.getMessage();
}
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public Builder setExternal(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource value) {
if (externalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
external_ = value;
onChanged();
} else {
externalBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public Builder setExternal(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.Builder builderForValue) {
if (externalBuilder_ == null) {
external_ = builderForValue.build();
onChanged();
} else {
externalBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public Builder mergeExternal(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource value) {
if (externalBuilder_ == null) {
if (((bitField0_ & 0x00000020) == 0x00000020)
&& external_ != null
&& external_
!= io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource
.getDefaultInstance()) {
external_ =
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.newBuilder(external_)
.mergeFrom(value)
.buildPartial();
} else {
external_ = value;
}
onChanged();
} else {
externalBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public Builder clearExternal() {
if (externalBuilder_ == null) {
external_ = null;
onChanged();
} else {
externalBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.Builder
getExternalBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getExternalFieldBuilder().getBuilder();
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSourceOrBuilder
getExternalOrBuilder() {
if (externalBuilder_ != null) {
return externalBuilder_.getMessageOrBuilder();
} else {
return external_ == null
? io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.getDefaultInstance()
: external_;
}
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricSource external = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSourceOrBuilder>
getExternalFieldBuilder() {
if (externalBuilder_ == null) {
externalBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSource.Builder,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricSourceOrBuilder>(
getExternal(), getParentForChildren(), isClean());
external_ = null;
}
return externalBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.MetricSpec)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.MetricSpec)
private static final io.kubernetes.client.proto.V1Autoscaling.MetricSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.MetricSpec();
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MetricSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MetricSpec(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.MetricSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MetricStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.MetricStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
boolean hasType();
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
java.lang.String getType();
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
com.google.protobuf.ByteString getTypeBytes();
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
boolean hasObject();
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus getObject();
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatusOrBuilder getObjectOrBuilder();
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
boolean hasPods();
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus getPods();
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatusOrBuilder getPodsOrBuilder();
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
boolean hasResource();
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus getResource();
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatusOrBuilder getResourceOrBuilder();
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
boolean hasContainerResource();
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus getContainerResource();
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatusOrBuilder
getContainerResourceOrBuilder();
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
boolean hasExternal();
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus getExternal();
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatusOrBuilder getExternalOrBuilder();
}
/**
*
*
*
* MetricStatus describes the last-read state of a single metric.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.MetricStatus}
*/
public static final class MetricStatus extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.MetricStatus)
MetricStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetricStatus.newBuilder() to construct.
private MetricStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MetricStatus() {
type_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private MetricStatus(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
type_ = bs;
break;
}
case 18:
{
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.Builder subBuilder =
null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = object_.toBuilder();
}
object_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(object_);
object_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 26:
{
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = pods_.toBuilder();
}
pods_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(pods_);
pods_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34:
{
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.Builder subBuilder =
null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = resource_.toBuilder();
}
resource_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(resource_);
resource_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 42:
{
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.Builder subBuilder =
null;
if (((bitField0_ & 0x00000020) == 0x00000020)) {
subBuilder = external_.toBuilder();
}
external_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(external_);
external_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000020;
break;
}
case 58:
{
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.Builder
subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
subBuilder = containerResource_.toBuilder();
}
containerResource_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(containerResource_);
containerResource_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.MetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.MetricStatus.Builder.class);
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private volatile java.lang.Object type_;
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
}
}
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OBJECT_FIELD_NUMBER = 2;
private io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus object_;
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public boolean hasObject() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus getObject() {
return object_ == null
? io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.getDefaultInstance()
: object_;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatusOrBuilder
getObjectOrBuilder() {
return object_ == null
? io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.getDefaultInstance()
: object_;
}
public static final int PODS_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus pods_;
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public boolean hasPods() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus getPods() {
return pods_ == null
? io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.getDefaultInstance()
: pods_;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatusOrBuilder getPodsOrBuilder() {
return pods_ == null
? io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.getDefaultInstance()
: pods_;
}
public static final int RESOURCE_FIELD_NUMBER = 4;
private io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus resource_;
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public boolean hasResource() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus getResource() {
return resource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.getDefaultInstance()
: resource_;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatusOrBuilder
getResourceOrBuilder() {
return resource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.getDefaultInstance()
: resource_;
}
public static final int CONTAINERRESOURCE_FIELD_NUMBER = 7;
private io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
containerResource_;
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public boolean hasContainerResource() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
getContainerResource() {
return containerResource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
.getDefaultInstance()
: containerResource_;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatusOrBuilder
getContainerResourceOrBuilder() {
return containerResource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
.getDefaultInstance()
: containerResource_;
}
public static final int EXTERNAL_FIELD_NUMBER = 5;
private io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus external_;
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public boolean hasExternal() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus getExternal() {
return external_ == null
? io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.getDefaultInstance()
: external_;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatusOrBuilder
getExternalOrBuilder() {
return external_ == null
? io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.getDefaultInstance()
: external_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, getObject());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getPods());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, getResource());
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeMessage(5, getExternal());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(7, getContainerResource());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getObject());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPods());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getResource());
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExternal());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getContainerResource());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.MetricStatus)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.MetricStatus other =
(io.kubernetes.client.proto.V1Autoscaling.MetricStatus) obj;
boolean result = true;
result = result && (hasType() == other.hasType());
if (hasType()) {
result = result && getType().equals(other.getType());
}
result = result && (hasObject() == other.hasObject());
if (hasObject()) {
result = result && getObject().equals(other.getObject());
}
result = result && (hasPods() == other.hasPods());
if (hasPods()) {
result = result && getPods().equals(other.getPods());
}
result = result && (hasResource() == other.hasResource());
if (hasResource()) {
result = result && getResource().equals(other.getResource());
}
result = result && (hasContainerResource() == other.hasContainerResource());
if (hasContainerResource()) {
result = result && getContainerResource().equals(other.getContainerResource());
}
result = result && (hasExternal() == other.hasExternal());
if (hasExternal()) {
result = result && getExternal().equals(other.getExternal());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
}
if (hasObject()) {
hash = (37 * hash) + OBJECT_FIELD_NUMBER;
hash = (53 * hash) + getObject().hashCode();
}
if (hasPods()) {
hash = (37 * hash) + PODS_FIELD_NUMBER;
hash = (53 * hash) + getPods().hashCode();
}
if (hasResource()) {
hash = (37 * hash) + RESOURCE_FIELD_NUMBER;
hash = (53 * hash) + getResource().hashCode();
}
if (hasContainerResource()) {
hash = (37 * hash) + CONTAINERRESOURCE_FIELD_NUMBER;
hash = (53 * hash) + getContainerResource().hashCode();
}
if (hasExternal()) {
hash = (37 * hash) + EXTERNAL_FIELD_NUMBER;
hash = (53 * hash) + getExternal().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.MetricStatus prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* MetricStatus describes the last-read state of a single metric.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.MetricStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.MetricStatus)
io.kubernetes.client.proto.V1Autoscaling.MetricStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.MetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.MetricStatus.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.MetricStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getObjectFieldBuilder();
getPodsFieldBuilder();
getResourceFieldBuilder();
getContainerResourceFieldBuilder();
getExternalFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
type_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
if (objectBuilder_ == null) {
object_ = null;
} else {
objectBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (podsBuilder_ == null) {
pods_ = null;
} else {
podsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (resourceBuilder_ == null) {
resource_ = null;
} else {
resourceBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (containerResourceBuilder_ == null) {
containerResource_ = null;
} else {
containerResourceBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
if (externalBuilder_ == null) {
external_ = null;
} else {
externalBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_MetricStatus_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.MetricStatus getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.MetricStatus.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.MetricStatus build() {
io.kubernetes.client.proto.V1Autoscaling.MetricStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.MetricStatus buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.MetricStatus result =
new io.kubernetes.client.proto.V1Autoscaling.MetricStatus(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (objectBuilder_ == null) {
result.object_ = object_;
} else {
result.object_ = objectBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (podsBuilder_ == null) {
result.pods_ = pods_;
} else {
result.pods_ = podsBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (resourceBuilder_ == null) {
result.resource_ = resource_;
} else {
result.resource_ = resourceBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
if (containerResourceBuilder_ == null) {
result.containerResource_ = containerResource_;
} else {
result.containerResource_ = containerResourceBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020;
}
if (externalBuilder_ == null) {
result.external_ = external_;
} else {
result.external_ = externalBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.MetricStatus) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.MetricStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.kubernetes.client.proto.V1Autoscaling.MetricStatus other) {
if (other == io.kubernetes.client.proto.V1Autoscaling.MetricStatus.getDefaultInstance())
return this;
if (other.hasType()) {
bitField0_ |= 0x00000001;
type_ = other.type_;
onChanged();
}
if (other.hasObject()) {
mergeObject(other.getObject());
}
if (other.hasPods()) {
mergePods(other.getPods());
}
if (other.hasResource()) {
mergeResource(other.getResource());
}
if (other.hasContainerResource()) {
mergeContainerResource(other.getContainerResource());
}
if (other.hasExternal()) {
mergeExternal(other.getExternal());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.MetricStatus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.MetricStatus) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object type_ = "";
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public Builder setType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
*
*
*
* type is the type of metric source. It will be one of "ContainerResource",
* "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
* Note: "ContainerResource" type is available on when the feature-gate
* HPAContainerMetrics is enabled
*
*
* optional string type = 1;
*/
public Builder setTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
private io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus object_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatusOrBuilder>
objectBuilder_;
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public boolean hasObject() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus getObject() {
if (objectBuilder_ == null) {
return object_ == null
? io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.getDefaultInstance()
: object_;
} else {
return objectBuilder_.getMessage();
}
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public Builder setObject(io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus value) {
if (objectBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
object_ = value;
onChanged();
} else {
objectBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public Builder setObject(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.Builder builderForValue) {
if (objectBuilder_ == null) {
object_ = builderForValue.build();
onChanged();
} else {
objectBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public Builder mergeObject(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus value) {
if (objectBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)
&& object_ != null
&& object_
!= io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus
.getDefaultInstance()) {
object_ =
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.newBuilder(object_)
.mergeFrom(value)
.buildPartial();
} else {
object_ = value;
}
onChanged();
} else {
objectBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public Builder clearObject() {
if (objectBuilder_ == null) {
object_ = null;
onChanged();
} else {
objectBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.Builder
getObjectBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getObjectFieldBuilder().getBuilder();
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatusOrBuilder
getObjectOrBuilder() {
if (objectBuilder_ != null) {
return objectBuilder_.getMessageOrBuilder();
} else {
return object_ == null
? io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.getDefaultInstance()
: object_;
}
}
/**
*
*
*
* object refers to a metric describing a single kubernetes object
* (for example, hits-per-second on an Ingress object).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ObjectMetricStatus object = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatusOrBuilder>
getObjectFieldBuilder() {
if (objectBuilder_ == null) {
objectBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatusOrBuilder>(
getObject(), getParentForChildren(), isClean());
object_ = null;
}
return objectBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus pods_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatusOrBuilder>
podsBuilder_;
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public boolean hasPods() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus getPods() {
if (podsBuilder_ == null) {
return pods_ == null
? io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.getDefaultInstance()
: pods_;
} else {
return podsBuilder_.getMessage();
}
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public Builder setPods(io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus value) {
if (podsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
pods_ = value;
onChanged();
} else {
podsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public Builder setPods(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.Builder builderForValue) {
if (podsBuilder_ == null) {
pods_ = builderForValue.build();
onChanged();
} else {
podsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public Builder mergePods(io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus value) {
if (podsBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& pods_ != null
&& pods_
!= io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus
.getDefaultInstance()) {
pods_ =
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.newBuilder(pods_)
.mergeFrom(value)
.buildPartial();
} else {
pods_ = value;
}
onChanged();
} else {
podsBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public Builder clearPods() {
if (podsBuilder_ == null) {
pods_ = null;
onChanged();
} else {
podsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.Builder getPodsBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getPodsFieldBuilder().getBuilder();
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatusOrBuilder getPodsOrBuilder() {
if (podsBuilder_ != null) {
return podsBuilder_.getMessageOrBuilder();
} else {
return pods_ == null
? io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.getDefaultInstance()
: pods_;
}
}
/**
*
*
*
* pods refers to a metric describing each pod in the current scale target
* (for example, transactions-processed-per-second). The values will be
* averaged together before being compared to the target value.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.PodsMetricStatus pods = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatusOrBuilder>
getPodsFieldBuilder() {
if (podsBuilder_ == null) {
podsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatusOrBuilder>(
getPods(), getParentForChildren(), isClean());
pods_ = null;
}
return podsBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus resource_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatusOrBuilder>
resourceBuilder_;
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public boolean hasResource() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus getResource() {
if (resourceBuilder_ == null) {
return resource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.getDefaultInstance()
: resource_;
} else {
return resourceBuilder_.getMessage();
}
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public Builder setResource(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus value) {
if (resourceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
resource_ = value;
onChanged();
} else {
resourceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public Builder setResource(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.Builder builderForValue) {
if (resourceBuilder_ == null) {
resource_ = builderForValue.build();
onChanged();
} else {
resourceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public Builder mergeResource(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus value) {
if (resourceBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)
&& resource_ != null
&& resource_
!= io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus
.getDefaultInstance()) {
resource_ =
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.newBuilder(resource_)
.mergeFrom(value)
.buildPartial();
} else {
resource_ = value;
}
onChanged();
} else {
resourceBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public Builder clearResource() {
if (resourceBuilder_ == null) {
resource_ = null;
onChanged();
} else {
resourceBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.Builder
getResourceBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getResourceFieldBuilder().getBuilder();
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatusOrBuilder
getResourceOrBuilder() {
if (resourceBuilder_ != null) {
return resourceBuilder_.getMessageOrBuilder();
} else {
return resource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.getDefaultInstance()
: resource_;
}
}
/**
*
*
*
* resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ResourceMetricStatus resource = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatusOrBuilder>
getResourceFieldBuilder() {
if (resourceBuilder_ == null) {
resourceBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatusOrBuilder>(
getResource(), getParentForChildren(), isClean());
resource_ = null;
}
return resourceBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
containerResource_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatusOrBuilder>
containerResourceBuilder_;
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public boolean hasContainerResource() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
getContainerResource() {
if (containerResourceBuilder_ == null) {
return containerResource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
.getDefaultInstance()
: containerResource_;
} else {
return containerResourceBuilder_.getMessage();
}
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public Builder setContainerResource(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus value) {
if (containerResourceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
containerResource_ = value;
onChanged();
} else {
containerResourceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public Builder setContainerResource(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.Builder
builderForValue) {
if (containerResourceBuilder_ == null) {
containerResource_ = builderForValue.build();
onChanged();
} else {
containerResourceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public Builder mergeContainerResource(
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus value) {
if (containerResourceBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)
&& containerResource_ != null
&& containerResource_
!= io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
.getDefaultInstance()) {
containerResource_ =
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.newBuilder(
containerResource_)
.mergeFrom(value)
.buildPartial();
} else {
containerResource_ = value;
}
onChanged();
} else {
containerResourceBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public Builder clearContainerResource() {
if (containerResourceBuilder_ == null) {
containerResource_ = null;
onChanged();
} else {
containerResourceBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.Builder
getContainerResourceBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getContainerResourceFieldBuilder().getBuilder();
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
public io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatusOrBuilder
getContainerResourceOrBuilder() {
if (containerResourceBuilder_ != null) {
return containerResourceBuilder_.getMessageOrBuilder();
} else {
return containerResource_ == null
? io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus
.getDefaultInstance()
: containerResource_;
}
}
/**
*
*
*
* container resource refers to a resource metric (such as those specified in
* requests and limits) known to Kubernetes describing a single container in each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available
* to normal per-pod metrics using the "pods" source.
* +optional
*
*
*
* optional .k8s.io.api.autoscaling.v1.ContainerResourceMetricStatus containerResource = 7;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatusOrBuilder>
getContainerResourceFieldBuilder() {
if (containerResourceBuilder_ == null) {
containerResourceBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ContainerResourceMetricStatusOrBuilder>(
getContainerResource(), getParentForChildren(), isClean());
containerResource_ = null;
}
return containerResourceBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus external_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatusOrBuilder>
externalBuilder_;
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public boolean hasExternal() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus getExternal() {
if (externalBuilder_ == null) {
return external_ == null
? io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.getDefaultInstance()
: external_;
} else {
return externalBuilder_.getMessage();
}
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public Builder setExternal(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus value) {
if (externalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
external_ = value;
onChanged();
} else {
externalBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public Builder setExternal(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.Builder builderForValue) {
if (externalBuilder_ == null) {
external_ = builderForValue.build();
onChanged();
} else {
externalBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public Builder mergeExternal(
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus value) {
if (externalBuilder_ == null) {
if (((bitField0_ & 0x00000020) == 0x00000020)
&& external_ != null
&& external_
!= io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus
.getDefaultInstance()) {
external_ =
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.newBuilder(external_)
.mergeFrom(value)
.buildPartial();
} else {
external_ = value;
}
onChanged();
} else {
externalBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public Builder clearExternal() {
if (externalBuilder_ == null) {
external_ = null;
onChanged();
} else {
externalBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.Builder
getExternalBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getExternalFieldBuilder().getBuilder();
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
public io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatusOrBuilder
getExternalOrBuilder() {
if (externalBuilder_ != null) {
return externalBuilder_.getMessageOrBuilder();
} else {
return external_ == null
? io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.getDefaultInstance()
: external_;
}
}
/**
*
*
*
* external refers to a global metric that is not associated
* with any Kubernetes object. It allows autoscaling based on information
* coming from components running outside of cluster
* (for example length of queue in cloud messaging service, or
* QPS from loadbalancer running outside of cluster).
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ExternalMetricStatus external = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatusOrBuilder>
getExternalFieldBuilder() {
if (externalBuilder_ == null) {
externalBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ExternalMetricStatusOrBuilder>(
getExternal(), getParentForChildren(), isClean());
external_ = null;
}
return externalBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.MetricStatus)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.MetricStatus)
private static final io.kubernetes.client.proto.V1Autoscaling.MetricStatus DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.MetricStatus();
}
public static io.kubernetes.client.proto.V1Autoscaling.MetricStatus getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MetricStatus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MetricStatus(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.MetricStatus getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ObjectMetricSourceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ObjectMetricSource)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
boolean hasTarget();
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference getTarget();
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder
getTargetOrBuilder();
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
boolean hasMetricName();
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
java.lang.String getMetricName();
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
com.google.protobuf.ByteString getMetricNameBytes();
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
boolean hasTargetValue();
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
io.kubernetes.client.proto.Resource.Quantity getTargetValue();
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetValueOrBuilder();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
boolean hasSelector();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
io.kubernetes.client.proto.Meta.LabelSelector getSelector();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder();
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
boolean hasAverageValue();
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
io.kubernetes.client.proto.Resource.Quantity getAverageValue();
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getAverageValueOrBuilder();
}
/**
*
*
*
* ObjectMetricSource indicates how to scale on a metric describing a
* kubernetes object (for example, hits-per-second on an Ingress object).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ObjectMetricSource}
*/
public static final class ObjectMetricSource extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ObjectMetricSource)
ObjectMetricSourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use ObjectMetricSource.newBuilder() to construct.
private ObjectMetricSource(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ObjectMetricSource() {
metricName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ObjectMetricSource(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder
subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = target_.toBuilder();
}
target_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(target_);
target_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 18:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
metricName_ = bs;
break;
}
case 26:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = targetValue_.toBuilder();
}
targetValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(targetValue_);
targetValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34:
{
io.kubernetes.client.proto.Meta.LabelSelector.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = selector_.toBuilder();
}
selector_ =
input.readMessage(
io.kubernetes.client.proto.Meta.LabelSelector.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(selector_);
selector_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 42:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
subBuilder = averageValue_.toBuilder();
}
averageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(averageValue_);
averageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.Builder.class);
}
private int bitField0_;
public static final int TARGET_FIELD_NUMBER = 1;
private io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference target_;
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public boolean hasTarget() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference getTarget() {
return target_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: target_;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder
getTargetOrBuilder() {
return target_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: target_;
}
public static final int METRICNAME_FIELD_NUMBER = 2;
private volatile java.lang.Object metricName_;
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
}
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TARGETVALUE_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Resource.Quantity targetValue_;
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public boolean hasTargetValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetValue() {
return targetValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetValue_;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetValueOrBuilder() {
return targetValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetValue_;
}
public static final int SELECTOR_FIELD_NUMBER = 4;
private io.kubernetes.client.proto.Meta.LabelSelector selector_;
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getSelector() {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder() {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
public static final int AVERAGEVALUE_FIELD_NUMBER = 5;
private io.kubernetes.client.proto.Resource.Quantity averageValue_;
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public boolean hasAverageValue() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.Quantity getAverageValue() {
return averageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: averageValue_;
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getAverageValueOrBuilder() {
return averageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: averageValue_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, getTarget());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metricName_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getTargetValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, getSelector());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(5, getAverageValue());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTarget());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metricName_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSelector());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAverageValue());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource other =
(io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource) obj;
boolean result = true;
result = result && (hasTarget() == other.hasTarget());
if (hasTarget()) {
result = result && getTarget().equals(other.getTarget());
}
result = result && (hasMetricName() == other.hasMetricName());
if (hasMetricName()) {
result = result && getMetricName().equals(other.getMetricName());
}
result = result && (hasTargetValue() == other.hasTargetValue());
if (hasTargetValue()) {
result = result && getTargetValue().equals(other.getTargetValue());
}
result = result && (hasSelector() == other.hasSelector());
if (hasSelector()) {
result = result && getSelector().equals(other.getSelector());
}
result = result && (hasAverageValue() == other.hasAverageValue());
if (hasAverageValue()) {
result = result && getAverageValue().equals(other.getAverageValue());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTarget()) {
hash = (37 * hash) + TARGET_FIELD_NUMBER;
hash = (53 * hash) + getTarget().hashCode();
}
if (hasMetricName()) {
hash = (37 * hash) + METRICNAME_FIELD_NUMBER;
hash = (53 * hash) + getMetricName().hashCode();
}
if (hasTargetValue()) {
hash = (37 * hash) + TARGETVALUE_FIELD_NUMBER;
hash = (53 * hash) + getTargetValue().hashCode();
}
if (hasSelector()) {
hash = (37 * hash) + SELECTOR_FIELD_NUMBER;
hash = (53 * hash) + getSelector().hashCode();
}
if (hasAverageValue()) {
hash = (37 * hash) + AVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getAverageValue().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ObjectMetricSource indicates how to scale on a metric describing a
* kubernetes object (for example, hits-per-second on an Ingress object).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ObjectMetricSource}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ObjectMetricSource)
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getTargetFieldBuilder();
getTargetValueFieldBuilder();
getSelectorFieldBuilder();
getAverageValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (targetBuilder_ == null) {
target_ = null;
} else {
targetBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
metricName_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
if (targetValueBuilder_ == null) {
targetValue_ = null;
} else {
targetValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (selectorBuilder_ == null) {
selector_ = null;
} else {
selectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (averageValueBuilder_ == null) {
averageValue_ = null;
} else {
averageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource build() {
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource result =
new io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (targetBuilder_ == null) {
result.target_ = target_;
} else {
result.target_ = targetBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.metricName_ = metricName_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (targetValueBuilder_ == null) {
result.targetValue_ = targetValue_;
} else {
result.targetValue_ = targetValueBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (selectorBuilder_ == null) {
result.selector_ = selector_;
} else {
result.selector_ = selectorBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
if (averageValueBuilder_ == null) {
result.averageValue_ = averageValue_;
} else {
result.averageValue_ = averageValueBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource.getDefaultInstance())
return this;
if (other.hasTarget()) {
mergeTarget(other.getTarget());
}
if (other.hasMetricName()) {
bitField0_ |= 0x00000002;
metricName_ = other.metricName_;
onChanged();
}
if (other.hasTargetValue()) {
mergeTargetValue(other.getTargetValue());
}
if (other.hasSelector()) {
mergeSelector(other.getSelector());
}
if (other.hasAverageValue()) {
mergeAverageValue(other.getAverageValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference target_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder>
targetBuilder_;
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public boolean hasTarget() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference getTarget() {
if (targetBuilder_ == null) {
return target_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: target_;
} else {
return targetBuilder_.getMessage();
}
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public Builder setTarget(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference value) {
if (targetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
target_ = value;
onChanged();
} else {
targetBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public Builder setTarget(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder
builderForValue) {
if (targetBuilder_ == null) {
target_ = builderForValue.build();
onChanged();
} else {
targetBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public Builder mergeTarget(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference value) {
if (targetBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)
&& target_ != null
&& target_
!= io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()) {
target_ =
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.newBuilder(
target_)
.mergeFrom(value)
.buildPartial();
} else {
target_ = value;
}
onChanged();
} else {
targetBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public Builder clearTarget() {
if (targetBuilder_ == null) {
target_ = null;
onChanged();
} else {
targetBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder
getTargetBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTargetFieldBuilder().getBuilder();
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder
getTargetOrBuilder() {
if (targetBuilder_ != null) {
return targetBuilder_.getMessageOrBuilder();
} else {
return target_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: target_;
}
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder>
getTargetFieldBuilder() {
if (targetBuilder_ == null) {
targetBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder>(
getTarget(), getParentForChildren(), isClean());
target_ = null;
}
return targetBuilder_;
}
private java.lang.Object metricName_ = "";
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public Builder setMetricName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
metricName_ = value;
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public Builder clearMetricName() {
bitField0_ = (bitField0_ & ~0x00000002);
metricName_ = getDefaultInstance().getMetricName();
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public Builder setMetricNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
metricName_ = value;
onChanged();
return this;
}
private io.kubernetes.client.proto.Resource.Quantity targetValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
targetValueBuilder_;
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public boolean hasTargetValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetValue() {
if (targetValueBuilder_ == null) {
return targetValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetValue_;
} else {
return targetValueBuilder_.getMessage();
}
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public Builder setTargetValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
targetValue_ = value;
onChanged();
} else {
targetValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public Builder setTargetValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (targetValueBuilder_ == null) {
targetValue_ = builderForValue.build();
onChanged();
} else {
targetValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public Builder mergeTargetValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetValueBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& targetValue_ != null
&& targetValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
targetValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(targetValue_)
.mergeFrom(value)
.buildPartial();
} else {
targetValue_ = value;
}
onChanged();
} else {
targetValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public Builder clearTargetValue() {
if (targetValueBuilder_ == null) {
targetValue_ = null;
onChanged();
} else {
targetValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getTargetValueBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTargetValueFieldBuilder().getBuilder();
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetValueOrBuilder() {
if (targetValueBuilder_ != null) {
return targetValueBuilder_.getMessageOrBuilder();
} else {
return targetValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetValue_;
}
}
/**
*
*
*
* targetValue is the target value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getTargetValueFieldBuilder() {
if (targetValueBuilder_ == null) {
targetValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getTargetValue(), getParentForChildren(), isClean());
targetValue_ = null;
}
return targetValueBuilder_;
}
private io.kubernetes.client.proto.Meta.LabelSelector selector_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
selectorBuilder_;
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getSelector() {
if (selectorBuilder_ == null) {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
} else {
return selectorBuilder_.getMessage();
}
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public Builder setSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (selectorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
selector_ = value;
onChanged();
} else {
selectorBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public Builder setSelector(
io.kubernetes.client.proto.Meta.LabelSelector.Builder builderForValue) {
if (selectorBuilder_ == null) {
selector_ = builderForValue.build();
onChanged();
} else {
selectorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public Builder mergeSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (selectorBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)
&& selector_ != null
&& selector_ != io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()) {
selector_ =
io.kubernetes.client.proto.Meta.LabelSelector.newBuilder(selector_)
.mergeFrom(value)
.buildPartial();
} else {
selector_ = value;
}
onChanged();
} else {
selectorBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public Builder clearSelector() {
if (selectorBuilder_ == null) {
selector_ = null;
onChanged();
} else {
selectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelector.Builder getSelectorBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getSelectorFieldBuilder().getBuilder();
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder() {
if (selectorBuilder_ != null) {
return selectorBuilder_.getMessageOrBuilder();
} else {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric.
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
getSelectorFieldBuilder() {
if (selectorBuilder_ == null) {
selectorBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>(
getSelector(), getParentForChildren(), isClean());
selector_ = null;
}
return selectorBuilder_;
}
private io.kubernetes.client.proto.Resource.Quantity averageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
averageValueBuilder_;
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public boolean hasAverageValue() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.Quantity getAverageValue() {
if (averageValueBuilder_ == null) {
return averageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: averageValue_;
} else {
return averageValueBuilder_.getMessage();
}
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public Builder setAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (averageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
averageValue_ = value;
onChanged();
} else {
averageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public Builder setAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (averageValueBuilder_ == null) {
averageValue_ = builderForValue.build();
onChanged();
} else {
averageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public Builder mergeAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (averageValueBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)
&& averageValue_ != null
&& averageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
averageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(averageValue_)
.mergeFrom(value)
.buildPartial();
} else {
averageValue_ = value;
}
onChanged();
} else {
averageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public Builder clearAverageValue() {
if (averageValueBuilder_ == null) {
averageValue_ = null;
onChanged();
} else {
averageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getAverageValueBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getAverageValueOrBuilder() {
if (averageValueBuilder_ != null) {
return averageValueBuilder_.getMessageOrBuilder();
} else {
return averageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: averageValue_;
}
}
/**
*
*
*
* averageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getAverageValueFieldBuilder() {
if (averageValueBuilder_ == null) {
averageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getAverageValue(), getParentForChildren(), isClean());
averageValue_ = null;
}
return averageValueBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ObjectMetricSource)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ObjectMetricSource)
private static final io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource();
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ObjectMetricSource parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ObjectMetricSource(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricSource getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ObjectMetricStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ObjectMetricStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
boolean hasTarget();
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference getTarget();
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder
getTargetOrBuilder();
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
boolean hasMetricName();
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
java.lang.String getMetricName();
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
com.google.protobuf.ByteString getMetricNameBytes();
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
boolean hasCurrentValue();
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
io.kubernetes.client.proto.Resource.Quantity getCurrentValue();
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentValueOrBuilder();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
boolean hasSelector();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
io.kubernetes.client.proto.Meta.LabelSelector getSelector();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder();
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
boolean hasAverageValue();
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
io.kubernetes.client.proto.Resource.Quantity getAverageValue();
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getAverageValueOrBuilder();
}
/**
*
*
*
* ObjectMetricStatus indicates the current value of a metric describing a
* kubernetes object (for example, hits-per-second on an Ingress object).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ObjectMetricStatus}
*/
public static final class ObjectMetricStatus extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ObjectMetricStatus)
ObjectMetricStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use ObjectMetricStatus.newBuilder() to construct.
private ObjectMetricStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ObjectMetricStatus() {
metricName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ObjectMetricStatus(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder
subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = target_.toBuilder();
}
target_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(target_);
target_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 18:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
metricName_ = bs;
break;
}
case 26:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = currentValue_.toBuilder();
}
currentValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(currentValue_);
currentValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34:
{
io.kubernetes.client.proto.Meta.LabelSelector.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = selector_.toBuilder();
}
selector_ =
input.readMessage(
io.kubernetes.client.proto.Meta.LabelSelector.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(selector_);
selector_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 42:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
subBuilder = averageValue_.toBuilder();
}
averageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(averageValue_);
averageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.Builder.class);
}
private int bitField0_;
public static final int TARGET_FIELD_NUMBER = 1;
private io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference target_;
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public boolean hasTarget() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference getTarget() {
return target_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: target_;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder
getTargetOrBuilder() {
return target_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: target_;
}
public static final int METRICNAME_FIELD_NUMBER = 2;
private volatile java.lang.Object metricName_;
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
}
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CURRENTVALUE_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Resource.Quantity currentValue_;
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public boolean hasCurrentValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentValue() {
return currentValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentValue_;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentValueOrBuilder() {
return currentValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentValue_;
}
public static final int SELECTOR_FIELD_NUMBER = 4;
private io.kubernetes.client.proto.Meta.LabelSelector selector_;
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getSelector() {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder() {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
public static final int AVERAGEVALUE_FIELD_NUMBER = 5;
private io.kubernetes.client.proto.Resource.Quantity averageValue_;
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public boolean hasAverageValue() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.Quantity getAverageValue() {
return averageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: averageValue_;
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getAverageValueOrBuilder() {
return averageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: averageValue_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, getTarget());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metricName_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getCurrentValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, getSelector());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(5, getAverageValue());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTarget());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metricName_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCurrentValue());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSelector());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAverageValue());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus other =
(io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus) obj;
boolean result = true;
result = result && (hasTarget() == other.hasTarget());
if (hasTarget()) {
result = result && getTarget().equals(other.getTarget());
}
result = result && (hasMetricName() == other.hasMetricName());
if (hasMetricName()) {
result = result && getMetricName().equals(other.getMetricName());
}
result = result && (hasCurrentValue() == other.hasCurrentValue());
if (hasCurrentValue()) {
result = result && getCurrentValue().equals(other.getCurrentValue());
}
result = result && (hasSelector() == other.hasSelector());
if (hasSelector()) {
result = result && getSelector().equals(other.getSelector());
}
result = result && (hasAverageValue() == other.hasAverageValue());
if (hasAverageValue()) {
result = result && getAverageValue().equals(other.getAverageValue());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTarget()) {
hash = (37 * hash) + TARGET_FIELD_NUMBER;
hash = (53 * hash) + getTarget().hashCode();
}
if (hasMetricName()) {
hash = (37 * hash) + METRICNAME_FIELD_NUMBER;
hash = (53 * hash) + getMetricName().hashCode();
}
if (hasCurrentValue()) {
hash = (37 * hash) + CURRENTVALUE_FIELD_NUMBER;
hash = (53 * hash) + getCurrentValue().hashCode();
}
if (hasSelector()) {
hash = (37 * hash) + SELECTOR_FIELD_NUMBER;
hash = (53 * hash) + getSelector().hashCode();
}
if (hasAverageValue()) {
hash = (37 * hash) + AVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getAverageValue().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ObjectMetricStatus indicates the current value of a metric describing a
* kubernetes object (for example, hits-per-second on an Ingress object).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ObjectMetricStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ObjectMetricStatus)
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getTargetFieldBuilder();
getCurrentValueFieldBuilder();
getSelectorFieldBuilder();
getAverageValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (targetBuilder_ == null) {
target_ = null;
} else {
targetBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
metricName_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
if (currentValueBuilder_ == null) {
currentValue_ = null;
} else {
currentValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (selectorBuilder_ == null) {
selector_ = null;
} else {
selectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (averageValueBuilder_ == null) {
averageValue_ = null;
} else {
averageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus build() {
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus result =
new io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (targetBuilder_ == null) {
result.target_ = target_;
} else {
result.target_ = targetBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.metricName_ = metricName_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (currentValueBuilder_ == null) {
result.currentValue_ = currentValue_;
} else {
result.currentValue_ = currentValueBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (selectorBuilder_ == null) {
result.selector_ = selector_;
} else {
result.selector_ = selectorBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
if (averageValueBuilder_ == null) {
result.averageValue_ = averageValue_;
} else {
result.averageValue_ = averageValueBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus.getDefaultInstance())
return this;
if (other.hasTarget()) {
mergeTarget(other.getTarget());
}
if (other.hasMetricName()) {
bitField0_ |= 0x00000002;
metricName_ = other.metricName_;
onChanged();
}
if (other.hasCurrentValue()) {
mergeCurrentValue(other.getCurrentValue());
}
if (other.hasSelector()) {
mergeSelector(other.getSelector());
}
if (other.hasAverageValue()) {
mergeAverageValue(other.getAverageValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference target_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder>
targetBuilder_;
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public boolean hasTarget() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference getTarget() {
if (targetBuilder_ == null) {
return target_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: target_;
} else {
return targetBuilder_.getMessage();
}
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public Builder setTarget(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference value) {
if (targetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
target_ = value;
onChanged();
} else {
targetBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public Builder setTarget(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder
builderForValue) {
if (targetBuilder_ == null) {
target_ = builderForValue.build();
onChanged();
} else {
targetBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public Builder mergeTarget(
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference value) {
if (targetBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)
&& target_ != null
&& target_
!= io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()) {
target_ =
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.newBuilder(
target_)
.mergeFrom(value)
.buildPartial();
} else {
target_ = value;
}
onChanged();
} else {
targetBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public Builder clearTarget() {
if (targetBuilder_ == null) {
target_ = null;
onChanged();
} else {
targetBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder
getTargetBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTargetFieldBuilder().getBuilder();
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
public io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder
getTargetOrBuilder() {
if (targetBuilder_ != null) {
return targetBuilder_.getMessageOrBuilder();
} else {
return target_ == null
? io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference
.getDefaultInstance()
: target_;
}
}
/**
*
*
*
* target is the described Kubernetes object.
*
*
* optional .k8s.io.api.autoscaling.v1.CrossVersionObjectReference target = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder>
getTargetFieldBuilder() {
if (targetBuilder_ == null) {
targetBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReference.Builder,
io.kubernetes.client.proto.V1Autoscaling.CrossVersionObjectReferenceOrBuilder>(
getTarget(), getParentForChildren(), isClean());
target_ = null;
}
return targetBuilder_;
}
private java.lang.Object metricName_ = "";
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public Builder setMetricName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
metricName_ = value;
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public Builder clearMetricName() {
bitField0_ = (bitField0_ & ~0x00000002);
metricName_ = getDefaultInstance().getMetricName();
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question.
*
*
* optional string metricName = 2;
*/
public Builder setMetricNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
metricName_ = value;
onChanged();
return this;
}
private io.kubernetes.client.proto.Resource.Quantity currentValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
currentValueBuilder_;
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public boolean hasCurrentValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentValue() {
if (currentValueBuilder_ == null) {
return currentValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentValue_;
} else {
return currentValueBuilder_.getMessage();
}
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public Builder setCurrentValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
currentValue_ = value;
onChanged();
} else {
currentValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public Builder setCurrentValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (currentValueBuilder_ == null) {
currentValue_ = builderForValue.build();
onChanged();
} else {
currentValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public Builder mergeCurrentValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentValueBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& currentValue_ != null
&& currentValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
currentValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(currentValue_)
.mergeFrom(value)
.buildPartial();
} else {
currentValue_ = value;
}
onChanged();
} else {
currentValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public Builder clearCurrentValue() {
if (currentValueBuilder_ == null) {
currentValue_ = null;
onChanged();
} else {
currentValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getCurrentValueBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getCurrentValueFieldBuilder().getBuilder();
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentValueOrBuilder() {
if (currentValueBuilder_ != null) {
return currentValueBuilder_.getMessageOrBuilder();
} else {
return currentValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentValue_;
}
}
/**
*
*
*
* currentValue is the current value of the metric (as a quantity).
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getCurrentValueFieldBuilder() {
if (currentValueBuilder_ == null) {
currentValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getCurrentValue(), getParentForChildren(), isClean());
currentValue_ = null;
}
return currentValueBuilder_;
}
private io.kubernetes.client.proto.Meta.LabelSelector selector_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
selectorBuilder_;
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getSelector() {
if (selectorBuilder_ == null) {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
} else {
return selectorBuilder_.getMessage();
}
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public Builder setSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (selectorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
selector_ = value;
onChanged();
} else {
selectorBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public Builder setSelector(
io.kubernetes.client.proto.Meta.LabelSelector.Builder builderForValue) {
if (selectorBuilder_ == null) {
selector_ = builderForValue.build();
onChanged();
} else {
selectorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public Builder mergeSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (selectorBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)
&& selector_ != null
&& selector_ != io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()) {
selector_ =
io.kubernetes.client.proto.Meta.LabelSelector.newBuilder(selector_)
.mergeFrom(value)
.buildPartial();
} else {
selector_ = value;
}
onChanged();
} else {
selectorBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public Builder clearSelector() {
if (selectorBuilder_ == null) {
selector_ = null;
onChanged();
} else {
selectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelector.Builder getSelectorBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getSelectorFieldBuilder().getBuilder();
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder() {
if (selectorBuilder_ != null) {
return selectorBuilder_.getMessageOrBuilder();
} else {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
getSelectorFieldBuilder() {
if (selectorBuilder_ == null) {
selectorBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>(
getSelector(), getParentForChildren(), isClean());
selector_ = null;
}
return selectorBuilder_;
}
private io.kubernetes.client.proto.Resource.Quantity averageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
averageValueBuilder_;
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public boolean hasAverageValue() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.Quantity getAverageValue() {
if (averageValueBuilder_ == null) {
return averageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: averageValue_;
} else {
return averageValueBuilder_.getMessage();
}
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public Builder setAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (averageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
averageValue_ = value;
onChanged();
} else {
averageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public Builder setAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (averageValueBuilder_ == null) {
averageValue_ = builderForValue.build();
onChanged();
} else {
averageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public Builder mergeAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (averageValueBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)
&& averageValue_ != null
&& averageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
averageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(averageValue_)
.mergeFrom(value)
.buildPartial();
} else {
averageValue_ = value;
}
onChanged();
} else {
averageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public Builder clearAverageValue() {
if (averageValueBuilder_ == null) {
averageValue_ = null;
onChanged();
} else {
averageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getAverageValueBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getAverageValueOrBuilder() {
if (averageValueBuilder_ != null) {
return averageValueBuilder_.getMessageOrBuilder();
} else {
return averageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: averageValue_;
}
}
/**
*
*
*
* averageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getAverageValueFieldBuilder() {
if (averageValueBuilder_ == null) {
averageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getAverageValue(), getParentForChildren(), isClean());
averageValue_ = null;
}
return averageValueBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ObjectMetricStatus)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ObjectMetricStatus)
private static final io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus();
}
public static io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ObjectMetricStatus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ObjectMetricStatus(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ObjectMetricStatus getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PodsMetricSourceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.PodsMetricSource)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
boolean hasMetricName();
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
java.lang.String getMetricName();
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
com.google.protobuf.ByteString getMetricNameBytes();
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*/
boolean hasTargetAverageValue();
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*/
io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue();
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetAverageValueOrBuilder();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
boolean hasSelector();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
io.kubernetes.client.proto.Meta.LabelSelector getSelector();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder();
}
/**
*
*
*
* PodsMetricSource indicates how to scale on a metric describing each pod in
* the current scale target (for example, transactions-processed-per-second).
* The values will be averaged together before being compared to the target
* value.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.PodsMetricSource}
*/
public static final class PodsMetricSource extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.PodsMetricSource)
PodsMetricSourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use PodsMetricSource.newBuilder() to construct.
private PodsMetricSource(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PodsMetricSource() {
metricName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private PodsMetricSource(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
metricName_ = bs;
break;
}
case 18:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = targetAverageValue_.toBuilder();
}
targetAverageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(targetAverageValue_);
targetAverageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 26:
{
io.kubernetes.client.proto.Meta.LabelSelector.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = selector_.toBuilder();
}
selector_ =
input.readMessage(
io.kubernetes.client.proto.Meta.LabelSelector.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(selector_);
selector_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.Builder.class);
}
private int bitField0_;
public static final int METRICNAME_FIELD_NUMBER = 1;
private volatile java.lang.Object metricName_;
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
}
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TARGETAVERAGEVALUE_FIELD_NUMBER = 2;
private io.kubernetes.client.proto.Resource.Quantity targetAverageValue_;
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*/
public boolean hasTargetAverageValue() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue() {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetAverageValueOrBuilder() {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
public static final int SELECTOR_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Meta.LabelSelector selector_;
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getSelector() {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder() {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, getTargetAverageValue());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getSelector());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTargetAverageValue());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSelector());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource other =
(io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource) obj;
boolean result = true;
result = result && (hasMetricName() == other.hasMetricName());
if (hasMetricName()) {
result = result && getMetricName().equals(other.getMetricName());
}
result = result && (hasTargetAverageValue() == other.hasTargetAverageValue());
if (hasTargetAverageValue()) {
result = result && getTargetAverageValue().equals(other.getTargetAverageValue());
}
result = result && (hasSelector() == other.hasSelector());
if (hasSelector()) {
result = result && getSelector().equals(other.getSelector());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMetricName()) {
hash = (37 * hash) + METRICNAME_FIELD_NUMBER;
hash = (53 * hash) + getMetricName().hashCode();
}
if (hasTargetAverageValue()) {
hash = (37 * hash) + TARGETAVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getTargetAverageValue().hashCode();
}
if (hasSelector()) {
hash = (37 * hash) + SELECTOR_FIELD_NUMBER;
hash = (53 * hash) + getSelector().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* PodsMetricSource indicates how to scale on a metric describing each pod in
* the current scale target (for example, transactions-processed-per-second).
* The values will be averaged together before being compared to the target
* value.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.PodsMetricSource}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.PodsMetricSource)
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getTargetAverageValueFieldBuilder();
getSelectorFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
metricName_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = null;
} else {
targetAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (selectorBuilder_ == null) {
selector_ = null;
} else {
selectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource build() {
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource result =
new io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.metricName_ = metricName_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (targetAverageValueBuilder_ == null) {
result.targetAverageValue_ = targetAverageValue_;
} else {
result.targetAverageValue_ = targetAverageValueBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (selectorBuilder_ == null) {
result.selector_ = selector_;
} else {
result.selector_ = selectorBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource other) {
if (other == io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource.getDefaultInstance())
return this;
if (other.hasMetricName()) {
bitField0_ |= 0x00000001;
metricName_ = other.metricName_;
onChanged();
}
if (other.hasTargetAverageValue()) {
mergeTargetAverageValue(other.getTargetAverageValue());
}
if (other.hasSelector()) {
mergeSelector(other.getSelector());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object metricName_ = "";
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public Builder setMetricName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
metricName_ = value;
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public Builder clearMetricName() {
bitField0_ = (bitField0_ & ~0x00000001);
metricName_ = getDefaultInstance().getMetricName();
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public Builder setMetricNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
metricName_ = value;
onChanged();
return this;
}
private io.kubernetes.client.proto.Resource.Quantity targetAverageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
targetAverageValueBuilder_;
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*
*/
public boolean hasTargetAverageValue() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue() {
if (targetAverageValueBuilder_ == null) {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
} else {
return targetAverageValueBuilder_.getMessage();
}
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*
*/
public Builder setTargetAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetAverageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
targetAverageValue_ = value;
onChanged();
} else {
targetAverageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*
*/
public Builder setTargetAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = builderForValue.build();
onChanged();
} else {
targetAverageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*
*/
public Builder mergeTargetAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetAverageValueBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)
&& targetAverageValue_ != null
&& targetAverageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
targetAverageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(targetAverageValue_)
.mergeFrom(value)
.buildPartial();
} else {
targetAverageValue_ = value;
}
onChanged();
} else {
targetAverageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*
*/
public Builder clearTargetAverageValue() {
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = null;
onChanged();
} else {
targetAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getTargetAverageValueBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getTargetAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder
getTargetAverageValueOrBuilder() {
if (targetAverageValueBuilder_ != null) {
return targetAverageValueBuilder_.getMessageOrBuilder();
} else {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getTargetAverageValueFieldBuilder() {
if (targetAverageValueBuilder_ == null) {
targetAverageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getTargetAverageValue(), getParentForChildren(), isClean());
targetAverageValue_ = null;
}
return targetAverageValueBuilder_;
}
private io.kubernetes.client.proto.Meta.LabelSelector selector_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
selectorBuilder_;
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getSelector() {
if (selectorBuilder_ == null) {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
} else {
return selectorBuilder_.getMessage();
}
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public Builder setSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (selectorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
selector_ = value;
onChanged();
} else {
selectorBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public Builder setSelector(
io.kubernetes.client.proto.Meta.LabelSelector.Builder builderForValue) {
if (selectorBuilder_ == null) {
selector_ = builderForValue.build();
onChanged();
} else {
selectorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public Builder mergeSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (selectorBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& selector_ != null
&& selector_ != io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()) {
selector_ =
io.kubernetes.client.proto.Meta.LabelSelector.newBuilder(selector_)
.mergeFrom(value)
.buildPartial();
} else {
selector_ = value;
}
onChanged();
} else {
selectorBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public Builder clearSelector() {
if (selectorBuilder_ == null) {
selector_ = null;
onChanged();
} else {
selectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelector.Builder getSelectorBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getSelectorFieldBuilder().getBuilder();
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder() {
if (selectorBuilder_ != null) {
return selectorBuilder_.getMessageOrBuilder();
} else {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
getSelectorFieldBuilder() {
if (selectorBuilder_ == null) {
selectorBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>(
getSelector(), getParentForChildren(), isClean());
selector_ = null;
}
return selectorBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.PodsMetricSource)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.PodsMetricSource)
private static final io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource();
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PodsMetricSource parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PodsMetricSource(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricSource getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PodsMetricStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.PodsMetricStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
boolean hasMetricName();
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
java.lang.String getMetricName();
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
com.google.protobuf.ByteString getMetricNameBytes();
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*/
boolean hasCurrentAverageValue();
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*/
io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue();
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentAverageValueOrBuilder();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
boolean hasSelector();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
io.kubernetes.client.proto.Meta.LabelSelector getSelector();
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder();
}
/**
*
*
*
* PodsMetricStatus indicates the current value of a metric describing each pod in
* the current scale target (for example, transactions-processed-per-second).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.PodsMetricStatus}
*/
public static final class PodsMetricStatus extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.PodsMetricStatus)
PodsMetricStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use PodsMetricStatus.newBuilder() to construct.
private PodsMetricStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PodsMetricStatus() {
metricName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private PodsMetricStatus(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
metricName_ = bs;
break;
}
case 18:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = currentAverageValue_.toBuilder();
}
currentAverageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(currentAverageValue_);
currentAverageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 26:
{
io.kubernetes.client.proto.Meta.LabelSelector.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = selector_.toBuilder();
}
selector_ =
input.readMessage(
io.kubernetes.client.proto.Meta.LabelSelector.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(selector_);
selector_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.Builder.class);
}
private int bitField0_;
public static final int METRICNAME_FIELD_NUMBER = 1;
private volatile java.lang.Object metricName_;
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
}
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CURRENTAVERAGEVALUE_FIELD_NUMBER = 2;
private io.kubernetes.client.proto.Resource.Quantity currentAverageValue_;
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*/
public boolean hasCurrentAverageValue() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue() {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentAverageValueOrBuilder() {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
public static final int SELECTOR_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Meta.LabelSelector selector_;
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getSelector() {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder() {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, getCurrentAverageValue());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getSelector());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCurrentAverageValue());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSelector());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus other =
(io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus) obj;
boolean result = true;
result = result && (hasMetricName() == other.hasMetricName());
if (hasMetricName()) {
result = result && getMetricName().equals(other.getMetricName());
}
result = result && (hasCurrentAverageValue() == other.hasCurrentAverageValue());
if (hasCurrentAverageValue()) {
result = result && getCurrentAverageValue().equals(other.getCurrentAverageValue());
}
result = result && (hasSelector() == other.hasSelector());
if (hasSelector()) {
result = result && getSelector().equals(other.getSelector());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMetricName()) {
hash = (37 * hash) + METRICNAME_FIELD_NUMBER;
hash = (53 * hash) + getMetricName().hashCode();
}
if (hasCurrentAverageValue()) {
hash = (37 * hash) + CURRENTAVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getCurrentAverageValue().hashCode();
}
if (hasSelector()) {
hash = (37 * hash) + SELECTOR_FIELD_NUMBER;
hash = (53 * hash) + getSelector().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* PodsMetricStatus indicates the current value of a metric describing each pod in
* the current scale target (for example, transactions-processed-per-second).
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.PodsMetricStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.PodsMetricStatus)
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCurrentAverageValueFieldBuilder();
getSelectorFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
metricName_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = null;
} else {
currentAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (selectorBuilder_ == null) {
selector_ = null;
} else {
selectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus build() {
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus result =
new io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.metricName_ = metricName_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (currentAverageValueBuilder_ == null) {
result.currentAverageValue_ = currentAverageValue_;
} else {
result.currentAverageValue_ = currentAverageValueBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (selectorBuilder_ == null) {
result.selector_ = selector_;
} else {
result.selector_ = selectorBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus other) {
if (other == io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus.getDefaultInstance())
return this;
if (other.hasMetricName()) {
bitField0_ |= 0x00000001;
metricName_ = other.metricName_;
onChanged();
}
if (other.hasCurrentAverageValue()) {
mergeCurrentAverageValue(other.getCurrentAverageValue());
}
if (other.hasSelector()) {
mergeSelector(other.getSelector());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object metricName_ = "";
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public boolean hasMetricName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
metricName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public com.google.protobuf.ByteString getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public Builder setMetricName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
metricName_ = value;
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public Builder clearMetricName() {
bitField0_ = (bitField0_ & ~0x00000001);
metricName_ = getDefaultInstance().getMetricName();
onChanged();
return this;
}
/**
*
*
*
* metricName is the name of the metric in question
*
*
* optional string metricName = 1;
*/
public Builder setMetricNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
metricName_ = value;
onChanged();
return this;
}
private io.kubernetes.client.proto.Resource.Quantity currentAverageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
currentAverageValueBuilder_;
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*
*/
public boolean hasCurrentAverageValue() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue() {
if (currentAverageValueBuilder_ == null) {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
} else {
return currentAverageValueBuilder_.getMessage();
}
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*
*/
public Builder setCurrentAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentAverageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
currentAverageValue_ = value;
onChanged();
} else {
currentAverageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*
*/
public Builder setCurrentAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = builderForValue.build();
onChanged();
} else {
currentAverageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*
*/
public Builder mergeCurrentAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentAverageValueBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)
&& currentAverageValue_ != null
&& currentAverageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
currentAverageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(currentAverageValue_)
.mergeFrom(value)
.buildPartial();
} else {
currentAverageValue_ = value;
}
onChanged();
} else {
currentAverageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*
*/
public Builder clearCurrentAverageValue() {
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = null;
onChanged();
} else {
currentAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getCurrentAverageValueBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getCurrentAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder
getCurrentAverageValueOrBuilder() {
if (currentAverageValueBuilder_ != null) {
return currentAverageValueBuilder_.getMessageOrBuilder();
} else {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* metric across all relevant pods (as a quantity)
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getCurrentAverageValueFieldBuilder() {
if (currentAverageValueBuilder_ == null) {
currentAverageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getCurrentAverageValue(), getParentForChildren(), isClean());
currentAverageValue_ = null;
}
return currentAverageValueBuilder_;
}
private io.kubernetes.client.proto.Meta.LabelSelector selector_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
selectorBuilder_;
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelector getSelector() {
if (selectorBuilder_ == null) {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
} else {
return selectorBuilder_.getMessage();
}
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public Builder setSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (selectorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
selector_ = value;
onChanged();
} else {
selectorBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public Builder setSelector(
io.kubernetes.client.proto.Meta.LabelSelector.Builder builderForValue) {
if (selectorBuilder_ == null) {
selector_ = builderForValue.build();
onChanged();
} else {
selectorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public Builder mergeSelector(io.kubernetes.client.proto.Meta.LabelSelector value) {
if (selectorBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& selector_ != null
&& selector_ != io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()) {
selector_ =
io.kubernetes.client.proto.Meta.LabelSelector.newBuilder(selector_)
.mergeFrom(value)
.buildPartial();
} else {
selector_ = value;
}
onChanged();
} else {
selectorBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public Builder clearSelector() {
if (selectorBuilder_ == null) {
selector_ = null;
onChanged();
} else {
selectorBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelector.Builder getSelectorBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getSelectorFieldBuilder().getBuilder();
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
public io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder getSelectorOrBuilder() {
if (selectorBuilder_ != null) {
return selectorBuilder_.getMessageOrBuilder();
} else {
return selector_ == null
? io.kubernetes.client.proto.Meta.LabelSelector.getDefaultInstance()
: selector_;
}
}
/**
*
*
*
* selector is the string-encoded form of a standard kubernetes label selector for the given metric
* When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
* When unset, just the metricName will be used to gather metrics.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>
getSelectorFieldBuilder() {
if (selectorBuilder_ == null) {
selectorBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.LabelSelector,
io.kubernetes.client.proto.Meta.LabelSelector.Builder,
io.kubernetes.client.proto.Meta.LabelSelectorOrBuilder>(
getSelector(), getParentForChildren(), isClean());
selector_ = null;
}
return selectorBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.PodsMetricStatus)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.PodsMetricStatus)
private static final io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus();
}
public static io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PodsMetricStatus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PodsMetricStatus(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.PodsMetricStatus getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ResourceMetricSourceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ResourceMetricSource)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
boolean hasName();
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
java.lang.String getName();
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
boolean hasTargetAverageUtilization();
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
int getTargetAverageUtilization();
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
boolean hasTargetAverageValue();
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue();
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetAverageValueOrBuilder();
}
/**
*
*
*
* ResourceMetricSource indicates how to scale on a resource metric known to
* Kubernetes, as specified in requests and limits, describing each pod in the
* current scale target (e.g. CPU or memory). The values will be averaged
* together before being compared to the target. Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available to
* normal per-pod metrics using the "pods" source. Only one "target" type
* should be set.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ResourceMetricSource}
*/
public static final class ResourceMetricSource extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ResourceMetricSource)
ResourceMetricSourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResourceMetricSource.newBuilder() to construct.
private ResourceMetricSource(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResourceMetricSource() {
name_ = "";
targetAverageUtilization_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ResourceMetricSource(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
name_ = bs;
break;
}
case 16:
{
bitField0_ |= 0x00000002;
targetAverageUtilization_ = input.readInt32();
break;
}
case 26:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = targetAverageValue_.toBuilder();
}
targetAverageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(targetAverageValue_);
targetAverageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TARGETAVERAGEUTILIZATION_FIELD_NUMBER = 2;
private int targetAverageUtilization_;
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public boolean hasTargetAverageUtilization() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public int getTargetAverageUtilization() {
return targetAverageUtilization_;
}
public static final int TARGETAVERAGEVALUE_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Resource.Quantity targetAverageValue_;
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
public boolean hasTargetAverageValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue() {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getTargetAverageValueOrBuilder() {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, targetAverageUtilization_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getTargetAverageValue());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size +=
com.google.protobuf.CodedOutputStream.computeInt32Size(2, targetAverageUtilization_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetAverageValue());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource other =
(io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource) obj;
boolean result = true;
result = result && (hasName() == other.hasName());
if (hasName()) {
result = result && getName().equals(other.getName());
}
result = result && (hasTargetAverageUtilization() == other.hasTargetAverageUtilization());
if (hasTargetAverageUtilization()) {
result = result && (getTargetAverageUtilization() == other.getTargetAverageUtilization());
}
result = result && (hasTargetAverageValue() == other.hasTargetAverageValue());
if (hasTargetAverageValue()) {
result = result && getTargetAverageValue().equals(other.getTargetAverageValue());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasTargetAverageUtilization()) {
hash = (37 * hash) + TARGETAVERAGEUTILIZATION_FIELD_NUMBER;
hash = (53 * hash) + getTargetAverageUtilization();
}
if (hasTargetAverageValue()) {
hash = (37 * hash) + TARGETAVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getTargetAverageValue().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ResourceMetricSource indicates how to scale on a resource metric known to
* Kubernetes, as specified in requests and limits, describing each pod in the
* current scale target (e.g. CPU or memory). The values will be averaged
* together before being compared to the target. Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available to
* normal per-pod metrics using the "pods" source. Only one "target" type
* should be set.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ResourceMetricSource}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ResourceMetricSource)
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.class,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getTargetAverageValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
targetAverageUtilization_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = null;
} else {
targetAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource build() {
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource result =
new io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.targetAverageUtilization_ = targetAverageUtilization_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (targetAverageValueBuilder_ == null) {
result.targetAverageValue_ = targetAverageValue_;
} else {
result.targetAverageValue_ = targetAverageValueBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource.getDefaultInstance())
return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (other.hasTargetAverageUtilization()) {
setTargetAverageUtilization(other.getTargetAverageUtilization());
}
if (other.hasTargetAverageValue()) {
mergeTargetAverageValue(other.getTargetAverageValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
private int targetAverageUtilization_;
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public boolean hasTargetAverageUtilization() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public int getTargetAverageUtilization() {
return targetAverageUtilization_;
}
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public Builder setTargetAverageUtilization(int value) {
bitField0_ |= 0x00000002;
targetAverageUtilization_ = value;
onChanged();
return this;
}
/**
*
*
*
* targetAverageUtilization is the target value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods.
* +optional
*
*
* optional int32 targetAverageUtilization = 2;
*/
public Builder clearTargetAverageUtilization() {
bitField0_ = (bitField0_ & ~0x00000002);
targetAverageUtilization_ = 0;
onChanged();
return this;
}
private io.kubernetes.client.proto.Resource.Quantity targetAverageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
targetAverageValueBuilder_;
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public boolean hasTargetAverageValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.Quantity getTargetAverageValue() {
if (targetAverageValueBuilder_ == null) {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
} else {
return targetAverageValueBuilder_.getMessage();
}
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public Builder setTargetAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetAverageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
targetAverageValue_ = value;
onChanged();
} else {
targetAverageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public Builder setTargetAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = builderForValue.build();
onChanged();
} else {
targetAverageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public Builder mergeTargetAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (targetAverageValueBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& targetAverageValue_ != null
&& targetAverageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
targetAverageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(targetAverageValue_)
.mergeFrom(value)
.buildPartial();
} else {
targetAverageValue_ = value;
}
onChanged();
} else {
targetAverageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public Builder clearTargetAverageValue() {
if (targetAverageValueBuilder_ == null) {
targetAverageValue_ = null;
onChanged();
} else {
targetAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getTargetAverageValueBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTargetAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder
getTargetAverageValueOrBuilder() {
if (targetAverageValueBuilder_ != null) {
return targetAverageValueBuilder_.getMessageOrBuilder();
} else {
return targetAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: targetAverageValue_;
}
}
/**
*
*
*
* targetAverageValue is the target value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getTargetAverageValueFieldBuilder() {
if (targetAverageValueBuilder_ == null) {
targetAverageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getTargetAverageValue(), getParentForChildren(), isClean());
targetAverageValue_ = null;
}
return targetAverageValueBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ResourceMetricSource)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ResourceMetricSource)
private static final io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource();
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourceMetricSource parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ResourceMetricSource(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricSource
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ResourceMetricStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ResourceMetricStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
boolean hasName();
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
java.lang.String getName();
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
boolean hasCurrentAverageUtilization();
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
int getCurrentAverageUtilization();
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
boolean hasCurrentAverageValue();
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue();
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentAverageValueOrBuilder();
}
/**
*
*
*
* ResourceMetricStatus indicates the current value of a resource metric known to
* Kubernetes, as specified in requests and limits, describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available to
* normal per-pod metrics using the "pods" source.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ResourceMetricStatus}
*/
public static final class ResourceMetricStatus extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ResourceMetricStatus)
ResourceMetricStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResourceMetricStatus.newBuilder() to construct.
private ResourceMetricStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResourceMetricStatus() {
name_ = "";
currentAverageUtilization_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ResourceMetricStatus(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
name_ = bs;
break;
}
case 16:
{
bitField0_ |= 0x00000002;
currentAverageUtilization_ = input.readInt32();
break;
}
case 26:
{
io.kubernetes.client.proto.Resource.Quantity.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = currentAverageValue_.toBuilder();
}
currentAverageValue_ =
input.readMessage(
io.kubernetes.client.proto.Resource.Quantity.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(currentAverageValue_);
currentAverageValue_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CURRENTAVERAGEUTILIZATION_FIELD_NUMBER = 2;
private int currentAverageUtilization_;
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public boolean hasCurrentAverageUtilization() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public int getCurrentAverageUtilization() {
return currentAverageUtilization_;
}
public static final int CURRENTAVERAGEVALUE_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.Resource.Quantity currentAverageValue_;
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
public boolean hasCurrentAverageValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue() {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder getCurrentAverageValueOrBuilder() {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, currentAverageUtilization_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getCurrentAverageValue());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size +=
com.google.protobuf.CodedOutputStream.computeInt32Size(2, currentAverageUtilization_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCurrentAverageValue());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus other =
(io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus) obj;
boolean result = true;
result = result && (hasName() == other.hasName());
if (hasName()) {
result = result && getName().equals(other.getName());
}
result = result && (hasCurrentAverageUtilization() == other.hasCurrentAverageUtilization());
if (hasCurrentAverageUtilization()) {
result = result && (getCurrentAverageUtilization() == other.getCurrentAverageUtilization());
}
result = result && (hasCurrentAverageValue() == other.hasCurrentAverageValue());
if (hasCurrentAverageValue()) {
result = result && getCurrentAverageValue().equals(other.getCurrentAverageValue());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasCurrentAverageUtilization()) {
hash = (37 * hash) + CURRENTAVERAGEUTILIZATION_FIELD_NUMBER;
hash = (53 * hash) + getCurrentAverageUtilization();
}
if (hasCurrentAverageValue()) {
hash = (37 * hash) + CURRENTAVERAGEVALUE_FIELD_NUMBER;
hash = (53 * hash) + getCurrentAverageValue().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ResourceMetricStatus indicates the current value of a resource metric known to
* Kubernetes, as specified in requests and limits, describing each pod in the
* current scale target (e.g. CPU or memory). Such metrics are built in to
* Kubernetes, and have special scaling options on top of those available to
* normal per-pod metrics using the "pods" source.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ResourceMetricStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ResourceMetricStatus)
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCurrentAverageValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
currentAverageUtilization_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = null;
} else {
currentAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus
getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus build() {
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus result =
new io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.currentAverageUtilization_ = currentAverageUtilization_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (currentAverageValueBuilder_ == null) {
result.currentAverageValue_ = currentAverageValue_;
} else {
result.currentAverageValue_ = currentAverageValueBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus other) {
if (other
== io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus.getDefaultInstance())
return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (other.hasCurrentAverageUtilization()) {
setCurrentAverageUtilization(other.getCurrentAverageUtilization());
}
if (other.hasCurrentAverageValue()) {
mergeCurrentAverageValue(other.getCurrentAverageValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*
*
* name is the name of the resource in question.
*
*
* optional string name = 1;
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
private int currentAverageUtilization_;
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public boolean hasCurrentAverageUtilization() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public int getCurrentAverageUtilization() {
return currentAverageUtilization_;
}
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public Builder setCurrentAverageUtilization(int value) {
bitField0_ |= 0x00000002;
currentAverageUtilization_ = value;
onChanged();
return this;
}
/**
*
*
*
* currentAverageUtilization is the current value of the average of the
* resource metric across all relevant pods, represented as a percentage of
* the requested value of the resource for the pods. It will only be
* present if `targetAverageValue` was set in the corresponding metric
* specification.
* +optional
*
*
* optional int32 currentAverageUtilization = 2;
*/
public Builder clearCurrentAverageUtilization() {
bitField0_ = (bitField0_ & ~0x00000002);
currentAverageUtilization_ = 0;
onChanged();
return this;
}
private io.kubernetes.client.proto.Resource.Quantity currentAverageValue_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
currentAverageValueBuilder_;
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public boolean hasCurrentAverageValue() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.Quantity getCurrentAverageValue() {
if (currentAverageValueBuilder_ == null) {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
} else {
return currentAverageValueBuilder_.getMessage();
}
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public Builder setCurrentAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentAverageValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
currentAverageValue_ = value;
onChanged();
} else {
currentAverageValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public Builder setCurrentAverageValue(
io.kubernetes.client.proto.Resource.Quantity.Builder builderForValue) {
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = builderForValue.build();
onChanged();
} else {
currentAverageValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public Builder mergeCurrentAverageValue(io.kubernetes.client.proto.Resource.Quantity value) {
if (currentAverageValueBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& currentAverageValue_ != null
&& currentAverageValue_
!= io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()) {
currentAverageValue_ =
io.kubernetes.client.proto.Resource.Quantity.newBuilder(currentAverageValue_)
.mergeFrom(value)
.buildPartial();
} else {
currentAverageValue_ = value;
}
onChanged();
} else {
currentAverageValueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public Builder clearCurrentAverageValue() {
if (currentAverageValueBuilder_ == null) {
currentAverageValue_ = null;
onChanged();
} else {
currentAverageValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.Quantity.Builder getCurrentAverageValueBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getCurrentAverageValueFieldBuilder().getBuilder();
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
public io.kubernetes.client.proto.Resource.QuantityOrBuilder
getCurrentAverageValueOrBuilder() {
if (currentAverageValueBuilder_ != null) {
return currentAverageValueBuilder_.getMessageOrBuilder();
} else {
return currentAverageValue_ == null
? io.kubernetes.client.proto.Resource.Quantity.getDefaultInstance()
: currentAverageValue_;
}
}
/**
*
*
*
* currentAverageValue is the current value of the average of the
* resource metric across all relevant pods, as a raw value (instead of as
* a percentage of the request), similar to the "pods" metric source type.
* It will always be set, regardless of the corresponding metric specification.
*
*
* optional .k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>
getCurrentAverageValueFieldBuilder() {
if (currentAverageValueBuilder_ == null) {
currentAverageValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Resource.Quantity,
io.kubernetes.client.proto.Resource.Quantity.Builder,
io.kubernetes.client.proto.Resource.QuantityOrBuilder>(
getCurrentAverageValue(), getParentForChildren(), isClean());
currentAverageValue_ = null;
}
return currentAverageValueBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ResourceMetricStatus)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ResourceMetricStatus)
private static final io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus();
}
public static io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourceMetricStatus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ResourceMetricStatus(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ResourceMetricStatus
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ScaleOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.Scale)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
boolean hasMetadata();
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
io.kubernetes.client.proto.Meta.ObjectMeta getMetadata();
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder getMetadataOrBuilder();
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
boolean hasSpec();
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec getSpec();
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
io.kubernetes.client.proto.V1Autoscaling.ScaleSpecOrBuilder getSpecOrBuilder();
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
boolean hasStatus();
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus getStatus();
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
io.kubernetes.client.proto.V1Autoscaling.ScaleStatusOrBuilder getStatusOrBuilder();
}
/**
*
*
*
* Scale represents a scaling request for a resource.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.Scale}
*/
public static final class Scale extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.Scale)
ScaleOrBuilder {
private static final long serialVersionUID = 0L;
// Use Scale.newBuilder() to construct.
private Scale(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Scale() {}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private Scale(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
io.kubernetes.client.proto.Meta.ObjectMeta.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = metadata_.toBuilder();
}
metadata_ =
input.readMessage(
io.kubernetes.client.proto.Meta.ObjectMeta.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 18:
{
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = spec_.toBuilder();
}
spec_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(spec_);
spec_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 26:
{
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = status_.toBuilder();
}
status_ =
input.readMessage(
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.PARSER,
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(status_);
status_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_Scale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_Scale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.Scale.class,
io.kubernetes.client.proto.V1Autoscaling.Scale.Builder.class);
}
private int bitField0_;
public static final int METADATA_FIELD_NUMBER = 1;
private io.kubernetes.client.proto.Meta.ObjectMeta metadata_;
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMeta getMetadata() {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()
: metadata_;
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder getMetadataOrBuilder() {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()
: metadata_;
}
public static final int SPEC_FIELD_NUMBER = 2;
private io.kubernetes.client.proto.V1Autoscaling.ScaleSpec spec_;
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public boolean hasSpec() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleSpec getSpec() {
return spec_ == null
? io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.getDefaultInstance()
: spec_;
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleSpecOrBuilder getSpecOrBuilder() {
return spec_ == null
? io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.getDefaultInstance()
: spec_;
}
public static final int STATUS_FIELD_NUMBER = 3;
private io.kubernetes.client.proto.V1Autoscaling.ScaleStatus status_;
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleStatus getStatus() {
return status_ == null
? io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.getDefaultInstance()
: status_;
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleStatusOrBuilder getStatusOrBuilder() {
return status_ == null
? io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.getDefaultInstance()
: status_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, getMetadata());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, getSpec());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getStatus());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpec());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStatus());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.Scale)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.Scale other =
(io.kubernetes.client.proto.V1Autoscaling.Scale) obj;
boolean result = true;
result = result && (hasMetadata() == other.hasMetadata());
if (hasMetadata()) {
result = result && getMetadata().equals(other.getMetadata());
}
result = result && (hasSpec() == other.hasSpec());
if (hasSpec()) {
result = result && getSpec().equals(other.getSpec());
}
result = result && (hasStatus() == other.hasStatus());
if (hasStatus()) {
result = result && getStatus().equals(other.getStatus());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
if (hasSpec()) {
hash = (37 * hash) + SPEC_FIELD_NUMBER;
hash = (53 * hash) + getSpec().hashCode();
}
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.kubernetes.client.proto.V1Autoscaling.Scale prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Scale represents a scaling request for a resource.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.Scale}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.Scale)
io.kubernetes.client.proto.V1Autoscaling.ScaleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_Scale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_Scale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.Scale.class,
io.kubernetes.client.proto.V1Autoscaling.Scale.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.Scale.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getMetadataFieldBuilder();
getSpecFieldBuilder();
getStatusFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (specBuilder_ == null) {
spec_ = null;
} else {
specBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (statusBuilder_ == null) {
status_ = null;
} else {
statusBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_Scale_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.Scale getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.Scale.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.Scale build() {
io.kubernetes.client.proto.V1Autoscaling.Scale result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.Scale buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.Scale result =
new io.kubernetes.client.proto.V1Autoscaling.Scale(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (specBuilder_ == null) {
result.spec_ = spec_;
} else {
result.spec_ = specBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (statusBuilder_ == null) {
result.status_ = status_;
} else {
result.status_ = statusBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.Scale) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.Scale) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.kubernetes.client.proto.V1Autoscaling.Scale other) {
if (other == io.kubernetes.client.proto.V1Autoscaling.Scale.getDefaultInstance())
return this;
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
if (other.hasSpec()) {
mergeSpec(other.getSpec());
}
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.Scale parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.kubernetes.client.proto.V1Autoscaling.Scale) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.kubernetes.client.proto.Meta.ObjectMeta metadata_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.ObjectMeta,
io.kubernetes.client.proto.Meta.ObjectMeta.Builder,
io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder>
metadataBuilder_;
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMeta getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()
: metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public Builder setMetadata(io.kubernetes.client.proto.Meta.ObjectMeta value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public Builder setMetadata(
io.kubernetes.client.proto.Meta.ObjectMeta.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public Builder mergeMetadata(io.kubernetes.client.proto.Meta.ObjectMeta value) {
if (metadataBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)
&& metadata_ != null
&& metadata_ != io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()) {
metadata_ =
io.kubernetes.client.proto.Meta.ObjectMeta.newBuilder(metadata_)
.mergeFrom(value)
.buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMeta.Builder getMetadataBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
public io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null
? io.kubernetes.client.proto.Meta.ObjectMeta.getDefaultInstance()
: metadata_;
}
}
/**
*
*
*
* Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
* +optional
*
*
* optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.ObjectMeta,
io.kubernetes.client.proto.Meta.ObjectMeta.Builder,
io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.Meta.ObjectMeta,
io.kubernetes.client.proto.Meta.ObjectMeta.Builder,
io.kubernetes.client.proto.Meta.ObjectMetaOrBuilder>(
getMetadata(), getParentForChildren(), isClean());
metadata_ = null;
}
return metadataBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.ScaleSpec spec_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec,
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.Builder,
io.kubernetes.client.proto.V1Autoscaling.ScaleSpecOrBuilder>
specBuilder_;
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public boolean hasSpec() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleSpec getSpec() {
if (specBuilder_ == null) {
return spec_ == null
? io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.getDefaultInstance()
: spec_;
} else {
return specBuilder_.getMessage();
}
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public Builder setSpec(io.kubernetes.client.proto.V1Autoscaling.ScaleSpec value) {
if (specBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
spec_ = value;
onChanged();
} else {
specBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public Builder setSpec(
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.Builder builderForValue) {
if (specBuilder_ == null) {
spec_ = builderForValue.build();
onChanged();
} else {
specBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public Builder mergeSpec(io.kubernetes.client.proto.V1Autoscaling.ScaleSpec value) {
if (specBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)
&& spec_ != null
&& spec_ != io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.getDefaultInstance()) {
spec_ =
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.newBuilder(spec_)
.mergeFrom(value)
.buildPartial();
} else {
spec_ = value;
}
onChanged();
} else {
specBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public Builder clearSpec() {
if (specBuilder_ == null) {
spec_ = null;
onChanged();
} else {
specBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.Builder getSpecBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getSpecFieldBuilder().getBuilder();
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleSpecOrBuilder getSpecOrBuilder() {
if (specBuilder_ != null) {
return specBuilder_.getMessageOrBuilder();
} else {
return spec_ == null
? io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.getDefaultInstance()
: spec_;
}
}
/**
*
*
*
* defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleSpec spec = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec,
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.Builder,
io.kubernetes.client.proto.V1Autoscaling.ScaleSpecOrBuilder>
getSpecFieldBuilder() {
if (specBuilder_ == null) {
specBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec,
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.Builder,
io.kubernetes.client.proto.V1Autoscaling.ScaleSpecOrBuilder>(
getSpec(), getParentForChildren(), isClean());
spec_ = null;
}
return specBuilder_;
}
private io.kubernetes.client.proto.V1Autoscaling.ScaleStatus status_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus,
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ScaleStatusOrBuilder>
statusBuilder_;
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleStatus getStatus() {
if (statusBuilder_ == null) {
return status_ == null
? io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.getDefaultInstance()
: status_;
} else {
return statusBuilder_.getMessage();
}
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public Builder setStatus(io.kubernetes.client.proto.V1Autoscaling.ScaleStatus value) {
if (statusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
onChanged();
} else {
statusBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public Builder setStatus(
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.Builder builderForValue) {
if (statusBuilder_ == null) {
status_ = builderForValue.build();
onChanged();
} else {
statusBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public Builder mergeStatus(io.kubernetes.client.proto.V1Autoscaling.ScaleStatus value) {
if (statusBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)
&& status_ != null
&& status_
!= io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.getDefaultInstance()) {
status_ =
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.newBuilder(status_)
.mergeFrom(value)
.buildPartial();
} else {
status_ = value;
}
onChanged();
} else {
statusBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public Builder clearStatus() {
if (statusBuilder_ == null) {
status_ = null;
onChanged();
} else {
statusBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.Builder getStatusBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
public io.kubernetes.client.proto.V1Autoscaling.ScaleStatusOrBuilder getStatusOrBuilder() {
if (statusBuilder_ != null) {
return statusBuilder_.getMessageOrBuilder();
} else {
return status_ == null
? io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.getDefaultInstance()
: status_;
}
}
/**
*
*
*
* current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
* +optional
*
*
* optional .k8s.io.api.autoscaling.v1.ScaleStatus status = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus,
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ScaleStatusOrBuilder>
getStatusFieldBuilder() {
if (statusBuilder_ == null) {
statusBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus,
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.Builder,
io.kubernetes.client.proto.V1Autoscaling.ScaleStatusOrBuilder>(
getStatus(), getParentForChildren(), isClean());
status_ = null;
}
return statusBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.Scale)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.Scale)
private static final io.kubernetes.client.proto.V1Autoscaling.Scale DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.Scale();
}
public static io.kubernetes.client.proto.V1Autoscaling.Scale getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Scale parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Scale(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.Scale getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ScaleSpecOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ScaleSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* desired number of instances for the scaled object.
* +optional
*
*
* optional int32 replicas = 1;
*/
boolean hasReplicas();
/**
*
*
*
* desired number of instances for the scaled object.
* +optional
*
*
* optional int32 replicas = 1;
*/
int getReplicas();
}
/**
*
*
*
* ScaleSpec describes the attributes of a scale subresource.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ScaleSpec}
*/
public static final class ScaleSpec extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ScaleSpec)
ScaleSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use ScaleSpec.newBuilder() to construct.
private ScaleSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ScaleSpec() {
replicas_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ScaleSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
bitField0_ |= 0x00000001;
replicas_ = input.readInt32();
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.class,
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.Builder.class);
}
private int bitField0_;
public static final int REPLICAS_FIELD_NUMBER = 1;
private int replicas_;
/**
*
*
*
* desired number of instances for the scaled object.
* +optional
*
*
* optional int32 replicas = 1;
*/
public boolean hasReplicas() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* desired number of instances for the scaled object.
* +optional
*
*
* optional int32 replicas = 1;
*/
public int getReplicas() {
return replicas_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(1, replicas_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, replicas_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.ScaleSpec)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec other =
(io.kubernetes.client.proto.V1Autoscaling.ScaleSpec) obj;
boolean result = true;
result = result && (hasReplicas() == other.hasReplicas());
if (hasReplicas()) {
result = result && (getReplicas() == other.getReplicas());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasReplicas()) {
hash = (37 * hash) + REPLICAS_FIELD_NUMBER;
hash = (53 * hash) + getReplicas();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.kubernetes.client.proto.V1Autoscaling.ScaleSpec prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ScaleSpec describes the attributes of a scale subresource.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ScaleSpec}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ScaleSpec)
io.kubernetes.client.proto.V1Autoscaling.ScaleSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.class,
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
replicas_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ScaleSpec getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ScaleSpec build() {
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ScaleSpec buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec result =
new io.kubernetes.client.proto.V1Autoscaling.ScaleSpec(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.replicas_ = replicas_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.ScaleSpec) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.ScaleSpec) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.kubernetes.client.proto.V1Autoscaling.ScaleSpec other) {
if (other == io.kubernetes.client.proto.V1Autoscaling.ScaleSpec.getDefaultInstance())
return this;
if (other.hasReplicas()) {
setReplicas(other.getReplicas());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ScaleSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ScaleSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int replicas_;
/**
*
*
*
* desired number of instances for the scaled object.
* +optional
*
*
* optional int32 replicas = 1;
*/
public boolean hasReplicas() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* desired number of instances for the scaled object.
* +optional
*
*
* optional int32 replicas = 1;
*/
public int getReplicas() {
return replicas_;
}
/**
*
*
*
* desired number of instances for the scaled object.
* +optional
*
*
* optional int32 replicas = 1;
*/
public Builder setReplicas(int value) {
bitField0_ |= 0x00000001;
replicas_ = value;
onChanged();
return this;
}
/**
*
*
*
* desired number of instances for the scaled object.
* +optional
*
*
* optional int32 replicas = 1;
*/
public Builder clearReplicas() {
bitField0_ = (bitField0_ & ~0x00000001);
replicas_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ScaleSpec)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ScaleSpec)
private static final io.kubernetes.client.proto.V1Autoscaling.ScaleSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.ScaleSpec();
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ScaleSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ScaleSpec(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ScaleSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ScaleStatusOrBuilder
extends
// @@protoc_insertion_point(interface_extends:k8s.io.api.autoscaling.v1.ScaleStatus)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* actual number of observed instances of the scaled object.
*
*
* optional int32 replicas = 1;
*/
boolean hasReplicas();
/**
*
*
*
* actual number of observed instances of the scaled object.
*
*
* optional int32 replicas = 1;
*/
int getReplicas();
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
boolean hasSelector();
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
java.lang.String getSelector();
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
com.google.protobuf.ByteString getSelectorBytes();
}
/**
*
*
*
* ScaleStatus represents the current status of a scale subresource.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ScaleStatus}
*/
public static final class ScaleStatus extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:k8s.io.api.autoscaling.v1.ScaleStatus)
ScaleStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use ScaleStatus.newBuilder() to construct.
private ScaleStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ScaleStatus() {
replicas_ = 0;
selector_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ScaleStatus(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
bitField0_ |= 0x00000001;
replicas_ = input.readInt32();
break;
}
case 18:
{
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
selector_ = bs;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.Builder.class);
}
private int bitField0_;
public static final int REPLICAS_FIELD_NUMBER = 1;
private int replicas_;
/**
*
*
*
* actual number of observed instances of the scaled object.
*
*
* optional int32 replicas = 1;
*/
public boolean hasReplicas() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* actual number of observed instances of the scaled object.
*
*
* optional int32 replicas = 1;
*/
public int getReplicas() {
return replicas_;
}
public static final int SELECTOR_FIELD_NUMBER = 2;
private volatile java.lang.Object selector_;
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
public java.lang.String getSelector() {
java.lang.Object ref = selector_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
selector_ = s;
}
return s;
}
}
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
public com.google.protobuf.ByteString getSelectorBytes() {
java.lang.Object ref = selector_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selector_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(1, replicas_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, selector_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, replicas_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, selector_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.kubernetes.client.proto.V1Autoscaling.ScaleStatus)) {
return super.equals(obj);
}
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus other =
(io.kubernetes.client.proto.V1Autoscaling.ScaleStatus) obj;
boolean result = true;
result = result && (hasReplicas() == other.hasReplicas());
if (hasReplicas()) {
result = result && (getReplicas() == other.getReplicas());
}
result = result && (hasSelector() == other.hasSelector());
if (hasSelector()) {
result = result && getSelector().equals(other.getSelector());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasReplicas()) {
hash = (37 * hash) + REPLICAS_FIELD_NUMBER;
hash = (53 * hash) + getReplicas();
}
if (hasSelector()) {
hash = (37 * hash) + SELECTOR_FIELD_NUMBER;
hash = (53 * hash) + getSelector().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* ScaleStatus represents the current status of a scale subresource.
*
*
* Protobuf type {@code k8s.io.api.autoscaling.v1.ScaleStatus}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:k8s.io.api.autoscaling.v1.ScaleStatus)
io.kubernetes.client.proto.V1Autoscaling.ScaleStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.class,
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.Builder.class);
}
// Construct using io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
replicas_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
selector_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.kubernetes.client.proto.V1Autoscaling
.internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_descriptor;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ScaleStatus getDefaultInstanceForType() {
return io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.getDefaultInstance();
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ScaleStatus build() {
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ScaleStatus buildPartial() {
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus result =
new io.kubernetes.client.proto.V1Autoscaling.ScaleStatus(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.replicas_ = replicas_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.selector_ = selector_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.kubernetes.client.proto.V1Autoscaling.ScaleStatus) {
return mergeFrom((io.kubernetes.client.proto.V1Autoscaling.ScaleStatus) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.kubernetes.client.proto.V1Autoscaling.ScaleStatus other) {
if (other == io.kubernetes.client.proto.V1Autoscaling.ScaleStatus.getDefaultInstance())
return this;
if (other.hasReplicas()) {
setReplicas(other.getReplicas());
}
if (other.hasSelector()) {
bitField0_ |= 0x00000002;
selector_ = other.selector_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.kubernetes.client.proto.V1Autoscaling.ScaleStatus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(io.kubernetes.client.proto.V1Autoscaling.ScaleStatus) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int replicas_;
/**
*
*
*
* actual number of observed instances of the scaled object.
*
*
* optional int32 replicas = 1;
*/
public boolean hasReplicas() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
*
*
* actual number of observed instances of the scaled object.
*
*
* optional int32 replicas = 1;
*/
public int getReplicas() {
return replicas_;
}
/**
*
*
*
* actual number of observed instances of the scaled object.
*
*
* optional int32 replicas = 1;
*/
public Builder setReplicas(int value) {
bitField0_ |= 0x00000001;
replicas_ = value;
onChanged();
return this;
}
/**
*
*
*
* actual number of observed instances of the scaled object.
*
*
* optional int32 replicas = 1;
*/
public Builder clearReplicas() {
bitField0_ = (bitField0_ & ~0x00000001);
replicas_ = 0;
onChanged();
return this;
}
private java.lang.Object selector_ = "";
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
public boolean hasSelector() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
public java.lang.String getSelector() {
java.lang.Object ref = selector_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
selector_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
public com.google.protobuf.ByteString getSelectorBytes() {
java.lang.Object ref = selector_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selector_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
public Builder setSelector(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
selector_ = value;
onChanged();
return this;
}
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
public Builder clearSelector() {
bitField0_ = (bitField0_ & ~0x00000002);
selector_ = getDefaultInstance().getSelector();
onChanged();
return this;
}
/**
*
*
*
* label query over pods that should match the replicas count. This is same
* as the label selector but in the string format to avoid introspection
* by clients. The string will be in the same format as the query-param syntax.
* More info about label selectors: https://kubernetes.io/docs/user-guide/labels#label-selectors
* +optional
*
*
* optional string selector = 2;
*/
public Builder setSelectorBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
selector_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:k8s.io.api.autoscaling.v1.ScaleStatus)
}
// @@protoc_insertion_point(class_scope:k8s.io.api.autoscaling.v1.ScaleStatus)
private static final io.kubernetes.client.proto.V1Autoscaling.ScaleStatus DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.kubernetes.client.proto.V1Autoscaling.ScaleStatus();
}
public static io.kubernetes.client.proto.V1Autoscaling.ScaleStatus getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ScaleStatus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ScaleStatus(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.kubernetes.client.proto.V1Autoscaling.ScaleStatus getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_MetricSpec_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_MetricSpec_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_MetricStatus_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_MetricStatus_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_Scale_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_Scale_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
static {
java.lang.String[] descriptorData = {
"\n)k8s.io/api/autoscaling/v1/generated.pr"
+ "oto\022\031k8s.io.api.autoscaling.v1\032\"k8s.io/a"
+ "pi/core/v1/generated.proto\0324k8s.io/apima"
+ "chinery/pkg/api/resource/generated.proto"
+ "\0324k8s.io/apimachinery/pkg/apis/meta/v1/g"
+ "enerated.proto\032/k8s.io/apimachinery/pkg/"
+ "runtime/generated.proto\0326k8s.io/apimachi"
+ "nery/pkg/runtime/schema/generated.proto\""
+ "\256\001\n\035ContainerResourceMetricSource\022\014\n\004nam"
+ "e\030\001 \001(\t\022 \n\030targetAverageUtilization\030\002 \001("
+ "\005\022J\n\022targetAverageValue\030\003 \001(\0132..k8s.io.a"
+ "pimachinery.pkg.api.resource.Quantity\022\021\n"
+ "\tcontainer\030\005 \001(\t\"\260\001\n\035ContainerResourceMe"
+ "tricStatus\022\014\n\004name\030\001 \001(\t\022!\n\031currentAvera"
+ "geUtilization\030\002 \001(\005\022K\n\023currentAverageVal"
+ "ue\030\003 \001(\0132..k8s.io.apimachinery.pkg.api.r"
+ "esource.Quantity\022\021\n\tcontainer\030\004 \001(\t\"M\n\033C"
+ "rossVersionObjectReference\022\014\n\004kind\030\001 \001(\t"
+ "\022\014\n\004name\030\002 \001(\t\022\022\n\napiVersion\030\003 \001(\t\"\210\002\n\024E"
+ "xternalMetricSource\022\022\n\nmetricName\030\001 \001(\t\022"
+ "K\n\016metricSelector\030\002 \001(\01323.k8s.io.apimach"
+ "inery.pkg.apis.meta.v1.LabelSelector\022C\n\013"
+ "targetValue\030\003 \001(\0132..k8s.io.apimachinery."
+ "pkg.api.resource.Quantity\022J\n\022targetAvera"
+ "geValue\030\004 \001(\0132..k8s.io.apimachinery.pkg."
+ "api.resource.Quantity\"\212\002\n\024ExternalMetric"
+ "Status\022\022\n\nmetricName\030\001 \001(\t\022K\n\016metricSele"
+ "ctor\030\002 \001(\01323.k8s.io.apimachinery.pkg.api"
+ "s.meta.v1.LabelSelector\022D\n\014currentValue\030"
+ "\003 \001(\0132..k8s.io.apimachinery.pkg.api.reso"
+ "urce.Quantity\022K\n\023currentAverageValue\030\004 \001"
+ "(\0132..k8s.io.apimachinery.pkg.api.resourc"
+ "e.Quantity\"\355\001\n\027HorizontalPodAutoscaler\022B"
+ "\n\010metadata\030\001 \001(\01320.k8s.io.apimachinery.p"
+ "kg.apis.meta.v1.ObjectMeta\022D\n\004spec\030\002 \001(\013"
+ "26.k8s.io.api.autoscaling.v1.HorizontalP"
+ "odAutoscalerSpec\022H\n\006status\030\003 \001(\01328.k8s.i"
+ "o.api.autoscaling.v1.HorizontalPodAutosc"
+ "alerStatus\"\251\001\n HorizontalPodAutoscalerCo"
+ "ndition\022\014\n\004type\030\001 \001(\t\022\016\n\006status\030\002 \001(\t\022F\n"
+ "\022lastTransitionTime\030\003 \001(\0132*.k8s.io.apima"
+ "chinery.pkg.apis.meta.v1.Time\022\016\n\006reason\030"
+ "\004 \001(\t\022\017\n\007message\030\005 \001(\t\"\242\001\n\033HorizontalPod"
+ "AutoscalerList\022@\n\010metadata\030\001 \001(\0132..k8s.i"
+ "o.apimachinery.pkg.apis.meta.v1.ListMeta"
+ "\022A\n\005items\030\002 \003(\01322.k8s.io.api.autoscaling"
+ ".v1.HorizontalPodAutoscaler\"\277\001\n\033Horizont"
+ "alPodAutoscalerSpec\022N\n\016scaleTargetRef\030\001 "
+ "\001(\01326.k8s.io.api.autoscaling.v1.CrossVer"
+ "sionObjectReference\022\023\n\013minReplicas\030\002 \001(\005"
+ "\022\023\n\013maxReplicas\030\003 \001(\005\022&\n\036targetCPUUtiliz"
+ "ationPercentage\030\004 \001(\005\"\331\001\n\035HorizontalPodA"
+ "utoscalerStatus\022\032\n\022observedGeneration\030\001 "
+ "\001(\003\022A\n\rlastScaleTime\030\002 \001(\0132*.k8s.io.apim"
+ "achinery.pkg.apis.meta.v1.Time\022\027\n\017curren"
+ "tReplicas\030\003 \001(\005\022\027\n\017desiredReplicas\030\004 \001(\005"
+ "\022\'\n\037currentCPUUtilizationPercentage\030\005 \001("
+ "\005\"\357\002\n\nMetricSpec\022\014\n\004type\030\001 \001(\t\022=\n\006object"
+ "\030\002 \001(\0132-.k8s.io.api.autoscaling.v1.Objec"
+ "tMetricSource\0229\n\004pods\030\003 \001(\0132+.k8s.io.api"
+ ".autoscaling.v1.PodsMetricSource\022A\n\010reso"
+ "urce\030\004 \001(\0132/.k8s.io.api.autoscaling.v1.R"
+ "esourceMetricSource\022S\n\021containerResource"
+ "\030\007 \001(\01328.k8s.io.api.autoscaling.v1.Conta"
+ "inerResourceMetricSource\022A\n\010external\030\005 \001"
+ "(\0132/.k8s.io.api.autoscaling.v1.ExternalM"
+ "etricSource\"\361\002\n\014MetricStatus\022\014\n\004type\030\001 \001"
+ "(\t\022=\n\006object\030\002 \001(\0132-.k8s.io.api.autoscal"
+ "ing.v1.ObjectMetricStatus\0229\n\004pods\030\003 \001(\0132"
+ "+.k8s.io.api.autoscaling.v1.PodsMetricSt"
+ "atus\022A\n\010resource\030\004 \001(\0132/.k8s.io.api.auto"
+ "scaling.v1.ResourceMetricStatus\022S\n\021conta"
+ "inerResource\030\007 \001(\01328.k8s.io.api.autoscal"
+ "ing.v1.ContainerResourceMetricStatus\022A\n\010"
+ "external\030\005 \001(\0132/.k8s.io.api.autoscaling."
+ "v1.ExternalMetricStatus\"\302\002\n\022ObjectMetric"
+ "Source\022F\n\006target\030\001 \001(\01326.k8s.io.api.auto"
+ "scaling.v1.CrossVersionObjectReference\022\022"
+ "\n\nmetricName\030\002 \001(\t\022C\n\013targetValue\030\003 \001(\0132"
+ "..k8s.io.apimachinery.pkg.api.resource.Q"
+ "uantity\022E\n\010selector\030\004 \001(\01323.k8s.io.apima"
+ "chinery.pkg.apis.meta.v1.LabelSelector\022D"
+ "\n\014averageValue\030\005 \001(\0132..k8s.io.apimachine"
+ "ry.pkg.api.resource.Quantity\"\303\002\n\022ObjectM"
+ "etricStatus\022F\n\006target\030\001 \001(\01326.k8s.io.api"
+ ".autoscaling.v1.CrossVersionObjectRefere"
+ "nce\022\022\n\nmetricName\030\002 \001(\t\022D\n\014currentValue\030"
+ "\003 \001(\0132..k8s.io.apimachinery.pkg.api.reso"
+ "urce.Quantity\022E\n\010selector\030\004 \001(\01323.k8s.io"
+ ".apimachinery.pkg.apis.meta.v1.LabelSele"
+ "ctor\022D\n\014averageValue\030\005 \001(\0132..k8s.io.apim"
+ "achinery.pkg.api.resource.Quantity\"\271\001\n\020P"
+ "odsMetricSource\022\022\n\nmetricName\030\001 \001(\t\022J\n\022t"
+ "argetAverageValue\030\002 \001(\0132..k8s.io.apimach"
+ "inery.pkg.api.resource.Quantity\022E\n\010selec"
+ "tor\030\003 \001(\01323.k8s.io.apimachinery.pkg.apis"
+ ".meta.v1.LabelSelector\"\272\001\n\020PodsMetricSta"
+ "tus\022\022\n\nmetricName\030\001 \001(\t\022K\n\023currentAverag"
+ "eValue\030\002 \001(\0132..k8s.io.apimachinery.pkg.a"
+ "pi.resource.Quantity\022E\n\010selector\030\003 \001(\01323"
+ ".k8s.io.apimachinery.pkg.apis.meta.v1.La"
+ "belSelector\"\222\001\n\024ResourceMetricSource\022\014\n\004"
+ "name\030\001 \001(\t\022 \n\030targetAverageUtilization\030\002"
+ " \001(\005\022J\n\022targetAverageValue\030\003 \001(\0132..k8s.i"
+ "o.apimachinery.pkg.api.resource.Quantity"
+ "\"\224\001\n\024ResourceMetricStatus\022\014\n\004name\030\001 \001(\t\022"
+ "!\n\031currentAverageUtilization\030\002 \001(\005\022K\n\023cu"
+ "rrentAverageValue\030\003 \001(\0132..k8s.io.apimach"
+ "inery.pkg.api.resource.Quantity\"\267\001\n\005Scal"
+ "e\022B\n\010metadata\030\001 \001(\01320.k8s.io.apimachiner"
+ "y.pkg.apis.meta.v1.ObjectMeta\0222\n\004spec\030\002 "
+ "\001(\0132$.k8s.io.api.autoscaling.v1.ScaleSpe"
+ "c\0226\n\006status\030\003 \001(\0132&.k8s.io.api.autoscali"
+ "ng.v1.ScaleStatus\"\035\n\tScaleSpec\022\020\n\010replic"
+ "as\030\001 \001(\005\"1\n\013ScaleStatus\022\020\n\010replicas\030\001 \001("
+ "\005\022\020\n\010selector\030\002 \001(\tB/\n\032io.kubernetes.cli"
+ "ent.protoB\rV1AutoscalingZ\002v1"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
io.kubernetes.client.proto.V1.getDescriptor(),
io.kubernetes.client.proto.Resource.getDescriptor(),
io.kubernetes.client.proto.Meta.getDescriptor(),
io.kubernetes.client.proto.Runtime.getDescriptor(),
io.kubernetes.client.proto.RuntimeSchema.getDescriptor(),
},
assigner);
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricSource_descriptor,
new java.lang.String[] {
"Name", "TargetAverageUtilization", "TargetAverageValue", "Container",
});
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ContainerResourceMetricStatus_descriptor,
new java.lang.String[] {
"Name", "CurrentAverageUtilization", "CurrentAverageValue", "Container",
});
internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_CrossVersionObjectReference_descriptor,
new java.lang.String[] {
"Kind", "Name", "ApiVersion",
});
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricSource_descriptor,
new java.lang.String[] {
"MetricName", "MetricSelector", "TargetValue", "TargetAverageValue",
});
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ExternalMetricStatus_descriptor,
new java.lang.String[] {
"MetricName", "MetricSelector", "CurrentValue", "CurrentAverageValue",
});
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscaler_descriptor,
new java.lang.String[] {
"Metadata", "Spec", "Status",
});
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerCondition_descriptor,
new java.lang.String[] {
"Type", "Status", "LastTransitionTime", "Reason", "Message",
});
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerList_descriptor,
new java.lang.String[] {
"Metadata", "Items",
});
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerSpec_descriptor,
new java.lang.String[] {
"ScaleTargetRef", "MinReplicas", "MaxReplicas", "TargetCPUUtilizationPercentage",
});
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_HorizontalPodAutoscalerStatus_descriptor,
new java.lang.String[] {
"ObservedGeneration",
"LastScaleTime",
"CurrentReplicas",
"DesiredReplicas",
"CurrentCPUUtilizationPercentage",
});
internal_static_k8s_io_api_autoscaling_v1_MetricSpec_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_k8s_io_api_autoscaling_v1_MetricSpec_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_MetricSpec_descriptor,
new java.lang.String[] {
"Type", "Object", "Pods", "Resource", "ContainerResource", "External",
});
internal_static_k8s_io_api_autoscaling_v1_MetricStatus_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_k8s_io_api_autoscaling_v1_MetricStatus_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_MetricStatus_descriptor,
new java.lang.String[] {
"Type", "Object", "Pods", "Resource", "ContainerResource", "External",
});
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_descriptor =
getDescriptor().getMessageTypes().get(12);
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricSource_descriptor,
new java.lang.String[] {
"Target", "MetricName", "TargetValue", "Selector", "AverageValue",
});
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_descriptor =
getDescriptor().getMessageTypes().get(13);
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ObjectMetricStatus_descriptor,
new java.lang.String[] {
"Target", "MetricName", "CurrentValue", "Selector", "AverageValue",
});
internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_descriptor =
getDescriptor().getMessageTypes().get(14);
internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_PodsMetricSource_descriptor,
new java.lang.String[] {
"MetricName", "TargetAverageValue", "Selector",
});
internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_descriptor =
getDescriptor().getMessageTypes().get(15);
internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_PodsMetricStatus_descriptor,
new java.lang.String[] {
"MetricName", "CurrentAverageValue", "Selector",
});
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_descriptor =
getDescriptor().getMessageTypes().get(16);
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricSource_descriptor,
new java.lang.String[] {
"Name", "TargetAverageUtilization", "TargetAverageValue",
});
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_descriptor =
getDescriptor().getMessageTypes().get(17);
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ResourceMetricStatus_descriptor,
new java.lang.String[] {
"Name", "CurrentAverageUtilization", "CurrentAverageValue",
});
internal_static_k8s_io_api_autoscaling_v1_Scale_descriptor =
getDescriptor().getMessageTypes().get(18);
internal_static_k8s_io_api_autoscaling_v1_Scale_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_Scale_descriptor,
new java.lang.String[] {
"Metadata", "Spec", "Status",
});
internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_descriptor =
getDescriptor().getMessageTypes().get(19);
internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ScaleSpec_descriptor,
new java.lang.String[] {
"Replicas",
});
internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_descriptor =
getDescriptor().getMessageTypes().get(20);
internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_k8s_io_api_autoscaling_v1_ScaleStatus_descriptor,
new java.lang.String[] {
"Replicas", "Selector",
});
io.kubernetes.client.proto.V1.getDescriptor();
io.kubernetes.client.proto.Resource.getDescriptor();
io.kubernetes.client.proto.Meta.getDescriptor();
io.kubernetes.client.proto.Runtime.getDescriptor();
io.kubernetes.client.proto.RuntimeSchema.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy