All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.appengine.v1.CpuUtilization Maven / Gradle / Ivy

There is a newer version: 2.54.0
Show newest version
/*
 * Copyright 2020 Google LLC
 *
 * 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/appengine/v1/version.proto

package com.google.appengine.v1;

/**
 *
 *
 * 
 * Target scaling by CPU usage.
 * 
* * Protobuf type {@code google.appengine.v1.CpuUtilization} */ public final class CpuUtilization extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.appengine.v1.CpuUtilization) CpuUtilizationOrBuilder { private static final long serialVersionUID = 0L; // Use CpuUtilization.newBuilder() to construct. private CpuUtilization(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private CpuUtilization() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new CpuUtilization(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private CpuUtilization( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } 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.Duration.Builder subBuilder = null; if (aggregationWindowLength_ != null) { subBuilder = aggregationWindowLength_.toBuilder(); } aggregationWindowLength_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(aggregationWindowLength_); aggregationWindowLength_ = subBuilder.buildPartial(); } break; } case 17: { targetUtilization_ = input.readDouble(); 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 com.google.appengine.v1.VersionProto .internal_static_google_appengine_v1_CpuUtilization_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.v1.VersionProto .internal_static_google_appengine_v1_CpuUtilization_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.v1.CpuUtilization.class, com.google.appengine.v1.CpuUtilization.Builder.class); } public static final int AGGREGATION_WINDOW_LENGTH_FIELD_NUMBER = 1; private com.google.protobuf.Duration aggregationWindowLength_; /** * * *
   * Period of time over which CPU utilization is calculated.
   * 
* * .google.protobuf.Duration aggregation_window_length = 1; * * @return Whether the aggregationWindowLength field is set. */ @java.lang.Override public boolean hasAggregationWindowLength() { return aggregationWindowLength_ != null; } /** * * *
   * Period of time over which CPU utilization is calculated.
   * 
* * .google.protobuf.Duration aggregation_window_length = 1; * * @return The aggregationWindowLength. */ @java.lang.Override public com.google.protobuf.Duration getAggregationWindowLength() { return aggregationWindowLength_ == null ? com.google.protobuf.Duration.getDefaultInstance() : aggregationWindowLength_; } /** * * *
   * Period of time over which CPU utilization is calculated.
   * 
* * .google.protobuf.Duration aggregation_window_length = 1; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getAggregationWindowLengthOrBuilder() { return getAggregationWindowLength(); } public static final int TARGET_UTILIZATION_FIELD_NUMBER = 2; private double targetUtilization_; /** * * *
   * Target CPU utilization ratio to maintain when scaling. Must be between 0
   * and 1.
   * 
* * double target_utilization = 2; * * @return The targetUtilization. */ @java.lang.Override public double getTargetUtilization() { return targetUtilization_; } 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 (aggregationWindowLength_ != null) { output.writeMessage(1, getAggregationWindowLength()); } if (targetUtilization_ != 0D) { output.writeDouble(2, targetUtilization_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (aggregationWindowLength_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAggregationWindowLength()); } if (targetUtilization_ != 0D) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, targetUtilization_); } 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 com.google.appengine.v1.CpuUtilization)) { return super.equals(obj); } com.google.appengine.v1.CpuUtilization other = (com.google.appengine.v1.CpuUtilization) obj; if (hasAggregationWindowLength() != other.hasAggregationWindowLength()) return false; if (hasAggregationWindowLength()) { if (!getAggregationWindowLength().equals(other.getAggregationWindowLength())) return false; } if (java.lang.Double.doubleToLongBits(getTargetUtilization()) != java.lang.Double.doubleToLongBits(other.getTargetUtilization())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasAggregationWindowLength()) { hash = (37 * hash) + AGGREGATION_WINDOW_LENGTH_FIELD_NUMBER; hash = (53 * hash) + getAggregationWindowLength().hashCode(); } hash = (37 * hash) + TARGET_UTILIZATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getTargetUtilization())); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.appengine.v1.CpuUtilization parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.v1.CpuUtilization parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.v1.CpuUtilization parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.v1.CpuUtilization parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.v1.CpuUtilization parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.v1.CpuUtilization parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.v1.CpuUtilization parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.appengine.v1.CpuUtilization 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 com.google.appengine.v1.CpuUtilization parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.appengine.v1.CpuUtilization 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 com.google.appengine.v1.CpuUtilization parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.appengine.v1.CpuUtilization 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(com.google.appengine.v1.CpuUtilization 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; } /** * * *
   * Target scaling by CPU usage.
   * 
* * Protobuf type {@code google.appengine.v1.CpuUtilization} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.appengine.v1.CpuUtilization) com.google.appengine.v1.CpuUtilizationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.v1.VersionProto .internal_static_google_appengine_v1_CpuUtilization_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.v1.VersionProto .internal_static_google_appengine_v1_CpuUtilization_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.v1.CpuUtilization.class, com.google.appengine.v1.CpuUtilization.Builder.class); } // Construct using com.google.appengine.v1.CpuUtilization.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(); if (aggregationWindowLengthBuilder_ == null) { aggregationWindowLength_ = null; } else { aggregationWindowLength_ = null; aggregationWindowLengthBuilder_ = null; } targetUtilization_ = 0D; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.appengine.v1.VersionProto .internal_static_google_appengine_v1_CpuUtilization_descriptor; } @java.lang.Override public com.google.appengine.v1.CpuUtilization getDefaultInstanceForType() { return com.google.appengine.v1.CpuUtilization.getDefaultInstance(); } @java.lang.Override public com.google.appengine.v1.CpuUtilization build() { com.google.appengine.v1.CpuUtilization result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.appengine.v1.CpuUtilization buildPartial() { com.google.appengine.v1.CpuUtilization result = new com.google.appengine.v1.CpuUtilization(this); if (aggregationWindowLengthBuilder_ == null) { result.aggregationWindowLength_ = aggregationWindowLength_; } else { result.aggregationWindowLength_ = aggregationWindowLengthBuilder_.build(); } result.targetUtilization_ = targetUtilization_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.appengine.v1.CpuUtilization) { return mergeFrom((com.google.appengine.v1.CpuUtilization) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.appengine.v1.CpuUtilization other) { if (other == com.google.appengine.v1.CpuUtilization.getDefaultInstance()) return this; if (other.hasAggregationWindowLength()) { mergeAggregationWindowLength(other.getAggregationWindowLength()); } if (other.getTargetUtilization() != 0D) { setTargetUtilization(other.getTargetUtilization()); } 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 { com.google.appengine.v1.CpuUtilization parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.appengine.v1.CpuUtilization) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.Duration aggregationWindowLength_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> aggregationWindowLengthBuilder_; /** * * *
     * Period of time over which CPU utilization is calculated.
     * 
* * .google.protobuf.Duration aggregation_window_length = 1; * * @return Whether the aggregationWindowLength field is set. */ public boolean hasAggregationWindowLength() { return aggregationWindowLengthBuilder_ != null || aggregationWindowLength_ != null; } /** * * *
     * Period of time over which CPU utilization is calculated.
     * 
* * .google.protobuf.Duration aggregation_window_length = 1; * * @return The aggregationWindowLength. */ public com.google.protobuf.Duration getAggregationWindowLength() { if (aggregationWindowLengthBuilder_ == null) { return aggregationWindowLength_ == null ? com.google.protobuf.Duration.getDefaultInstance() : aggregationWindowLength_; } else { return aggregationWindowLengthBuilder_.getMessage(); } } /** * * *
     * Period of time over which CPU utilization is calculated.
     * 
* * .google.protobuf.Duration aggregation_window_length = 1; */ public Builder setAggregationWindowLength(com.google.protobuf.Duration value) { if (aggregationWindowLengthBuilder_ == null) { if (value == null) { throw new NullPointerException(); } aggregationWindowLength_ = value; onChanged(); } else { aggregationWindowLengthBuilder_.setMessage(value); } return this; } /** * * *
     * Period of time over which CPU utilization is calculated.
     * 
* * .google.protobuf.Duration aggregation_window_length = 1; */ public Builder setAggregationWindowLength( com.google.protobuf.Duration.Builder builderForValue) { if (aggregationWindowLengthBuilder_ == null) { aggregationWindowLength_ = builderForValue.build(); onChanged(); } else { aggregationWindowLengthBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Period of time over which CPU utilization is calculated.
     * 
* * .google.protobuf.Duration aggregation_window_length = 1; */ public Builder mergeAggregationWindowLength(com.google.protobuf.Duration value) { if (aggregationWindowLengthBuilder_ == null) { if (aggregationWindowLength_ != null) { aggregationWindowLength_ = com.google.protobuf.Duration.newBuilder(aggregationWindowLength_) .mergeFrom(value) .buildPartial(); } else { aggregationWindowLength_ = value; } onChanged(); } else { aggregationWindowLengthBuilder_.mergeFrom(value); } return this; } /** * * *
     * Period of time over which CPU utilization is calculated.
     * 
* * .google.protobuf.Duration aggregation_window_length = 1; */ public Builder clearAggregationWindowLength() { if (aggregationWindowLengthBuilder_ == null) { aggregationWindowLength_ = null; onChanged(); } else { aggregationWindowLength_ = null; aggregationWindowLengthBuilder_ = null; } return this; } /** * * *
     * Period of time over which CPU utilization is calculated.
     * 
* * .google.protobuf.Duration aggregation_window_length = 1; */ public com.google.protobuf.Duration.Builder getAggregationWindowLengthBuilder() { onChanged(); return getAggregationWindowLengthFieldBuilder().getBuilder(); } /** * * *
     * Period of time over which CPU utilization is calculated.
     * 
* * .google.protobuf.Duration aggregation_window_length = 1; */ public com.google.protobuf.DurationOrBuilder getAggregationWindowLengthOrBuilder() { if (aggregationWindowLengthBuilder_ != null) { return aggregationWindowLengthBuilder_.getMessageOrBuilder(); } else { return aggregationWindowLength_ == null ? com.google.protobuf.Duration.getDefaultInstance() : aggregationWindowLength_; } } /** * * *
     * Period of time over which CPU utilization is calculated.
     * 
* * .google.protobuf.Duration aggregation_window_length = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getAggregationWindowLengthFieldBuilder() { if (aggregationWindowLengthBuilder_ == null) { aggregationWindowLengthBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getAggregationWindowLength(), getParentForChildren(), isClean()); aggregationWindowLength_ = null; } return aggregationWindowLengthBuilder_; } private double targetUtilization_; /** * * *
     * Target CPU utilization ratio to maintain when scaling. Must be between 0
     * and 1.
     * 
* * double target_utilization = 2; * * @return The targetUtilization. */ @java.lang.Override public double getTargetUtilization() { return targetUtilization_; } /** * * *
     * Target CPU utilization ratio to maintain when scaling. Must be between 0
     * and 1.
     * 
* * double target_utilization = 2; * * @param value The targetUtilization to set. * @return This builder for chaining. */ public Builder setTargetUtilization(double value) { targetUtilization_ = value; onChanged(); return this; } /** * * *
     * Target CPU utilization ratio to maintain when scaling. Must be between 0
     * and 1.
     * 
* * double target_utilization = 2; * * @return This builder for chaining. */ public Builder clearTargetUtilization() { targetUtilization_ = 0D; 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:google.appengine.v1.CpuUtilization) } // @@protoc_insertion_point(class_scope:google.appengine.v1.CpuUtilization) private static final com.google.appengine.v1.CpuUtilization DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.appengine.v1.CpuUtilization(); } public static com.google.appengine.v1.CpuUtilization getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public CpuUtilization parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CpuUtilization(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 com.google.appengine.v1.CpuUtilization getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy