github.com/aclisp/heapster@v0.19.2-0.20160613100040-51756f899a96/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/generated.proto (about)

     1  /*
     2  Copyright 2016 The Kubernetes Authors All rights reserved.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  
    18  // This file was autogenerated by go-to-protobuf. Do not edit it manually!
    19  
    20  syntax = 'proto2';
    21  
    22  package k8s.io.kubernetes.pkg.api.resource;
    23  
    24  import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
    25  
    26  // Package-wide variables from generator "generated".
    27  option go_package = "resource";
    28  
    29  // Quantity is a fixed-point representation of a number.
    30  // It provides convenient marshaling/unmarshaling in JSON and YAML,
    31  // in addition to String() and Int64() accessors.
    32  // 
    33  // The serialization format is:
    34  // 
    35  // <quantity>        ::= <signedNumber><suffix>
    36  //   (Note that <suffix> may be empty, from the "" case in <decimalSI>.)
    37  // <digit>           ::= 0 | 1 | ... | 9
    38  // <digits>          ::= <digit> | <digit><digits>
    39  // <number>          ::= <digits> | <digits>.<digits> | <digits>. | .<digits>
    40  // <sign>            ::= "+" | "-"
    41  // <signedNumber>    ::= <number> | <sign><number>
    42  // <suffix>          ::= <binarySI> | <decimalExponent> | <decimalSI>
    43  // <binarySI>        ::= Ki | Mi | Gi | Ti | Pi | Ei
    44  //   (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)
    45  // <decimalSI>       ::= m | "" | k | M | G | T | P | E
    46  //   (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
    47  // <decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber>
    48  // 
    49  // No matter which of the three exponent forms is used, no quantity may represent
    50  // a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal
    51  // places. Numbers larger or more precise will be capped or rounded up.
    52  // (E.g.: 0.1m will rounded up to 1m.)
    53  // This may be extended in the future if we require larger or smaller quantities.
    54  // 
    55  // When a Quantity is parsed from a string, it will remember the type of suffix
    56  // it had, and will use the same type again when it is serialized.
    57  // 
    58  // Before serializing, Quantity will be put in "canonical form".
    59  // This means that Exponent/suffix will be adjusted up or down (with a
    60  // corresponding increase or decrease in Mantissa) such that:
    61  //   a. No precision is lost
    62  //   b. No fractional digits will be emitted
    63  //   c. The exponent (or suffix) is as large as possible.
    64  // The sign will be omitted unless the number is negative.
    65  // 
    66  // Examples:
    67  //   1.5 will be serialized as "1500m"
    68  //   1.5Gi will be serialized as "1536Mi"
    69  // 
    70  // NOTE: We reserve the right to amend this canonical format, perhaps to
    71  //   allow 1.5 to be canonical.
    72  // TODO: Remove above disclaimer after all bikeshedding about format is over,
    73  //   or after March 2015.
    74  // 
    75  // Note that the quantity will NEVER be internally represented by a
    76  // floating point number. That is the whole point of this exercise.
    77  // 
    78  // Non-canonical values will still parse as long as they are well formed,
    79  // but will be re-emitted in their canonical form. (So always use canonical
    80  // form, or don't diff.)
    81  // 
    82  // This format is intended to make it difficult to use these numbers without
    83  // writing some sort of special handling code in the hopes that that will
    84  // cause implementors to also use a fixed point implementation.
    85  // 
    86  // +protobuf=true
    87  // +protobuf.embed=QuantityProto
    88  // +protobuf.options.marshal=false
    89  // +protobuf.options.(gogoproto.goproto_stringer)=false
    90  message Quantity {
    91    optional QuantityProto QuantityProto = 1;
    92  }
    93  
    94  // QuantityProto is a struct that is equivalent to Quantity, but intended for
    95  // protobuf marshalling/unmarshalling. It is generated into a serialization
    96  // that matches Quantity. Do not use in Go structs.
    97  // 
    98  // +protobuf=true
    99  message QuantityProto {
   100    // The format of the quantity
   101    optional string format = 1;
   102  
   103    // The scale dimension of the value
   104    optional int32 scale = 2;
   105  
   106    // Bigint is serialized as a raw bytes array
   107    optional bytes bigint = 3;
   108  }
   109