http://git-wip-us.apache.org/repos/asf/incubator-myriad/blob/16467f39/myriad-commons/src/main/java/org/apache/mesos/v1/quota/Protos.java ---------------------------------------------------------------------- diff --git a/myriad-commons/src/main/java/org/apache/mesos/v1/quota/Protos.java b/myriad-commons/src/main/java/org/apache/mesos/v1/quota/Protos.java new file mode 100644 index 0000000..fd707a5 --- /dev/null +++ b/myriad-commons/src/main/java/org/apache/mesos/v1/quota/Protos.java @@ -0,0 +1,3332 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: mesos/v1/quota/quota.proto + +package org.apache.mesos.v1.quota; + +public final class Protos { + private Protos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface QuotaInfoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string role = 1; + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + boolean hasRole(); + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + java.lang.String getRole(); + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + com.google.protobuf.ByteString + getRoleBytes(); + + // optional string principal = 2; + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + boolean hasPrincipal(); + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + java.lang.String getPrincipal(); + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + com.google.protobuf.ByteString + getPrincipalBytes(); + + // repeated .mesos.v1.Resource guarantee = 3; + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + java.util.List<org.apache.mesos.v1.Protos.Resource> + getGuaranteeList(); + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + org.apache.mesos.v1.Protos.Resource getGuarantee(int index); + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + int getGuaranteeCount(); + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + java.util.List<? extends org.apache.mesos.v1.Protos.ResourceOrBuilder> + getGuaranteeOrBuilderList(); + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + org.apache.mesos.v1.Protos.ResourceOrBuilder getGuaranteeOrBuilder( + int index); + } + /** + * Protobuf type {@code mesos.v1.quota.QuotaInfo} + * + * <pre> + * TODO(joerg84): Add limits, i.e. upper bounds of resources that a + * role is allowed to use. + * </pre> + */ + public static final class QuotaInfo extends + com.google.protobuf.GeneratedMessage + implements QuotaInfoOrBuilder { + // Use QuotaInfo.newBuilder() to construct. + private QuotaInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private QuotaInfo(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final QuotaInfo defaultInstance; + public static QuotaInfo getDefaultInstance() { + return defaultInstance; + } + + public QuotaInfo getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QuotaInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + role_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + principal_ = input.readBytes(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + guarantee_ = new java.util.ArrayList<org.apache.mesos.v1.Protos.Resource>(); + mutable_bitField0_ |= 0x00000004; + } + guarantee_.add(input.readMessage(org.apache.mesos.v1.Protos.Resource.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + guarantee_ = java.util.Collections.unmodifiableList(guarantee_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.mesos.v1.quota.Protos.QuotaInfo.class, org.apache.mesos.v1.quota.Protos.QuotaInfo.Builder.class); + } + + public static com.google.protobuf.Parser<QuotaInfo> PARSER = + new com.google.protobuf.AbstractParser<QuotaInfo>() { + public QuotaInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QuotaInfo(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<QuotaInfo> getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string role = 1; + public static final int ROLE_FIELD_NUMBER = 1; + private java.lang.Object role_; + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + public boolean hasRole() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + 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()) { + role_ = s; + } + return s; + } + } + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string principal = 2; + public static final int PRINCIPAL_FIELD_NUMBER = 2; + private java.lang.Object principal_; + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + public boolean hasPrincipal() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + 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()) { + principal_ = s; + } + return s; + } + } + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + public com.google.protobuf.ByteString + getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated .mesos.v1.Resource guarantee = 3; + public static final int GUARANTEE_FIELD_NUMBER = 3; + private java.util.List<org.apache.mesos.v1.Protos.Resource> guarantee_; + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public java.util.List<org.apache.mesos.v1.Protos.Resource> getGuaranteeList() { + return guarantee_; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public java.util.List<? extends org.apache.mesos.v1.Protos.ResourceOrBuilder> + getGuaranteeOrBuilderList() { + return guarantee_; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public int getGuaranteeCount() { + return guarantee_.size(); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource getGuarantee(int index) { + return guarantee_.get(index); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public org.apache.mesos.v1.Protos.ResourceOrBuilder getGuaranteeOrBuilder( + int index) { + return guarantee_.get(index); + } + + private void initFields() { + role_ = ""; + principal_ = ""; + guarantee_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getGuaranteeCount(); i++) { + if (!getGuarantee(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getRoleBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getPrincipalBytes()); + } + for (int i = 0; i < guarantee_.size(); i++) { + output.writeMessage(3, guarantee_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getRoleBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getPrincipalBytes()); + } + for (int i = 0; i < guarantee_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, guarantee_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.mesos.v1.quota.Protos.QuotaInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.mesos.v1.quota.Protos.QuotaInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mesos.v1.quota.QuotaInfo} + * + * <pre> + * TODO(joerg84): Add limits, i.e. upper bounds of resources that a + * role is allowed to use. + * </pre> + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> + implements org.apache.mesos.v1.quota.Protos.QuotaInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.mesos.v1.quota.Protos.QuotaInfo.class, org.apache.mesos.v1.quota.Protos.QuotaInfo.Builder.class); + } + + // Construct using org.apache.mesos.v1.quota.Protos.QuotaInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGuaranteeFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + role_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + principal_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (guaranteeBuilder_ == null) { + guarantee_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + guaranteeBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaInfo_descriptor; + } + + public org.apache.mesos.v1.quota.Protos.QuotaInfo getDefaultInstanceForType() { + return org.apache.mesos.v1.quota.Protos.QuotaInfo.getDefaultInstance(); + } + + public org.apache.mesos.v1.quota.Protos.QuotaInfo build() { + org.apache.mesos.v1.quota.Protos.QuotaInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.mesos.v1.quota.Protos.QuotaInfo buildPartial() { + org.apache.mesos.v1.quota.Protos.QuotaInfo result = new org.apache.mesos.v1.quota.Protos.QuotaInfo(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.role_ = role_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.principal_ = principal_; + if (guaranteeBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + guarantee_ = java.util.Collections.unmodifiableList(guarantee_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.guarantee_ = guarantee_; + } else { + result.guarantee_ = guaranteeBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.mesos.v1.quota.Protos.QuotaInfo) { + return mergeFrom((org.apache.mesos.v1.quota.Protos.QuotaInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.mesos.v1.quota.Protos.QuotaInfo other) { + if (other == org.apache.mesos.v1.quota.Protos.QuotaInfo.getDefaultInstance()) return this; + if (other.hasRole()) { + bitField0_ |= 0x00000001; + role_ = other.role_; + onChanged(); + } + if (other.hasPrincipal()) { + bitField0_ |= 0x00000002; + principal_ = other.principal_; + onChanged(); + } + if (guaranteeBuilder_ == null) { + if (!other.guarantee_.isEmpty()) { + if (guarantee_.isEmpty()) { + guarantee_ = other.guarantee_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureGuaranteeIsMutable(); + guarantee_.addAll(other.guarantee_); + } + onChanged(); + } + } else { + if (!other.guarantee_.isEmpty()) { + if (guaranteeBuilder_.isEmpty()) { + guaranteeBuilder_.dispose(); + guaranteeBuilder_ = null; + guarantee_ = other.guarantee_; + bitField0_ = (bitField0_ & ~0x00000004); + guaranteeBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGuaranteeFieldBuilder() : null; + } else { + guaranteeBuilder_.addAllMessages(other.guarantee_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getGuaranteeCount(); i++) { + if (!getGuarantee(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.mesos.v1.quota.Protos.QuotaInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.mesos.v1.quota.Protos.QuotaInfo) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string role = 1; + private java.lang.Object role_ = ""; + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + public boolean hasRole() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + role_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + public Builder setRole( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + role_ = value; + onChanged(); + return this; + } + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + public Builder clearRole() { + bitField0_ = (bitField0_ & ~0x00000001); + role_ = getDefaultInstance().getRole(); + onChanged(); + return this; + } + /** + * <code>optional string role = 1;</code> + * + * <pre> + * Quota is granted per role and not per framework, similar to + * dynamic reservations. + * </pre> + */ + public Builder setRoleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + role_ = value; + onChanged(); + return this; + } + + // optional string principal = 2; + private java.lang.Object principal_ = ""; + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + public boolean hasPrincipal() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + principal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + public com.google.protobuf.ByteString + getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + public Builder setPrincipal( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + principal_ = value; + onChanged(); + return this; + } + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + public Builder clearPrincipal() { + bitField0_ = (bitField0_ & ~0x00000002); + principal_ = getDefaultInstance().getPrincipal(); + onChanged(); + return this; + } + /** + * <code>optional string principal = 2;</code> + * + * <pre> + * Principal which set the quota. Currently only operators can set quotas. + * </pre> + */ + public Builder setPrincipalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + principal_ = value; + onChanged(); + return this; + } + + // repeated .mesos.v1.Resource guarantee = 3; + private java.util.List<org.apache.mesos.v1.Protos.Resource> guarantee_ = + java.util.Collections.emptyList(); + private void ensureGuaranteeIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + guarantee_ = new java.util.ArrayList<org.apache.mesos.v1.Protos.Resource>(guarantee_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.mesos.v1.Protos.Resource, org.apache.mesos.v1.Protos.Resource.Builder, org.apache.mesos.v1.Protos.ResourceOrBuilder> guaranteeBuilder_; + + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public java.util.List<org.apache.mesos.v1.Protos.Resource> getGuaranteeList() { + if (guaranteeBuilder_ == null) { + return java.util.Collections.unmodifiableList(guarantee_); + } else { + return guaranteeBuilder_.getMessageList(); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public int getGuaranteeCount() { + if (guaranteeBuilder_ == null) { + return guarantee_.size(); + } else { + return guaranteeBuilder_.getCount(); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource getGuarantee(int index) { + if (guaranteeBuilder_ == null) { + return guarantee_.get(index); + } else { + return guaranteeBuilder_.getMessage(index); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public Builder setGuarantee( + int index, org.apache.mesos.v1.Protos.Resource value) { + if (guaranteeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuaranteeIsMutable(); + guarantee_.set(index, value); + onChanged(); + } else { + guaranteeBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public Builder setGuarantee( + int index, org.apache.mesos.v1.Protos.Resource.Builder builderForValue) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + guarantee_.set(index, builderForValue.build()); + onChanged(); + } else { + guaranteeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public Builder addGuarantee(org.apache.mesos.v1.Protos.Resource value) { + if (guaranteeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuaranteeIsMutable(); + guarantee_.add(value); + onChanged(); + } else { + guaranteeBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public Builder addGuarantee( + int index, org.apache.mesos.v1.Protos.Resource value) { + if (guaranteeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuaranteeIsMutable(); + guarantee_.add(index, value); + onChanged(); + } else { + guaranteeBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public Builder addGuarantee( + org.apache.mesos.v1.Protos.Resource.Builder builderForValue) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + guarantee_.add(builderForValue.build()); + onChanged(); + } else { + guaranteeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public Builder addGuarantee( + int index, org.apache.mesos.v1.Protos.Resource.Builder builderForValue) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + guarantee_.add(index, builderForValue.build()); + onChanged(); + } else { + guaranteeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public Builder addAllGuarantee( + java.lang.Iterable<? extends org.apache.mesos.v1.Protos.Resource> values) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + super.addAll(values, guarantee_); + onChanged(); + } else { + guaranteeBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public Builder clearGuarantee() { + if (guaranteeBuilder_ == null) { + guarantee_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + guaranteeBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public Builder removeGuarantee(int index) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + guarantee_.remove(index); + onChanged(); + } else { + guaranteeBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource.Builder getGuaranteeBuilder( + int index) { + return getGuaranteeFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public org.apache.mesos.v1.Protos.ResourceOrBuilder getGuaranteeOrBuilder( + int index) { + if (guaranteeBuilder_ == null) { + return guarantee_.get(index); } else { + return guaranteeBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public java.util.List<? extends org.apache.mesos.v1.Protos.ResourceOrBuilder> + getGuaranteeOrBuilderList() { + if (guaranteeBuilder_ != null) { + return guaranteeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guarantee_); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource.Builder addGuaranteeBuilder() { + return getGuaranteeFieldBuilder().addBuilder( + org.apache.mesos.v1.Protos.Resource.getDefaultInstance()); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource.Builder addGuaranteeBuilder( + int index) { + return getGuaranteeFieldBuilder().addBuilder( + index, org.apache.mesos.v1.Protos.Resource.getDefaultInstance()); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The guarantee that these resources are allocatable for the above role. + * NOTE: `guarantee.role` should not specify any role except '*', + * because quota does not reserve specific resources. + * </pre> + */ + public java.util.List<org.apache.mesos.v1.Protos.Resource.Builder> + getGuaranteeBuilderList() { + return getGuaranteeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.mesos.v1.Protos.Resource, org.apache.mesos.v1.Protos.Resource.Builder, org.apache.mesos.v1.Protos.ResourceOrBuilder> + getGuaranteeFieldBuilder() { + if (guaranteeBuilder_ == null) { + guaranteeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.mesos.v1.Protos.Resource, org.apache.mesos.v1.Protos.Resource.Builder, org.apache.mesos.v1.Protos.ResourceOrBuilder>( + guarantee_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + guarantee_ = null; + } + return guaranteeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:mesos.v1.quota.QuotaInfo) + } + + static { + defaultInstance = new QuotaInfo(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:mesos.v1.quota.QuotaInfo) + } + + public interface QuotaRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bool force = 1 [default = false]; + /** + * <code>optional bool force = 1 [default = false];</code> + * + * <pre> + * Disables the capacity heuristic check if set to `true`. + * </pre> + */ + boolean hasForce(); + /** + * <code>optional bool force = 1 [default = false];</code> + * + * <pre> + * Disables the capacity heuristic check if set to `true`. + * </pre> + */ + boolean getForce(); + + // optional string role = 2; + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + boolean hasRole(); + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + java.lang.String getRole(); + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + com.google.protobuf.ByteString + getRoleBytes(); + + // repeated .mesos.v1.Resource guarantee = 3; + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + java.util.List<org.apache.mesos.v1.Protos.Resource> + getGuaranteeList(); + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + org.apache.mesos.v1.Protos.Resource getGuarantee(int index); + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + int getGuaranteeCount(); + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + java.util.List<? extends org.apache.mesos.v1.Protos.ResourceOrBuilder> + getGuaranteeOrBuilderList(); + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + org.apache.mesos.v1.Protos.ResourceOrBuilder getGuaranteeOrBuilder( + int index); + } + /** + * Protobuf type {@code mesos.v1.quota.QuotaRequest} + * + * <pre> + ** + * `QuotaRequest` provides a schema for set quota JSON requests. + * </pre> + */ + public static final class QuotaRequest extends + com.google.protobuf.GeneratedMessage + implements QuotaRequestOrBuilder { + // Use QuotaRequest.newBuilder() to construct. + private QuotaRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private QuotaRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final QuotaRequest defaultInstance; + public static QuotaRequest getDefaultInstance() { + return defaultInstance; + } + + public QuotaRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QuotaRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + force_ = input.readBool(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + role_ = input.readBytes(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + guarantee_ = new java.util.ArrayList<org.apache.mesos.v1.Protos.Resource>(); + mutable_bitField0_ |= 0x00000004; + } + guarantee_.add(input.readMessage(org.apache.mesos.v1.Protos.Resource.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + guarantee_ = java.util.Collections.unmodifiableList(guarantee_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.mesos.v1.quota.Protos.QuotaRequest.class, org.apache.mesos.v1.quota.Protos.QuotaRequest.Builder.class); + } + + public static com.google.protobuf.Parser<QuotaRequest> PARSER = + new com.google.protobuf.AbstractParser<QuotaRequest>() { + public QuotaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QuotaRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<QuotaRequest> getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional bool force = 1 [default = false]; + public static final int FORCE_FIELD_NUMBER = 1; + private boolean force_; + /** + * <code>optional bool force = 1 [default = false];</code> + * + * <pre> + * Disables the capacity heuristic check if set to `true`. + * </pre> + */ + public boolean hasForce() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional bool force = 1 [default = false];</code> + * + * <pre> + * Disables the capacity heuristic check if set to `true`. + * </pre> + */ + public boolean getForce() { + return force_; + } + + // optional string role = 2; + public static final int ROLE_FIELD_NUMBER = 2; + private java.lang.Object role_; + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + public boolean hasRole() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + 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()) { + role_ = s; + } + return s; + } + } + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated .mesos.v1.Resource guarantee = 3; + public static final int GUARANTEE_FIELD_NUMBER = 3; + private java.util.List<org.apache.mesos.v1.Protos.Resource> guarantee_; + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public java.util.List<org.apache.mesos.v1.Protos.Resource> getGuaranteeList() { + return guarantee_; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public java.util.List<? extends org.apache.mesos.v1.Protos.ResourceOrBuilder> + getGuaranteeOrBuilderList() { + return guarantee_; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public int getGuaranteeCount() { + return guarantee_.size(); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource getGuarantee(int index) { + return guarantee_.get(index); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public org.apache.mesos.v1.Protos.ResourceOrBuilder getGuaranteeOrBuilder( + int index) { + return guarantee_.get(index); + } + + private void initFields() { + force_ = false; + role_ = ""; + guarantee_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getGuaranteeCount(); i++) { + if (!getGuarantee(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, force_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getRoleBytes()); + } + for (int i = 0; i < guarantee_.size(); i++) { + output.writeMessage(3, guarantee_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, force_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getRoleBytes()); + } + for (int i = 0; i < guarantee_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, guarantee_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.mesos.v1.quota.Protos.QuotaRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.mesos.v1.quota.Protos.QuotaRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code mesos.v1.quota.QuotaRequest} + * + * <pre> + ** + * `QuotaRequest` provides a schema for set quota JSON requests. + * </pre> + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> + implements org.apache.mesos.v1.quota.Protos.QuotaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.mesos.v1.quota.Protos.QuotaRequest.class, org.apache.mesos.v1.quota.Protos.QuotaRequest.Builder.class); + } + + // Construct using org.apache.mesos.v1.quota.Protos.QuotaRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGuaranteeFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + force_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + role_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (guaranteeBuilder_ == null) { + guarantee_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + guaranteeBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.mesos.v1.quota.Protos.internal_static_mesos_v1_quota_QuotaRequest_descriptor; + } + + public org.apache.mesos.v1.quota.Protos.QuotaRequest getDefaultInstanceForType() { + return org.apache.mesos.v1.quota.Protos.QuotaRequest.getDefaultInstance(); + } + + public org.apache.mesos.v1.quota.Protos.QuotaRequest build() { + org.apache.mesos.v1.quota.Protos.QuotaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.mesos.v1.quota.Protos.QuotaRequest buildPartial() { + org.apache.mesos.v1.quota.Protos.QuotaRequest result = new org.apache.mesos.v1.quota.Protos.QuotaRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.force_ = force_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.role_ = role_; + if (guaranteeBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + guarantee_ = java.util.Collections.unmodifiableList(guarantee_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.guarantee_ = guarantee_; + } else { + result.guarantee_ = guaranteeBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.mesos.v1.quota.Protos.QuotaRequest) { + return mergeFrom((org.apache.mesos.v1.quota.Protos.QuotaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.mesos.v1.quota.Protos.QuotaRequest other) { + if (other == org.apache.mesos.v1.quota.Protos.QuotaRequest.getDefaultInstance()) return this; + if (other.hasForce()) { + setForce(other.getForce()); + } + if (other.hasRole()) { + bitField0_ |= 0x00000002; + role_ = other.role_; + onChanged(); + } + if (guaranteeBuilder_ == null) { + if (!other.guarantee_.isEmpty()) { + if (guarantee_.isEmpty()) { + guarantee_ = other.guarantee_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureGuaranteeIsMutable(); + guarantee_.addAll(other.guarantee_); + } + onChanged(); + } + } else { + if (!other.guarantee_.isEmpty()) { + if (guaranteeBuilder_.isEmpty()) { + guaranteeBuilder_.dispose(); + guaranteeBuilder_ = null; + guarantee_ = other.guarantee_; + bitField0_ = (bitField0_ & ~0x00000004); + guaranteeBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGuaranteeFieldBuilder() : null; + } else { + guaranteeBuilder_.addAllMessages(other.guarantee_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getGuaranteeCount(); i++) { + if (!getGuarantee(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.mesos.v1.quota.Protos.QuotaRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.mesos.v1.quota.Protos.QuotaRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional bool force = 1 [default = false]; + private boolean force_ ; + /** + * <code>optional bool force = 1 [default = false];</code> + * + * <pre> + * Disables the capacity heuristic check if set to `true`. + * </pre> + */ + public boolean hasForce() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional bool force = 1 [default = false];</code> + * + * <pre> + * Disables the capacity heuristic check if set to `true`. + * </pre> + */ + public boolean getForce() { + return force_; + } + /** + * <code>optional bool force = 1 [default = false];</code> + * + * <pre> + * Disables the capacity heuristic check if set to `true`. + * </pre> + */ + public Builder setForce(boolean value) { + bitField0_ |= 0x00000001; + force_ = value; + onChanged(); + return this; + } + /** + * <code>optional bool force = 1 [default = false];</code> + * + * <pre> + * Disables the capacity heuristic check if set to `true`. + * </pre> + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000001); + force_ = false; + onChanged(); + return this; + } + + // optional string role = 2; + private java.lang.Object role_ = ""; + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + public boolean hasRole() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + role_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + public Builder setRole( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + role_ = value; + onChanged(); + return this; + } + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + public Builder clearRole() { + bitField0_ = (bitField0_ & ~0x00000002); + role_ = getDefaultInstance().getRole(); + onChanged(); + return this; + } + /** + * <code>optional string role = 2;</code> + * + * <pre> + * The role for which to set quota. + * </pre> + */ + public Builder setRoleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + role_ = value; + onChanged(); + return this; + } + + // repeated .mesos.v1.Resource guarantee = 3; + private java.util.List<org.apache.mesos.v1.Protos.Resource> guarantee_ = + java.util.Collections.emptyList(); + private void ensureGuaranteeIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + guarantee_ = new java.util.ArrayList<org.apache.mesos.v1.Protos.Resource>(guarantee_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.mesos.v1.Protos.Resource, org.apache.mesos.v1.Protos.Resource.Builder, org.apache.mesos.v1.Protos.ResourceOrBuilder> guaranteeBuilder_; + + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public java.util.List<org.apache.mesos.v1.Protos.Resource> getGuaranteeList() { + if (guaranteeBuilder_ == null) { + return java.util.Collections.unmodifiableList(guarantee_); + } else { + return guaranteeBuilder_.getMessageList(); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public int getGuaranteeCount() { + if (guaranteeBuilder_ == null) { + return guarantee_.size(); + } else { + return guaranteeBuilder_.getCount(); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource getGuarantee(int index) { + if (guaranteeBuilder_ == null) { + return guarantee_.get(index); + } else { + return guaranteeBuilder_.getMessage(index); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public Builder setGuarantee( + int index, org.apache.mesos.v1.Protos.Resource value) { + if (guaranteeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuaranteeIsMutable(); + guarantee_.set(index, value); + onChanged(); + } else { + guaranteeBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public Builder setGuarantee( + int index, org.apache.mesos.v1.Protos.Resource.Builder builderForValue) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + guarantee_.set(index, builderForValue.build()); + onChanged(); + } else { + guaranteeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public Builder addGuarantee(org.apache.mesos.v1.Protos.Resource value) { + if (guaranteeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuaranteeIsMutable(); + guarantee_.add(value); + onChanged(); + } else { + guaranteeBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public Builder addGuarantee( + int index, org.apache.mesos.v1.Protos.Resource value) { + if (guaranteeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuaranteeIsMutable(); + guarantee_.add(index, value); + onChanged(); + } else { + guaranteeBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public Builder addGuarantee( + org.apache.mesos.v1.Protos.Resource.Builder builderForValue) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + guarantee_.add(builderForValue.build()); + onChanged(); + } else { + guaranteeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public Builder addGuarantee( + int index, org.apache.mesos.v1.Protos.Resource.Builder builderForValue) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + guarantee_.add(index, builderForValue.build()); + onChanged(); + } else { + guaranteeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public Builder addAllGuarantee( + java.lang.Iterable<? extends org.apache.mesos.v1.Protos.Resource> values) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + super.addAll(values, guarantee_); + onChanged(); + } else { + guaranteeBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public Builder clearGuarantee() { + if (guaranteeBuilder_ == null) { + guarantee_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + guaranteeBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public Builder removeGuarantee(int index) { + if (guaranteeBuilder_ == null) { + ensureGuaranteeIsMutable(); + guarantee_.remove(index); + onChanged(); + } else { + guaranteeBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource.Builder getGuaranteeBuilder( + int index) { + return getGuaranteeFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public org.apache.mesos.v1.Protos.ResourceOrBuilder getGuaranteeOrBuilder( + int index) { + if (guaranteeBuilder_ == null) { + return guarantee_.get(index); } else { + return guaranteeBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public java.util.List<? extends org.apache.mesos.v1.Protos.ResourceOrBuilder> + getGuaranteeOrBuilderList() { + if (guaranteeBuilder_ != null) { + return guaranteeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guarantee_); + } + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource.Builder addGuaranteeBuilder() { + return getGuaranteeFieldBuilder().addBuilder( + org.apache.mesos.v1.Protos.Resource.getDefaultInstance()); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public org.apache.mesos.v1.Protos.Resource.Builder addGuaranteeBuilder( + int index) { + return getGuaranteeFieldBuilder().addBuilder( + index, org.apache.mesos.v1.Protos.Resource.getDefaultInstance()); + } + /** + * <code>repeated .mesos.v1.Resource guarantee = 3;</code> + * + * <pre> + * The requested guarantee that these resources will be allocatable for + * the above role. + * </pre> + */ + public java.util.List<org.apache.mesos.v1.Protos.Resource.Builder> + getGuaranteeBuilderList() { + return getGuaranteeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.mesos.v1.Protos.Resource, org.apache.mesos.v1.Protos.Resource.Builder, org.apache.mesos.v1.Protos.ResourceOrBuilder> + getGuaranteeFieldBuilder() { + if (guaranteeBuilder_ == null) { + guaranteeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.mesos.v1.Protos.Resource, org.apache.mesos.v1.Protos.Resource.Builder, org.apache.mesos.v1.Protos.ResourceOrBuilder>( + guarantee_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + guarantee_ = null; + } + return guaranteeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:mesos.v1.quota.QuotaRequest) + } + + static { + defaultInstance = new QuotaRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:mesos.v1.quota.QuotaRequest) + } + + public interface QuotaStatusOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .mesos.v1.quota.QuotaInfo infos = 1; + /** + * <code>repeated .mesos.v1.quota.QuotaInfo infos = 1;</code> + * + * <pre> + * Quotas which are currently set, i.e. known to the master. + * </pre> + */ + java.util.List<org.apache.mesos.v1.quota.Protos.QuotaInfo> + getInfosList(); + /** + * <code>repeated .mesos.v1.quota.QuotaInfo infos = 1;</code> + * + * <pre> + * Quotas which are currently set, i.e. known to the master. + * </pre> + */ + org.apache.mesos.v1.quota.Protos.QuotaInfo getInfos(int index); + /** + * <code>repeated .mesos.v1.quota.QuotaInfo infos = 1;</code> + * + * <pre> + * Quotas which are currently set, i.e. known to the master. + * </pre> + */ + int getInfosCount(); + /** + * <code>repeated .mesos.v1.quota.QuotaInfo infos = 1;</code> + * + * <pre> + * Quotas which are currently set, i.e. known to the master. + * </pre> + */ + java.util.List<? extends org.apache.mesos.v1.quota.Protos.QuotaInfoOrBuilder> + getInfosOrBuilderList(); + /** + * <code>repeated .mesos.v1.quota.QuotaInfo infos = 1;</code> + * + * <pre> + * Quotas which are currently set, i.e. known to the master. + * </pre> + */ + org.apache.mesos.v1.quota.Protos.QuotaInfoOrBuilder getInfosOrBuilder( + int index); + } + /** + * Protobuf type {@code mesos.v1.quota.QuotaStatus} + * + * <pre> + ** + * `QuotaStatus` describes the internal representation for the /quota/status + * response. + * </pre> + */ + public static final class QuotaStatus extends + com.google.protobuf.GeneratedMessage + implements QuotaStatusOrBuilder { + // Use QuotaStatus.newBuilder() to construct. + private QuotaStatus(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private QuotaStatus(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final QuotaStatus defaultInstance; + public static QuotaStatus getDefaultInstance() { + return defaultInstance; + } + + public QuotaStatus getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QuotaStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + infos_ = new java.util.ArrayList<org.apache.mesos.v1.quota.Protos.QuotaInfo>(); + mutable_bitField0_ |= 0x00000001; + } + infos_.add(input.readMessage(org.apache.mesos.v1.quota.Protos.QuotaInfo.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(
<TRUNCATED>