github.com/aclisp/heapster@v0.19.2-0.20160613100040-51756f899a96/Godeps/_workspace/src/k8s.io/kubernetes/pkg/runtime/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.runtime;
    23  
    24  import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
    25  import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
    26  
    27  // Package-wide variables from generator "generated".
    28  option go_package = "runtime";
    29  
    30  // RawExtension is used to hold extensions in external versions.
    31  // 
    32  // To use this, make a field which has RawExtension as its type in your external, versioned
    33  // struct, and Object in your internal struct. You also need to register your
    34  // various plugin types.
    35  // 
    36  // // Internal package:
    37  // type MyAPIObject struct {
    38  // 	runtime.TypeMeta `json:",inline"`
    39  // 	MyPlugin runtime.Object `json:"myPlugin"`
    40  // }
    41  // type PluginA struct {
    42  // 	AOption string `json:"aOption"`
    43  // }
    44  // 
    45  // // External package:
    46  // type MyAPIObject struct {
    47  // 	runtime.TypeMeta `json:",inline"`
    48  // 	MyPlugin runtime.RawExtension `json:"myPlugin"`
    49  // }
    50  // type PluginA struct {
    51  // 	AOption string `json:"aOption"`
    52  // }
    53  // 
    54  // // On the wire, the JSON will look something like this:
    55  // {
    56  // 	"kind":"MyAPIObject",
    57  // 	"apiVersion":"v1",
    58  // 	"myPlugin": {
    59  // 		"kind":"PluginA",
    60  // 		"aOption":"foo",
    61  // 	},
    62  // }
    63  // 
    64  // So what happens? Decode first uses json or yaml to unmarshal the serialized data into
    65  // your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.
    66  // The next step is to copy (using pkg/conversion) into the internal struct. The runtime
    67  // package's DefaultScheme has conversion functions installed which will unpack the
    68  // JSON stored in RawExtension, turning it into the correct object type, and storing it
    69  // in the Object. (TODO: In the case where the object is of an unknown type, a
    70  // runtime.Unknown object will be created and stored.)
    71  // 
    72  // +protobuf=true
    73  message RawExtension {
    74    // Raw is the underlying serialization of this object.
    75    // 
    76    // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data.
    77    optional bytes raw = 1;
    78  }
    79  
    80  // TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type,
    81  // like this:
    82  // type MyAwesomeAPIObject struct {
    83  //      runtime.TypeMeta    `json:",inline"`
    84  //      ... // other fields
    85  // }
    86  // func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *unversioned.GroupVersionKind) { unversioned.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind
    87  // 
    88  // TypeMeta is provided here for convenience. You may use it directly from this package or define
    89  // your own with the same fields.
    90  // 
    91  // +protobuf=true
    92  message TypeMeta {
    93    optional string apiVersion = 1;
    94  
    95    optional string kind = 2;
    96  }
    97  
    98  // Unknown allows api objects with unknown types to be passed-through. This can be used
    99  // to deal with the API objects from a plug-in. Unknown objects still have functioning
   100  // TypeMeta features-- kind, version, etc.
   101  // TODO: Make this object have easy access to field based accessors and settors for
   102  // metadata and field mutatation.
   103  // 
   104  // +protobuf=true
   105  message Unknown {
   106    optional TypeMeta typeMeta = 1;
   107  
   108    // Raw will hold the complete serialized object which couldn't be matched
   109    // with a registered type. Most likely, nothing should be done with this
   110    // except for passing it through the system.
   111    optional bytes raw = 2;
   112  
   113    // ContentEncoding is encoding used to encode 'Raw' data.
   114    // Unspecified means no encoding.
   115    optional string contentEncoding = 3;
   116  
   117    // ContentType  is serialization method used to serialize 'Raw'.
   118    // Unspecified means ContentTypeJSON.
   119    optional string contentType = 4;
   120  }
   121